sfx2/source/notebookbar/NotebookbarTabControl.cxx | 2 +- vcl/inc/PriorityHBox.hxx | 2 -- vcl/inc/PriorityMergedHBox.hxx | 2 +- vcl/source/control/PriorityHBox.cxx | 11 ----------- 4 files changed, 2 insertions(+), 15 deletions(-)
New commits: commit de426177dcf08925b0a12b437ceb4d0a1eae006e Author: Michael Weghorn <[email protected]> AuthorDate: Thu Nov 21 14:36:47 2024 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Nov 22 00:16:01 2024 +0100 notebookbar: Drop PriorityHBox::GetHiddenCount The method is only used in the PriorityMergedHBox subclass, which overrides the method anyway, so drop the base class implementation. Change-Id: If2c11377b1ca0ac0f3c6cd4fec9890cdcbbce0ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176929 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/inc/PriorityHBox.hxx b/vcl/inc/PriorityHBox.hxx index 8c5529ec8860..ee47b97e350a 100644 --- a/vcl/inc/PriorityHBox.hxx +++ b/vcl/inc/PriorityHBox.hxx @@ -37,8 +37,6 @@ protected: std::vector<vcl::IPrioritable*> m_aSortedChildren; - virtual int GetHiddenCount() const; - virtual void GetChildrenWithPriorities(); public: diff --git a/vcl/inc/PriorityMergedHBox.hxx b/vcl/inc/PriorityMergedHBox.hxx index ed2f105f20f4..c464f0dbdc85 100644 --- a/vcl/inc/PriorityMergedHBox.hxx +++ b/vcl/inc/PriorityMergedHBox.hxx @@ -38,7 +38,7 @@ public: virtual void dispose() override; - int GetHiddenCount() const override; + int GetHiddenCount() const; Size calculateRequisition() const override; diff --git a/vcl/source/control/PriorityHBox.cxx b/vcl/source/control/PriorityHBox.cxx index c893cc8332eb..5b4b19660c4c 100644 --- a/vcl/source/control/PriorityHBox.cxx +++ b/vcl/source/control/PriorityHBox.cxx @@ -45,17 +45,6 @@ void PriorityHBox::Initialize() SetSizeFromParent(); } -int PriorityHBox::GetHiddenCount() const -{ - int nCount = 0; - - for (auto pWindow : m_aSortedChildren) - if (pWindow->IsHidden()) - nCount++; - - return nCount; -} - void PriorityHBox::SetSizeFromParent() { vcl::Window* pParent = GetParent(); commit d723ef639216c0e8e2b82f99bcf2eaf3d6a19c90 Author: Michael Weghorn <[email protected]> AuthorDate: Thu Nov 21 14:04:00 2024 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Nov 22 00:15:53 2024 +0100 notebookbar: Drop unnecessary static_cast Change-Id: If7aa91609409d3ad499a55348545d49d136d6606 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176928 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index b8a82b8bb00f..54279c69226e 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -245,7 +245,7 @@ void NotebookbarTabControl::StateChanged(StateChangedType nStateChange) VclPtr<ShortcutsToolBox> pShortcuts = VclPtr<ShortcutsToolBox>::Create( this ); pShortcuts->Show(); - SetToolBox( static_cast<ToolBox*>( pShortcuts.get() ) ); + SetToolBox(pShortcuts.get()); SetIconClickHdl( LINK( this, NotebookbarTabControl, OpenNotebookbarPopupMenu ) ); m_pListener = new ChangedUIEventListener( this );
