summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-12 13:52:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-06-13 22:16:33 +0200
commit68034f4f4f4187ba66adf8f5ea8064643671f324 (patch)
treec9a56f914d393a39793d64fb7ec1e4f2e04c6820 /desktop
parentc0ac81cdce09823861042441dc4deb71357aa395 (diff)
drop intermediate IExtensionListBox class
Change-Id: I415645fd61113577deef404cceb02d72d541291d Reviewed-on: https://gerrit.libreoffice.org/73974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx12
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx31
3 files changed, 16 insertions, 31 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index cff9f7b5feb0..778b141ee671 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -172,7 +172,7 @@ void ExtBoxWithBtns_Impl::RecalcAll()
{
const sal_Int32 nActive = getSelIndex();
- if ( nActive != IExtensionListBox::ENTRY_NOTFOUND )
+ if ( nActive != ExtensionBox_Impl::ENTRY_NOTFOUND )
{
SetButtonStatus( GetEntryData( nActive) );
}
@@ -309,7 +309,7 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt )
{
const SolarMutexGuard aGuard;
if ( rMEvt.IsMod1() && HasActive() )
- selectEntry( IExtensionListBox::ENTRY_NOTFOUND );
+ selectEntry( ExtensionBox_Impl::ENTRY_NOTFOUND );
// selecting a not existing entry will deselect the current one
else
selectEntry( nPos );
@@ -323,7 +323,7 @@ void ExtBoxWithBtns_Impl::enableButtons( bool bEnable )
if ( bEnable )
{
sal_Int32 nIndex = getSelIndex();
- if ( nIndex != IExtensionListBox::ENTRY_NOTFOUND )
+ if ( nIndex != ExtensionBox_Impl::ENTRY_NOTFOUND )
SetButtonStatus( GetEntryData( nIndex ) );
}
else
@@ -910,7 +910,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleOptionsBtn, Button*, void)
{
const sal_Int32 nActive = m_pExtensionBox->getSelIndex();
- if ( nActive != IExtensionListBox::ENTRY_NOTFOUND )
+ if ( nActive != ExtensionBox_Impl::ENTRY_NOTFOUND )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -939,7 +939,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleRemoveBtn, Button*, void)
{
const sal_Int32 nActive = m_pExtensionBox->getSelIndex();
- if ( nActive != IExtensionListBox::ENTRY_NOTFOUND )
+ if ( nActive != ExtensionBox_Impl::ENTRY_NOTFOUND )
{
TEntry_Impl pEntry = m_pExtensionBox->GetEntryData( nActive );
removePackage( pEntry->m_xPackage );
@@ -950,7 +950,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleEnableBtn, Button*, void)
{
const sal_Int32 nActive = m_pExtensionBox->getSelIndex();
- if ( nActive != IExtensionListBox::ENTRY_NOTFOUND )
+ if ( nActive != ExtensionBox_Impl::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 94fb3069d7f3..9d987b18bfce 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -176,7 +176,7 @@ ExtensionRemovedListener::~ExtensionRemovedListener()
// ExtensionBox_Impl
ExtensionBox_Impl::ExtensionBox_Impl(vcl::Window* pParent) :
- IExtensionListBox( pParent ),
+ Control( pParent, WB_BORDER | WB_TABSTOP ),
m_bHasScrollBar( false ),
m_bHasActive( false ),
m_bNeedsRecalc( true ),
@@ -260,7 +260,7 @@ void ExtensionBox_Impl::dispose()
m_pLocale.reset();
m_pCollator.reset();
- IExtensionListBox::dispose();
+ Control::dispose();
}
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 90282c1142be..79397f30ddbb 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -103,27 +103,7 @@ 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 IExtensionListBox
+class ExtensionBox_Impl : public Control
{
bool m_bHasScrollBar : 1;
bool m_bHasActive : 1;
@@ -213,14 +193,19 @@ public:
void setExtensionManager(TheExtensionManager* pManager) { m_pManager = pManager; }
//These functions are used for automatic testing
+public:
+ enum { ENTRY_NOTFOUND = -1 };
/** @return The count of the entries in the list box. */
- virtual sal_Int32 getItemCount() const override;
+ virtual 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 */
- virtual sal_Int32 getSelIndex() const override;
+ /** @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;
};
}