diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 13:00:06 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-21 09:01:57 +0000 |
commit | 431598b97b47b13c8b241f587b5eea21bf134893 (patch) | |
tree | f94011f51ec2ab79679e7df6133e6ac8f52ba808 /sfx2/source/doc | |
parent | 0cd2895e70eb96083ea78b1350583fe791b4237a (diff) |
convert CVT constants to scoped enum
Change-Id: I7703816b6a1df2bf24c06cdf9992f9982ae724e8
Reviewed-on: https://gerrit.libreoffice.org/15826
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/graphhelp.hxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 8 |
3 files changed, 10 insertions, 9 deletions
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 68fa2f974722..ca19d1bf8ce5 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -55,7 +55,7 @@ using namespace css; -SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, sal_uInt32 nFormat ) +SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, ConvertDataFormat nFormat ) { SvMemoryStream* pResult = NULL; if ( pGDIMeta ) @@ -92,7 +92,7 @@ void* GraphicHelper::getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta ) if ( pStream ) { Graphic aGraph( *pGDIMeta ); - sal_Bool bFailed = (sal_Bool)GraphicConverter::Export( *pStream, aGraph, CVT_EMF ); + sal_Bool bFailed = (sal_Bool)GraphicConverter::Export( *pStream, aGraph, ConvertDataFormat::EMF ); pStream->Flush(); delete pStream; @@ -118,7 +118,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co { SvMemoryStream* pStream = new SvMemoryStream( 65535, 65535 ); Graphic aGraph( *pGDIMeta ); - sal_Bool bFailed = (sal_Bool)GraphicConverter::Export( *pStream, aGraph, CVT_WMF ); + sal_Bool bFailed = (sal_Bool)GraphicConverter::Export( *pStream, aGraph, ConvertDataFormat::WMF ); pStream->Flush(); if ( !bFailed ) { diff --git a/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx index 30201edcbbac..8893bfc714ec 100644 --- a/sfx2/source/doc/graphhelp.hxx +++ b/sfx2/source/doc/graphhelp.hxx @@ -22,17 +22,18 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/io/XStream.hpp> - #include <rtl/ustring.hxx> + class SvMemoryStream; class GDIMetaFile; class BitmapEx; +enum class ConvertDataFormat; class GraphicHelper { public: - static SvMemoryStream* getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, sal_uInt32 nFormat ); + static SvMemoryStream* getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, ConvertDataFormat nFormat ); static void* getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta ); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 20f15ee6aec2..d23b10cb1ce4 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2057,7 +2057,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla { std::shared_ptr<SvMemoryStream> xStream( GraphicHelper::getFormatStrFromGDI_Impl( - xMetaFile.get(), CVT_EMF ) ); + xMetaFile.get(), ConvertDataFormat::EMF ) ); if (xStream) { xStream->SetVersion( SOFFICE_FILEFORMAT_CURRENT ); @@ -2092,7 +2092,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla { std::shared_ptr<SvMemoryStream> xStream( GraphicHelper::getFormatStrFromGDI_Impl( - xMetaFile.get(), CVT_WMF ) ); + xMetaFile.get(), ConvertDataFormat::WMF ) ); if (xStream) { @@ -2132,7 +2132,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla { std::shared_ptr<SvMemoryStream> xStream( GraphicHelper::getFormatStrFromGDI_Impl( - xMetaFile.get(), CVT_BMP ) ); + xMetaFile.get(), ConvertDataFormat::BMP ) ); if (xStream) { @@ -2156,7 +2156,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla { std::shared_ptr<SvMemoryStream> xStream( GraphicHelper::getFormatStrFromGDI_Impl( - xMetaFile.get(), CVT_PNG ) ); + xMetaFile.get(), ConvertDataFormat::PNG ) ); if (xStream) { |