diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-12 13:47:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-13 14:39:08 +0200 |
commit | 49057c5bd7fad4ba24efaa7520377986ecbdd11d (patch) | |
tree | 805ae4c02528b21cd9997cfd2e5f9efe777d64f4 /desktop | |
parent | 3f6d9d26d7852ce780615fae4e9be36e9de55959 (diff) |
move IExtensionListBox to where its used
Change-Id: I73401787032643c4881934864d2ec1e0389e2cf2
Reviewed-on: https://gerrit.libreoffice.org/73897
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit d18f31c4c9d6169f48f34bc53615a5a93a822aa7)
Reviewed-on: https://gerrit.libreoffice.org/73938
Tested-by: Jenkins
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 13 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 22 |
3 files changed, 27 insertions, 10 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index eaab2ff54e72..cff9f7b5feb0 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -45,7 +45,6 @@ #include <osl/mutex.hxx> #include <sal/log.hxx> -#include <svtools/extensionlistbox.hxx> #include <svtools/restartdialog.hxx> #include <sfx2/filedlghelper.hxx> @@ -173,7 +172,7 @@ void ExtBoxWithBtns_Impl::RecalcAll() { const sal_Int32 nActive = getSelIndex(); - if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) + if ( nActive != IExtensionListBox::ENTRY_NOTFOUND ) { SetButtonStatus( GetEntryData( nActive) ); } @@ -310,7 +309,7 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt ) { const SolarMutexGuard aGuard; if ( rMEvt.IsMod1() && HasActive() ) - selectEntry( svt::IExtensionListBox::ENTRY_NOTFOUND ); + selectEntry( IExtensionListBox::ENTRY_NOTFOUND ); // selecting a not existing entry will deselect the current one else selectEntry( nPos ); @@ -324,7 +323,7 @@ void ExtBoxWithBtns_Impl::enableButtons( bool bEnable ) if ( bEnable ) { sal_Int32 nIndex = getSelIndex(); - if ( nIndex != svt::IExtensionListBox::ENTRY_NOTFOUND ) + if ( nIndex != IExtensionListBox::ENTRY_NOTFOUND ) SetButtonStatus( GetEntryData( nIndex ) ); } else @@ -911,7 +910,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleOptionsBtn, Button*, void) { const sal_Int32 nActive = m_pExtensionBox->getSelIndex(); - if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) + if ( nActive != IExtensionListBox::ENTRY_NOTFOUND ) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -940,7 +939,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleRemoveBtn, Button*, void) { const sal_Int32 nActive = m_pExtensionBox->getSelIndex(); - if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) + if ( nActive != IExtensionListBox::ENTRY_NOTFOUND ) { TEntry_Impl pEntry = m_pExtensionBox->GetEntryData( nActive ); removePackage( pEntry->m_xPackage ); @@ -951,7 +950,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleEnableBtn, Button*, void) { const sal_Int32 nActive = m_pExtensionBox->getSelIndex(); - if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) + if ( nActive != IExtensionListBox::ENTRY_NOTFOUND ) { TEntry_Impl pEntry = m_pExtensionBox->GetEntryData( nActive ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 6e13917875c8..94fb3069d7f3 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -260,7 +260,7 @@ void ExtensionBox_Impl::dispose() m_pLocale.reset(); m_pCollator.reset(); - ::svt::IExtensionListBox::dispose(); + IExtensionListBox::dispose(); } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 245f1fd4d259..90282c1142be 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -26,7 +26,6 @@ #include <vcl/fixedhyper.hxx> #include <vcl/dialog.hxx> -#include <svtools/extensionlistbox.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/weakref.hxx> #include <unotools/collatorwrapper.hxx> @@ -104,8 +103,27 @@ public: virtual void SAL_CALL disposing(css::lang::EventObject const& evt) override; }; +/** This abstract class provides methods to implement an extension list box. + This header is needed for the automatic test tool +*/ +class IExtensionListBox: public Control +{ +public: + enum { ENTRY_NOTFOUND = -1 }; + + IExtensionListBox( vcl::Window* pParent ): Control( pParent, WB_BORDER | WB_TABSTOP ){} + + /** @return The count of the entries in the list box. */ + virtual sal_Int32 getItemCount() const = 0; + + /** @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 */ + virtual sal_Int32 getSelIndex() const = 0; + +}; -class ExtensionBox_Impl : public ::svt::IExtensionListBox +class ExtensionBox_Impl : public IExtensionListBox { bool m_bHasScrollBar : 1; bool m_bHasActive : 1; |