diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-22 16:00:43 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-29 10:41:38 +0200 |
commit | 641f375bec2fb65d64513ab9d74a3e3ca1489925 (patch) | |
tree | 287fee3f16c37f45170a0c43949b0f4b2786ad7a /svx/source/gallery2 | |
parent | 445b34fb9a882bd04fb53eb629ea246ce02b21aa (diff) |
convert GALLERY_HINT constants to scoped enum
Change-Id: I4e33f2ebfc00d9c5c75ddbb0625aaf7c39802e7f
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 8 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 8 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 18 |
4 files changed, 18 insertions, 18 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 48cbfc6338cd..d3c9e3026c75 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -457,11 +457,11 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint ) switch( rGalleryHint.GetType() ) { - case( GALLERY_HINT_THEME_CREATED ): + case( GalleryHintType::THEME_CREATED ): ImplInsertThemeEntry( mpGallery->GetThemeInfo( rGalleryHint.GetThemeName() ) ); break; - case( GALLERY_HINT_THEME_RENAMED ): + case( GalleryHintType::THEME_RENAMED ): { const sal_uInt16 nCurSelectPos = mpThemes->GetSelectEntryPos(); const sal_uInt16 nRenameEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() ); @@ -477,13 +477,13 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint ) } break; - case( GALLERY_HINT_THEME_REMOVED ): + case( GalleryHintType::THEME_REMOVED ): { mpThemes->RemoveEntry( rGalleryHint.GetThemeName() ); } break; - case( GALLERY_HINT_CLOSE_THEME ): + case( GalleryHintType::CLOSE_THEME ): { const sal_uInt16 nCurSelectPos = mpThemes->GetSelectEntryPos(); const sal_uInt16 nCloseEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() ); diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 4fadfb888cce..80d5d6b308b8 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -556,7 +556,7 @@ void GalleryBrowser2::Notify( SfxBroadcaster&, const SfxHint& rHint ) switch( rGalleryHint.GetType() ) { - case( GALLERY_HINT_THEME_UPDATEVIEW ): + case( GalleryHintType::THEME_UPDATEVIEW ): { if( GALLERYBROWSERMODE_PREVIEW == GetMode() ) SetMode( meLastMode ); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index c9bdb8aebaf8..157da5004a3a 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -519,7 +519,7 @@ bool Gallery::CreateTheme( const OUString& rThemeName ) aThemeList.push_back( pNewEntry ); delete( new GalleryTheme( this, pNewEntry ) ); - Broadcast( GalleryHint( GALLERY_HINT_THEME_CREATED, rThemeName ) ); + Broadcast( GalleryHint( GalleryHintType::THEME_CREATED, rThemeName ) ); bRet = true; } @@ -544,7 +544,7 @@ bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) pThemeEntry->SetName( rNewName ); pThm->ImplWrite(); - Broadcast( GalleryHint( GALLERY_HINT_THEME_RENAMED, aOldName, pThm->GetName() ) ); + Broadcast( GalleryHint( GalleryHintType::THEME_RENAMED, aOldName, pThm->GetName() ) ); ReleaseTheme( pThm, aListener ); bRet = true; } @@ -560,7 +560,7 @@ bool Gallery::RemoveTheme( const OUString& rThemeName ) if( pThemeEntry && !pThemeEntry->IsReadOnly() ) { - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_THEME, rThemeName ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_THEME, rThemeName ) ); SfxListener aListener; GalleryTheme* pThm = AcquireTheme( rThemeName, aListener ); @@ -589,7 +589,7 @@ bool Gallery::RemoveTheme( const OUString& rThemeName ) } } - Broadcast( GalleryHint( GALLERY_HINT_THEME_REMOVED, rThemeName ) ); + Broadcast( GalleryHint( GalleryHintType::THEME_REMOVED, rThemeName ) ); bRet = true; } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 5f7ac24ed52e..c872839b5fe6 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -83,8 +83,8 @@ GalleryTheme::~GalleryTheme() for ( size_t i = 0, n = aObjectList.size(); i < n; ++i ) { GalleryObject* pEntry = aObjectList[ i ]; - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); delete pEntry; } aObjectList.clear(); @@ -339,7 +339,7 @@ void GalleryTheme::ImplBroadcast( sal_uIntPtr nUpdatePos ) if( GetObjectCount() && ( nUpdatePos >= GetObjectCount() ) ) nUpdatePos = GetObjectCount() - 1; - Broadcast( GalleryHint( GALLERY_HINT_THEME_UPDATEVIEW, GetName(), nUpdatePos ) ); + Broadcast( GalleryHint( GalleryHintType::THEME_UPDATEVIEW, GetName(), nUpdatePos ) ); } } @@ -474,8 +474,8 @@ bool GalleryTheme::RemoveObject( size_t nPos ) if( SGA_OBJ_SVDRAW == pEntry->eObjKind ) aSvDrawStorageRef->Remove( pEntry->aURL.GetMainURL( INetURLObject::NO_DECODE ) ); - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); delete pEntry; pEntry = NULL; @@ -599,8 +599,8 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg pEntry = aObjectList[ i ]; if( pEntry->mbDelete ) { - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uLong >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uLong >( pEntry ) ) ); GalleryObjectList::iterator it = aObjectList.begin(); ::std::advance( it, i ); aObjectList.erase( it ); @@ -1408,8 +1408,8 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) for( size_t i = 0, n = aObjectList.size(); i < n; ++i ) { pObj = aObjectList[ i ]; - Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); delete pObj; } aObjectList.clear(); |