[Libreoffice-commits] core.git: include/vcl sw/source vcl/source vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 7 12:44:55 UTC 2021


 include/vcl/weld.hxx          |    2 --
 sw/source/ui/misc/outline.cxx |    6 ------
 vcl/source/app/salvtables.cxx |   12 ------------
 vcl/unx/gtk3/gtkinst.cxx      |   41 -----------------------------------------
 4 files changed, 61 deletions(-)

New commits:
commit 716c20460372e3f3543f4dc81a49368a5291cd34
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 7 11:30:12 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 7 14:44:23 2021 +0200

    remove [g|s]et_item_help_id for menubutton menu items
    
    a fairly obscure functionality that was used in just one menu that can
    be dropped now that the help is changed to contain references to the
    help ids the menu items already have
    
    Change-Id: I4efa2f11e7d48b398152d7308341bd3e4308c377
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118561
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 4546da76b18e..3e085e0af6aa 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1536,9 +1536,7 @@ public:
     virtual void set_item_active(const OString& rIdent, bool bActive) = 0;
     virtual void set_item_label(const OString& rIdent, const OUString& rLabel) = 0;
     virtual OUString get_item_label(const OString& rIdent) const = 0;
-    virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) = 0;
     virtual void set_item_visible(const OString& rIdent, bool bVisible) = 0;
-    virtual OString get_item_help_id(const OString& rIdent) const = 0;
 
     virtual void set_popover(weld::Widget* pPopover) = 0;
 };
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index ebac78812a6c..506388528608 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -219,12 +219,6 @@ IMPL_LINK_NOARG(SwOutlineTabDialog, FormHdl, weld::Toggleable&, void)
             continue;
         m_xMenuButton->set_item_label("form" + OString::number(i + 1), pRules->GetName());
     }
-
-    OString sHelpId(m_xMenuButton->get_item_help_id("form1"));
-    for (sal_Int32 i = 2; i <= 9; ++i)
-    {
-        m_xMenuButton->set_item_help_id("form" + OString::number(i), sHelpId);
-    }
 }
 
 IMPL_LINK(SwOutlineTabDialog, MenuSelectHdl, const OString&, rIdent, void)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 608baded3b4f..2a93a80711de 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2765,18 +2765,6 @@ public:
         pMenu->ShowItem(pMenu->GetItemId(rIdent), bShow);
     }
 
-    virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) override
-    {
-        PopupMenu* pMenu = m_xMenuButton->GetPopupMenu();
-        pMenu->SetHelpId(pMenu->GetItemId(rIdent), rHelpId);
-    }
-
-    virtual OString get_item_help_id(const OString& rIdent) const override
-    {
-        PopupMenu* pMenu = m_xMenuButton->GetPopupMenu();
-        return pMenu->GetHelpId(pMenu->GetItemId(rIdent));
-    }
-
     virtual void set_popover(weld::Widget* pPopover) override
     {
         SalInstanceWidget* pPopoverWidget = dynamic_cast<SalInstanceWidget*>(pPopover);
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index d80e1a78fbd0..3a48fa2e3c02 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -4916,16 +4916,6 @@ public:
         return OUString(pText, pText ? strlen(pText) : 0, RTL_TEXTENCODING_UTF8);
     }
 
-    void set_item_help_id(const OString& rIdent, const OString& rHelpId)
-    {
-        set_help_id(GTK_WIDGET(m_aMap[rIdent]), rHelpId);
-    }
-
-    OString get_item_help_id(const OString& rIdent) const
-    {
-        return get_help_id(GTK_WIDGET(m_aMap.find(rIdent)->second));
-    }
-
     void set_item_visible(const OString& rIdent, bool bShow)
     {
         GtkWidget* pWidget = GTK_WIDGET(m_aMap[rIdent]);
@@ -9809,27 +9799,6 @@ public:
 #endif
     }
 
-    virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) override
-    {
-#if !GTK_CHECK_VERSION(4, 0, 0)
-        MenuHelper::set_item_help_id(rIdent, rHelpId);
-#else
-        (void)rIdent; (void)rHelpId;
-        std::abort();
-#endif
-    }
-
-    virtual OString get_item_help_id(const OString& rIdent) const override
-    {
-#if !GTK_CHECK_VERSION(4, 0, 0)
-        return MenuHelper::get_item_help_id(rIdent);
-#else
-        (void)rIdent;
-        std::abort();
-        return OString();
-#endif
-    }
-
 #if GTK_CHECK_VERSION(4, 0, 0)
     static void action_activated(GSimpleAction*, GVariant* pParameter, gpointer widget)
     {
@@ -10208,16 +10177,6 @@ public:
         MenuHelper::set_item_visible(rIdent, bVisible);
     }
 
-    virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) override
-    {
-        MenuHelper::set_item_help_id(rIdent, rHelpId);
-    }
-
-    virtual OString get_item_help_id(const OString& rIdent) const override
-    {
-        return MenuHelper::get_item_help_id(rIdent);
-    }
-
     virtual void signal_activate(GtkMenuItem* pItem) override
     {
         signal_selected(::get_buildable_id(GTK_BUILDABLE(pItem)));


More information about the Libreoffice-commits mailing list