summaryrefslogtreecommitdiff
path: root/xmloff/source/chart
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-25 15:17:55 +0200
committerNoel Grandin <noel@peralex.com>2015-01-06 10:59:41 +0200
commitdc28e90d200a839d4017d548217ee5ce8a23f848 (patch)
treea6ae872fb19a046292d96d280da286a20a397def /xmloff/source/chart
parent465356ecc81e23016b4289ab16e99084f2a7b84e (diff)
fdo#84938: convert IMPORT_ constants to 'enum class'
Change-Id: Idaa8f07c62b3ba93c27ca5fe286720254baac10d
Diffstat (limited to 'xmloff/source/chart')
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx12
-rw-r--r--xmloff/source/chart/contexts.cxx8
2 files changed, 10 insertions, 10 deletions
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 52a09d550e3e..ce11bea12497 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -515,7 +515,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
// #110680#
SchXMLImport::SchXMLImport(
const Reference< uno::XComponentContext >& xContext,
- OUString const & implementationName, sal_uInt16 nImportFlags ) :
+ OUString const & implementationName, SvXMLImportFlags nImportFlags ) :
SvXMLImport( xContext, implementationName, nImportFlags )
{
GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
@@ -554,7 +554,7 @@ SvXMLImportContext *SchXMLImport::CreateContext( sal_uInt16 nPrefix, const OUStr
} else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
( IsXMLToken(rLocalName, XML_DOCUMENT) ||
(IsXMLToken(rLocalName, XML_DOCUMENT_META)
- && (getImportFlags() & IMPORT_META) )) )
+ && (getImportFlags() & SvXMLImportFlags::META) )) )
{
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY);
@@ -680,7 +680,7 @@ OUString SAL_CALL SchXMLImport_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_getImplementationName(), IMPORT_ALL);
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_getImplementationName(), SvXMLImportFlags::ALL);
}
// multiple storage version: one for content / styles / meta
@@ -700,7 +700,7 @@ OUString SAL_CALL SchXMLImport_Styles_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Styles_getImplementationName(), IMPORT_STYLES );
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Styles_getImplementationName(), SvXMLImportFlags::STYLES );
}
Sequence< OUString > SAL_CALL SchXMLImport_Content_getSupportedServiceNames() throw()
@@ -718,7 +718,7 @@ OUString SAL_CALL SchXMLImport_Content_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Content_getImplementationName(), IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS );
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Content_getImplementationName(), SvXMLImportFlags::CONTENT | SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::FONTDECLS );
}
Sequence< OUString > SAL_CALL SchXMLImport_Meta_getSupportedServiceNames() throw()
@@ -736,7 +736,7 @@ OUString SAL_CALL SchXMLImport_Meta_getImplementationName() throw()
Reference< uno::XInterface > SAL_CALL SchXMLImport_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
{
// #110680#
- return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Meta_getImplementationName(), IMPORT_META );
+ return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Meta_getImplementationName(), SvXMLImportFlags::META );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx
index e6fff5f1788f..7c212e56aab8 100644
--- a/xmloff/source/chart/contexts.cxx
+++ b/xmloff/source/chart/contexts.cxx
@@ -95,12 +95,12 @@ SvXMLImportContext* SchXMLDocContext::CreateChildContext(
{
SvXMLImportContext* pContext = 0;
const SvXMLTokenMap& rTokenMap = mrImportHelper.GetDocElemTokenMap();
- sal_uInt16 nFlags = GetImport().getImportFlags();
+ SvXMLImportFlags nFlags = GetImport().getImportFlags();
switch( rTokenMap.Get( nPrefix, rLocalName ))
{
case XML_TOK_DOC_AUTOSTYLES:
- if( nFlags & IMPORT_AUTOSTYLES )
+ if( nFlags & SvXMLImportFlags::AUTOSTYLES )
// not nice, but this is safe, as the SchXMLDocContext class can only by
// instantiated by the chart import class SchXMLImport (header is not exported)
pContext =
@@ -108,7 +108,7 @@ SvXMLImportContext* SchXMLDocContext::CreateChildContext(
break;
case XML_TOK_DOC_STYLES:
// for draw styles containing gradients/hatches/markers and dashes
- if( nFlags & IMPORT_STYLES )
+ if( nFlags & SvXMLImportFlags::STYLES )
pContext = new SvXMLStylesContext( GetImport(), nPrefix, rLocalName, xAttrList );
break;
case XML_TOK_DOC_META:
@@ -118,7 +118,7 @@ SvXMLImportContext* SchXMLDocContext::CreateChildContext(
pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
break;
case XML_TOK_DOC_BODY:
- if( nFlags & IMPORT_CONTENT )
+ if( nFlags & SvXMLImportFlags::CONTENT )
pContext = new SchXMLBodyContext_Impl( mrImportHelper, GetImport(), nPrefix, rLocalName );
break;
}