summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-27 20:01:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-28 11:40:47 +0100
commit278de7812d88a9f76e2b0ff57c3f4cb1097d4b2f (patch)
tree47596c445208eb9ea4eea1884370734d04198741 /sw/source
parent1ec381335c7b2eef1443ce3756a35c3165b7964a (diff)
tdf#130989 we want to fill the menu when the menubutton is toggled on
Change-Id: I85615277d3367ac679315745b47c1a7327c61903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89648 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/misc/outline.cxx7
-rw-r--r--sw/source/uibase/inc/outline.hxx2
2 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 5647cb61ebd9..d95731321120 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -145,7 +145,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(weld::Window* pParent, const SfxItemSet*
, bModified(rWrtSh.IsModified())
, m_xMenuButton(m_xBuilder->weld_menu_button("format"))
{
- m_xMenuButton->connect_clicked(LINK(this, SwOutlineTabDialog, FormHdl));
+ m_xMenuButton->connect_toggled(LINK(this, SwOutlineTabDialog, FormHdl));
m_xMenuButton->connect_selected(LINK(this, SwOutlineTabDialog, MenuSelectHdl));
xNumRule.reset(new SwNumRule(*rSh.GetOutlineNumRule()));
@@ -206,8 +206,11 @@ IMPL_LINK_NOARG(SwOutlineTabDialog, CancelHdl, weld::Button&, void)
m_xDialog->response(RET_CANCEL);
}
-IMPL_LINK_NOARG(SwOutlineTabDialog, FormHdl, weld::Button&, void)
+IMPL_LINK_NOARG(SwOutlineTabDialog, FormHdl, weld::ToggleButton&, void)
{
+ if (!m_xMenuButton->get_active())
+ return;
+
// fill PopupMenu
for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
{
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index 58f2383936fe..cf0f1818d86d 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -45,7 +45,7 @@ class SwOutlineTabDialog final : public SfxTabDialogController
std::unique_ptr<weld::MenuButton> m_xMenuButton;
DECL_LINK(CancelHdl, weld::Button&, void);
- DECL_LINK(FormHdl, weld::Button&, void);
+ DECL_LINK(FormHdl, weld::ToggleButton&, void);
DECL_LINK(MenuSelectHdl, const OString&, void);
virtual void PageCreated(const OString& rPageId, SfxTabPage& rPage) override;