tdf#145092 - Remove option "Word justify" from FontWork toolbar

Change-Id: Id36f7b1b8313868e730018737b353d92adbde33e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124337
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
This commit is contained in:
4k5h1t 2022-02-13 00:17:13 +05:30 committed by Heiko Tietze
parent d4ce88a364
commit 31180cc24f
2 changed files with 7 additions and 30 deletions

View file

@ -286,7 +286,6 @@ private:
std::unique_ptr<weld::RadioButton> mxLeft;
std::unique_ptr<weld::RadioButton> mxCenter;
std::unique_ptr<weld::RadioButton> mxRight;
std::unique_ptr<weld::RadioButton> mxWord;
std::unique_ptr<weld::RadioButton> mxStretch;
bool mbSettingValue;
@ -305,14 +304,12 @@ FontworkAlignmentWindow::FontworkAlignmentWindow(svt::PopupWindowController* pCo
, mxLeft(m_xBuilder->weld_radio_button("left"))
, mxCenter(m_xBuilder->weld_radio_button("center"))
, mxRight(m_xBuilder->weld_radio_button("right"))
, mxWord(m_xBuilder->weld_radio_button("word"))
, mxStretch(m_xBuilder->weld_radio_button("stretch"))
, mbSettingValue(false)
{
mxLeft->connect_toggled(LINK(this, FontworkAlignmentWindow, SelectHdl));
mxCenter->connect_toggled(LINK(this, FontworkAlignmentWindow, SelectHdl));
mxRight->connect_toggled(LINK(this, FontworkAlignmentWindow, SelectHdl));
mxWord->connect_toggled(LINK(this, FontworkAlignmentWindow, SelectHdl));
mxStretch->connect_toggled(LINK(this, FontworkAlignmentWindow, SelectHdl));
AddStatusListener( gsFontworkAlignment );
@ -328,8 +325,9 @@ void FontworkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled )
mxCenter->set_sensitive(bEnabled);
mxRight->set_active(nSurface == 2 && bEnabled);
mxRight->set_sensitive(bEnabled);
mxWord->set_active(nSurface == 3 && bEnabled);
mxWord->set_sensitive(bEnabled);
//Refer https://bugs.documentfoundation.org/show_bug.cgi?id=145092 for why following lines are commented
//mxWord->set_active(nSurface == 3 && bEnabled);
//mxWord->set_sensitive(bEnabled);
mxStretch->set_active(nSurface == 4 && bEnabled);
mxStretch->set_sensitive(bEnabled);
mbSettingValue = bSettingValue;
@ -364,8 +362,9 @@ IMPL_LINK(FontworkAlignmentWindow, SelectHdl, weld::Toggleable&, rButton, void)
nAlignment = 1;
else if (mxRight->get_active())
nAlignment = 2;
else if (mxWord->get_active())
nAlignment = 3;
//Refer https://bugs.documentfoundation.org/show_bug.cgi?id=145092 for why following lines are commented
//else if (mxWord->get_active())
// nAlignment = 3;
else
nAlignment = 4;

View file

@ -17,11 +17,6 @@
<property name="can_focus">False</property>
<property name="icon_name">svx/res/fontworkalignright_16.png</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">svx/res/fontworkalignjustified_16.png</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can_focus">False</property>
@ -91,23 +86,6 @@
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="word">
<property name="label" translatable="yes" context="fontworkalignmentcontrol|RID_SVXSTR_ALIGN_WORD">_Word Justify</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="image">image4</property>
<property name="use_underline">True</property>
<property name="always_show_image">True</property>
<property name="draw_indicator">True</property>
<property name="group">left</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="stretch">
<property name="label" translatable="yes" context="fontworkalignmentcontrol|RID_SVXSTR_ALIGN_STRETCH">S_tretch Justify</property>
@ -122,7 +100,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="top_attach">3</property>
</packing>
</child>
</object>