summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-28 15:07:40 +0200
committerNoel Grandin <noel@peralex.com>2015-01-06 10:59:42 +0200
commit8447eeb192acf7e3255f7fdf92977470b28a18f9 (patch)
tree2743aaf5eefe97bc534cd655247f69eb91715bd8 /xmloff
parentc29657e0d6bb707345584ac7a7f5ae5016f37297 (diff)
fdo#84938: convert ERROR_ #defines to 'enum class'
Change-Id: Ie76bac6b91a9faa4f9ff7dbdf2b455ea9016cf72
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx22
-rw-r--r--xmloff/source/core/xmlimp.cxx8
2 files changed, 15 insertions, 15 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index b37878466a88..c751b7ca707a 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -455,7 +455,7 @@ SvXMLExport::SvXMLExport(
mbExtended( false ),
meClass( eClass ),
mnExportFlags( nExportFlags ),
- mnErrorFlags( ERROR_NO ),
+ mnErrorFlags( SvXMLErrorFlags::NO ),
msWS( GetXMLToken(XML_WS) ),
mbSaveLinkedSections(true)
{
@@ -486,7 +486,7 @@ SvXMLExport::SvXMLExport(
mbExtended( false ),
meClass( XML_TOKEN_INVALID ),
mnExportFlags( SvXMLExportFlags::NONE ),
- mnErrorFlags( ERROR_NO ),
+ mnErrorFlags( SvXMLErrorFlags::NO ),
msWS( GetXMLToken(XML_WS) ),
mbSaveLinkedSections(true)
{
@@ -525,7 +525,7 @@ SvXMLExport::SvXMLExport(
mbExtended( false ),
meClass( XML_TOKEN_INVALID ),
mnExportFlags( SvXMLExportFlags::NONE ),
- mnErrorFlags( ERROR_NO ),
+ mnErrorFlags( SvXMLErrorFlags::NO ),
msWS( GetXMLToken(XML_WS) ),
mbSaveLinkedSections(true)
{
@@ -864,7 +864,7 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue
}
// return true only if no error occurred
- return (GetErrorFlags() & (ERROR_DO_NOTHING|ERROR_ERROR_OCCURRED)) == 0;
+ return (GetErrorFlags() & (SvXMLErrorFlags::DO_NOTHING|SvXMLErrorFlags::ERROR_OCCURRED)) == SvXMLErrorFlags::NO;
}
void SAL_CALL SvXMLExport::cancel() throw(uno::RuntimeException, std::exception)
@@ -2248,7 +2248,7 @@ void SvXMLExport::StartElement(sal_uInt16 nPrefix,
void SvXMLExport::StartElement(const OUString& rName,
bool bIgnWSOutside )
{
- if ((mnErrorFlags & ERROR_DO_NOTHING) != ERROR_DO_NOTHING)
+ if ((mnErrorFlags & SvXMLErrorFlags::DO_NOTHING) != SvXMLErrorFlags::DO_NOTHING)
{
try
{
@@ -2276,7 +2276,7 @@ void SvXMLExport::StartElement(const OUString& rName,
void SvXMLExport::Characters(const OUString& rChars)
{
- if ((mnErrorFlags & ERROR_DO_NOTHING) != ERROR_DO_NOTHING)
+ if ((mnErrorFlags & SvXMLErrorFlags::DO_NOTHING) != SvXMLErrorFlags::DO_NOTHING)
{
try
{
@@ -2321,7 +2321,7 @@ void SvXMLExport::EndElement(const OUString& rName,
SAL_WARN_IF(!mpImpl->mNamespaceMaps.empty() &&
(mpImpl->mNamespaceMaps.top().second >= mpImpl->mDepth), "xmloff.core", "SvXMLExport: NamespaceMaps corrupted");
- if ((mnErrorFlags & ERROR_DO_NOTHING) != ERROR_DO_NOTHING)
+ if ((mnErrorFlags & SvXMLErrorFlags::DO_NOTHING) != SvXMLErrorFlags::DO_NOTHING)
{
try
{
@@ -2344,7 +2344,7 @@ void SvXMLExport::IgnorableWhitespace()
if ((mnExportFlags & SvXMLExportFlags::PRETTY) != SvXMLExportFlags::PRETTY)
return;
- if ((mnErrorFlags & ERROR_DO_NOTHING) != ERROR_DO_NOTHING)
+ if ((mnErrorFlags & SvXMLErrorFlags::DO_NOTHING) != SvXMLErrorFlags::DO_NOTHING)
{
try
{
@@ -2371,11 +2371,11 @@ void SvXMLExport::SetError(
// maintain error flags
if ( ( nId & XMLERROR_FLAG_ERROR ) != 0 )
- mnErrorFlags |= ERROR_ERROR_OCCURRED;
+ mnErrorFlags |= SvXMLErrorFlags::ERROR_OCCURRED;
if ( ( nId & XMLERROR_FLAG_WARNING ) != 0 )
- mnErrorFlags |= ERROR_WARNING_OCCURRED;
+ mnErrorFlags |= SvXMLErrorFlags::WARNING_OCCURRED;
if ( ( nId & XMLERROR_FLAG_SEVERE ) != 0 )
- mnErrorFlags |= ERROR_DO_NOTHING;
+ mnErrorFlags |= SvXMLErrorFlags::DO_NOTHING;
// create error lsit on demand
if ( mpXMLErrors == NULL )
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 56cf1f6e1784..86e6b86bf1b6 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -428,7 +428,7 @@ SvXMLImport::SvXMLImport(
mpXMLErrors( NULL ),
mpStyleMap(0),
mnImportFlags( nImportFlags ),
- mnErrorFlags(0),
+ mnErrorFlags(SvXMLErrorFlags::NO),
mbIsFormsSupported( true ),
mbIsTableShapeSupported( false ),
mbIsGraphicLoadOnDemandSupported( true )
@@ -1776,11 +1776,11 @@ void SvXMLImport::SetError(
{
// maintain error flags
if ( ( nId & XMLERROR_FLAG_ERROR ) != 0 )
- mnErrorFlags |= ERROR_ERROR_OCCURRED;
+ mnErrorFlags |= SvXMLErrorFlags::ERROR_OCCURRED;
if ( ( nId & XMLERROR_FLAG_WARNING ) != 0 )
- mnErrorFlags |= ERROR_WARNING_OCCURRED;
+ mnErrorFlags |= SvXMLErrorFlags::WARNING_OCCURRED;
if ( ( nId & XMLERROR_FLAG_SEVERE ) != 0 )
- mnErrorFlags |= ERROR_DO_NOTHING;
+ mnErrorFlags |= SvXMLErrorFlags::DO_NOTHING;
// create error list on demand
if ( mpXMLErrors == NULL )