desktop/source/deployment/gui/dp_gui_dialog2.cxx    |   12 +++----
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx |    4 +-
 desktop/source/deployment/gui/dp_gui_extlistbox.hxx |   31 +++++---------------
 3 files changed, 16 insertions(+), 31 deletions(-)

New commits:
commit c1080bf3e3afba17889d8438b35373d0bf768307
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jun 12 13:52:32 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jun 13 09:58:31 2019 +0200

    drop intermediate IExtensionListBox class
    
    Change-Id: I415645fd61113577deef404cceb02d72d541291d
    Reviewed-on: https://gerrit.libreoffice.org/73898
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 85e686775f72..da0a3cf3a1a8 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;
 };
 
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to