summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-28 14:22:51 +0200
committerNoel Grandin <noel@peralex.com>2015-01-06 10:59:42 +0200
commitc29657e0d6bb707345584ac7a7f5ae5016f37297 (patch)
tree89cd11551729836a979570744da3c81090e330dd /sc/source
parentec5bf66d366cd42774a87465e1187271f48a4ab1 (diff)
fdo#84938: convert EXPORT_ #defines to 'enum class'
Change-Id: I2ed239fa073b5fa8fb56c1af9d4b0bac89acfacf
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx40
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx2
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx2
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx2
5 files changed, 24 insertions, 24 deletions
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 4330c970dc15..6b123383c386 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -195,7 +195,7 @@ void ScChangeTrackingExportHelper::WriteDepending(const ScChangeAction* pDependA
// #i80033# save old "dependence" element if backward compatibility is requested,
// correct "dependency" element otherwise
- const bool bSaveBackwardsCompatible = ( rExport.getExportFlags() & EXPORT_SAVEBACKWARDCOMPATIBLE );
+ const bool bSaveBackwardsCompatible = bool( rExport.getExportFlags() & SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE );
SvXMLElementExport aDependElem(rExport, XML_NAMESPACE_TABLE,
bSaveBackwardsCompatible ? XML_DEPENDENCE : XML_DEPENDENCY,
true, true);
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index d731f23c967e..84f4de11da42 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -259,7 +259,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw(uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_getImplementationName(), EXPORT_ALL );
+ return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_getImplementationName(), SvXMLExportFlags::ALL );
}
OUString SAL_CALL ScXMLOOoExport_Meta_getImplementationName() throw()
@@ -277,7 +277,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Meta_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw (uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Meta_getImplementationName(), EXPORT_META );
+ return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Meta_getImplementationName(), SvXMLExportFlags::META );
}
OUString SAL_CALL ScXMLOOoExport_Styles_getImplementationName() throw()
@@ -295,7 +295,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Styles_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw (uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Styles_getImplementationName(), EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_FONTDECLS);
+ return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Styles_getImplementationName(), SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS);
}
OUString SAL_CALL ScXMLOOoExport_Content_getImplementationName() throw()
@@ -313,7 +313,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Content_createInstance
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw (uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Content_getImplementationName(), EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_FONTDECLS);
+ return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS);
}
OUString SAL_CALL ScXMLOOoExport_Settings_getImplementationName() throw()
@@ -331,7 +331,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Settings_createInstanc
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw( uno::Exception, std::exception )
{
- return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Settings_getImplementationName(), EXPORT_SETTINGS );
+ return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Settings_getImplementationName(), SvXMLExportFlags::SETTINGS );
}
// Oasis Filter
@@ -352,7 +352,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw (uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_getImplementationName(), EXPORT_ALL|EXPORT_OASIS);
+ return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_getImplementationName(), SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS);
}
OUString SAL_CALL ScXMLOasisExport_Meta_getImplementationName() throw()
@@ -371,7 +371,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Meta_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw (uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Meta_getImplementationName(), EXPORT_META|EXPORT_OASIS);
+ return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Meta_getImplementationName(), SvXMLExportFlags::META|SvXMLExportFlags::OASIS);
}
OUString SAL_CALL ScXMLOasisExport_Styles_getImplementationName() throw()
@@ -390,7 +390,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Styles_createInstanc
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw( uno::Exception, std::exception )
{
- return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Styles_getImplementationName(), EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_FONTDECLS|EXPORT_OASIS);
+ return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Styles_getImplementationName(), SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS);
}
OUString SAL_CALL ScXMLOasisExport_Content_getImplementationName() throw()
@@ -409,7 +409,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Content_createInstan
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw (uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Content_getImplementationName(), EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_FONTDECLS|EXPORT_OASIS);
+ return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS);
}
OUString SAL_CALL ScXMLOasisExport_Settings_getImplementationName() throw()
@@ -428,7 +428,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Settings_createInsta
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
throw (uno::Exception, std::exception)
{
- return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Settings_getImplementationName(), EXPORT_SETTINGS|EXPORT_OASIS);
+ return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Settings_getImplementationName(), SvXMLExportFlags::SETTINGS|SvXMLExportFlags::OASIS);
}
class ScXMLShapeExport : public XMLShapeExport
@@ -466,7 +466,7 @@ sal_Int16 ScXMLExport::GetMeasureUnit()
// #110680#
ScXMLExport::ScXMLExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
- OUString const & implementationName, sal_uInt16 nExportFlag)
+ OUString const & implementationName, SvXMLExportFlags nExportFlag)
: SvXMLExport( GetMeasureUnit(),
xContext, implementationName, XML_SPREADSHEET, nExportFlag ),
pDoc(NULL),
@@ -495,7 +495,7 @@ ScXMLExport::ScXMLExport(
bRowHeaderOpen(false),
mbShowProgress( false )
{
- if (getExportFlags() & EXPORT_CONTENT)
+ if (getExportFlags() & SvXMLExportFlags::CONTENT)
{
pGroupColumns = new ScMyOpenCloseColumnRowGroup(*this, XML_TABLE_COLUMN_GROUP);
pGroupRows = new ScMyOpenCloseColumnRowGroup(*this, XML_TABLE_ROW_GROUP);
@@ -531,7 +531,7 @@ ScXMLExport::ScXMLExport(
GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME),
xTableStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX));
- if( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
+ if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
{
// This name is reserved for the external ref cache tables. This
// should not conflict with user-defined styles since this name is
@@ -1888,7 +1888,7 @@ void ScXMLExport::CopySourceStream( sal_Int32 nStartOffset, sal_Int32 nEndOffset
// temporary: set same stream again to clear buffer
xDestSource->setOutputStream( xDestStream );
- if ( getExportFlags() & EXPORT_PRETTY )
+ if ( getExportFlags() & SvXMLExportFlags::PRETTY )
{
const OString aOutStr("\n ");
uno::Sequence<sal_Int8> aOutSeq( (sal_Int8*)aOutStr.getStr(), aOutStr.getLength() );
@@ -2322,7 +2322,7 @@ void ScXMLExport::_ExportAutoStyles()
if (!xIndex.is())
return;
- if (getExportFlags() & EXPORT_CONTENT)
+ if (getExportFlags() & SvXMLExportFlags::CONTENT)
{
// re-create automatic styles with old names from stored data
ScSheetSaveData* pSheetData = ScModelObj::getImplementation(xSpreadDoc)->GetSheetSaveData();
@@ -2737,7 +2737,7 @@ void ScXMLExport::_ExportAutoStyles()
}
}
- if (getExportFlags() & EXPORT_MASTERSTYLES)
+ if (getExportFlags() & SvXMLExportFlags::MASTERSTYLES)
{
GetPageExport()->collectAutoStyles(true);
GetPageExport()->exportAutoStyles();
@@ -2745,7 +2745,7 @@ void ScXMLExport::_ExportAutoStyles()
// #i30251#; only write Text Styles once
- if ((getExportFlags() & EXPORT_CONTENT) || (getExportFlags() & EXPORT_MASTERSTYLES))
+ if ((getExportFlags() & SvXMLExportFlags::CONTENT) || (getExportFlags() & SvXMLExportFlags::MASTERSTYLES))
GetTextParagraphExport()->exportTextAutoStyles();
}
@@ -5021,8 +5021,8 @@ void ScXMLExport::IncrementProgressBar(bool bFlush, sal_Int32 nInc)
sal_uInt32 ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
{
- if( (getExportFlags() & (EXPORT_FONTDECLS|EXPORT_STYLES|
- EXPORT_MASTERSTYLES|EXPORT_CONTENT)) != 0 )
+ if( getExportFlags() & (SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::STYLES|
+ SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
{
if (GetDocument())
{
@@ -5052,7 +5052,7 @@ sal_uInt32 ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
}
// sheet events use officeooo namespace
- if( (getExportFlags() & EXPORT_CONTENT) != 0 &&
+ if( (getExportFlags() & SvXMLExportFlags::CONTENT) &&
getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
{
bool bAnySheetEvents = false;
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 135726fb5d08..44ac90a7d6f2 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -238,7 +238,7 @@ protected:
public:
ScXMLExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
- OUString const & implementationName, sal_uInt16 nExportFlag);
+ OUString const & implementationName, SvXMLExportFlags nExportFlag);
virtual ~ScXMLExport();
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index a618ff399199..63e5d94ac455 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -156,7 +156,7 @@ XMLFontAutoStylePool* ScXMLExport::CreateFontAutoStylePool()
// written by different ScXMLExport instance, and would therefore write each
// font file twice without complicated checking for duplicates, so handle
// the embedding only in one of them.
- if(( getExportFlags() & EXPORT_CONTENT ) == 0 )
+ if(!( getExportFlags() & SvXMLExportFlags::CONTENT ))
blockFontEmbedding = true;
if( !GetDocument()->IsUsingEmbededFonts())
blockFontEmbedding = true;
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index f40b731620fa..97c986857b30 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -694,7 +694,7 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC
pExport->SetSharedData(pSharedData);
// if there are sheets to copy, get the source stream
- if ( sName == "content.xml" && lcl_HasValidStream(rDoc) && ( pExport->getExportFlags() & EXPORT_OASIS ) )
+ if ( sName == "content.xml" && lcl_HasValidStream(rDoc) && ( pExport->getExportFlags() & SvXMLExportFlags::OASIS ) )
{
// old stream is still in this file's storage - open read-only