summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-20 13:00:06 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-05 20:32:50 -0500
commitf372a783d7c3f35b6411e6c7a0b648f73d5248e1 (patch)
treed421745e04ed7648922d62d065be93b80e5945a0 /sfx2/source
parent77d834de0a7ef9a5644bd73b8cba230bde7c93f9 (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> (cherry picked from commit 431598b97b47b13c8b241f587b5eea21bf134893)
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/doc/graphhelp.cxx6
-rw-r--r--sfx2/source/doc/graphhelp.hxx5
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx8
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 ccdd99b16fd5..75946cd30397 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2066,7 +2066,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 );
@@ -2101,7 +2101,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)
{
@@ -2141,7 +2141,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)
{
@@ -2165,7 +2165,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)
{