Related: tdf#140387 give toolbuttons a11y names

Change-Id: I046957afaf89e3f88cde4c2a3cffa470af657175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110939
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index ddf2745..0fc589d 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -295,9 +295,6 @@

#define STR_CLOSE_PANE                          NC_("STR_CLOSE_PANE", "Close Pane")

#define SFX_STR_SIDEBAR_MORE_OPTIONS            NC_("SFX_STR_SIDEBAR_MORE_OPTIONS", "More Options")
#define SFX_STR_SIDEBAR_CLOSE_DECK              NC_("SFX_STR_SIDEBAR_CLOSE_DECK", "Close Sidebar Deck")

// Translators: default Impress template names
#define STR_TEMPLATE_NAME1                      NC_("STR_TEMPLATE_NAME1", "")
#define STR_TEMPLATE_NAME2                      NC_("STR_TEMPLATE_NAME2", "Beehive")
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index f7e0a8d..91d95d6 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -119,17 +119,7 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible)

    mbIsCloserVisible = bIsCloserVisible;

    if (mbIsCloserVisible)
    {
        mxToolBox->set_item_visible("button", true);
        mxToolBox->set_item_icon_name("button", "sfx2/res/closedoc.png");
        mxToolBox->set_item_tooltip_text("button",
                                    SfxResId(SFX_STR_SIDEBAR_CLOSE_DECK));
    }
    else
    {
        mxToolBox->set_item_visible("button", false);
    }
    mxToolBox->set_item_visible("button", mbIsCloserVisible);
}

void DeckTitleBar::HandleToolBoxItemClick()
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index a9ddbc7..7f2ff32 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -109,8 +109,6 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName,
            *mxToolBox, *m_xBuilder, msMoreOptionsCommand, rxFrame, rxController, true);

    mxToolBox->set_item_visible(msIdent, true);
    mxToolBox->set_item_icon_name(msIdent, "sfx2/res/symphony/morebutton.png");
    mxToolBox->set_item_tooltip_text(msIdent, SfxResId(SFX_STR_SIDEBAR_MORE_OPTIONS));
}

void PanelTitleBar::HandleToolBoxItemClick()
diff --git a/sfx2/uiconfig/ui/decktitlebar.ui b/sfx2/uiconfig/ui/decktitlebar.ui
index 68ecdc6..bbfcba7 100644
--- a/sfx2/uiconfig/ui/decktitlebar.ui
+++ b/sfx2/uiconfig/ui/decktitlebar.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.1 -->
<!-- Generated with glade 3.38.2 -->
<interface domain="sfx">
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkBox" id="DeckTitleBar">
@@ -61,7 +61,14 @@
          <object class="GtkToolButton" id="button">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="tooltip-text" translatable="yes" context="decktitlebar|SFX_STR_SIDEBAR_CLOSE_DECK">Close Sidebar Deck</property>
            <property name="use-underline">True</property>
            <property name="icon-name">sfx2/res/closedoc.png</property>
            <child internal-child="accessible">
              <object class="AtkObject" id="button-atkobject">
                <property name="AtkObject::accessible-name" translatable="yes" context="decktitlebar|SFX_STR_SIDEBAR_CLOSE_DECK">Close Sidebar Deck</property>
              </object>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
diff --git a/sfx2/uiconfig/ui/paneltitlebar.ui b/sfx2/uiconfig/ui/paneltitlebar.ui
index 6fd6218..2e352bf 100644
--- a/sfx2/uiconfig/ui/paneltitlebar.ui
+++ b/sfx2/uiconfig/ui/paneltitlebar.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.1 -->
<!-- Generated with glade 3.38.2 -->
<interface domain="sfx">
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkBox" id="PanelTitleBar">
@@ -68,7 +68,14 @@
          <object class="GtkToolButton" id="button">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
            <property name="tooltip-text" translatable="yes" context="paneltitlebar|SFX_STR_SIDEBAR_MORE_OPTIONS">More Options</property>
            <property name="use-underline">True</property>
            <property name="icon-name">sfx2/res/symphony/morebutton.png</property>
            <child internal-child="accessible">
              <object class="AtkObject" id="button-atkobject">
                <property name="AtkObject::accessible-name" translatable="yes" context="paneltitlebar|SFX_STR_SIDEBAR_MORE_OPTIONS">More Options</property>
              </object>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
diff --git a/solenv/sanitizers/ui/sfx.suppr b/solenv/sanitizers/ui/sfx.suppr
index 58a6dc1..31def4b 100644
--- a/solenv/sanitizers/ui/sfx.suppr
+++ b/solenv/sanitizers/ui/sfx.suppr
@@ -12,7 +12,6 @@ sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='type'] orphan-label
sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='value'] orphan-label
sfx2/uiconfig/ui/decktitlebar.ui://GtkImage[@id='addonimage'] no-labelled-by
sfx2/uiconfig/ui/decktitlebar.ui://GtkLabel[@id='label'] orphan-label
sfx2/uiconfig/ui/decktitlebar.ui://GtkToolButton[@id='button'] button-no-label
sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showcreate'] orphan-label
sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showmodify'] orphan-label
sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showsigned'] orphan-label
@@ -47,7 +46,6 @@ sfx2/uiconfig/ui/templatepanel.ui://GtkToggleToolButton[@id='6'] button-no-label
sfx2/uiconfig/ui/templatepanel.ui://GtkToggleToolButton[@id='65535'] button-no-label
sfx2/uiconfig/ui/templatedlg.ui://GtkLabel[@id='label1'] orphan-label
sfx2/uiconfig/ui/paneltitlebar.ui://GtkImage[@id='addonimage'] no-labelled-by
sfx2/uiconfig/ui/paneltitlebar.ui://GtkToolButton[@id='button'] button-no-label
sfx2/uiconfig/ui/versioncommentdialog.ui://GtkLabel[@id='timestamp'] orphan-label
sfx2/uiconfig/ui/versioncommentdialog.ui://GtkLabel[@id='author'] orphan-label
sfx2/uiconfig/ui/versioncommentdialog.ui://GtkTextView[@id='textview'] no-labelled-by