desktop/source/deployment/gui/dp_gui_dialog2.cxx | 17 +++++++++-------- desktop/source/deployment/gui/dp_gui_dialog2.hxx | 1 - desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 2 +- desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 2 +- svtools/inc/svtools/extensionlistbox.hxx | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-)
New commits: commit 1b0109aeda20ec241600972538efc03c87c78733 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Feb 12 15:58:16 2013 +0100 Undefined UpdateRequiredDialog::selectEntry Change-Id: I7319b4bc276a38cf94aa90934529835ac38f57fa diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 023d16d..490ac06 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -225,7 +225,6 @@ public: virtual void updatePackageInfo( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ); - void selectEntry( long nPos ); virtual long addPackageToList( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &, bool bLicenseMissing = false ); bool enablePackage( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage, bool bEnable ); commit 4a6c72e3b1007e713b3797d23df60b3477a47072 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Feb 12 14:15:51 2013 +0100 Clean up EXTENSION_LISTBOX_ENTRY_NOTFOUND Change-Id: Ie491835b854bf59694a20c4f94e2333b72142d08 diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 643e851..63154e7 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -219,7 +219,7 @@ void ExtBoxWithBtns_Impl::RecalcAll() { const sal_Int32 nActive = getSelIndex(); - if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) { SetButtonStatus( GetEntryData( nActive) ); } @@ -232,7 +232,7 @@ void ExtBoxWithBtns_Impl::RecalcAll() ExtensionBox_Impl::RecalcAll(); - if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) SetButtonPos( GetEntryRect( nActive ) ); } @@ -313,7 +313,7 @@ bool ExtBoxWithBtns_Impl::HandleTabKey( bool bReverse ) { sal_Int32 nIndex = getSelIndex(); - if ( nIndex == EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + if ( nIndex == svt::IExtensionListBox::ENTRY_NOTFOUND ) return false; PushButton *pNext = NULL; @@ -417,7 +417,8 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt ) { const SolarMutexGuard aGuard; if ( rMEvt.IsMod1() && HasActive() ) - selectEntry( EXTENSION_LISTBOX_ENTRY_NOTFOUND ); // Selecting an not existing entry will deselect the current one + selectEntry( svt::IExtensionListBox::ENTRY_NOTFOUND ); + // selecting a not existing entry will deselect the current one else selectEntry( nPos ); } @@ -452,7 +453,7 @@ void ExtBoxWithBtns_Impl::enableButtons( bool bEnable ) if ( bEnable ) { sal_Int32 nIndex = getSelIndex(); - if ( nIndex != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + if ( nIndex != svt::IExtensionListBox::ENTRY_NOTFOUND ) SetButtonStatus( GetEntryData( nIndex ) ); } else @@ -486,7 +487,7 @@ IMPL_LINK_NOARG(ExtBoxWithBtns_Impl, HandleOptionsBtn) { const sal_Int32 nActive = getSelIndex(); - if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -509,7 +510,7 @@ IMPL_LINK_NOARG(ExtBoxWithBtns_Impl, HandleEnableBtn) { const sal_Int32 nActive = getSelIndex(); - if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) { TEntry_Impl pEntry = GetEntryData( nActive ); @@ -530,7 +531,7 @@ IMPL_LINK_NOARG(ExtBoxWithBtns_Impl, HandleRemoveBtn) { const sal_Int32 nActive = getSelIndex(); - if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + if ( nActive != svt::IExtensionListBox::ENTRY_NOTFOUND ) { TEntry_Impl pEntry = GetEntryData( nActive ); m_pParent->removePackage( pEntry->m_xPackage ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index b050c06..01fea3e 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -304,7 +304,7 @@ sal_Int32 ExtensionBox_Impl::getSelIndex() const return static_cast< sal_Int32 >( m_nActive ); } else - return static_cast< sal_Int32 >( EXTENSION_LISTBOX_ENTRY_NOTFOUND ); + return ENTRY_NOTFOUND; } //------------------------------------------------------------------------------ diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index bd16bae..b0fda41 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -222,7 +222,7 @@ public: /** @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 EXTENSION_LISTBOX_ENTRY_NOTFOUND */ + then this function returns ENTRY_NOTFOUND */ virtual sal_Int32 getSelIndex() const; /** @return The item name of the entry with the given index diff --git a/svtools/inc/svtools/extensionlistbox.hxx b/svtools/inc/svtools/extensionlistbox.hxx index 950aca2..0202312 100644 --- a/svtools/inc/svtools/extensionlistbox.hxx +++ b/svtools/inc/svtools/extensionlistbox.hxx @@ -28,8 +28,6 @@ namespace svt { -#define EXTENSION_LISTBOX_ENTRY_NOTFOUND (sal_Int32) 0xFFFFFFFF - // ============================================================================ /** This abstract class provides methods to implement an extension list box. @@ -38,6 +36,8 @@ namespace svt class IExtensionListBox: public Control { public: + enum { ENTRY_NOTFOUND = -1 }; + IExtensionListBox( Window* pParent, WinBits nWinStyle = 0 ): Control( pParent, nWinStyle ){} /** @return The count of the entries in the list box. */ @@ -45,7 +45,7 @@ public: /** @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 EXTENSION_LISTBOX_ENTRY_NOTFOUND */ + then this function returns ENTRY_NOTFOUND */ virtual sal_Int32 getSelIndex() const = 0; /** @return The item name of the entry with the given index _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits