Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8447eeb1
Kaydet (Commit)
8447eeb1
authored
Ara 28, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#84938: convert ERROR_ #defines to 'enum class'
Change-Id: Ie76bac6b91a9faa4f9ff7dbdf2b455ea9016cf72
üst
c29657e0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
24 deletions
+32
-24
xmlerror.hxx
include/xmloff/xmlerror.hxx
+11
-5
xmlexp.hxx
include/xmloff/xmlexp.hxx
+3
-2
xmlimp.hxx
include/xmloff/xmlimp.hxx
+3
-2
xmlexp.cxx
xmloff/source/core/xmlexp.cxx
+11
-11
xmlimp.cxx
xmloff/source/core/xmlimp.cxx
+4
-4
No files found.
include/xmloff/xmlerror.hxx
Dosyayı görüntüle @
8447eeb1
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <sal/types.h>
#include <sal/types.h>
#include <o3tl/typed_flags_set.hxx>
#include <vector>
#include <vector>
...
@@ -79,11 +80,16 @@
...
@@ -79,11 +80,16 @@
// 16bit error flag constants for use in the
// 16bit error flag constants for use in the
// SvXMLExport/SvXMLImport error flags
// SvXMLExport/SvXMLImport error flags
#define ERROR_NO 0x0000
enum
class
SvXMLErrorFlags
{
#define ERROR_DO_NOTHING 0x0001
NO
=
0x0000
,
#define ERROR_ERROR_OCCURRED 0x0002
DO_NOTHING
=
0x0001
,
#define ERROR_WARNING_OCCURRED 0x0004
ERROR_OCCURRED
=
0x0002
,
WARNING_OCCURRED
=
0x0004
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
SvXMLErrorFlags
>
:
is_typed_flags
<
SvXMLErrorFlags
,
0x7
>
{};
}
...
...
include/xmloff/xmlexp.hxx
Dosyayı görüntüle @
8447eeb1
...
@@ -73,6 +73,7 @@ class XMLSettingsExportHelper;
...
@@ -73,6 +73,7 @@ class XMLSettingsExportHelper;
class
XMLImageMapExport
;
class
XMLImageMapExport
;
class
XMLErrors
;
class
XMLErrors
;
class
LanguageTag
;
class
LanguageTag
;
enum
class
SvXMLErrorFlags
;
// Shapes in Writer cannot be named via context menu (#i51726#)
// Shapes in Writer cannot be named via context menu (#i51726#)
#include <unotools/moduleoptions.hxx>
#include <unotools/moduleoptions.hxx>
...
@@ -158,7 +159,7 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public ::cppu::WeakImplHelper6<
...
@@ -158,7 +159,7 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public ::cppu::WeakImplHelper6<
SAL_DLLPRIVATE
void
_InitCtor
();
SAL_DLLPRIVATE
void
_InitCtor
();
SvXMLExportFlags
mnExportFlags
;
SvXMLExportFlags
mnExportFlags
;
sal_uInt16
mnErrorFlags
;
SvXMLErrorFlags
mnErrorFlags
;
public
:
public
:
...
@@ -545,7 +546,7 @@ public:
...
@@ -545,7 +546,7 @@ public:
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
&
rMsgParams
);
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
&
rMsgParams
);
/** return current error flags (logical 'or' of all error flags so far) */
/** return current error flags (logical 'or' of all error flags so far) */
sal_uInt16
GetErrorFlags
()
{
return
mnErrorFlags
;
}
SvXMLErrorFlags
GetErrorFlags
()
{
return
mnErrorFlags
;
}
virtual
void
DisposingModel
();
virtual
void
DisposingModel
();
...
...
include/xmloff/xmlimp.hxx
Dosyayı görüntüle @
8447eeb1
...
@@ -74,6 +74,7 @@ class XMLFontStylesContext;
...
@@ -74,6 +74,7 @@ class XMLFontStylesContext;
class
XMLEventImportHelper
;
class
XMLEventImportHelper
;
class
XMLErrors
;
class
XMLErrors
;
class
StyleMap
;
class
StyleMap
;
enum
class
SvXMLErrorFlags
;
typedef
std
::
vector
<
SvXMLImportContext
*>
SvXMLImportContexts_Impl
;
typedef
std
::
vector
<
SvXMLImportContext
*>
SvXMLImportContexts_Impl
;
typedef
std
::
vector
<
::
css
::
uno
::
Reference
<
::
css
::
xml
::
sax
::
XFastContextHandler
>>
typedef
std
::
vector
<
::
css
::
uno
::
Reference
<
::
css
::
xml
::
sax
::
XFastContextHandler
>>
...
@@ -157,7 +158,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper7<
...
@@ -157,7 +158,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper7<
SAL_DLLPRIVATE
void
_InitCtor
();
SAL_DLLPRIVATE
void
_InitCtor
();
SvXMLImportFlags
mnImportFlags
;
SvXMLImportFlags
mnImportFlags
;
sal_uInt16
mnErrorFlags
;
SvXMLErrorFlags
mnErrorFlags
;
std
::
set
<
OUString
>
embeddedFontUrlsKnown
;
std
::
set
<
OUString
>
embeddedFontUrlsKnown
;
protected
:
protected
:
...
@@ -415,7 +416,7 @@ public:
...
@@ -415,7 +416,7 @@ public:
const
OUString
&
rMsg2
);
const
OUString
&
rMsg2
);
/** return current error flags */
/** return current error flags */
sal_uInt16
GetErrorFlags
()
{
return
mnErrorFlags
;
}
SvXMLErrorFlags
GetErrorFlags
()
{
return
mnErrorFlags
;
}
virtual
void
DisposingModel
();
virtual
void
DisposingModel
();
...
...
xmloff/source/core/xmlexp.cxx
Dosyayı görüntüle @
8447eeb1
...
@@ -455,7 +455,7 @@ SvXMLExport::SvXMLExport(
...
@@ -455,7 +455,7 @@ SvXMLExport::SvXMLExport(
mbExtended
(
false
),
mbExtended
(
false
),
meClass
(
eClass
),
meClass
(
eClass
),
mnExportFlags
(
nExportFlags
),
mnExportFlags
(
nExportFlags
),
mnErrorFlags
(
ERROR_
NO
),
mnErrorFlags
(
SvXMLErrorFlags
::
NO
),
msWS
(
GetXMLToken
(
XML_WS
)
),
msWS
(
GetXMLToken
(
XML_WS
)
),
mbSaveLinkedSections
(
true
)
mbSaveLinkedSections
(
true
)
{
{
...
@@ -486,7 +486,7 @@ SvXMLExport::SvXMLExport(
...
@@ -486,7 +486,7 @@ SvXMLExport::SvXMLExport(
mbExtended
(
false
),
mbExtended
(
false
),
meClass
(
XML_TOKEN_INVALID
),
meClass
(
XML_TOKEN_INVALID
),
mnExportFlags
(
SvXMLExportFlags
::
NONE
),
mnExportFlags
(
SvXMLExportFlags
::
NONE
),
mnErrorFlags
(
ERROR_
NO
),
mnErrorFlags
(
SvXMLErrorFlags
::
NO
),
msWS
(
GetXMLToken
(
XML_WS
)
),
msWS
(
GetXMLToken
(
XML_WS
)
),
mbSaveLinkedSections
(
true
)
mbSaveLinkedSections
(
true
)
{
{
...
@@ -525,7 +525,7 @@ SvXMLExport::SvXMLExport(
...
@@ -525,7 +525,7 @@ SvXMLExport::SvXMLExport(
mbExtended
(
false
),
mbExtended
(
false
),
meClass
(
XML_TOKEN_INVALID
),
meClass
(
XML_TOKEN_INVALID
),
mnExportFlags
(
SvXMLExportFlags
::
NONE
),
mnExportFlags
(
SvXMLExportFlags
::
NONE
),
mnErrorFlags
(
ERROR_
NO
),
mnErrorFlags
(
SvXMLErrorFlags
::
NO
),
msWS
(
GetXMLToken
(
XML_WS
)
),
msWS
(
GetXMLToken
(
XML_WS
)
),
mbSaveLinkedSections
(
true
)
mbSaveLinkedSections
(
true
)
{
{
...
@@ -864,7 +864,7 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue
...
@@ -864,7 +864,7 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue
}
}
// return true only if no error occurred
// 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
)
void
SAL_CALL
SvXMLExport
::
cancel
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
@@ -2248,7 +2248,7 @@ void SvXMLExport::StartElement(sal_uInt16 nPrefix,
...
@@ -2248,7 +2248,7 @@ void SvXMLExport::StartElement(sal_uInt16 nPrefix,
void
SvXMLExport
::
StartElement
(
const
OUString
&
rName
,
void
SvXMLExport
::
StartElement
(
const
OUString
&
rName
,
bool
bIgnWSOutside
)
bool
bIgnWSOutside
)
{
{
if
((
mnErrorFlags
&
ERROR_DO_NOTHING
)
!=
ERROR_
DO_NOTHING
)
if
((
mnErrorFlags
&
SvXMLErrorFlags
::
DO_NOTHING
)
!=
SvXMLErrorFlags
::
DO_NOTHING
)
{
{
try
try
{
{
...
@@ -2276,7 +2276,7 @@ void SvXMLExport::StartElement(const OUString& rName,
...
@@ -2276,7 +2276,7 @@ void SvXMLExport::StartElement(const OUString& rName,
void
SvXMLExport
::
Characters
(
const
OUString
&
rChars
)
void
SvXMLExport
::
Characters
(
const
OUString
&
rChars
)
{
{
if
((
mnErrorFlags
&
ERROR_DO_NOTHING
)
!=
ERROR_
DO_NOTHING
)
if
((
mnErrorFlags
&
SvXMLErrorFlags
::
DO_NOTHING
)
!=
SvXMLErrorFlags
::
DO_NOTHING
)
{
{
try
try
{
{
...
@@ -2321,7 +2321,7 @@ void SvXMLExport::EndElement(const OUString& rName,
...
@@ -2321,7 +2321,7 @@ void SvXMLExport::EndElement(const OUString& rName,
SAL_WARN_IF
(
!
mpImpl
->
mNamespaceMaps
.
empty
()
&&
SAL_WARN_IF
(
!
mpImpl
->
mNamespaceMaps
.
empty
()
&&
(
mpImpl
->
mNamespaceMaps
.
top
().
second
>=
mpImpl
->
mDepth
),
"xmloff.core"
,
"SvXMLExport: NamespaceMaps corrupted"
);
(
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
try
{
{
...
@@ -2344,7 +2344,7 @@ void SvXMLExport::IgnorableWhitespace()
...
@@ -2344,7 +2344,7 @@ void SvXMLExport::IgnorableWhitespace()
if
((
mnExportFlags
&
SvXMLExportFlags
::
PRETTY
)
!=
SvXMLExportFlags
::
PRETTY
)
if
((
mnExportFlags
&
SvXMLExportFlags
::
PRETTY
)
!=
SvXMLExportFlags
::
PRETTY
)
return
;
return
;
if
((
mnErrorFlags
&
ERROR_DO_NOTHING
)
!=
ERROR_
DO_NOTHING
)
if
((
mnErrorFlags
&
SvXMLErrorFlags
::
DO_NOTHING
)
!=
SvXMLErrorFlags
::
DO_NOTHING
)
{
{
try
try
{
{
...
@@ -2371,11 +2371,11 @@ void SvXMLExport::SetError(
...
@@ -2371,11 +2371,11 @@ void SvXMLExport::SetError(
// maintain error flags
// maintain error flags
if
(
(
nId
&
XMLERROR_FLAG_ERROR
)
!=
0
)
if
(
(
nId
&
XMLERROR_FLAG_ERROR
)
!=
0
)
mnErrorFlags
|=
ERROR_
ERROR_OCCURRED
;
mnErrorFlags
|=
SvXMLErrorFlags
::
ERROR_OCCURRED
;
if
(
(
nId
&
XMLERROR_FLAG_WARNING
)
!=
0
)
if
(
(
nId
&
XMLERROR_FLAG_WARNING
)
!=
0
)
mnErrorFlags
|=
ERROR_
WARNING_OCCURRED
;
mnErrorFlags
|=
SvXMLErrorFlags
::
WARNING_OCCURRED
;
if
(
(
nId
&
XMLERROR_FLAG_SEVERE
)
!=
0
)
if
(
(
nId
&
XMLERROR_FLAG_SEVERE
)
!=
0
)
mnErrorFlags
|=
ERROR_
DO_NOTHING
;
mnErrorFlags
|=
SvXMLErrorFlags
::
DO_NOTHING
;
// create error lsit on demand
// create error lsit on demand
if
(
mpXMLErrors
==
NULL
)
if
(
mpXMLErrors
==
NULL
)
...
...
xmloff/source/core/xmlimp.cxx
Dosyayı görüntüle @
8447eeb1
...
@@ -428,7 +428,7 @@ SvXMLImport::SvXMLImport(
...
@@ -428,7 +428,7 @@ SvXMLImport::SvXMLImport(
mpXMLErrors
(
NULL
),
mpXMLErrors
(
NULL
),
mpStyleMap
(
0
),
mpStyleMap
(
0
),
mnImportFlags
(
nImportFlags
),
mnImportFlags
(
nImportFlags
),
mnErrorFlags
(
0
),
mnErrorFlags
(
SvXMLErrorFlags
::
NO
),
mbIsFormsSupported
(
true
),
mbIsFormsSupported
(
true
),
mbIsTableShapeSupported
(
false
),
mbIsTableShapeSupported
(
false
),
mbIsGraphicLoadOnDemandSupported
(
true
)
mbIsGraphicLoadOnDemandSupported
(
true
)
...
@@ -1776,11 +1776,11 @@ void SvXMLImport::SetError(
...
@@ -1776,11 +1776,11 @@ void SvXMLImport::SetError(
{
{
// maintain error flags
// maintain error flags
if
(
(
nId
&
XMLERROR_FLAG_ERROR
)
!=
0
)
if
(
(
nId
&
XMLERROR_FLAG_ERROR
)
!=
0
)
mnErrorFlags
|=
ERROR_
ERROR_OCCURRED
;
mnErrorFlags
|=
SvXMLErrorFlags
::
ERROR_OCCURRED
;
if
(
(
nId
&
XMLERROR_FLAG_WARNING
)
!=
0
)
if
(
(
nId
&
XMLERROR_FLAG_WARNING
)
!=
0
)
mnErrorFlags
|=
ERROR_
WARNING_OCCURRED
;
mnErrorFlags
|=
SvXMLErrorFlags
::
WARNING_OCCURRED
;
if
(
(
nId
&
XMLERROR_FLAG_SEVERE
)
!=
0
)
if
(
(
nId
&
XMLERROR_FLAG_SEVERE
)
!=
0
)
mnErrorFlags
|=
ERROR_
DO_NOTHING
;
mnErrorFlags
|=
SvXMLErrorFlags
::
DO_NOTHING
;
// create error list on demand
// create error list on demand
if
(
mpXMLErrors
==
NULL
)
if
(
mpXMLErrors
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment