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>
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index de42c5f..39c3b0a 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -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;

diff --git a/svx/uiconfig/ui/fontworkalignmentcontrol.ui b/svx/uiconfig/ui/fontworkalignmentcontrol.ui
index 13abbb7..2a8e1c8 100644
--- a/svx/uiconfig/ui/fontworkalignmentcontrol.ui
+++ b/svx/uiconfig/ui/fontworkalignmentcontrol.ui
@@ -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>
@@ -92,23 +87,6 @@
          </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>
            <property name="visible">True</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>