diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-22 15:54:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-29 10:41:38 +0200 |
commit | 445b34fb9a882bd04fb53eb629ea246ce02b21aa (patch) | |
tree | bc0f8b469fcb64ac3eaeb8781a369d081af5798b /svx | |
parent | ab1b535fb049f4b6354561e60eb027b4cc691a6c (diff) |
convert SGX_IMPORT constants to scoped enum
Change-Id: I5c80b8b762682bc666761710039b3b57bb3d579d
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 6 | ||||
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 41d86298d1f5..c2e129852585 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -82,10 +82,10 @@ IMPL_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory ) return 0L; } -sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, +GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, OUString& rFilterName, bool bShowProgress ) { - sal_uInt16 nRet = SGA_IMPORT_NONE; + GalleryGraphicImportRet nRet = GalleryGraphicImportRet::NONE; SfxMedium aMedium( rURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ); aMedium.Download(); @@ -101,7 +101,7 @@ sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, if( !rGraphicFilter.ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::NO_DECODE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) ) { rFilterName = rGraphicFilter.GetImportFormatName( nFormat ); - nRet = SGA_IMPORT_FILE; + nRet = GalleryGraphicImportRet::FILE; } } diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 873bbdab54c8..9e300ec629ab 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -278,7 +278,7 @@ SgaObjectBmp::SgaObjectBmp( const INetURLObject& rURL ) Graphic aGraphic; OUString aFilter; - if ( SGA_IMPORT_NONE != GalleryGraphicImport( rURL, aGraphic, aFilter ) ) + if ( GalleryGraphicImportRet::NONE != GalleryGraphicImport( rURL, aGraphic, aFilter ) ) Init( aGraphic, rURL ); } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 263af9ffeebb..5f7ac24ed52e 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -553,7 +553,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg { aGraphic.Clear(); - if ( GalleryGraphicImport( aURL, aGraphic, aFormat ) ) + if ( GalleryGraphicImport( aURL, aGraphic, aFormat ) != GalleryGraphicImportRet::NONE ) { boost::scoped_ptr<SgaObject> pNewObj; @@ -790,7 +790,7 @@ bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgre case( SGA_OBJ_INET ): { OUString aFilterDummy; - bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy, bProgress ) != SGA_IMPORT_NONE ); + bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy, bProgress ) != GalleryGraphicImportRet::NONE ); } break; @@ -1105,12 +1105,12 @@ bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos Graphic aGraphic; OUString aFormat; boost::scoped_ptr<SgaObject> pNewObj; - const sal_uInt16 nImportRet = GalleryGraphicImport( rURL, aGraphic, aFormat ); + const GalleryGraphicImportRet nImportRet = GalleryGraphicImport( rURL, aGraphic, aFormat ); bool bRet = false; - if( nImportRet != SGA_IMPORT_NONE ) + if( nImportRet != GalleryGraphicImportRet::NONE ) { - if ( SGA_IMPORT_INET == nImportRet ) + if ( GalleryGraphicImportRet::INET == nImportRet ) pNewObj.reset((SgaObject*) new SgaObjectINet( aGraphic, rURL, aFormat )); else if ( aGraphic.IsAnimated() ) pNewObj.reset((SgaObject*) new SgaObjectAnim( aGraphic, rURL, aFormat )); |