[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 28 16:56:21 UTC 2020
sw/source/ui/misc/outline.cxx | 7 +++++--
sw/source/uibase/inc/outline.hxx | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit b93ecc2179c1fe0cab9f504f621d676594d10bd6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Feb 27 20:01:42 2020 +0000
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Fri Feb 28 17:55:49 2020 +0100
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/+/89669
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index e4e3f8083de1..8c4a92fdfaff 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -148,7 +148,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()));
@@ -209,8 +209,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 f57ce394cbf7..1ae10fd4ebb4 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;
More information about the Libreoffice-commits
mailing list