cui/source/inc/macropg.hxx | 2 -- include/vcl/toolkit/svtabbx.hxx | 3 +-- vcl/inc/accessibility/accessibletablistbox.hxx | 2 -- vcl/inc/treeglue.hxx | 4 ++-- vcl/source/treelist/svtabbx.cxx | 16 ++++++---------- vcl/source/window/builder.cxx | 3 +-- 6 files changed, 10 insertions(+), 20 deletions(-)
New commits: commit aa3416b59abfde102e8589f53f75089cadffc242 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jan 31 15:11:07 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Feb 4 00:39:31 2025 +0100 cui: Drop unnecessary forward declarations The SvTabListBox one is unused. SvxMacroTabPage_ is declared just below. Change-Id: I0fd8e3be7967b533aa0268833d98833d15b3903b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181021 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx index 86d93115b416..02d10e1fd879 100644 --- a/cui/source/inc/macropg.hxx +++ b/cui/source/inc/macropg.hxx @@ -33,8 +33,6 @@ typedef std::pair<OUString, OUString> EventPair; typedef std::unordered_map<OUString, EventPair> EventsHash; -class SvxMacroTabPage_; -class SvTabListBox; class SvxMacroTabPage_Impl; commit 6b67cef4fa7aaebaacfdc8715594d22a186555ce Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jan 31 15:07:07 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Feb 4 00:39:25 2025 +0100 vcl: SvHeaderTabListBox: Pass HeaderBar in ctor ... instead of having a separate method SvHeaderTabListBox::InitHeaderBar that gets called right after the ctor. Change-Id: Ie4c523448dd11e58718c94d0b74888faa8984fd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181020 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx index 0de912c20c21..4e6eb66b2969 100644 --- a/include/vcl/toolkit/svtabbx.hxx +++ b/include/vcl/toolkit/svtabbx.hxx @@ -106,13 +106,12 @@ private: void RecalculateAccessibleChildren(); public: - SvHeaderTabListBox( vcl::Window* pParent, WinBits nBits ); + SvHeaderTabListBox(vcl::Window* pParent, WinBits nBits, HeaderBar* pHeaderBar); virtual ~SvHeaderTabListBox() override; virtual void dispose() override; virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; - void InitHeaderBar(HeaderBar* pHeaderBar); HeaderBar* GetHeaderBar(); static bool IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol ); diff --git a/vcl/inc/treeglue.hxx b/vcl/inc/treeglue.hxx index 6e3930a017df..16fc52a3a7ed 100644 --- a/vcl/inc/treeglue.hxx +++ b/vcl/inc/treeglue.hxx @@ -22,8 +22,8 @@ private: Link<const IterString&, bool> m_aEditedEntryHdl; public: - LclHeaderTabListBox(vcl::Window* pParent, WinBits nWinStyle) - : SvHeaderTabListBox(pParent, nWinStyle) + LclHeaderTabListBox(vcl::Window* pParent, WinBits nWinStyle, HeaderBar* pHeaderBar) + : SvHeaderTabListBox(pParent, nWinStyle, pHeaderBar) { } diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index c0d5c90e8a10..04f359d1696e 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -549,11 +549,16 @@ namespace vcl }; } -SvHeaderTabListBox::SvHeaderTabListBox( vcl::Window* pParent, WinBits nWinStyle ) +SvHeaderTabListBox::SvHeaderTabListBox(vcl::Window* pParent, WinBits nWinStyle, HeaderBar* pHeaderBar) : SvTabListBox(pParent, nWinStyle) , m_bFirstPaint(true) , m_pImpl(new ::vcl::SvHeaderTabListBoxImpl) { + + assert(pHeaderBar); + m_pImpl->m_pHeaderBar = pHeaderBar; + SetScrolledHdl(LINK(this, SvHeaderTabListBox, ScrollHdl_Impl)); + m_pImpl->m_pHeaderBar->SetCreateAccessibleHdl(LINK(this, SvHeaderTabListBox, CreateAccessibleHdl_Impl)); } SvHeaderTabListBox::~SvHeaderTabListBox() @@ -581,15 +586,6 @@ void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const tools: SvTabListBox::Paint(rRenderContext, rRect); } -void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar ) -{ - DBG_ASSERT( !m_pImpl->m_pHeaderBar, "header bar already initialized" ); - DBG_ASSERT( pHeaderBar, "invalid header bar initialization" ); - m_pImpl->m_pHeaderBar = pHeaderBar; - SetScrolledHdl( LINK( this, SvHeaderTabListBox, ScrollHdl_Impl ) ); - m_pImpl->m_pHeaderBar->SetCreateAccessibleHdl( LINK( this, SvHeaderTabListBox, CreateAccessibleHdl_Impl ) ); -} - HeaderBar* SvHeaderTabListBox::GetHeaderBar() { return m_pImpl ? m_pImpl->m_pHeaderBar : nullptr; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 871a90a603d2..763654d8bd50 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1743,8 +1743,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString xHeader->SetHelpId(getHelpRoot() + headerid); m_aChildren.emplace_back(headerid, xHeader, true); - VclPtr<LclHeaderTabListBox> xHeaderBox = VclPtr<LclHeaderTabListBox>::Create(xContainer, nWinStyle); - xHeaderBox->InitHeaderBar(xHeader); + VclPtr<LclHeaderTabListBox> xHeaderBox = VclPtr<LclHeaderTabListBox>::Create(xContainer, nWinStyle, xHeader); xContainer->set_expand(true); xHeader->Show(); xContainer->Show(); commit b671f7f47036fe08bf4edd1a21ed014026f604ca Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jan 31 12:39:09 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Feb 4 00:39:18 2025 +0100 a11y: Drop obsolete comment mentioning IAccessibleTabListBox Obsolete since: commit eaaa5d04a27270ad13d5e470ed5f50d418e6fa4d Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Jan 28 13:54:14 2025 +0100 a11y: Drop IAccessibleTabListBox iface Change-Id: I4b6e88be79872d6bacd0852d61d04d4ded350265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181019 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/inc/accessibility/accessibletablistbox.hxx b/vcl/inc/accessibility/accessibletablistbox.hxx index 63ba024db8cc..3edd331b3f6c 100644 --- a/vcl/inc/accessibility/accessibletablistbox.hxx +++ b/vcl/inc/accessibility/accessibletablistbox.hxx @@ -53,8 +53,6 @@ public: // XAccessibleContext css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override; - // IAccessibleTabListBox - css::uno::Reference< css::accessibility::XAccessible > getHeaderBar() {