cui/source/inc/cuitabline.hxx | 2 +- cui/source/tabpages/tpline.cxx | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-)
New commits: commit 4e79b53e33883b5d77a2868632c42410169c5dcb Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Aug 27 16:51:04 2024 +0200 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Wed Aug 28 12:35:02 2024 +0200 tdf#161805 cui: Populate line tab menus when page gets created Since commit f075fa01cb4f74185f13eb0a8d7f84cf1f47af49 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Aug 22 10:26:32 2023 +0200 tdf#141101 tdf#101886 a11y: Restore previous focus on col/line popup close , the menu button toggled handler is no more called before the menu shows. `SvxLineTabPage` was relying on the old behavior and only populating the menu entries in the handler, resulting in them not being present any more the first time the menu gets opened after the above commit. Populate the menu items when the tab page gets created instead, by changing the handler to a regular method `SvxLineTabPage::PopulateMenus` that gets called from `SvxLineTabPage::Construct` (which already takes care of updating the list boxes in the tab page). Move the call to `SvxLineTabPage::Construct` to the end of `SvxLineTabPage::PageCreated`, as `SvxLineTabPage::PopulateMenus` makes use of `m_pSymbolList` and `m_xSymbolAttr` that were previously only set after the call to `SvxLineTabPage::Construct`. Change-Id: I521a50f3a3695f20f789add89ffd88749e3b5cd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172472 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> (cherry picked from commit de1c7a2f54117202d91b1d2d693fa4c1a761aa87) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172488 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 1122a2017f00..5cd3b0fdb044 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -172,7 +172,6 @@ private: // handler for gallery popup menu button + size DECL_LINK(GraphicHdl_Impl, const OUString&, void); DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton&, void); - DECL_LINK(MenuCreateHdl_Impl, weld::Toggleable&, void); DECL_LINK(RatioHdl_Impl, weld::Toggleable&, void); DECL_LINK(ClickInvisibleHdl_Impl, weld::ComboBox&, void); @@ -196,6 +195,7 @@ private: void FillXLSet_Impl(); void FillListboxes(); + void PopulateMenus(); public: void ShowSymbolControls(bool bOn); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 37fe8ef913b0..d7d752d6c05f 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -181,7 +181,6 @@ SvxLineTabPage::SvxLineTabPage(weld::Container* pPage, weld::DialogController* p // Symbols on a line (eg star charts), MB-handler set m_xSymbolMB->connect_selected(LINK(this, SvxLineTabPage, GraphicHdl_Impl)); - m_xSymbolMB->connect_toggled(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl)); m_xSymbolWidthMF->connect_value_changed(LINK(this, SvxLineTabPage, SizeHdl_Impl)); m_xSymbolHeightMF->connect_value_changed(LINK(this, SvxLineTabPage, SizeHdl_Impl)); m_xSymbolRatioCB->connect_toggled(LINK(this, SvxLineTabPage, RatioHdl_Impl)); @@ -215,6 +214,7 @@ SvxLineTabPage::~SvxLineTabPage() void SvxLineTabPage::Construct() { FillListboxes(); + PopulateMenus(); } void SvxLineTabPage::FillListboxes() @@ -1377,9 +1377,7 @@ void SvxLineTabPage::FillUserData() } // #58425# Symbols on a list (e.g. StarChart) -// Handler for the symbol selection's popup menu (NumMenueButton) -// The following link originates from SvxNumOptionsTabPage -IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::Toggleable&, void) +void SvxLineTabPage::PopulateMenus() { ScopedVclPtrInstance< VirtualDevice > pVD; @@ -1683,7 +1681,6 @@ void SvxLineTabPage::PageCreated(const SfxAllItemSet& aSet) SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if (pDlgTypeItem) SetDlgType(pDlgTypeItem->GetValue()); - Construct(); if(pSdrObjListItem) //symbols { @@ -1694,6 +1691,8 @@ void SvxLineTabPage::PageCreated(const SfxAllItemSet& aSet) if(pGraphicItem) m_aAutoSymbolGraphic = pGraphicItem->GetGraphic(); } + + Construct(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */