summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-17 09:46:24 +0200
committerNoel Grandin <noel@peralex.com>2016-08-18 08:49:02 +0200
commit7232f03f9a74cc839710d4355470963610aff21d (patch)
treec1bbe4077c9c7206cf2d979489b4610949e0b61f /svx
parenta06a8ecb743aa3ffb1be83fbb98f7aa06bc230cb (diff)
convert SvXMLEmbeddedObjectHelperMode to scoped enum
Change-Id: I12ccc8c7ba0885b3bacd0c17d430a853d327524b
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xml/xmleohlp.cxx20
-rw-r--r--svx/source/xml/xmlexport.cxx4
2 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 7067da149f2a..cd5fc113c771 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -139,7 +139,7 @@ SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() :
maReplacementGraphicsContainerStorageName( XML_CONTAINERSTORAGE_NAME ),
maReplacementGraphicsContainerStorageName60( XML_CONTAINERSTORAGE_NAME_60 ),
mpDocPersist( nullptr ),
- meCreateMode( EMBEDDEDOBJECTHELPER_MODE_READ ),
+ meCreateMode( SvXMLEmbeddedObjectHelperMode::Read ),
mpStreamMap( nullptr )
{
}
@@ -149,7 +149,7 @@ SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper( ::comphelper::IEmbeddedHel
maReplacementGraphicsContainerStorageName( XML_CONTAINERSTORAGE_NAME ),
maReplacementGraphicsContainerStorageName60( XML_CONTAINERSTORAGE_NAME_60 ),
mpDocPersist( nullptr ),
- meCreateMode( EMBEDDEDOBJECTHELPER_MODE_READ ),
+ meCreateMode( SvXMLEmbeddedObjectHelperMode::Read ),
mpStreamMap( nullptr )
{
Init( nullptr, rDocPersist, eCreateMode );
@@ -340,7 +340,7 @@ uno::Reference < embed::XStorage > const & SvXMLEmbeddedObjectHelper::ImplGetCon
{
if( mxContainerStorage.is() &&
!maCurContainerStorageName.isEmpty() &&
- EMBEDDEDOBJECTHELPER_MODE_WRITE == meCreateMode )
+ SvXMLEmbeddedObjectHelperMode::Write == meCreateMode )
{
uno::Reference < embed::XTransactedObject > xTrans( mxContainerStorage, uno::UNO_QUERY );
if ( xTrans.is() )
@@ -349,7 +349,7 @@ uno::Reference < embed::XStorage > const & SvXMLEmbeddedObjectHelper::ImplGetCon
if( !rStorageName.isEmpty() && mxRootStorage.is() )
{
- sal_Int32 nMode = EMBEDDEDOBJECTHELPER_MODE_WRITE == meCreateMode
+ sal_Int32 nMode = SvXMLEmbeddedObjectHelperMode::Write == meCreateMode
? ::embed::ElementModes::READWRITE
: ::embed::ElementModes::READ;
mxContainerStorage = mxRootStorage->openStorageElement( rStorageName,
@@ -455,10 +455,10 @@ OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL(
OUString aContainerStorageName, aObjectStorageName;
if( !ImplGetStorageNames( rURLStr, aContainerStorageName,
aObjectStorageName,
- EMBEDDEDOBJECTHELPER_MODE_WRITE == meCreateMode ) )
+ SvXMLEmbeddedObjectHelperMode::Write == meCreateMode ) )
return sRetURL;
- if( EMBEDDEDOBJECTHELPER_MODE_READ == meCreateMode )
+ if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
{
OutputStorageWrapper_Impl *pOut = nullptr;
SvXMLEmbeddedObjectHelper_Impl::iterator aIter;
@@ -635,7 +635,7 @@ Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName(
{
MutexGuard aGuard( maMutex );
Any aRet;
- if( EMBEDDEDOBJECTHELPER_MODE_READ == meCreateMode )
+ if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
{
Reference < XOutputStream > xStrm;
if( mpStreamMap )
@@ -739,7 +739,7 @@ sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& rURLStr
throw (RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
- if( EMBEDDEDOBJECTHELPER_MODE_READ == meCreateMode )
+ if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
{
return true;
}
@@ -762,7 +762,7 @@ Type SAL_CALL SvXMLEmbeddedObjectHelper::getElementType()
throw (RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
- if( EMBEDDEDOBJECTHELPER_MODE_READ == meCreateMode )
+ if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
return cppu::UnoType<XOutputStream>::get();
else
return cppu::UnoType<XInputStream>::get();
@@ -772,7 +772,7 @@ sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasElements()
throw (RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
- if( EMBEDDEDOBJECTHELPER_MODE_READ == meCreateMode )
+ if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
{
return true;
}
diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx
index 820b545b2ced..0d827a29b6c7 100644
--- a/svx/source/xml/xmlexport.cxx
+++ b/svx/source/xml/xmlexport.cxx
@@ -76,7 +76,7 @@ bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutputSt
::comphelper::IEmbeddedHelper *pPersist = pModel->GetPersist();
if( pPersist )
{
- pObjectHelper = SvXMLEmbeddedObjectHelper::Create( *pPersist, EMBEDDEDOBJECTHELPER_MODE_WRITE );
+ pObjectHelper = SvXMLEmbeddedObjectHelper::Create( *pPersist, SvXMLEmbeddedObjectHelperMode::Write );
xObjectResolver = pObjectHelper;
}
@@ -184,7 +184,7 @@ bool SvxDrawingLayerImport( SdrModel* pModel, const uno::Reference<io::XInputStr
{
pObjectHelper = SvXMLEmbeddedObjectHelper::Create(
*pPersist,
- EMBEDDEDOBJECTHELPER_MODE_READ );
+ SvXMLEmbeddedObjectHelperMode::Read );
xObjectResolver = pObjectHelper;
}