desktop/source/deployment/gui/dp_gui_dialog2.cxx | 2 +- desktop/source/deployment/gui/dp_gui_extensionboxwithbuttons.cxx | 2 +- desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 6 ------ desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 7 +------ 4 files changed, 3 insertions(+), 14 deletions(-)
New commits: commit 78f3bdc05a89670d937874de194d5c66889923fd Author: Michael Weghorn <[email protected]> AuthorDate: Thu Oct 16 18:37:03 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Sat Oct 18 00:48:35 2025 +0200 extension mgr: Drop misleading comment about automatic testing This ExtensionBox::getSelIndex is not used for automatic testing these days, so drop the comment suggesting this. Change-Id: I1fa0658fc999dc2a88766b86158aa3b2b2380969 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192522 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 1fc838b27ccf..8362564e78af 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -186,7 +186,6 @@ public: void prepareChecking(); void checkEntries(); - //These functions are used for automatic testing public: enum { ENTRY_NOTFOUND = -1 }; commit dbe9fd8f1d9cef6dcf425bb7fcdbf500815f54b6 Author: Michael Weghorn <[email protected]> AuthorDate: Thu Oct 16 18:33:05 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Sat Oct 18 00:48:25 2025 +0200 extension mgr: Drop ExtensionBox::getItemCount There is already ExtensionBox::GetEntryCount to get the entry count, so use that one everywhere and drop ExtensionBox::getItemCount. Change-Id: Ie016394bb7052d15da33ae4c2c999c4fa8674ab3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192521 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 3f900f471b00..a8db569efcfa 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -606,7 +606,7 @@ IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface, void ) m_xAddBtn->set_tooltip_text(u""_ustr); } - m_xUpdateBtn->set_sensitive( !bLockInterface && m_xExtensionBox->getItemCount() ); + m_xUpdateBtn->set_sensitive(!bLockInterface && m_xExtensionBox->GetEntryCount()); m_xExtensionBox->enableButtons( !bLockInterface ); clearEventID(); diff --git a/desktop/source/deployment/gui/dp_gui_extensionboxwithbuttons.cxx b/desktop/source/deployment/gui/dp_gui_extensionboxwithbuttons.cxx index 4c8c30732646..992f533a078f 100644 --- a/desktop/source/deployment/gui/dp_gui_extensionboxwithbuttons.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensionboxwithbuttons.cxx @@ -154,7 +154,7 @@ bool ExtensionBoxWithButtons::Command(const CommandEvent& rCEvt) OUString ExtensionBoxWithButtons::ShowPopupMenu(const Point& rPos, const tools::Long nPos) { - if ( nPos >= static_cast<tools::Long>(getItemCount()) ) + if (nPos >= GetEntryCount()) return u"CMD_NONE"_ustr; std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"desktop/ui/extensionmenu.ui"_ustr)); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 33849b7cc776..f4a81504be4c 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -241,12 +241,6 @@ ExtensionBox::~ExtensionBox() m_oCollator.reset(); } -sal_Int32 ExtensionBox::getItemCount() const -{ - return static_cast< sal_Int32 >( m_vEntries.size() ); -} - - sal_Int32 ExtensionBox::getSelIndex() const { assert(m_nActive >= -1); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 88e9423482e6..1fc838b27ccf 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -190,12 +190,8 @@ public: public: enum { ENTRY_NOTFOUND = -1 }; - /** @return The count of the entries in the list box. */ - sal_Int32 getItemCount() const; - /** @return The index of the first selected entry in the list box. - When nothing is selected, which is the case when getItemCount returns '0', - then this function returns ENTRY_NOTFOUND */ + When nothing is selected, then this function returns ENTRY_NOTFOUND. */ sal_Int32 getSelIndex() const; };
