diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-13 09:49:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-13 20:08:09 +0100 |
commit | 3f7fbae1bc38d528080552a715af187285f47028 (patch) | |
tree | 78feab9b381f9c961c04d840a435e14cea9dedb9 | |
parent | ac863696a697b8007a7ee525127fb571d84d1b88 (diff) |
sal_uIntPtr->void* in GalleryHint
Change-Id: I50528411bb76d5a204a5e52c4d77a7ecaf7f5ddf
Reviewed-on: https://gerrit.libreoffice.org/46390
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/svx/galmisc.hxx | 8 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 18 | ||||
-rw-r--r-- | svx/source/unogallery/unogaltheme.cxx | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 602c8283550f..f0823ae6553a 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -180,20 +180,20 @@ private: GalleryHintType mnType; OUString maThemeName; OUString maStringData; - sal_uIntPtr mnData1; + void* mnData1; public: - GalleryHint( GalleryHintType nType, const OUString& rThemeName, sal_uIntPtr nData1 = 0 ) : + GalleryHint( GalleryHintType nType, const OUString& rThemeName, void* nData1 = nullptr ) : mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ) {} - GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData, sal_uIntPtr nData1 = 0 ) : + GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData, void* nData1 = nullptr ) : mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nData1 ) {} GalleryHintType GetType() const { return mnType; } const OUString& GetThemeName() const { return maThemeName; } const OUString& GetStringData() const { return maStringData; } - sal_uIntPtr GetData1() const { return mnData1; } + void* GetData1() const { return mnData1; } }; #endif diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 0a77441323f4..b6feefd016ad 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -518,7 +518,7 @@ void GalleryBrowser2::Notify( SfxBroadcaster&, const SfxHint& rHint ) if( GALLERYBROWSERMODE_PREVIEW == GetMode() ) SetMode( meLastMode ); - ImplUpdateViews( (sal_uInt16) rGalleryHint.GetData1() + 1 ); + ImplUpdateViews( reinterpret_cast<size_t>(rGalleryHint.GetData1()) + 1 ); } break; diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 84b693fc6851..3c0800493f79 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -80,8 +80,8 @@ GalleryTheme::~GalleryTheme() for (GalleryObject* pEntry : aObjectList) { - Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); - Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), pEntry ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), pEntry ) ); delete pEntry; } aObjectList.clear(); @@ -336,7 +336,7 @@ void GalleryTheme::ImplBroadcast( sal_uIntPtr nUpdatePos ) if( GetObjectCount() && ( nUpdatePos >= GetObjectCount() ) ) nUpdatePos = GetObjectCount() - 1; - Broadcast( GalleryHint( GalleryHintType::THEME_UPDATEVIEW, GetName(), nUpdatePos ) ); + Broadcast( GalleryHint( GalleryHintType::THEME_UPDATEVIEW, GetName(), reinterpret_cast<void*>(nUpdatePos) ) ); } } @@ -471,8 +471,8 @@ bool GalleryTheme::RemoveObject( size_t nPos ) if( SgaObjKind::SvDraw == pEntry->eObjKind ) aSvDrawStorageRef->Remove( pEntry->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); - Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); - Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), pEntry ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), pEntry ) ); delete pEntry; pEntry = nullptr; @@ -596,8 +596,8 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize { if( (*it)->mbDelete ) { - Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( *it ) ) ); - Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uLong >( *it ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), *it ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), *it ) ); delete *it; it = aObjectList.erase( it ); } @@ -1389,8 +1389,8 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) for(GalleryObject* i : aObjectList) { pObj = i; - Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); - Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); + Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), pObj ) ); + Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), pObj ) ); delete pObj; } aObjectList.clear(); diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index 713f6d7f826a..404a9bb897dd 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -316,7 +316,7 @@ void GalleryTheme::Notify( SfxBroadcaster&, const SfxHint& rHint ) case GalleryHintType::CLOSE_OBJECT: { - GalleryObject* pObj = reinterpret_cast< GalleryObject* >( rGalleryHint.GetData1() ); + GalleryObject* pObj = static_cast< GalleryObject* >( rGalleryHint.GetData1() ); if( pObj ) implReleaseItems( pObj ); |