summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/inc/DashStyle.hxx10
-rw-r--r--xmloff/inc/GradientStyle.hxx11
-rw-r--r--xmloff/inc/HatchStyle.hxx10
-rw-r--r--xmloff/inc/MarkerStyle.hxx10
-rw-r--r--xmloff/inc/MetaExportComponent.hxx6
-rw-r--r--xmloff/inc/TransGradientStyle.hxx10
-rw-r--r--xmloff/inc/txtflde.hxx66
-rw-r--r--xmloff/inc/txtvfldi.hxx6
-rw-r--r--xmloff/inc/xmltabe.hxx11
-rw-r--r--xmloff/source/chart/PropertyMap.hxx113
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx26
-rw-r--r--xmloff/source/chart/SchXMLAutoStylePoolP.cxx12
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx16
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx224
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx26
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx23
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx13
-rw-r--r--xmloff/source/chart/contexts.cxx21
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx51
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx77
-rw-r--r--xmloff/source/core/XMLEmbeddedObjectImportContext.cxx38
-rw-r--r--xmloff/source/core/nmspmap.cxx15
-rw-r--r--xmloff/source/core/xmlehelp.cxx75
-rw-r--r--xmloff/source/core/xmlexp.cxx200
-rw-r--r--xmloff/source/core/xmlimp.cxx154
-rw-r--r--xmloff/source/core/xmltoken.cxx44
-rw-r--r--xmloff/source/core/xmluconv.cxx56
-rw-r--r--xmloff/source/draw/XMLGraphicsDefaultStyle.cxx13
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx24
-rw-r--r--xmloff/source/draw/XMLImageMapExport.cxx99
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx94
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx10
-rw-r--r--xmloff/source/draw/animexp.cxx54
-rw-r--r--xmloff/source/draw/animimp.cxx43
-rw-r--r--xmloff/source/draw/eventimp.cxx42
-rw-r--r--xmloff/source/draw/layerexp.cxx16
-rw-r--r--xmloff/source/draw/layerimp.cxx13
-rw-r--r--xmloff/source/draw/sdpropls.cxx400
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx126
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx21
-rw-r--r--xmloff/source/draw/shapeexport.cxx37
-rw-r--r--xmloff/source/draw/shapeexport2.cxx309
-rw-r--r--xmloff/source/draw/shapeexport3.cxx83
-rw-r--r--xmloff/source/draw/shapeimport.cxx8
-rw-r--r--xmloff/source/draw/viewcontext.cxx13
-rw-r--r--xmloff/source/draw/ximp3dobject.cxx8
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx41
-rw-r--r--xmloff/source/draw/ximpgrp.cxx12
-rw-r--r--xmloff/source/draw/ximppage.cxx13
-rw-r--r--xmloff/source/draw/ximpshap.cxx195
-rw-r--r--xmloff/source/draw/ximpshow.cxx61
-rw-r--r--xmloff/source/draw/ximpstyl.cxx29
-rw-r--r--xmloff/source/forms/controlpropertyhdl.cxx17
-rw-r--r--xmloff/source/forms/controlpropertymap.cxx61
-rw-r--r--xmloff/source/forms/formenums.cxx12
-rw-r--r--xmloff/source/forms/officeforms.cxx14
-rw-r--r--xmloff/source/meta/MetaExportComponent.cxx18
-rw-r--r--xmloff/source/meta/MetaImportComponent.cxx13
-rw-r--r--xmloff/source/meta/xmlmetae.cxx92
-rw-r--r--xmloff/source/meta/xmlmetai.cxx15
-rw-r--r--xmloff/source/script/XMLEventExport.cxx12
-rw-r--r--xmloff/source/script/XMLEventImportHelper.cxx8
-rw-r--r--xmloff/source/script/XMLEventsImportContext.cxx15
-rw-r--r--xmloff/source/script/XMLStarBasicContextFactory.cxx16
-rw-r--r--xmloff/source/script/XMLStarBasicExportHandler.cxx21
-rw-r--r--xmloff/source/script/xmlscripti.cxx39
-rw-r--r--xmloff/source/style/DashStyle.cxx32
-rw-r--r--xmloff/source/style/DrawAspectHdl.cxx16
-rw-r--r--xmloff/source/style/FillStyleContext.cxx8
-rw-r--r--xmloff/source/style/GradientStyle.cxx44
-rw-r--r--xmloff/source/style/HatchStyle.cxx30
-rw-r--r--xmloff/source/style/ImageStyle.cxx28
-rw-r--r--xmloff/source/style/MarkerStyle.cxx43
-rw-r--r--xmloff/source/style/PageHeaderFooterContext.cxx13
-rw-r--r--xmloff/source/style/PageMasterImportContext.cxx19
-rw-r--r--xmloff/source/style/PageMasterPropHdl.cxx52
-rw-r--r--xmloff/source/style/PageMasterPropHdl.hxx10
-rw-r--r--xmloff/source/style/PageMasterPropHdlFactory.cxx36
-rw-r--r--xmloff/source/style/PageMasterStyleMap.cxx229
-rw-r--r--xmloff/source/style/TransGradientStyle.cxx38
-rw-r--r--xmloff/source/style/VisAreaContext.cxx17
-rw-r--r--xmloff/source/style/VisAreaExport.cxx27
-rw-r--r--xmloff/source/style/XMLBackgroundImageContext.cxx11
-rw-r--r--xmloff/source/style/XMLBackgroundImageExport.cxx42
-rw-r--r--xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx6
-rw-r--r--xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx17
-rw-r--r--xmloff/source/style/XMLClipPropertyHandler.cxx12
-rw-r--r--xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx6
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx26
-rw-r--r--xmloff/source/style/XMLFontStylesContext.cxx11
-rw-r--r--xmloff/source/style/XMLFootnoteSeparatorExport.cxx22
-rw-r--r--xmloff/source/style/XMLFootnoteSeparatorImport.cxx24
-rw-r--r--xmloff/source/style/XMLPageExport.cxx19
-rw-r--r--xmloff/source/style/XMLRectangleMembersHandler.cxx6
-rw-r--r--xmloff/source/style/adjushdl.cxx8
-rw-r--r--xmloff/source/style/backhdl.cxx30
-rw-r--r--xmloff/source/style/bordrhdl.cxx20
-rw-r--r--xmloff/source/style/breakhdl.cxx18
-rw-r--r--xmloff/source/style/cdouthdl.cxx8
-rw-r--r--xmloff/source/style/chrhghdl.cxx8
-rw-r--r--xmloff/source/style/chrlohdl.cxx17
-rw-r--r--xmloff/source/style/csmaphdl.cxx16
-rw-r--r--xmloff/source/style/escphdl.cxx19
-rw-r--r--xmloff/source/style/fonthdl.cxx16
-rw-r--r--xmloff/source/style/impastp4.cxx21
-rw-r--r--xmloff/source/style/kernihdl.cxx14
-rw-r--r--xmloff/source/style/lspachdl.cxx12
-rw-r--r--xmloff/source/style/opaquhdl.cxx16
-rw-r--r--xmloff/source/style/postuhdl.cxx8
-rw-r--r--xmloff/source/style/prhdlfac.cxx20
-rw-r--r--xmloff/source/style/prstylei.cxx13
-rw-r--r--xmloff/source/style/shadwhdl.cxx13
-rw-r--r--xmloff/source/style/shdwdhdl.cxx13
-rw-r--r--xmloff/source/style/styleexp.cxx59
-rw-r--r--xmloff/source/style/undlihdl.cxx8
-rw-r--r--xmloff/source/style/weighhdl.cxx17
-rw-r--r--xmloff/source/style/xmlaustp.cxx20
-rw-r--r--xmloff/source/style/xmlbahdl.cxx27
-rw-r--r--xmloff/source/style/xmlbahdl.hxx15
-rw-r--r--xmloff/source/style/xmlexppr.cxx21
-rw-r--r--xmloff/source/style/xmlimppr.cxx15
-rw-r--r--xmloff/source/style/xmlnume.cxx185
-rw-r--r--xmloff/source/style/xmlnumfe.cxx154
-rw-r--r--xmloff/source/style/xmlnumfi.cxx17
-rw-r--r--xmloff/source/style/xmlnumi.cxx45
-rw-r--r--xmloff/source/style/xmlprmap.cxx16
-rw-r--r--xmloff/source/style/xmlstyle.cxx59
-rw-r--r--xmloff/source/style/xmltabe.cxx32
-rw-r--r--xmloff/source/style/xmltabi.cxx20
-rw-r--r--xmloff/source/text/XMLAutoMarkFileContext.cxx13
-rw-r--r--xmloff/source/text/XMLAutoTextContainerEventImport.cxx16
-rw-r--r--xmloff/source/text/XMLAutoTextEventExport.cxx6
-rw-r--r--xmloff/source/text/XMLAutoTextEventExport.hxx6
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.cxx16
-rw-r--r--xmloff/source/text/XMLCalculationSettingsContext.cxx14
-rw-r--r--xmloff/source/text/XMLChangeImportContext.cxx13
-rw-r--r--xmloff/source/text/XMLChangeInfoContext.cxx21
-rw-r--r--xmloff/source/text/XMLChangedRegionImportContext.cxx23
-rw-r--r--xmloff/source/text/XMLFootnoteBodyImportContext.cxx8
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx20
-rw-r--r--xmloff/source/text/XMLFootnoteImportContext.cxx14
-rw-r--r--xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx16
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx17
-rw-r--r--xmloff/source/text/XMLIndexBibliographyEntryContext.cxx14
-rw-r--r--xmloff/source/text/XMLIndexBibliographySourceContext.cxx18
-rw-r--r--xmloff/source/text/XMLIndexBodyContext.cxx8
-rw-r--r--xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx14
-rw-r--r--xmloff/source/text/XMLIndexIllustrationSourceContext.cxx19
-rw-r--r--xmloff/source/text/XMLIndexMarkExport.cxx57
-rw-r--r--xmloff/source/text/XMLIndexObjectSourceContext.cxx19
-rw-r--r--xmloff/source/text/XMLIndexSimpleEntryContext.cxx14
-rw-r--r--xmloff/source/text/XMLIndexSourceBaseContext.cxx18
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx17
-rw-r--r--xmloff/source/text/XMLIndexTOCSourceContext.cxx17
-rw-r--r--xmloff/source/text/XMLIndexTOCStylesContext.cxx21
-rw-r--r--xmloff/source/text/XMLIndexTabStopEntryContext.cxx23
-rw-r--r--xmloff/source/text/XMLIndexTableSourceContext.cxx16
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.cxx23
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.hxx12
-rw-r--r--xmloff/source/text/XMLIndexTitleTemplateContext.cxx13
-rw-r--r--xmloff/source/text/XMLIndexUserSourceContext.cxx17
-rw-r--r--xmloff/source/text/XMLLineNumberingExport.cxx45
-rw-r--r--xmloff/source/text/XMLLineNumberingImportContext.cxx15
-rw-r--r--xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx12
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx65
-rw-r--r--xmloff/source/text/XMLSectionExport.hxx9
-rw-r--r--xmloff/source/text/XMLSectionFootnoteConfigExport.cxx24
-rw-r--r--xmloff/source/text/XMLSectionFootnoteConfigImport.cxx30
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx33
-rw-r--r--xmloff/source/text/XMLStringBufferImportContext.cxx14
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx19
-rw-r--r--xmloff/source/text/XMLTextColumnsExport.cxx45
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx46
-rw-r--r--xmloff/source/text/XMLTextFrameHyperlinkContext.cxx17
-rw-r--r--xmloff/source/text/XMLTextHeaderFooterContext.cxx7
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx11
-rw-r--r--xmloff/source/text/XMLTextListItemContext.cxx11
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx10
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx17
-rw-r--r--xmloff/source/text/XMLTextMasterPageExport.cxx33
-rw-r--r--xmloff/source/text/XMLTextMasterStylesContext.cxx13
-rw-r--r--xmloff/source/text/XMLTextShapeStyleContext.cxx18
-rw-r--r--xmloff/source/text/XMLTrackedChangesImportContext.cxx19
-rw-r--r--xmloff/source/text/txtdrope.cxx31
-rw-r--r--xmloff/source/text/txtdrope.hxx11
-rw-r--r--xmloff/source/text/txtdropi.cxx10
-rw-r--r--xmloff/source/text/txtflde.cxx788
-rw-r--r--xmloff/source/text/txtftne.cxx88
-rw-r--r--xmloff/source/text/txtimp.cxx10
-rw-r--r--xmloff/source/text/txtparae.cxx232
-rw-r--r--xmloff/source/text/txtparai.cxx69
-rw-r--r--xmloff/source/text/txtprhdl.cxx123
-rw-r--r--xmloff/source/text/txtprmap.cxx713
-rw-r--r--xmloff/source/text/txtsecte.cxx8
-rw-r--r--xmloff/source/text/txtstyle.cxx38
-rw-r--r--xmloff/source/text/txtstyli.cxx22
-rw-r--r--xmloff/source/text/txtvfldi.cxx59
197 files changed, 4314 insertions, 4229 deletions
diff --git a/xmloff/inc/DashStyle.hxx b/xmloff/inc/DashStyle.hxx
index 8418dd9d9477..7242160a38e6 100644
--- a/xmloff/inc/DashStyle.hxx
+++ b/xmloff/inc/DashStyle.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DashStyle.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:00 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,10 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
class SvXMLNamespaceMap;
class SvXMLAttributeList;
class SvXMLUnitConverter;
@@ -94,7 +98,7 @@ private:
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
- void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+ void AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const ::rtl::OUString& rStrValue );
};
diff --git a/xmloff/inc/GradientStyle.hxx b/xmloff/inc/GradientStyle.hxx
index 446740643a17..db9445fd4592 100644
--- a/xmloff/inc/GradientStyle.hxx
+++ b/xmloff/inc/GradientStyle.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: GradientStyle.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:00 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,11 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
+
class SvXMLNamespaceMap;
class SvXMLAttributeList;
class SvXMLUnitConverter;
@@ -94,7 +99,7 @@ private:
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
- void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+ void AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const ::rtl::OUString& rStrValue );
};
diff --git a/xmloff/inc/HatchStyle.hxx b/xmloff/inc/HatchStyle.hxx
index a140050736bd..236dcd822f80 100644
--- a/xmloff/inc/HatchStyle.hxx
+++ b/xmloff/inc/HatchStyle.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: HatchStyle.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:00 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,10 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
class SvXMLNamespaceMap;
class SvXMLAttributeList;
class SvXMLUnitConverter;
@@ -96,7 +100,7 @@ private:
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
- void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+ void AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const ::rtl::OUString& rStrValue );
};
diff --git a/xmloff/inc/MarkerStyle.hxx b/xmloff/inc/MarkerStyle.hxx
index 2492258dd021..1f83e854d9aa 100644
--- a/xmloff/inc/MarkerStyle.hxx
+++ b/xmloff/inc/MarkerStyle.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MarkerStyle.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:01 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,10 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
class SvXMLNamespaceMap;
class SvXMLAttributeList;
class SvXMLUnitConverter;
@@ -94,7 +98,7 @@ private:
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
- void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+ void AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const ::rtl::OUString& rStrValue );
};
diff --git a/xmloff/inc/MetaExportComponent.hxx b/xmloff/inc/MetaExportComponent.hxx
index b12b2c274f7a..f87988d7d186 100644
--- a/xmloff/inc/MetaExportComponent.hxx
+++ b/xmloff/inc/MetaExportComponent.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MetaExportComponent.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: sab $ $Date: 2001-02-28 17:45:52 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,7 +76,7 @@ public:
protected:
// export the events off all autotexts
virtual sal_uInt32 exportDoc(
- const sal_Char *pClass = NULL );
+ enum ::xmloff::token::XMLTokenEnum eClass = xmloff::token::XML_TOKEN_INVALID );
// methods without content:
virtual void _ExportAutoStyles();
diff --git a/xmloff/inc/TransGradientStyle.hxx b/xmloff/inc/TransGradientStyle.hxx
index 360b4c0e335d..e8f0fc078d06 100644
--- a/xmloff/inc/TransGradientStyle.hxx
+++ b/xmloff/inc/TransGradientStyle.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TransGradientStyle.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:01 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,6 +65,10 @@
#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
class SvXMLNamespaceMap;
class SvXMLAttributeList;
@@ -94,7 +98,7 @@ private:
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
- void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+ void AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const ::rtl::OUString& rStrValue );
};
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 72f5d7684405..397026644f03 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtflde.hxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: cl $ $Date: 2001-05-09 14:37:03 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,6 +78,10 @@
#include <rtl/ustring>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
#include <map>
#include <set>
@@ -238,22 +242,22 @@ public:
// determine element or attribute names
// (public, because they may be useful in related XML export classes)
- static const sal_Char* MapPlaceholderType(sal_uInt16 nType);
- static const sal_Char* MapTemplateDisplayFormat(sal_Int16 nType);
- static const sal_Char* MapChapterDisplayFormat(sal_Int16 nType);
- static const sal_Char* MapFilenameDisplayFormat(sal_Int16 nType);
- static const sal_Char* MapDocInfoFieldName(enum FieldIdEnum nToken);
- static const sal_Char* MapReferenceSource(sal_Int16 nType);
- static const sal_Char* MapReferenceType(sal_Int16 nType);
- static const sal_Char* MapCountFieldName(sal_Int16 nToken);
- static const sal_Char* MapBibliographyFieldName(::rtl::OUString sName);
- static const sal_Char* MapMeasureKind(sal_Int16 nKind);
- const sal_Char* MapPageNumberName(const ::com::sun::star::uno::Reference<
+ static enum ::xmloff::token::XMLTokenEnum MapPlaceholderType(sal_uInt16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapTemplateDisplayFormat(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapChapterDisplayFormat(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapFilenameDisplayFormat(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapDocInfoFieldName(enum FieldIdEnum nToken);
+ static enum ::xmloff::token::XMLTokenEnum MapReferenceSource(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapReferenceType(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapCountFieldName(sal_Int16 nToken);
+ static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(::rtl::OUString sName);
+ static enum ::xmloff::token::XMLTokenEnum MapMeasureKind(sal_Int16 nKind);
+ enum ::xmloff::token::XMLTokenEnum MapPageNumberName(const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet> & xPropSet,
sal_Int32& nOffset); /// also adjust page offset
- const sal_Char* MapAuthorFieldName(const ::com::sun::star::uno::Reference <
+ enum ::xmloff::token::XMLTokenEnum MapAuthorFieldName(const ::com::sun::star::uno::Reference <
::com::sun::star::beans::XPropertySet > & xPropSet);
- const sal_Char* MapSenderFieldName(const ::com::sun::star::uno::Reference <
+ enum ::xmloff::token::XMLTokenEnum MapSenderFieldName(const ::com::sun::star::uno::Reference <
::com::sun::star::beans::XPropertySet > & xPropSet);
protected:
@@ -271,12 +275,12 @@ protected:
enum FieldIdEnum nToken);
/// export an empty element
- void ExportElement(const sal_Char* pElementName, /// element name
+ void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, /// element token
sal_Bool bAddSpace = sal_False); /// add blanks around
/// element?
/// export an element with string content
- void ExportElement(const sal_Char* pElementName, /// element name
+ void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, /// element token
const ::rtl::OUString& sContent, /// element content
sal_Bool bAddSpace = sal_False); /// add blanks around
/// element?
@@ -285,47 +289,47 @@ protected:
/// export a boolean attribute
void ProcessBoolean(
- const sal_Char* pXmlName, /// attribute name (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
sal_Bool bBool, /// attribute value
sal_Bool bDefault); /// attribute default; omit, if attribute differs
/// export an integer attribute
void ProcessInteger(
- const sal_Char* pXmlName, /// attribute name (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
sal_Int32 nNum); /// attribute value
/// export an integer attribute, omit if default
void ProcessInteger(
- const sal_Char* pXmlName, /// attribute name (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
sal_Int32 nNum, /// attribute value
sal_Int32 nDefault); /// default value
/// export a string attribute
void ProcessString(
- const sal_Char* pXmlName, /// attribute name (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
const ::rtl::OUString& sValue, /// attribute value
sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
/// export a string attribute, omit if default
void ProcessString(
- const sal_Char* pXmlName, /// attribute name (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
const ::rtl::OUString& sValue, /// attribute value
const ::rtl::OUString& sDefault, /// default value; omit if equal
sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
/// export a string attribute
void ProcessString(
- const sal_Char* pXmlName, /// attribute name (namespace text)
- const sal_Char* pValue, /// attribute value
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eValue, /// attribute token
sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
/// export a string attribute, omit if default
void ProcessString(
- const sal_Char* pXmlName, /// attribute name (namespace text)
- const sal_Char* pValue, /// attribute value
- const sal_Char* pDefault, /// attribute default
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eValue, /// attribute value token
+ enum ::xmloff::token::XMLTokenEnum eDefault, /// default value token
sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
/// export a string as a sequence of paragraphs
@@ -356,7 +360,7 @@ protected:
/// export times, dates and durations according to ISO 8601
void ProcessDateTime(
- const sal_Char* sXMLName, /// name of attribute
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
double dValue, /// date/time value
sal_Bool bIsDate, /// export as date (rather than date/time)?
sal_Bool bIsDuration = sal_False, /// export as duration
@@ -365,7 +369,7 @@ protected:
/// export a date, time, or duration
void ProcessDateTime(
- const sal_Char* sXMLName, /// name of attribute
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
sal_Int32 nMinutes, /// date/time value in minutes
sal_Bool bIsDate, /// export as date?
sal_Bool bIsDuration, /// export as duration?
@@ -374,14 +378,14 @@ protected:
/// export times, dates and durations according to ISO 8601
void ProcessDateTime(
- const sal_Char* sXMLName, /// name of attribute
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
const ::com::sun::star::util::DateTime& rTime, /// date/time value
sal_Bool bIsDate, /// export as date (rather than date/time)?
sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
/// export date according to ISO 8601
void ProcessDate(
- const sal_Char* sXMLName, /// name of attribute
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
const ::com::sun::star::util::Date& rTime, /// date value
sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
index 2a65b7ecb66a..def0ef72a486 100644
--- a/xmloff/inc/txtvfldi.hxx
+++ b/xmloff/inc/txtvfldi.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtvfldi.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2000-09-27 15:58:44 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -542,7 +542,7 @@ class XMLVariableDeclImportContext : public SvXMLImportContext
::rtl::OUString sName;
XMLValueImportHelper aValueHelper;
sal_Int8 nNumLevel;
- sal_Char cSeparationChar;
+ sal_Unicode cSeparationChar;
public:
diff --git a/xmloff/inc/xmltabe.hxx b/xmloff/inc/xmltabe.hxx
index 1acb5376f572..2cda9ff108b6 100644
--- a/xmloff/inc/xmltabe.hxx
+++ b/xmloff/inc/xmltabe.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltabe.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:02 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,6 +73,10 @@
#include "attrlist.hxx"
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
class SvXMLNamespaceMap;
class SvXMLUnitConverter;
@@ -102,7 +106,8 @@ protected:
void CheckAttrList();
#endif
void ClearAttrList();
- void AddAttribute( sal_uInt16 nPrefixKey, const char *pName,
+ void AddAttribute( sal_uInt16 nPrefixKey,
+ enum ::xmloff::token::XMLTokenEnum eName,
const ::rtl::OUString& rValue );
::rtl::OUString GetQNameByKey( sal_uInt16 nKey,
const ::rtl::OUString& rLocalName ) const;
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 8ec07f8b1332..fedd641b9153 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PropertyMap.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,9 +67,6 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -133,10 +130,10 @@
#define XML_SCH_CONTEXT_SPECIAL_SYMBOL_HEIGHT ( XML_SCH_CTF_START + 21 )
#define XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME ( XML_SCH_CTF_START + 22 )
-#define MAP_ENTRY( a, ns, nm, t ) { a, XML_NAMESPACE_##ns, ##nm, t }
-#define MAP_CONTEXT( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, ##nm, t, XML_SCH_CONTEXT_##c }
-#define MAP_SPECIAL( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, ##nm, t | MID_FLAG_SPECIAL_ITEM, XML_SCH_CONTEXT_SPECIAL_##c }
-#define MAP_ENTRY_END { 0,0,0,0 }
+#define MAP_ENTRY( a, ns, nm, t ) { a, XML_NAMESPACE_##ns, xmloff::token::##nm, t }
+#define MAP_CONTEXT( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, xmloff::token::##nm, t, XML_SCH_CONTEXT_##c }
+#define MAP_SPECIAL( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, xmloff::token::##nm, t | MID_FLAG_SPECIAL_ITEM, XML_SCH_CONTEXT_SPECIAL_##c }
+#define MAP_ENTRY_END { 0,0,xmloff::token::XML_TOKEN_INVALID,0 }
// ---------------------------------------------------------
// PropertyMap for Chart properties drawing- and
@@ -152,65 +149,65 @@
const XMLPropertyMapEntry aXMLChartPropMap[] =
{
// chart subtypes
- MAP_ENTRY( "UpDown", CHART, sXML_stock_updown_bars, XML_TYPE_BOOL ),
- MAP_ENTRY( "Volume", CHART, sXML_stock_with_volume, XML_TYPE_BOOL ),
- MAP_ENTRY( "Dim3D", CHART, sXML_three_dimensional, XML_TYPE_BOOL ),
- MAP_ENTRY( "Deep", CHART, sXML_deep, XML_TYPE_BOOL ),
- MAP_ENTRY( "Lines", CHART, sXML_lines, XML_TYPE_BOOL ),
- MAP_ENTRY( "Percent", CHART, sXML_percentage, XML_TYPE_BOOL ),
- MAP_ENTRY( "SolidType", CHART, sXML_solid_type, XML_SCH_TYPE_SOLID_TYPE ),
- MAP_ENTRY( "SplineType", CHART, sXML_splines, XML_TYPE_NUMBER ),
- MAP_ENTRY( "Stacked", CHART, sXML_stacked, XML_TYPE_BOOL ),
- MAP_ENTRY( "SymbolType", CHART, sXML_symbol, XML_TYPE_NUMBER ),
- MAP_SPECIAL( "SymbolSize", CHART, sXML_symbol_width, XML_TYPE_MEASURE | MID_FLAG_MERGE_PROPERTY, SYMBOL_WIDTH ),
- MAP_SPECIAL( "SymbolSize", CHART, sXML_symbol_height, XML_TYPE_MEASURE | MID_FLAG_MERGE_PROPERTY, SYMBOL_HEIGHT ),
- MAP_SPECIAL( "SymbolBitmapURL", CHART, sXML_symbol_image_name, XML_TYPE_STRING, SYMBOL_IMAGE_NAME ),
- MAP_ENTRY( "Vertical", CHART, sXML_vertical, XML_TYPE_BOOL ),
- MAP_ENTRY( "NumberOfLines", CHART, sXML_lines_used, XML_TYPE_NUMBER ),
- MAP_ENTRY( "StackedBarsConnected", CHART, sXML_connect_bars, XML_TYPE_BOOL ),
+ MAP_ENTRY( "UpDown", CHART, XML_STOCK_UPDOWN_BARS, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Volume", CHART, XML_STOCK_WITH_VOLUME, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Dim3D", CHART, XML_THREE_DIMENSIONAL, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Deep", CHART, XML_DEEP, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Lines", CHART, XML_LINES, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Percent", CHART, XML_PERCENTAGE, XML_TYPE_BOOL ),
+ MAP_ENTRY( "SolidType", CHART, XML_SOLID_TYPE, XML_SCH_TYPE_SOLID_TYPE ),
+ MAP_ENTRY( "SplineType", CHART, XML_SPLINES, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "Stacked", CHART, XML_STACKED, XML_TYPE_BOOL ),
+ MAP_ENTRY( "SymbolType", CHART, XML_SYMBOL, XML_TYPE_NUMBER ),
+ MAP_SPECIAL( "SymbolSize", CHART, XML_SYMBOL_WIDTH, XML_TYPE_MEASURE | MID_FLAG_MERGE_PROPERTY, SYMBOL_WIDTH ),
+ MAP_SPECIAL( "SymbolSize", CHART, XML_SYMBOL_HEIGHT, XML_TYPE_MEASURE | MID_FLAG_MERGE_PROPERTY, SYMBOL_HEIGHT ),
+ MAP_SPECIAL( "SymbolBitmapURL", CHART, XML_SYMBOL_IMAGE_NAME, XML_TYPE_STRING, SYMBOL_IMAGE_NAME ),
+ MAP_ENTRY( "Vertical", CHART, XML_VERTICAL, XML_TYPE_BOOL ),
+ MAP_ENTRY( "NumberOfLines", CHART, XML_LINES_USED, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "StackedBarsConnected", CHART, XML_CONNECT_BARS, XML_TYPE_BOOL ),
// plot-area properties
- MAP_ENTRY( "DataRowSource", CHART, sXML_series_source, XML_SCH_TYPE_DATAROWSOURCE ),
+ MAP_ENTRY( "DataRowSource", CHART, XML_SERIES_SOURCE, XML_SCH_TYPE_DATAROWSOURCE ),
// axis properties
- MAP_ENTRY( "DisplayLabels", CHART, sXML_display_label, XML_TYPE_BOOL ),
- MAP_SPECIAL( "Marks", CHART, sXML_tick_marks_major_inner, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MAJ_INNER ), // convert one constant
- MAP_SPECIAL( "Marks", CHART, sXML_tick_marks_major_outer, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MAJ_OUTER ), // to two bools
- MAP_SPECIAL( "HelpMarks", CHART, sXML_tick_marks_minor_inner, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MIN_INNER ), // see above
- MAP_SPECIAL( "HelpMarks", CHART, sXML_tick_marks_minor_outer, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MIN_OUTER ),
- MAP_ENTRY( "Logarithmic", CHART, sXML_logarithmic, XML_TYPE_BOOL ),
- MAP_CONTEXT( "Min", CHART, sXML_minimum, XML_TYPE_DOUBLE, MIN ),
- MAP_CONTEXT( "Max", CHART, sXML_maximum, XML_TYPE_DOUBLE, MAX ),
- MAP_CONTEXT( "Origin", CHART, sXML_origin, XML_TYPE_DOUBLE, ORIGIN ),
- MAP_CONTEXT( "StepMain", CHART, sXML_interval_major, XML_TYPE_DOUBLE, STEP_MAIN ),
- MAP_CONTEXT( "StepHelp", CHART, sXML_interval_minor, XML_TYPE_DOUBLE, STEP_HELP ),
- MAP_ENTRY( "GapWidth", CHART, sXML_gap_width, XML_TYPE_NUMBER ),
- MAP_ENTRY( "Overlap", CHART, sXML_overlap, XML_TYPE_NUMBER ),
- MAP_ENTRY( "TextBreak", TEXT, sXML_line_break, XML_TYPE_BOOL ),
- MAP_ENTRY( "ArrangeOrder", CHART, sXML_label_arrangement, XML_SCH_TYPE_AXIS_ARRANGEMENT ),
- MAP_SPECIAL( "NumberFormat", STYLE, sXML_data_style_name, XML_TYPE_NUMBER, NUMBER_FORMAT ),
- MAP_ENTRY( "LinkNumberFormatToSource", CHART, sXML_link_data_style_to_source, XML_TYPE_BOOL ),
- MAP_ENTRY( "Visible", CHART, sXML_visible, XML_TYPE_BOOL ),
+ MAP_ENTRY( "DisplayLabels", CHART, XML_DISPLAY_LABEL, XML_TYPE_BOOL ),
+ MAP_SPECIAL( "Marks", CHART, XML_TICK_MARKS_MAJOR_INNER, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MAJ_INNER ), // convert one constant
+ MAP_SPECIAL( "Marks", CHART, XML_TICK_MARKS_MAJOR_OUTER, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MAJ_OUTER ), // to two bools
+ MAP_SPECIAL( "HelpMarks", CHART, XML_TICK_MARKS_MINOR_INNER, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MIN_INNER ), // see above
+ MAP_SPECIAL( "HelpMarks", CHART, XML_TICK_MARKS_MINOR_OUTER, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, TICKS_MIN_OUTER ),
+ MAP_ENTRY( "Logarithmic", CHART, XML_LOGARITHMIC, XML_TYPE_BOOL ),
+ MAP_CONTEXT( "Min", CHART, XML_MINIMUM, XML_TYPE_DOUBLE, MIN ),
+ MAP_CONTEXT( "Max", CHART, XML_MAXIMUM, XML_TYPE_DOUBLE, MAX ),
+ MAP_CONTEXT( "Origin", CHART, XML_ORIGIN, XML_TYPE_DOUBLE, ORIGIN ),
+ MAP_CONTEXT( "StepMain", CHART, XML_INTERVAL_MAJOR, XML_TYPE_DOUBLE, STEP_MAIN ),
+ MAP_CONTEXT( "StepHelp", CHART, XML_INTERVAL_MINOR, XML_TYPE_DOUBLE, STEP_HELP ),
+ MAP_ENTRY( "GapWidth", CHART, XML_GAP_WIDTH, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "Overlap", CHART, XML_OVERLAP, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "TextBreak", TEXT, XML_LINE_BREAK, XML_TYPE_BOOL ),
+ MAP_ENTRY( "ArrangeOrder", CHART, XML_LABEL_ARRANGEMENT, XML_SCH_TYPE_AXIS_ARRANGEMENT ),
+ MAP_SPECIAL( "NumberFormat", STYLE, XML_DATA_STYLE_NAME, XML_TYPE_NUMBER, NUMBER_FORMAT ),
+ MAP_ENTRY( "LinkNumberFormatToSource", CHART, XML_LINK_DATA_STYLE_TO_SOURCE, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Visible", CHART, XML_VISIBLE, XML_TYPE_BOOL ),
// statistical properties
- MAP_ENTRY( "MeanValue", CHART, sXML_mean_value, XML_TYPE_BOOL ),
- MAP_ENTRY( "ErrorMargin", CHART, sXML_error_margin, XML_TYPE_DOUBLE ),
- MAP_ENTRY( "ConstantErrorLow", CHART, sXML_error_lower_limit, XML_TYPE_DOUBLE ),
- MAP_ENTRY( "ConstantErrorHigh", CHART, sXML_error_upper_limit, XML_TYPE_DOUBLE ),
- MAP_ENTRY( "ErrorIndicator", CHART, sXML_error_upper_indicator, XML_SCH_TYPE_ERROR_INDICATOR_UPPER | MID_FLAG_MERGE_PROPERTY ), // convert one constant
- MAP_ENTRY( "ErrorIndicator", CHART, sXML_error_lower_indicator, XML_SCH_TYPE_ERROR_INDICATOR_LOWER | MID_FLAG_MERGE_PROPERTY ), // to two bools
- MAP_ENTRY( "ErrorCategory", CHART, sXML_error_category, XML_SCH_TYPE_ERROR_CATEGORY ),
- MAP_ENTRY( "PercentageError", CHART, sXML_error_percentage, XML_TYPE_DOUBLE ),
- MAP_ENTRY( "RegressionCurves", CHART, sXML_regression_type, XML_SCH_TYPE_REGRESSION_TYPE ),
+ MAP_ENTRY( "MeanValue", CHART, XML_MEAN_VALUE, XML_TYPE_BOOL ),
+ MAP_ENTRY( "ErrorMargin", CHART, XML_ERROR_MARGIN, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "ConstantErrorLow", CHART, XML_ERROR_LOWER_LIMIT, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "ConstantErrorHigh", CHART, XML_ERROR_UPPER_LIMIT, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "ErrorIndicator", CHART, XML_ERROR_UPPER_INDICATOR, XML_SCH_TYPE_ERROR_INDICATOR_UPPER | MID_FLAG_MERGE_PROPERTY ), // convert one constant
+ MAP_ENTRY( "ErrorIndicator", CHART, XML_ERROR_LOWER_INDICATOR, XML_SCH_TYPE_ERROR_INDICATOR_LOWER | MID_FLAG_MERGE_PROPERTY ), // to two bools
+ MAP_ENTRY( "ErrorCategory", CHART, XML_ERROR_CATEGORY, XML_SCH_TYPE_ERROR_CATEGORY ),
+ MAP_ENTRY( "PercentageError", CHART, XML_ERROR_PERCENTAGE, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "RegressionCurves", CHART, XML_REGRESSION_TYPE, XML_SCH_TYPE_REGRESSION_TYPE ),
// series/data-point properties
- MAP_SPECIAL( "DataCaption", CHART, sXML_data_label_number, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, DATA_LABEL_NUMBER ), // convert one constant
- MAP_SPECIAL( "DataCaption", CHART, sXML_data_label_text, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, DATA_LABEL_TEXT ), // to 'tristate' and two bools
- MAP_SPECIAL( "DataCaption", CHART, sXML_data_label_symbol, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, DATA_LABEL_SYMBOL ),
- MAP_ENTRY( "SegmentOffset", CHART, sXML_pie_offset, XML_TYPE_NUMBER ),
+ MAP_SPECIAL( "DataCaption", CHART, XML_DATA_LABEL_NUMBER, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, DATA_LABEL_NUMBER ), // convert one constant
+ MAP_SPECIAL( "DataCaption", CHART, XML_DATA_LABEL_TEXT, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, DATA_LABEL_TEXT ), // to 'tristate' and two bools
+ MAP_SPECIAL( "DataCaption", CHART, XML_DATA_LABEL_SYMBOL, XML_TYPE_NUMBER | MID_FLAG_MERGE_PROPERTY, DATA_LABEL_SYMBOL ),
+ MAP_ENTRY( "SegmentOffset", CHART, XML_PIE_OFFSET, XML_TYPE_NUMBER ),
// text properties for titles
- MAP_SPECIAL( "TextRotation", TEXT, sXML_rotation_angle, XML_TYPE_NUMBER, TEXT_ROTATION ), // convert 1/100th degrees to degrees
+ MAP_SPECIAL( "TextRotation", TEXT, XML_ROTATION_ANGLE, XML_TYPE_NUMBER, TEXT_ROTATION ), // convert 1/100th degrees to degrees
MAP_ENTRY_END
};
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 7f0a49181fee..71fc62ccf9eb 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PropertyMaps.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: bm $ $Date: 2001-06-15 11:08:42 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,6 +93,9 @@
#ifndef _XMLOFF_XMLEXP_HXX
#include "xmlexp.hxx"
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLERRORINDICATORPROPERTYHDL_HXX_
#include "XMLErrorIndicatorPropertyHdl.hxx"
@@ -132,6 +135,7 @@
#define SCH_XML_UNSETFLAG( status, flag ) (status) = ((status) | (flag)) - (flag)
using namespace com::sun::star;
+using namespace ::xmloff::token;
// the following class implementations are in this file:
//
@@ -209,9 +213,9 @@ XMLChartPropertySetMapper::~XMLChartPropertySetMapper()
XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
SvXMLExport& rExport) :
SvXMLExportPropertyMapper( rMapper ),
- msCDATA( rtl::OUString::createFromAscii( sXML_CDATA )),
- msTrue( rtl::OUString::createFromAscii( sXML_true )),
- msFalse( rtl::OUString::createFromAscii( sXML_false )),
+ msCDATA( GetXMLToken( XML_CDATA )),
+ msTrue( GetXMLToken( XML_TRUE )),
+ msFalse( GetXMLToken( XML_FALSE )),
mrExport( rExport )
{
// chain draw properties
@@ -344,11 +348,11 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
{
rProperty.maValue >>= nValue;
if((( nValue & chart::ChartDataCaption::VALUE ) == chart::ChartDataCaption::VALUE ))
- sValueBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( sXML_value ));
+ sValueBuffer.append( GetXMLToken( XML_VALUE ));
else if(( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT )
- sValueBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( sXML_percentage ));
+ sValueBuffer.append( GetXMLToken( XML_PERCENTAGE ));
else
- sValueBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( sXML_none ));
+ sValueBuffer.append( GetXMLToken( XML_NONE ));
}
break;
case XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_TEXT:
@@ -471,11 +475,11 @@ sal_Bool XMLChartImportPropertyMapper::handleSpecialItem(
{
// modify old value
rProperty.maValue >>= nValue;
- if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_none )))
+ if( IsXMLToken( rValue, XML_NONE ))
SCH_XML_UNSETFLAG( nValue, chart::ChartDataCaption::VALUE | chart::ChartDataCaption::PERCENT );
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_value )))
+ else if( IsXMLToken( rValue, XML_VALUE ) )
SCH_XML_SETFLAG( nValue, chart::ChartDataCaption::VALUE );
- else // must be sXML_percentage
+ else // must be XML_PERCENTAGE
SCH_XML_SETFLAG( nValue, chart::ChartDataCaption::PERCENT );
rProperty.maValue <<= nValue;
}
diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
index 65d88ad12256..67985cda25ba 100644
--- a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
+++ b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SchXMLAutoStylePoolP.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: bm $ $Date: 2001-02-14 17:11:24 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,6 +73,12 @@
#ifndef _XMLOFF_NMSPMAP_HXX
#include "nmspmap.hxx"
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
+using ::xmloff::token::GetXMLToken;
+using ::xmloff::token::XML_CDATA;
SchXMLAutoStylePoolP::SchXMLAutoStylePoolP( SchXMLExport& rSchXMLExport ) :
mrSchXMLExport( rSchXMLExport )
@@ -89,7 +95,7 @@ void SchXMLAutoStylePoolP::exportStyleAttributes(
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap ) const
{
- const rtl::OUString sCDATA( RTL_CONSTASCII_USTRINGPARAM( sXML_CDATA ));
+ const rtl::OUString sCDATA( GetXMLToken( XML_CDATA ));
SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties,
rPropExp, rUnitConverter, rNamespaceMap );
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index d86c3fd092e4..39f3b3d9969e 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SchXMLChartContext.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: bm $ $Date: 2001-06-26 13:08:17 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,8 +75,8 @@
#ifndef _XMLOFF_XMLEMENT_HXX
#include "xmlement.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
#include "nmspmap.hxx"
@@ -756,14 +756,14 @@ void SchXMLTitleContext::StartElement( const uno::Reference< xml::sax::XAttribut
if( nPrefix == XML_NAMESPACE_SVG )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_x )))
+ if( IsXMLToken( aLocalName, XML_X ) )
GetImport().GetMM100UnitConverter().convertMeasure( mrPosition.X, aValue );
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_y )))
+ else if( IsXMLToken( aLocalName, XML_Y ) )
GetImport().GetMM100UnitConverter().convertMeasure( mrPosition.Y, aValue );
}
else if( nPrefix == XML_NAMESPACE_CHART )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_style_name )))
+ if( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
msAutoStyleName = aValue;
}
}
@@ -794,7 +794,7 @@ SvXMLImportContext* SchXMLTitleContext::CreateChildContext(
SvXMLImportContext* pContext = 0;
if( nPrefix == XML_NAMESPACE_TEXT &&
- rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_p )))
+ IsXMLToken( rLocalName, XML_P ) )
{
pContext = new SchXMLParagraphContext( GetImport(), rLocalName, mrTitle );
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 0465cf9d9bf3..5fc15719f279 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SchXMLExport.cxx,v $
*
- * $Revision: 1.50 $
+ * $Revision: 1.51 $
*
- * last change: $Author: bm $ $Date: 2001-06-21 11:29:50 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,8 +80,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_FAMILIES_HXX_
#include "families.hxx"
@@ -161,12 +161,8 @@
using namespace rtl;
using namespace com::sun::star;
+using namespace ::xmloff::token;
-#define SCH_XML_AXIS_NAME_X "primary-x"
-#define SCH_XML_AXIS_NAME_2X "secondary-x"
-#define SCH_XML_AXIS_NAME_Y "primary-y"
-#define SCH_XML_AXIS_NAME_2Y "secondary-y"
-#define SCH_XML_AXIS_NAME_Z "primary-z"
// ========================================
// class SchXMLExportHelper
@@ -383,45 +379,45 @@ void SchXMLExportHelper::parseDocument( uno::Reference< chart::XChartDocument >&
// determine class
if( sChartType.getLength())
{
- rtl::OUString sXMLChartType;
+ enum XMLTokenEnum eXMLChartType = XML_TOKEN_INVALID;
rtl::OUString sAddInName;
if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.LineDiagram" )))
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_line ));
+ eXMLChartType = XML_LINE;
else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.AreaDiagram" )))
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_area ));
+ eXMLChartType = XML_AREA;
else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.BarDiagram" )))
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_bar ));
+ eXMLChartType = XML_BAR;
else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.PieDiagram" )))
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_circle ));
+ eXMLChartType = XML_CIRCLE;
else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.DonutDiagram" )))
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_ring ));
+ eXMLChartType = XML_RING;
else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.XYDiagram" )))
{
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_scatter ));
+ eXMLChartType = XML_SCATTER;
mnDomainAxes = 1;
}
else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.NetDiagram" )))
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_radar ));
+ eXMLChartType = XML_RADAR;
else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.StockDiagram" )))
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_stock ));
+ eXMLChartType = XML_STOCK;
else // servie-name of add-in
{
- sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_add_in ));
+ eXMLChartType = XML_ADD_IN;
sAddInName = sChartType;
}
- if( sXMLChartType.getLength())
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_class, sXMLChartType );
+ if( eXMLChartType != XML_TOKEN_INVALID )
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, eXMLChartType );
if( sAddInName.getLength())
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_add_in_name, sAddInName );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ADD_IN_NAME, sAddInName );
}
// write style name
AddAutoStyleAttribute( aPropertyStates );
//element
- pElChart = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_chart, sal_True, sal_True );
+ pElChart = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_CHART, sal_True, sal_True );
}
else // autostyles
{
@@ -452,7 +448,7 @@ void SchXMLExportHelper::parseDocument( uno::Reference< chart::XChartDocument >&
AddAutoStyleAttribute( aPropertyStates );
// element
- SvXMLElementExport aElTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+ SvXMLElementExport aElTitle( mrExport, XML_NAMESPACE_CHART, XML_TITLE, sal_True, sal_True );
// content (text:p)
uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
@@ -496,7 +492,7 @@ void SchXMLExportHelper::parseDocument( uno::Reference< chart::XChartDocument >&
AddAutoStyleAttribute( aPropertyStates );
// element (has no subelements)
- SvXMLElementExport aElSubTitle( mrExport, XML_NAMESPACE_CHART, sXML_subtitle, sal_True, sal_True );
+ SvXMLElementExport aElSubTitle( mrExport, XML_NAMESPACE_CHART, XML_SUBTITLE, sal_True, sal_True );
// content (text:p)
uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
@@ -549,22 +545,22 @@ void SchXMLExportHelper::parseDocument( uno::Reference< chart::XChartDocument >&
switch( aLegendPos )
{
case chart::ChartLegendPosition_LEFT:
- msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_left ));
+ msString = GetXMLToken(XML_LEFT);
break;
case chart::ChartLegendPosition_RIGHT:
- msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_right ));
+ msString = GetXMLToken(XML_RIGHT);
break;
case chart::ChartLegendPosition_TOP:
- msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_top ));
+ msString = GetXMLToken(XML_TOP);
break;
case chart::ChartLegendPosition_BOTTOM:
- msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_bottom ));
+ msString = GetXMLToken(XML_BOTTOM);
break;
}
// export anchor position
if( msString.getLength())
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_legend_position, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, msString );
// export absolute position
msString = rtl::OUString();
@@ -577,7 +573,7 @@ void SchXMLExportHelper::parseDocument( uno::Reference< chart::XChartDocument >&
AddAutoStyleAttribute( aPropertyStates );
// element
- SvXMLElementExport aLegend( mrExport, XML_NAMESPACE_CHART, sXML_legend, sal_True, sal_True );
+ SvXMLElementExport aLegend( mrExport, XML_NAMESPACE_CHART, XML_LEGEND, sal_True, sal_True );
}
else // autostyles
{
@@ -630,8 +626,8 @@ void SchXMLExportHelper::exportTable( uno::Reference< chart::XChartDataArray >&
{
// table element
// -------------
- mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_name, msTableName );
- SvXMLElementExport aTable( mrExport, XML_NAMESPACE_TABLE, sXML_table, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, msTableName );
+ SvXMLElementExport aTable( mrExport, XML_NAMESPACE_TABLE, XML_TABLE, sal_True, sal_True );
if( rData.is())
{
@@ -678,48 +674,48 @@ void SchXMLExportHelper::exportTable( uno::Reference< chart::XChartDataArray >&
if( mbHasCategoryLabels )
{
// row description are put in the first column
- SvXMLElementExport aHeaderColumns( mrExport, XML_NAMESPACE_TABLE, sXML_table_header_columns, sal_True, sal_True );
- SvXMLElementExport aHeaderColumn( mrExport, XML_NAMESPACE_TABLE, sXML_table_column, sal_True, sal_True );
+ SvXMLElementExport aHeaderColumns( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_HEADER_COLUMNS, sal_True, sal_True );
+ SvXMLElementExport aHeaderColumn( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, sal_True, sal_True );
}
// non-header columns
if( mnSeriesCount )
{
- SvXMLElementExport aColumns( mrExport, XML_NAMESPACE_TABLE, sXML_table_columns, sal_True, sal_True );
- mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_number_columns_repeated,
+ SvXMLElementExport aColumns( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMNS, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED,
rtl::OUString::valueOf( (sal_Int64) mnSeriesCount ));
- SvXMLElementExport aColumn( mrExport, XML_NAMESPACE_TABLE, sXML_table_column, sal_True, sal_True );
+ SvXMLElementExport aColumn( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, sal_True, sal_True );
}
// rows
if( mbHasSeriesLabels )
{
- SvXMLElementExport aHeaderRows( mrExport, XML_NAMESPACE_TABLE, sXML_table_header_rows, sal_True, sal_True );
- SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, sXML_table_row, sal_True, sal_True );
+ SvXMLElementExport aHeaderRows( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_HEADER_ROWS, sal_True, sal_True );
+ SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True );
// write one empty cell (the cell A1 is never used)
{
- SvXMLElementExport aEmptyCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+ SvXMLElementExport aEmptyCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
}
for( nSeries = 0; nSeries < nSeriesLablesLength; nSeries++ )
{
- mrExport.AddAttributeASCII( XML_NAMESPACE_TABLE, sXML_value_type, sXML_string );
- SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_VALUE_TYPE, XML_STRING );
+ SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
exportText( xSeriesLabels[ nSeries ] );
}
}
// export data
- SvXMLElementExport aRows( mrExport, XML_NAMESPACE_TABLE, sXML_table_rows, sal_True, sal_True );
+ SvXMLElementExport aRows( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROWS, sal_True, sal_True );
for( nDataPoint = 0; nDataPoint < nSeriesLength; nDataPoint++ )
{
// <table:table-row>
- SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, sXML_table_row, sal_True, sal_True );
+ SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True );
pData = pSequence[ nDataPoint ].getConstArray();
if( mbHasCategoryLabels )
{
// cells containing row descriptions (in the first column)
- mrExport.AddAttributeASCII( XML_NAMESPACE_TABLE, sXML_value_type, sXML_string );
- SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_VALUE_TYPE, XML_STRING );
+ SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
if( nDataPoint < nCategoryLabelsLength )
exportText( xCategoryLabels[ nDataPoint ] );
}
@@ -738,9 +734,9 @@ void SchXMLExportHelper::exportTable( uno::Reference< chart::XChartDataArray >&
msString = msStringBuffer.makeStringAndClear();
// <table:table-cell>
- mrExport.AddAttributeASCII( XML_NAMESPACE_TABLE, sXML_value_type, sXML_float );
- mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_value, msString );
- SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_VALUE_TYPE, XML_FLOAT );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_VALUE, msString );
+ SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
// <text:p>
exportText( msString );
@@ -789,7 +785,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
if( msChartAddress.getLength())
{
- mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_cell_range_address, msChartAddress );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, msChartAddress );
uno::Reference< chart::XChartDocument > xDoc( mrExport.GetModel(), uno::UNO_QUERY );
if( xDoc.is() )
@@ -832,7 +828,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
{
// this attribute is for charts embedded in calc documents only.
// With this you are able to store a file again in 5.0 binary format
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_table_number_list, msTableNumberList );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_TABLE_NUMBER_LIST, msTableNumberList );
}
// attributes
@@ -881,7 +877,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
}
// element
- pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_plot_area, sal_True, sal_True );
+ pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, sal_True, sal_True );
// light sources (inside plot area element)
if( bIs3DChart &&
@@ -926,9 +922,9 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
if( msStringBuffer.getLength())
{
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_cell_range_address, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, msString );
}
- SvXMLElementExport aCategories( mrExport, XML_NAMESPACE_CHART, sXML_categories, sal_True, sal_True );
+ SvXMLElementExport aCategories( mrExport, XML_NAMESPACE_CHART, XML_CATEGORIES, sal_True, sal_True );
}
// series elements
@@ -977,7 +973,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
getCellAddress( nSeries + nDataPointOffset, nSeriesOffset + mnSeriesLength - 1 );
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_values_cell_range_address, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, msString );
// reference to label
if( mbHasSeriesLabels )
@@ -985,7 +981,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
msStringBuffer.append( msTableName );
getCellAddress( nSeries + nDataPointOffset, 0 );
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_label_cell_address, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS, msString );
}
}
else
@@ -996,10 +992,10 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
// deprecated
// if( maSeriesAddresses.getLength() > nSeries )
// {
-// mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_values_cell_range_address,
+// mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS,
// maSeriesAddresses[ nSeries ].DataRangeAddress );
// if( maSeriesAddresses[ nSeries ].LabelAddress.getLength())
-// mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_label_cell_address,
+// mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS,
// maSeriesAddresses[ nSeries ].LabelAddress );
// }
}
@@ -1007,9 +1003,9 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
if( bHasTwoYAxes )
{
if( nAttachedAxis == chart::ChartAxisAssign::SECONDARY_Y )
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_attached_axis, SCH_XML_AXIS_NAME_2Y );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_SECONDARY_Y );
else
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_attached_axis, SCH_XML_AXIS_NAME_Y );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_PRIMARY_Y );
}
// write style name
@@ -1018,12 +1014,12 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
{
DBG_ASSERT( ! maAutoStyleNameQueue.empty(), "Autostyle queue empty!" );
aSeriesASName = maAutoStyleNameQueue.front();
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aSeriesASName );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_STYLE_NAME, aSeriesASName );
maAutoStyleNameQueue.pop();
}
// open series element until end of for loop
- pSeries = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_series, sal_True, sal_True );
+ pSeries = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_SERIES, sal_True, sal_True );
}
else // autostyles
{
@@ -1065,9 +1061,9 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
msString = msStringBuffer.makeStringAndClear();
if( msString.getLength())
{
- mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_cell_range_address, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, msString );
}
- SvXMLElementExport aDomain( mrExport, XML_NAMESPACE_CHART, sXML_domain, sal_True, sal_True );
+ SvXMLElementExport aDomain( mrExport, XML_NAMESPACE_CHART, XML_DOMAIN, sal_True, sal_True );
}
}
@@ -1138,7 +1134,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
// Write reapeat counter (if data point run contains more than one point).
if( nRepeated > 1 )
{
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_repeated,
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED,
rtl::OUString::valueOf( (sal_Int64)( nRepeated ) ));
}
@@ -1146,11 +1142,11 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
if( aLastASName.getLength() &&
! aLastASName.equals( aSeriesASName ))
{
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aLastASName );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_STYLE_NAME, aLastASName );
}
// Write the actual point data.
- SvXMLElementExport aPoint( mrExport, XML_NAMESPACE_CHART, sXML_data_point, sal_True, sal_True );
+ SvXMLElementExport aPoint( mrExport, XML_NAMESPACE_CHART, XML_DATA_POINT, sal_True, sal_True );
// Reset repeat counter for the new style.
nRepeated = 1;
@@ -1175,7 +1171,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
{
if( nRepeated > 1 )
{
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_repeated,
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED,
rtl::OUString::valueOf( (sal_Int64)( nRepeated ) ));
}
@@ -1183,10 +1179,10 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
aLastASName.getLength() &&
! aLastASName.equals( aSeriesASName ))
{
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aLastASName );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_STYLE_NAME, aLastASName );
}
- SvXMLElementExport aPoint( mrExport, XML_NAMESPACE_CHART, sXML_data_point, sal_True, sal_True );
+ SvXMLElementExport aPoint( mrExport, XML_NAMESPACE_CHART, XML_DATA_POINT, sal_True, sal_True );
}
}
@@ -1218,7 +1214,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
// add style name attribute
AddAutoStyleAttribute( aPropertyStates );
- SvXMLElementExport aWall( mrExport, XML_NAMESPACE_CHART, sXML_wall, sal_True, sal_True );
+ SvXMLElementExport aWall( mrExport, XML_NAMESPACE_CHART, XML_WALL, sal_True, sal_True );
}
else // autostyles
{
@@ -1379,17 +1375,18 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
}
if( bExportContent )
{
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, (mnDomainAxes > 0)
- ? sXML_domain // scatter (or bubble) chart
- : sXML_category );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, (mnDomainAxes > 0)
+ ? XML_DOMAIN // scatter (or bubble) chart
+ : XML_CATEGORY );
+
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_NAME, XML_PRIMARY_X );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_X );
// write style name
AddAutoStyleAttribute( aPropertyStates );
// element
- pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_AXIS, sal_True, sal_True );
}
else // autostyles
{
@@ -1416,7 +1413,7 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
addPosition( xShape );
AddAutoStyleAttribute( aPropertyStates );
- SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+ SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, XML_TITLE, sal_True, sal_True );
// paragraph containing title
exportText( aText );
@@ -1437,8 +1434,8 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
if( bExportContent )
{
AddAutoStyleAttribute( aPropertyStates );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_major );
- SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_MAJOR );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, XML_GRID, sal_True, sal_True );
}
else
{
@@ -1453,8 +1450,8 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
if( bExportContent )
{
AddAutoStyleAttribute( aPropertyStates );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_minor );
- SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_MINOR );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, XML_GRID, sal_True, sal_True );
}
else
{
@@ -1491,13 +1488,13 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
}
if( bExportContent )
{
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, (mnDomainAxes > 0)
- ? sXML_domain // scatter (or bubble) chart
- : sXML_category );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, (mnDomainAxes > 0)
+ ? XML_DOMAIN // scatter (or bubble) chart
+ : XML_CATEGORY );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_2X );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_NAME, XML_SECONDARY_X );
AddAutoStyleAttribute( aPropertyStates );
- pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_AXIS, sal_True, sal_True );
}
else // autostyles
{
@@ -1537,10 +1534,10 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
}
if( bExportContent )
{
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_value );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_Y );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_VALUE );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_NAME, XML_PRIMARY_Y );
AddAutoStyleAttribute( aPropertyStates );
- pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_AXIS, sal_True, sal_True );
}
else
{
@@ -1567,7 +1564,7 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
addPosition( xShape );
AddAutoStyleAttribute( aPropertyStates );
- SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+ SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, XML_TITLE, sal_True, sal_True );
// paragraph containing title
exportText( aText );
@@ -1589,8 +1586,8 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
if( bExportContent )
{
AddAutoStyleAttribute( aPropertyStates );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_major );
- SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_MAJOR );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, XML_GRID, sal_True, sal_True );
}
else
{
@@ -1607,8 +1604,8 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
if( bExportContent )
{
AddAutoStyleAttribute( aPropertyStates );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_minor );
- SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_MINOR );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, XML_GRID, sal_True, sal_True );
}
else
{
@@ -1643,10 +1640,10 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
}
if( bExportContent )
{
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_value );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_2Y );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_VALUE );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_NAME, XML_SECONDARY_Y );
AddAutoStyleAttribute( aPropertyStates );
- pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_AXIS, sal_True, sal_True );
}
else // autostyles
{
@@ -1684,10 +1681,11 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
}
if( bExportContent )
{
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_series );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_Z );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_SERIES );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_NAME, XML_PRIMARY_Z );
+
AddAutoStyleAttribute( aPropertyStates );
- pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_AXIS, sal_True, sal_True );
}
else
{
@@ -1714,7 +1712,7 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
addPosition( xShape );
AddAutoStyleAttribute( aPropertyStates );
- SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+ SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, XML_TITLE, sal_True, sal_True );
// paragraph containing title
exportText( aText );
@@ -1736,8 +1734,8 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
if( bExportContent )
{
AddAutoStyleAttribute( aPropertyStates );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_major );
- SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_MAJOR );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, XML_GRID, sal_True, sal_True );
}
else
{
@@ -1754,8 +1752,8 @@ void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram,
if( bExportContent )
{
AddAutoStyleAttribute( aPropertyStates );
- mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_minor );
- SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, XML_MINOR );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, XML_GRID, sal_True, sal_True );
}
else
{
@@ -1800,11 +1798,11 @@ void SchXMLExportHelper::addPosition( uno::Reference< drawing::XShape > xShape )
mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aPos.X );
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_x, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_X, msString );
mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aPos.Y );
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_y, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_Y, msString );
}
}
@@ -1816,11 +1814,11 @@ void SchXMLExportHelper::addSize( uno::Reference< drawing::XShape > xShape )
mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aSize.Width );
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_width, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, msString );
mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aSize.Height );
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_height, msString );
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString );
}
}
@@ -1854,7 +1852,7 @@ void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertySt
{
DBG_ASSERT( ! maAutoStyleNameQueue.empty(), "Autostyle queue empty!" );
- mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, maAutoStyleNameQueue.front());
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_STYLE_NAME, maAutoStyleNameQueue.front());
maAutoStyleNameQueue.pop();
}
}
@@ -1974,11 +1972,11 @@ void SchXMLExport::_ExportContent()
GetMM100UnitConverter().convertMeasure( sStringBuffer, aSize.Width );
sString = sStringBuffer.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_SVG, sXML_width, sString );
+ AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, sString );
GetMM100UnitConverter().convertMeasure( sStringBuffer, aSize.Height );
sString = sStringBuffer.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_SVG, sXML_height, sString );
+ AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, sString );
}
// determine if data comes from the outside
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index a144dc00596b..a4cbbdace926 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SchXMLPlotAreaContext.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,8 +70,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
@@ -969,7 +969,7 @@ SvXMLImportContext* SchXMLAxisContext::CreateChildContext(
if( nPrefix == XML_NAMESPACE_CHART )
{
- if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_title )))
+ if( IsXMLToken( rLocalName, XML_TITLE ) )
{
uno::Reference< drawing::XShape > xTitleShape = getTitleShape();
pContext = new SchXMLTitleContext( mrImportHelper, rImport, rLocalName,
@@ -977,7 +977,7 @@ SvXMLImportContext* SchXMLAxisContext::CreateChildContext(
xTitleShape,
maCurrentAxis.aPosition );
}
- else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_grid )))
+ else if( IsXMLToken( rLocalName, XML_GRID ) )
{
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
sal_Bool bIsMajor = sal_True; // default value for class is "major"
@@ -991,12 +991,12 @@ SvXMLImportContext* SchXMLAxisContext::CreateChildContext(
if( nPrefix == XML_NAMESPACE_CHART )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_class )))
+ if( IsXMLToken( aLocalName, XML_CLASS ) )
{
- if( xAttrList->getValueByIndex( i ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_minor )))
+ if( IsXMLToken( xAttrList->getValueByIndex( i ), XML_MINOR ) )
bIsMajor = sal_False;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_style_name )))
+ else if( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
sAutoStyleName = xAttrList->getValueByIndex( i );
}
}
@@ -1179,9 +1179,9 @@ void SchXMLDataPointContext::StartElement( const uno::Reference< xml::sax::XAttr
if( nPrefix == XML_NAMESPACE_CHART )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_style_name )))
+ if( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
sAutoStyleName = xAttrList->getValueByIndex( i );
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_repeated )))
+ else if( IsXMLToken( aLocalName, XML_REPEATED ) )
nRepeat = xAttrList->getValueByIndex( i ).toInt32();
}
}
@@ -1223,7 +1223,7 @@ void SchXMLCategoriesDomainContext::StartElement( const uno::Reference< xml::sax
USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if( nPrefix == XML_NAMESPACE_TABLE &&
- aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_cell_range_address )))
+ IsXMLToken( aLocalName, XML_CELL_RANGE_ADDRESS ) )
{
mrAddress = xAttrList->getValueByIndex( i );
}
@@ -1264,7 +1264,7 @@ void SchXMLWallFloorContext::StartElement( const uno::Reference< xml::sax::XAttr
USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if( nPrefix == XML_NAMESPACE_CHART &&
- aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_style_name )))
+ IsXMLToken( aLocalName, XML_STYLE_NAME ) )
{
sAutoStyleName = xAttrList->getValueByIndex( i );
}
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index b69ed8e431bd..f902eed5d946 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SchXMLTableContext.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: bm $ $Date: 2001-05-25 12:01:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,8 +74,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
#include "nmspmap.hxx"
@@ -101,6 +101,7 @@
#endif
using namespace com::sun::star;
+using namespace ::xmloff::token;
// ----------------------------------------
// class SchXMLTableContext
@@ -190,7 +191,7 @@ SvXMLImportContext* SchXMLTableColumnsContext::CreateChildContext(
SvXMLImportContext* pContext = 0;
if( nPrefix == XML_NAMESPACE_TABLE &&
- rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_column )))
+ IsXMLToken( rLocalName, XML_TABLE_COLUMN ) )
{
pContext = new SchXMLTableColumnContext( mrImportHelper, GetImport(), rLocalName, mrTable );
}
@@ -228,7 +229,7 @@ void SchXMLTableColumnContext::StartElement( const uno::Reference< xml::sax::XAt
USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if( nPrefix == XML_NAMESPACE_TABLE &&
- aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_number_columns_repeated )))
+ IsXMLToken( aLocalName, XML_NUMBER_COLUMNS_REPEATED ) )
{
aValue = xAttrList->getValueByIndex( i );
break; // we only need this attribute
@@ -281,7 +282,7 @@ SvXMLImportContext* SchXMLTableRowsContext::CreateChildContext(
SvXMLImportContext* pContext = 0;
if( nPrefix == XML_NAMESPACE_TABLE &&
- rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_row )))
+ IsXMLToken( rLocalName, XML_TABLE_ROW ) )
{
pContext = new SchXMLTableRowContext( mrImportHelper, GetImport(), rLocalName, mrTable );
}
@@ -328,7 +329,7 @@ SvXMLImportContext* SchXMLTableRowContext::CreateChildContext(
// <table:table-cell> element
if( nPrefix == XML_NAMESPACE_TABLE &&
- rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_cell )))
+ IsXMLToken(rLocalName, XML_TABLE_CELL ) )
{
pContext = new SchXMLTableCellContext( mrImportHelper, GetImport(), rLocalName, mrTable );
}
@@ -382,9 +383,9 @@ void SchXMLTableCellContext::StartElement( const uno::Reference< xml::sax::XAttr
{
case XML_TOK_CELL_VAL_TYPE:
aValue = xAttrList->getValueByIndex( i );
- if( aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_float )))
+ if( IsXMLToken( aValue, XML_FLOAT ) )
eValueType = SCH_CELL_TYPE_FLOAT;
- else if( aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_string )))
+ else if( IsXMLToken( aValue, XML_STRING ) )
eValueType = SCH_CELL_TYPE_STRING;
break;
@@ -425,7 +426,7 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext(
// <text:p> element
if( mbReadPara &&
nPrefix == XML_NAMESPACE_TEXT &&
- rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_p )))
+ IsXMLToken( rLocalName, XML_P ) )
{
// we have to read a string here (not a float)
pContext = new SchXMLParagraphContext( GetImport(), rLocalName, maCellContent );
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index c17f37878654..a95ad0a2f537 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLChartStyleContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: bm $ $Date: 2001-02-14 17:14:51 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -60,8 +60,8 @@
************************************************************************/
#include "XMLChartStyleContext.hxx"
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNUMFI_HXX
#include "xmlnumfi.hxx"
@@ -71,6 +71,9 @@
#endif
using namespace com::sun::star;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_DATA_STYLE_NAME;
+
TYPEINIT1( XMLChartStyleContext, XMLPropStyleContext );
@@ -81,7 +84,7 @@ void XMLChartStyleContext::SetAttribute(
const ::rtl::OUString& rLocalName,
const ::rtl::OUString& rValue )
{
- if( rLocalName.compareToAscii( sXML_data_style_name ) == 0 )
+ if( IsXMLToken( rLocalName, XML_DATA_STYLE_NAME ) )
{
msDataStyleName = rValue;
}
diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx
index 8e66902b5d4f..e24f7e75c563 100644
--- a/xmloff/source/chart/contexts.cxx
+++ b/xmloff/source/chart/contexts.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: contexts.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cl $ $Date: 2001-03-04 17:48:54 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <tools/debug.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -97,6 +97,7 @@
#include "SchXMLChartContext.hxx"
using namespace com::sun::star;
+using namespace ::xmloff::token;
// ==================================================
@@ -108,10 +109,10 @@ SchXMLDocContext::SchXMLDocContext( SchXMLImportHelper& rImpHelper,
mrImportHelper( rImpHelper )
{
DBG_ASSERT( XML_NAMESPACE_OFFICE == nPrefix &&
- ( 0 == rLName.compareToAscii(sXML_document) ||
- 0 == rLName.compareToAscii(sXML_document_meta) ||
- 0 == rLName.compareToAscii(sXML_document_styles) ||
- 0 == rLName.compareToAscii(sXML_document_content) ),
+ ( IsXMLToken( rLName, XML_DOCUMENT ) ||
+ IsXMLToken( rLName, XML_DOCUMENT_META) ||
+ IsXMLToken( rLName, XML_DOCUMENT_STYLES) ||
+ IsXMLToken( rLName, XML_DOCUMENT_CONTENT) ),
"SchXMLDocContext instanciated with no <office:document> element" );
}
@@ -170,7 +171,7 @@ SchXMLBodyContext::SchXMLBodyContext( SchXMLImportHelper& rImpHelper,
mrImportHelper( rImpHelper )
{
DBG_ASSERT( XML_NAMESPACE_OFFICE == nPrefix &&
- rLName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_body )),
+ IsXMLToken( rLName, XML_BODY ),
"SchXMLBodyContext instanciated with no <office:body> element" );
}
@@ -190,7 +191,7 @@ SvXMLImportContext* SchXMLBodyContext::CreateChildContext(
// <chart:chart> element
if( nPrefix == XML_NAMESPACE_CHART &&
- rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_chart )))
+ IsXMLToken( rLocalName, XML_CHART ) )
{
pContext = mrImportHelper.CreateChartContext( GetImport(),
nPrefix, rLocalName,
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index e6c5c335978a..d9b3f8ec769f 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DocumentSettingsContext.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: sab $ $Date: 2001-05-23 12:38:52 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,8 +73,8 @@
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -122,6 +122,7 @@
#endif
using namespace com::sun::star;
+using namespace ::xmloff::token;
//------------------------------------------------------------------
@@ -338,21 +339,21 @@ SvXMLImportContext *CreateSettingsContext(SvXMLImport& rImport, USHORT nPrefix,
if (nPrefix == XML_NAMESPACE_CONFIG)
{
- if (aLocalName.compareToAscii(sXML_name) == 0)
+ if (IsXMLToken(aLocalName, XML_NAME))
rProp.Name = sValue;
}
}
if (nPrefix == XML_NAMESPACE_CONFIG)
{
- if (rLocalName.compareToAscii(sXML_config_item) == 0)
+ if (IsXMLToken(rLocalName, XML_CONFIG_ITEM))
pContext = new XMLConfigItemContext(rImport, nPrefix, rLocalName, xAttrList, rProp.Value, pBaseContext);
- else if((rLocalName.compareToAscii(sXML_config_item_set) == 0) ||
- (rLocalName.compareToAscii(sXML_config_item_map_entry) == 0))
+ else if((IsXMLToken(rLocalName, XML_CONFIG_ITEM_SET)) ||
+ (IsXMLToken(rLocalName, XML_CONFIG_ITEM_MAP_ENTRY)) )
pContext = new XMLConfigItemSetContext(rImport, nPrefix, rLocalName, xAttrList, rProp.Value, pBaseContext);
- else if(rLocalName.compareToAscii(sXML_config_item_map_named) == 0)
+ else if(IsXMLToken(rLocalName, XML_CONFIG_ITEM_MAP_NAMED))
pContext = new XMLConfigItemMapNamedContext(rImport, nPrefix, rLocalName, xAttrList, rProp.Value, pBaseContext);
- else if(rLocalName.compareToAscii(sXML_config_item_map_indexed) == 0)
+ else if(IsXMLToken(rLocalName, XML_CONFIG_ITEM_MAP_INDEXED))
pContext = new XMLConfigItemMapIndexedContext(rImport, nPrefix, rLocalName, xAttrList, rProp.Value, rProp.Name, pBaseContext);
}
@@ -394,18 +395,18 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( USHORT nPref
if (nPrefix == XML_NAMESPACE_CONFIG)
{
- if (aLocalName.compareToAscii(sXML_name) == 0)
+ if (IsXMLToken(aLocalName, XML_NAME))
sName = sValue;
}
}
if (nPrefix == XML_NAMESPACE_CONFIG)
{
- if (rLocalName.compareToAscii(sXML_config_item_set) == 0)
+ if (IsXMLToken(rLocalName, XML_CONFIG_ITEM_SET))
{
- if (sName.compareToAscii(sXML_view_settings) == 0)
+ if (IsXMLToken(sName, XML_VIEW_SETTINGS))
pContext = new XMLConfigItemSetContext(GetImport(), nPrefix, rLocalName, xAttrList, aViewProps, NULL);
- else if (sName.compareToAscii(sXML_configuration_settings) == 0)
+ else if (IsXMLToken(sName, XML_CONFIGURATION_SETTINGS))
pContext = new XMLConfigItemSetContext(GetImport(), nPrefix, rLocalName, xAttrList, aConfigProps, NULL);
}
}
@@ -519,7 +520,7 @@ XMLConfigItemContext::XMLConfigItemContext(SvXMLImport& rImport, USHORT nPrfx, c
if (nPrefix == XML_NAMESPACE_CONFIG)
{
- if (aLocalName.compareToAscii(sXML_type) == 0)
+ if (IsXMLToken(aLocalName, XML_TYPE))
sType = sValue;
}
}
@@ -540,7 +541,7 @@ SvXMLImportContext *XMLConfigItemContext::CreateChildContext( USHORT nPrefix,
void XMLConfigItemContext::Characters( const ::rtl::OUString& rChars )
{
- if (sType.compareToAscii(sXML_base64Binary) == 0)
+ if (IsXMLToken(sType, XML_BASE64BINARY))
{
rtl::OUString sTrimmedChars( rChars.trim() );
if( sTrimmedChars.getLength() )
@@ -580,47 +581,47 @@ void XMLConfigItemContext::EndElement()
{
if (pBaseContext)
{
- if (sType.compareToAscii(sXML_boolean) == 0)
+ if (IsXMLToken(sType, XML_BOOLEAN))
{
sal_Bool bValue(sal_False);
- if (sValue.compareToAscii(sXML_true) == 0)
+ if (IsXMLToken(sValue, XML_TRUE))
bValue = sal_True;
rAny <<= bValue;
}
- else if (sType.compareToAscii(sXML_short) == 0)
+ else if (IsXMLToken(sType, XML_SHORT))
{
sal_Int32 nValue(0);
SvXMLUnitConverter::convertNumber(nValue, sValue);
rAny <<= static_cast<sal_Int16>(nValue);
}
- else if (sType.compareToAscii(sXML_int) == 0)
+ else if (IsXMLToken(sType, XML_INT))
{
sal_Int32 nValue(0);
SvXMLUnitConverter::convertNumber(nValue, sValue);
rAny <<= nValue;
}
- else if (sType.compareToAscii(sXML_long) == 0)
+ else if (IsXMLToken(sType, XML_LONG))
{
sal_Int64 nValue(sValue.toInt64());
rAny <<= nValue;
}
- else if (sType.compareToAscii(sXML_double) == 0)
+ else if (IsXMLToken(sType, XML_DOUBLE))
{
double fValue(0.0);
SvXMLUnitConverter::convertDouble(fValue, sValue);
rAny <<= fValue;
}
- else if (sType.compareToAscii(sXML_string) == 0)
+ else if (IsXMLToken(sType, XML_STRING))
{
rAny <<= sValue;
}
- else if (sType.compareToAscii(sXML_datetime) == 0)
+ else if (IsXMLToken(sType, XML_DATETIME))
{
util::DateTime aDateTime;
SvXMLUnitConverter::convertDateTime(aDateTime, sValue);
rAny <<= aDateTime;
}
- else if (sType.compareToAscii(sXML_base64Binary) == 0)
+ else if (IsXMLToken(sType, XML_BASE64BINARY))
{
rAny <<= aDecoded;
}
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 318390b907e8..8dd0753964da 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SettingsExportHelper.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: cl $ $Date: 2001-05-22 15:07:31 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,8 +66,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
@@ -114,6 +114,7 @@
#endif
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
XMLSettingsExportHelper::XMLSettingsExportHelper(SvXMLExport& rTempExport)
: rExport(rTempExport)
@@ -230,23 +231,23 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny,
void XMLSettingsExportHelper::exportBool(const sal_Bool bValue, const rtl::OUString& rName) const
{
DBG_ASSERT(rName.getLength(), "no name");
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_boolean);
- SvXMLElementExport aBoolElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_BOOLEAN);
+ SvXMLElementExport aBoolElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
rtl::OUString sValue;
if (bValue)
- sValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true));
+ sValue = GetXMLToken(XML_TRUE);
else
- sValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_false));
+ sValue = GetXMLToken(XML_FALSE);
rExport.GetDocHandler()->characters(sValue);
}
void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const
{
DBG_ASSERT(rName.getLength(), "no name");
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_short);
- SvXMLElementExport aShortElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_SHORT);
+ SvXMLElementExport aShortElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
rtl::OUStringBuffer sBuffer;
SvXMLUnitConverter::convertNumber(sBuffer, sal_Int32(nValue));
rExport.GetDocHandler()->characters(sBuffer.makeStringAndClear());
@@ -255,9 +256,9 @@ void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUS
void XMLSettingsExportHelper::exportInt(const sal_Int32 nValue, const rtl::OUString& rName) const
{
DBG_ASSERT(rName.getLength(), "no name");
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_int);
- SvXMLElementExport aIntElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_INT);
+ SvXMLElementExport aIntElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
rtl::OUStringBuffer sBuffer;
SvXMLUnitConverter::convertNumber(sBuffer, nValue);
rExport.GetDocHandler()->characters(sBuffer.makeStringAndClear());
@@ -266,9 +267,9 @@ void XMLSettingsExportHelper::exportInt(const sal_Int32 nValue, const rtl::OUStr
void XMLSettingsExportHelper::exportLong(const sal_Int64 nValue, const rtl::OUString& rName) const
{
DBG_ASSERT(rName.getLength(), "no name");
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_long);
- SvXMLElementExport aIntElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_LONG);
+ SvXMLElementExport aIntElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
rtl::OUString sValue(rtl::OUString::valueOf(nValue));
rExport.GetDocHandler()->characters(sValue);
}
@@ -276,9 +277,9 @@ void XMLSettingsExportHelper::exportLong(const sal_Int64 nValue, const rtl::OUSt
void XMLSettingsExportHelper::exportDouble(const double fValue, const rtl::OUString& rName) const
{
DBG_ASSERT(rName.getLength(), "no name");
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_double);
- SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_DOUBLE);
+ SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
rtl::OUStringBuffer sBuffer;
SvXMLUnitConverter::convertDouble(sBuffer, fValue);
rExport.GetDocHandler()->characters(sBuffer.makeStringAndClear());
@@ -287,9 +288,9 @@ void XMLSettingsExportHelper::exportDouble(const double fValue, const rtl::OUStr
void XMLSettingsExportHelper::exportString(const rtl::OUString& sValue, const rtl::OUString& rName) const
{
DBG_ASSERT(rName.getLength(), "no name");
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_string);
- SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_STRING);
+ SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
if (sValue.getLength())
rExport.GetDocHandler()->characters(sValue);
}
@@ -297,11 +298,11 @@ void XMLSettingsExportHelper::exportString(const rtl::OUString& sValue, const rt
void XMLSettingsExportHelper::exportDateTime(const util::DateTime& aValue, const rtl::OUString& rName) const
{
DBG_ASSERT(rName.getLength(), "no name");
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_datetime);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_DATETIME);
rtl::OUStringBuffer sBuffer;
SvXMLUnitConverter::convertDateTime(sBuffer, aValue);
- SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
rExport.GetDocHandler()->characters(sBuffer.makeStringAndClear());
}
@@ -313,8 +314,8 @@ void XMLSettingsExportHelper::exportSequencePropertyValue(
sal_Int32 nLength(aProps.getLength());
if(nLength)
{
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- SvXMLElementExport aSequenceElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item_set, sal_True, sal_True);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ SvXMLElementExport aSequenceElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM_SET, sal_True, sal_True);
for (sal_Int32 i = 0; i < nLength; i++)
CallTypeFunction(aProps[i].Value, aProps[i].Name);
}
@@ -386,9 +387,9 @@ void XMLSettingsExportHelper::exportbase64Binary(
{
DBG_ASSERT(rName.getLength(), "no name");
sal_Int32 nLength(aProps.getLength());
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- rExport.AddAttributeASCII(XML_NAMESPACE_CONFIG, sXML_type, sXML_base64Binary);
- SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item, sal_True, sal_False);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_TYPE, XML_BASE64BINARY);
+ SvXMLElementExport aDoubleElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, sal_True, sal_False);
if(nLength)
{
rtl::OUStringBuffer sBuffer;
@@ -408,8 +409,8 @@ void XMLSettingsExportHelper::exportMapEntry(const uno::Any& rAny,
if (nLength)
{
if (bNameAccess)
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- SvXMLElementExport aEntryElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item_map_entry, sal_True, sal_True);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ SvXMLElementExport aEntryElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM_MAP_ENTRY, sal_True, sal_True);
for (sal_Int32 i = 0; i < nLength; i++)
CallTypeFunction(aProps[i].Value, aProps[i].Name);
}
@@ -424,8 +425,8 @@ void XMLSettingsExportHelper::exportNameAccess(
"wrong NameAccess" );
if(aNamed->hasElements())
{
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- SvXMLElementExport aNamedElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item_map_named, sal_True, sal_True);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ SvXMLElementExport aNamedElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM_MAP_NAMED, sal_True, sal_True);
uno::Sequence< rtl::OUString > aNames(aNamed->getElementNames());
for (sal_Int32 i = 0; i < aNames.getLength(); i++)
exportMapEntry(aNamed->getByName(aNames[i]), aNames[i], sal_True);
@@ -442,8 +443,8 @@ void XMLSettingsExportHelper::exportIndexAccess(
rtl::OUString sEmpty;// ( RTLCONSTASCII_USTRINGPARAM( "View" ) );
if(aIndexed->hasElements())
{
- rExport.AddAttribute(XML_NAMESPACE_CONFIG, sXML_name, rName);
- SvXMLElementExport aIndexedElem(rExport, XML_NAMESPACE_CONFIG, sXML_config_item_map_indexed, sal_True, sal_True);
+ rExport.AddAttribute(XML_NAMESPACE_CONFIG, XML_NAME, rName);
+ SvXMLElementExport aIndexedElem(rExport, XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM_MAP_INDEXED, sal_True, sal_True);
sal_Int32 nCount = aIndexed->getCount();
for (sal_Int32 i = 0; i < nCount; i++)
{
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index c4085a6daba6..5955df607531 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLEmbeddedObjectImportContext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mib $ $Date: 2001-05-09 12:15:59 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,8 +76,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLFILTERSERVICENAMES_H
@@ -92,28 +92,28 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::xml::sax;
+using namespace ::xmloff::token;
struct XMLServiceMapEntry_Impl
{
- const sal_Char *sClass;
- sal_Int32 sClassLen;
+ enum XMLTokenEnum eClass;
const sal_Char *sFilterService;
sal_Int32 nFilterServiceLen;
};
#define SERVICE_MAP_ENTRY( cls, app ) \
- { sXML_##cls, sizeof(sXML_##cls)-1, \
+ { XML_##cls, \
XML_IMPORT_FILTER_##app, sizeof(XML_IMPORT_FILTER_##app)-1 }
const XMLServiceMapEntry_Impl aServiceMap[] =
{
- SERVICE_MAP_ENTRY( text, WRITER ),
- SERVICE_MAP_ENTRY( online_text, WRITER ),
- SERVICE_MAP_ENTRY( spreadsheet, CALC ),
- SERVICE_MAP_ENTRY( drawing, DRAW ),
- SERVICE_MAP_ENTRY( presentation, IMPRESS ),
- SERVICE_MAP_ENTRY( chart, CHART ),
- { 0, 0, 0, 0 }
+ SERVICE_MAP_ENTRY( TEXT, WRITER ),
+ SERVICE_MAP_ENTRY( ONLINE_TEXT, WRITER ),
+ SERVICE_MAP_ENTRY( SPREADSHEET, CALC ),
+ SERVICE_MAP_ENTRY( DRAWING, DRAW ),
+ SERVICE_MAP_ENTRY( PRESENTATION, IMPRESS ),
+ SERVICE_MAP_ENTRY( CHART, CHART ),
+ { XML_TOKEN_INVALID, 0, 0 }
};
class XMLEmbeddedObjectImportContext_Impl : public SvXMLImportContext
@@ -218,12 +218,12 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
SvXMLImportContext( rImport, nPrfx, rLName )
{
if( nPrfx == XML_NAMESPACE_MATH &&
- rLName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_math ) ) )
+ IsXMLToken( rLName, XML_MATH ) )
{
sFilterService = OUString( RTL_CONSTASCII_USTRINGPARAM(XML_IMPORT_FILTER_MATH) );
}
else if( nPrfx == XML_NAMESPACE_OFFICE &&
- rLName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_document ) ) )
+ IsXMLToken( rLName, XML_DOCUMENT ) )
{
OUString sClass;
@@ -234,7 +234,7 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
OUString aLocalName;
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
if( nPrefix == XML_NAMESPACE_OFFICE &&
- aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_class ) ) )
+ IsXMLToken( aLocalName, XML_CLASS ) )
{
sClass = xAttrList->getValueByIndex( i );
break;
@@ -244,9 +244,9 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
if( sClass.getLength() )
{
const XMLServiceMapEntry_Impl *pEntry = aServiceMap;
- while( pEntry->sClass )
+ while( pEntry->eClass != XML_TOKEN_INVALID )
{
- if( sClass.equalsAsciiL( pEntry->sClass, pEntry->sClassLen ) )
+ if( IsXMLToken( sClass, pEntry->eClass ) )
{
sFilterService = OUString( pEntry->sFilterService,
pEntry->nFilterServiceLen,
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 0df5d3b92363..de5814b34bb0 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: nmspmap.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mtg $ $Date: 2001-06-13 14:16:16 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,8 +71,8 @@
#include <rtl/ustrbuf.hxx>
#endif
-#ifndef _XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
@@ -80,6 +80,9 @@
#endif
using namespace rtl;
+using ::xmloff::token::GetXMLToken;
+using ::xmloff::token::XML_XMLNS;
+
/* The basic idea of this class is that we have two two ways to search our
* data...by prefix and by key. We use an STL hash_map for fast prefix
@@ -94,12 +97,12 @@ using namespace rtl;
*/
SvXMLNamespaceMap::SvXMLNamespaceMap() :
- sXMLNS( OUString::createFromAscii(sXML_xmlns) )
+ sXMLNS( GetXMLToken(XML_XMLNS) )
{
}
SvXMLNamespaceMap::SvXMLNamespaceMap( const SvXMLNamespaceMap& rMap ) :
- sXMLNS( OUString::createFromAscii(sXML_xmlns) )
+ sXMLNS( GetXMLToken(XML_XMLNS) )
{
aNameHash = rMap.aNameHash;
aNameMap = rMap.aNameMap;
diff --git a/xmloff/source/core/xmlehelp.cxx b/xmloff/source/core/xmlehelp.cxx
index 5360fe03472f..48cbbc9a72e9 100644
--- a/xmloff/source/core/xmlehelp.cxx
+++ b/xmloff/source/core/xmlehelp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlehelp.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: bm $ $Date: 2001-05-21 12:37:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,11 +76,12 @@
#include "xmlehelp.hxx"
#endif
-#ifndef _XMLOFF_XMKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMTOKEN_HXX
+#include "xmltoken.hxx"
#endif
using namespace ::rtl;
+using namespace ::xmloff::token;
void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
OUStringBuffer& rOut,
@@ -97,7 +98,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
long nMul = 1000;
long nDiv = 1;
long nFac = 100;
- const sal_Char *pUnit = NULL;
+ enum XMLTokenEnum eUnit = XML_TOKEN_INVALID;
switch( eValueUnit )
{
case MAP_TWIP:
@@ -112,7 +113,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 25400; // 25.4 * 1000
nDiv = 1440; // 72 * 20;
nFac = 100;
- pUnit = sXML_unit_mm;
+ eUnit = XML_UNIT_MM;
break;
case MAP_CM:
@@ -120,7 +121,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 25400; // 2.54 * 10000
nDiv = 1440; // 72 * 20;
nFac = 1000;
- pUnit = sXML_unit_cm;
+ eUnit = XML_UNIT_CM;
break;
case MAP_POINT:
@@ -128,7 +129,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 1000;
nDiv = 20;
nFac = 100;
- pUnit = sXML_unit_pt;
+ eUnit = XML_UNIT_PT;
break;
case MAP_INCH:
@@ -139,7 +140,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 100000;
nDiv = 1440; // 72 * 20;
nFac = 10000;
- pUnit = sXML_unit_inch;
+ eUnit = XML_UNIT_INCH;
break;
}
break;
@@ -151,7 +152,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 10;
nDiv = 1;
nFac = 1;
- pUnit = sXML_unit_pt;
+ eUnit = XML_UNIT_PT;
break;
case MAP_100TH_MM:
@@ -166,7 +167,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 10;
nDiv = 1;
nFac = 100;
- pUnit = sXML_unit_mm;
+ eUnit = XML_UNIT_MM;
break;
case MAP_CM:
@@ -174,7 +175,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 10;
nDiv = 1; // 72 * 20;
nFac = 1000;
- pUnit = sXML_unit_cm;
+ eUnit = XML_UNIT_CM;
break;
case MAP_POINT:
@@ -182,7 +183,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 72000;
nDiv = 2540;
nFac = 100;
- pUnit = sXML_unit_pt;
+ eUnit = XML_UNIT_PT;
break;
case MAP_INCH:
@@ -193,7 +194,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
nMul = 100000;
nDiv = 2540;
nFac = 10000;
- pUnit = sXML_unit_inch;
+ eUnit = XML_UNIT_INCH;
break;
}
break;
@@ -257,10 +258,10 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
}
}
- if( pUnit )
- rOut.appendAscii( pUnit );
+ if( eUnit != XML_TOKEN_INVALID )
+ rOut.append( GetXMLToken(eUnit) );
#if 0
- const sal_Char *pUnit;
+ enum XMLTokenEnum eUnit;
long nFac = 1;
switch( eOutUnit )
{
@@ -272,7 +273,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
case MAP_MM:
// 0.01mm
nFac *= 100L;
- pUnit = sXML_unit_mm;
+ eUnit = XML_UNIT_MM;
break;
case MAP_CM:
@@ -283,7 +284,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
// 0.01cm
nFac *= 100L;
#endif
- pUnit = sXML_unit_cm;
+ eUnit = XML_UNIT_CM;
break;
case MAP_TWIP:
@@ -295,7 +296,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
// 0.1pt
nFac *= 10L;
#endif
- pUnit = sXML_unit_pt;
+ eUnit = XML_UNIT_PT;
break;
case MAP_1000TH_INCH:
@@ -314,7 +315,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
// 0.01in
nFac *= 100L;
#endif
- pUnit = sXML_unit_inch;
+ eUnit = XML_UNIT_INCH;
break;
}
@@ -332,7 +333,7 @@ void SvXMLExportHelper::AddLength( long nValue, MapUnit eValueUnit,
}
}
- rOut.appendAscii( OUString::createFromAscii( pUnit ) );
+ rOut.append( GetXMLToken(eUnit) );
#endif
}
@@ -351,7 +352,7 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
if(eCoreUnit != eDestUnit)
{
- const sal_Char *pUnit = NULL;
+ enum XMLTokenEnum eUnit = XML_TOKEN_INVALID;
switch(eCoreUnit)
{
@@ -368,21 +369,21 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
{
// 0.01mm = 0.57twip (exactly)
fRetval = ((25400.0 / 1440.0) / 1000.0);
- pUnit = sXML_unit_mm;
+ eUnit = XML_UNIT_MM;
break;
}
case MAP_CM:
{
// 0.001cm = 0.57twip (exactly)
fRetval = ((25400.0 / 1440.0) / 10000.0);
- pUnit = sXML_unit_cm;
+ eUnit = XML_UNIT_CM;
break;
}
case MAP_POINT:
{
// 0.01pt = 0.2twip (exactly)
fRetval = ((1000.0 / 20.0) / 1000.0);
- pUnit = sXML_unit_pt;
+ eUnit = XML_UNIT_PT;
break;
}
case MAP_INCH:
@@ -391,7 +392,7 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
DBG_ASSERT(MAP_INCH == eDestUnit, "output unit not supported for twip values");
// 0.0001in = 0.144twip (exactly)
fRetval = ((100000.0 / 1440.0) / 100000.0);
- pUnit = sXML_unit_inch;
+ eUnit = XML_UNIT_INCH;
break;
}
}
@@ -404,19 +405,19 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
case MAP_MM:
// 1mm = 72 / 25.4 pt (exactly)
fRetval = ( 25.4 / 72.0 );
- pUnit = sXML_unit_mm;
+ eUnit = XML_UNIT_MM;
break;
case MAP_CM:
// 1cm = 72 / 2.54 pt (exactly)
fRetval = ( 2.54 / 72.0 );
- pUnit = sXML_unit_cm;
+ eUnit = XML_UNIT_CM;
break;
case MAP_TWIP:
// 1twip = 72 / 1440 pt (exactly)
fRetval = 20.0; // 1440.0 / 72.0
- pUnit = sXML_unit_pc;
+ eUnit = XML_UNIT_PC;
break;
case MAP_INCH:
@@ -424,7 +425,7 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
DBG_ASSERT(MAP_INCH == eDestUnit, "output unit not supported for pt values");
// 1in = 72 pt (exactly)
fRetval = ( 1.0 / 72.0 );
- pUnit = sXML_unit_inch;
+ eUnit = XML_UNIT_INCH;
break;
}
break;
@@ -442,21 +443,21 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
{
// 0.01mm = 1 mm/100 (exactly)
fRetval = ((10.0 / 1.0) / 1000.0);
- pUnit = sXML_unit_mm;
+ eUnit = XML_UNIT_MM;
break;
}
case MAP_CM:
{
// 0.001mm = 1 mm/100 (exactly)
fRetval = ((10.0 / 1.0) / 10000.0);
- pUnit = sXML_unit_cm;
+ eUnit = XML_UNIT_CM;
break;
}
case MAP_POINT:
{
// 0.01pt = 0.35 mm/100 (exactly)
fRetval = ((72000.0 / 2540.0) / 1000.0);
- pUnit = sXML_unit_pt;
+ eUnit = XML_UNIT_PT;
break;
}
case MAP_INCH:
@@ -465,7 +466,7 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
DBG_ASSERT(MAP_INCH == eDestUnit, "output unit not supported for 1/100mm values");
// 0.0001in = 0.254 mm/100 (exactly)
fRetval = ((100000.0 / 2540.0) / 100000.0);
- pUnit = sXML_unit_inch;
+ eUnit = XML_UNIT_INCH;
break;
}
}
@@ -473,8 +474,8 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
}
}
- if(pUnit)
- rUnit.appendAscii(pUnit);
+ if(eUnit != XML_TOKEN_INVALID)
+ rUnit.append(GetXMLToken(eUnit));
}
return fRetval;
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 26d24a7b95cf..91e9a0775682 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexp.cxx,v $
*
- * $Revision: 1.72 $
+ * $Revision: 1.73 $
*
- * last change: $Author: sab $ $Date: 2001-06-25 12:39:27 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,8 +103,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLEXP_HXX
@@ -139,10 +139,6 @@
#include "SettingsExportHelper.hxx"
#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
-#include "xmltoken.hxx"
-#endif
-
#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
#endif
@@ -241,66 +237,96 @@ const XMLServiceMapEntry_Impl aServiceMap[] =
void SvXMLExport::_InitCtor()
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_OFFICE, sXML_np_office,
- sXML_n_office, XML_NAMESPACE_OFFICE );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_OFFICE,
+ GetXMLToken(XML_NP_OFFICE),
+ GetXMLToken(XML_N_OFFICE),
+ XML_NAMESPACE_OFFICE );
if( (getExportFlags() & (EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_FONTDECLS) ) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_FO, sXML_np_fo,
- sXML_n_fo, XML_NAMESPACE_FO );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_FO, GetXMLToken(XML_NP_FO),
+ GetXMLToken(XML_N_FO), XML_NAMESPACE_FO );
}
if( (getExportFlags() & (EXPORT_META|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_SETTINGS) ) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_XLINK, sXML_np_xlink,
- sXML_n_xlink, XML_NAMESPACE_XLINK );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_XLINK,
+ GetXMLToken(XML_NP_XLINK),
+ GetXMLToken(XML_N_XLINK),
+ XML_NAMESPACE_XLINK );
}
if( (getExportFlags() & EXPORT_SETTINGS) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_CONFIG, sXML_np_config,
- sXML_n_config, XML_NAMESPACE_CONFIG );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_CONFIG,
+ GetXMLToken(XML_NP_CONFIG),
+ GetXMLToken(XML_N_CONFIG),
+ XML_NAMESPACE_CONFIG );
}
if( (getExportFlags() & EXPORT_META) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_DC, sXML_np_dc,
- sXML_n_dc, XML_NAMESPACE_DC );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_META, sXML_np_meta,
- sXML_n_meta, XML_NAMESPACE_META );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_DC, GetXMLToken(XML_NP_DC),
+ GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_META,
+ GetXMLToken(XML_NP_META),
+ GetXMLToken(XML_N_META),
+ XML_NAMESPACE_META );
}
if( (getExportFlags() & (EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_FONTDECLS) ) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_STYLE, sXML_np_style,
- sXML_n_style, XML_NAMESPACE_STYLE );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_STYLE,
+ GetXMLToken(XML_NP_STYLE),
+ GetXMLToken(XML_N_STYLE),
+ XML_NAMESPACE_STYLE );
}
// namespaces for documents
if( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_TEXT, sXML_np_text,
- sXML_n_text, XML_NAMESPACE_TEXT );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_DRAW, sXML_np_draw,
- sXML_n_draw, XML_NAMESPACE_DRAW );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_DR3D, sXML_np_dr3d,
- sXML_n_dr3d, XML_NAMESPACE_DR3D );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_SVG, sXML_np_svg,
- sXML_n_svg, XML_NAMESPACE_SVG );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_CHART, sXML_np_chart,
- sXML_n_chart, XML_NAMESPACE_CHART );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_TABLE, sXML_np_table,
- sXML_n_table, XML_NAMESPACE_TABLE );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_NUMBER, sXML_np_number,
- sXML_n_number, XML_NAMESPACE_NUMBER );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_TEXT,
+ GetXMLToken(XML_NP_TEXT),
+ GetXMLToken(XML_N_TEXT),
+ XML_NAMESPACE_TEXT );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_DRAW,
+ GetXMLToken(XML_NP_DRAW),
+ GetXMLToken(XML_N_DRAW),
+ XML_NAMESPACE_DRAW );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_DR3D,
+ GetXMLToken(XML_NP_DR3D),
+ GetXMLToken(XML_N_DR3D),
+ XML_NAMESPACE_DR3D );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_SVG,
+ GetXMLToken(XML_NP_SVG),
+ GetXMLToken(XML_N_SVG),
+ XML_NAMESPACE_SVG );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_CHART,
+ GetXMLToken(XML_NP_CHART),
+ GetXMLToken(XML_N_CHART),
+ XML_NAMESPACE_CHART );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_TABLE,
+ GetXMLToken(XML_NP_TABLE),
+ GetXMLToken(XML_N_TABLE),
+ XML_NAMESPACE_TABLE );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_NUMBER,
+ GetXMLToken(XML_NP_NUMBER),
+ GetXMLToken(XML_N_NUMBER),
+ XML_NAMESPACE_NUMBER );
}
if( (getExportFlags() & (EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_MATH, sXML_np_math,
- sXML_n_math, XML_NAMESPACE_MATH );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_FORM, sXML_namespace_form,
- sXML_url_form, XML_NAMESPACE_FORM );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_MATH,
+ GetXMLToken(XML_NP_MATH),
+ GetXMLToken(XML_N_MATH),
+ XML_NAMESPACE_MATH );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_FORM,
+ GetXMLToken(XML_NP_FORM),
+ GetXMLToken(XML_N_FORM),
+ XML_NAMESPACE_FORM );
}
if( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS) ) != 0 )
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_SCRIPT, sXML_namespace_script,
- sXML_url_script, XML_NAMESPACE_SCRIPT );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_SCRIPT,
+ GetXMLToken(XML_NP_SCRIPT),
+ GetXMLToken(XML_N_SCRIPT),
+ XML_NAMESPACE_SCRIPT );
}
@@ -314,8 +340,8 @@ void SvXMLExport::_InitCtor()
SvXMLExport::SvXMLExport( MapUnit eDfltUnit, const enum XMLTokenEnum eClass, sal_uInt16 nExportFlags ) :
pImpl( 0 ), meClass( eClass ),
- sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- sWS( OUString::createFromAscii( sXML_WS ) ),
+ sCDATA( GetXMLToken(XML_CDATA) ),
+ sWS( GetXMLToken(XML_WS) ),
pNamespaceMap( new SvXMLNamespaceMap ),
pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, eDfltUnit ) ),
pAttrList( new SvXMLAttributeList ),
@@ -335,8 +361,8 @@ SvXMLExport::SvXMLExport(
const uno::Reference< xml::sax::XDocumentHandler > & rHandler,
MapUnit eDfltUnit ) :
pImpl( 0 ), meClass( XML_TOKEN_INVALID ),
- sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- sWS( OUString::createFromAscii( sXML_WS ) ),
+ sCDATA( GetXMLToken(XML_CDATA) ),
+ sWS( GetXMLToken(XML_WS) ),
sOrigFileName( rFileName ),
pNamespaceMap( new SvXMLNamespaceMap ),
pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, eDfltUnit ) ),
@@ -363,8 +389,8 @@ SvXMLExport::SvXMLExport(
const Reference< XModel >& rModel,
sal_Int16 eDfltUnit ) :
pImpl( 0 ), meClass( XML_TOKEN_INVALID ),
- sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- sWS( OUString::createFromAscii( sXML_WS ) ),
+ sCDATA( GetXMLToken(XML_CDATA) ),
+ sWS( GetXMLToken(XML_WS) ),
sOrigFileName( rFileName ),
pNamespaceMap( new SvXMLNamespaceMap ),
pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit) ) ),
@@ -394,8 +420,8 @@ SvXMLExport::SvXMLExport(
const Reference< document::XGraphicObjectResolver >& rEmbeddedGraphicObjects,
sal_Int16 eDfltUnit ) :
pImpl( 0 ), meClass( XML_TOKEN_INVALID ),
- sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- sWS( OUString::createFromAscii( sXML_WS ) ),
+ sCDATA( GetXMLToken(XML_CDATA) ),
+ sWS( GetXMLToken(XML_WS) ),
sOrigFileName( rFileName ),
pNamespaceMap( new SvXMLNamespaceMap ),
pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit) ) ),
@@ -674,7 +700,7 @@ void SvXMLExport::ImplExportMeta()
{
// <office:meta>
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, sXML_meta,
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_META,
sal_True, sal_True );
_ExportMeta();
@@ -686,7 +712,7 @@ void SvXMLExport::ImplExportSettings()
CheckAttrList();
{
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, sXML_settings,
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_SETTINGS,
sal_True, sal_True );
XMLSettingsExportHelper aSettingsExportHelper(*this);
_ExportViewSettings(aSettingsExportHelper);
@@ -698,10 +724,10 @@ void SvXMLExport::ImplExportStyles( sal_Bool bUsed )
{
CheckAttrList();
-// AddAttributeASCII( XML_NAMESPACE_NONE, sXML_id, sXML_styles_id );
+// AddAttribute( XML_NAMESPACE_NONE, XML_ID, XML_STYLES_ID );
{
// <style:styles>
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, sXML_styles,
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_STYLES,
sal_True, sal_True );
_ExportStyles( sal_False );
@@ -710,23 +736,23 @@ void SvXMLExport::ImplExportStyles( sal_Bool bUsed )
void SvXMLExport::ImplExportAutoStyles( sal_Bool bUsed )
{
-// AddAttributeASCII( XML_NAMESPACE_NONE, sXML_id, sXML_auto_styles_id );
+// AddAttributeASCII( XML_NAMESPACE_NONE, XML_ID, XML_AUTO_STYLES_ID );
{
// <style:automatic-styles>
SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE,
- sXML_automatic_styles, sal_True, sal_True );
+ XML_AUTOMATIC_STYLES, sal_True, sal_True );
#if 0
- AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_href, sXML_styles_href );
- AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
- AddAttribute( XML_NAMESPACE_XLINK, sXML_role,
+ AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, XML_STYLES_HREF );
+ AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
+ AddAttribute( XML_NAMESPACE_XLINK, XML_ROLE,
pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE,
- OUString::createFromAscii(sXML_stylesheet)) );
+ GetXMLToken(XML_STYLESHEET)) );
{
// <style:use-styles>
SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE,
- sXML_use_styles, sal_True, sal_True );
+ XML_USE_STYLES, sal_True, sal_True );
}
#endif
_ExportAutoStyles();
@@ -737,23 +763,23 @@ void SvXMLExport::ImplExportMasterStyles( sal_Bool bUsed )
{
{
// <style:master-styles>
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, sXML_master_styles,
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_MASTER_STYLES,
sal_True, sal_True );
_ExportMasterStyles();
}
#if 0
- AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_href, sXML_auto_styles_href );
- AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
- AddAttribute( XML_NAMESPACE_XLINK, sXML_role,
+ AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, XML_AUTO_STYLES_HREF );
+ AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
+ AddAttribute( XML_NAMESPACE_XLINK, XML_ROLE,
pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE,
- OUString::createFromAscii(sXML_stylesheet) ) );
+ GetXMLToken(XML_STYLESHEET) ) );
{
// <style:use-styles>
SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE,
- sXML_use_styles, sal_True, sal_True );
+ XML_USE_STYLES, sal_True, sal_True );
}
#endif
}
@@ -767,7 +793,7 @@ void SvXMLExport::ImplExportContent()
{
// <office:body ...>
SetBodyAttributes();
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, sXML_body,
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_BODY,
sal_True, sal_True );
_ExportContent();
@@ -807,53 +833,53 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
// office:version = ...
if( !bExtended )
- AddAttributeASCII( XML_NAMESPACE_OFFICE, sXML_version, sXML_1_0 );
+ AddAttribute( XML_NAMESPACE_OFFICE, XML_VERSION,
+ OUString::createFromAscii(sXML_1_0) );
{
- char* pRootService;
+ enum XMLTokenEnum eRootService = XML_TOKEN_INVALID;
const sal_Int32 nExportMode = mnExportFlags & (EXPORT_META|EXPORT_STYLES|EXPORT_CONTENT|EXPORT_SETTINGS);
if( EXPORT_META == nExportMode )
{
// export only meta
- pRootService = sXML_document_meta;
+ eRootService = XML_DOCUMENT_META;
}
else if ( EXPORT_SETTINGS == nExportMode )
{
// export only settings
- pRootService = sXML_document_settings;
+ eRootService = XML_DOCUMENT_SETTINGS;
}
else if( EXPORT_STYLES == nExportMode )
{
// export only styles
- pRootService = sXML_document_styles;
+ eRootService = XML_DOCUMENT_STYLES;
}
else if( EXPORT_CONTENT == nExportMode )
{
// export only content
- pRootService = sXML_document_content;
+ eRootService = XML_DOCUMENT_CONTENT;
}
else
{
// the god'ol one4all element
- pRootService = sXML_document;
+ eRootService = XML_DOCUMENT;
}
if( (getExportFlags() & EXPORT_NODOCTYPE) == 0 &&
xExtHandler.is() )
{
OUStringBuffer aDocType(
- sizeof(sXML_xml_doctype_prefix) +
- sizeof(sXML_xml_doctype_suffix) + 30 );
+ GetXMLToken(XML_XML_DOCTYPE_PREFIX).getLength() +
+ GetXMLToken(XML_XML_DOCTYPE_SUFFIX).getLength() + 30 );
- aDocType.appendAscii( sXML_xml_doctype_prefix );
- OUString sLName( OUString::createFromAscii(pRootService) );
+ aDocType.append( GetXMLToken(XML_XML_DOCTYPE_PREFIX) );
aDocType.append( GetNamespaceMap().GetQNameByKey(
- XML_NAMESPACE_OFFICE, sLName ) );
- aDocType.appendAscii( sXML_xml_doctype_suffix );
+ XML_NAMESPACE_OFFICE, GetXMLToken(eRootService) ) );
+ aDocType.append( GetXMLToken(XML_XML_DOCTYPE_SUFFIX) );
xExtHandler->unknown( aDocType.makeStringAndClear() );
}
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, pRootService, sal_True, sal_True );
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, eRootService, sal_True, sal_True );
// meta information
if( mnExportFlags & EXPORT_META )
@@ -920,7 +946,7 @@ void SvXMLExport::_ExportViewSettings(const XMLSettingsExportHelper& rSettingsEx
aProps[nOldLength] = aProp;
}
}
- OUString sViewSettings(RTL_CONSTASCII_USTRINGPARAM(sXML_view_settings));
+ OUString sViewSettings(GetXMLToken(XML_VIEW_SETTINGS));
rSettingsExportHelper.exportSettings(aProps, sViewSettings);
}
@@ -928,14 +954,14 @@ void SvXMLExport::_ExportConfigurationSettings(const XMLSettingsExportHelper& rS
{
uno::Sequence<beans::PropertyValue> aProps;
GetConfigurationSettings(aProps);
- OUString sConfigurationSettings(RTL_CONSTASCII_USTRINGPARAM(sXML_configuration_settings));
+ OUString sConfigurationSettings(GetXMLToken(XML_CONFIGURATION_SETTINGS));
rSettingsExportHelper.exportSettings(aProps, sConfigurationSettings);
}
void SvXMLExport::_ExportScripts()
{
// <office:script>
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, sXML_script,
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_SCRIPT,
sal_True, sal_True );
XMLBasicExport aBasicExp( *this );
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 5589e34b018e..9a0f4ef133a7 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlimp.cxx,v $
*
- * $Revision: 1.44 $
+ * $Revision: 1.45 $
*
- * last change: $Author: sab $ $Date: 2001-06-25 11:44:38 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,9 @@
#ifndef _XMLOFF_XMLKYWD_HXX
#include "xmlkywd.hxx"
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX_
#include "XMLFontStylesContext.hxx"
#endif
@@ -140,6 +143,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::container;
+using namespace ::xmloff::token;
sal_Char __READONLY_DATA sXML_np__office[] = "_office";
sal_Char __READONLY_DATA sXML_np__style[] = "_style";
@@ -181,56 +185,104 @@ SvXMLImportContext *SvXMLImport::CreateContext( USHORT nPrefix,
void SvXMLImport::_InitCtor()
{
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_OFFICE_IDX, sXML_np__office,
- sXML_n_office, XML_NAMESPACE_OFFICE );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_STYLE_IDX, sXML_np__style,
- sXML_n_style, XML_NAMESPACE_STYLE );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_TEXT_IDX, sXML_np__text,
- sXML_n_text, XML_NAMESPACE_TEXT );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_TABLE_IDX, sXML_np__table,
- sXML_n_table, XML_NAMESPACE_TABLE );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_DRAW_IDX, sXML_np__draw,
- sXML_n_draw, XML_NAMESPACE_DRAW );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_DR3D_IDX, sXML_np__dr3d,
- sXML_n_dr3d, XML_NAMESPACE_DR3D );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_FO_IDX, sXML_np__fo,
- sXML_n_fo, XML_NAMESPACE_FO );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_XLINK_IDX, sXML_np__xlink,
- sXML_n_xlink, XML_NAMESPACE_XLINK );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_DC_IDX, sXML_np__dc,
- sXML_n_dc, XML_NAMESPACE_DC );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_META_IDX, sXML_np__meta,
- sXML_n_meta, XML_NAMESPACE_META );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_NUMBER_IDX, sXML_np__number,
- sXML_n_number, XML_NAMESPACE_NUMBER );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_SVG_IDX, sXML_np__svg,
- sXML_n_svg, XML_NAMESPACE_SVG );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_CHART_IDX, sXML_np__chart,
- sXML_n_chart, XML_NAMESPACE_CHART );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_MATH_IDX, sXML_np__math,
- sXML_n_math, XML_NAMESPACE_MATH );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_FORM_IDX, sXML_namespace_form,
- sXML_url_form, XML_NAMESPACE_FORM );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_SCRIPT_IDX, sXML_np__script,
- sXML_url_script, XML_NAMESPACE_SCRIPT );
- pNamespaceMap->AddAtIndex( XML_NAMESPACE_CONFIG_IDX, sXML_np__config,
- sXML_n_config, XML_NAMESPACE_CONFIG );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_OFFICE_IDX,
+ OUString::createFromAscii(sXML_np__office),
+ GetXMLToken(XML_N_OFFICE),
+ XML_NAMESPACE_OFFICE );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_STYLE_IDX,
+ OUString::createFromAscii(sXML_np__style),
+ GetXMLToken(XML_N_STYLE),
+ XML_NAMESPACE_STYLE );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_TEXT_IDX,
+ OUString::createFromAscii(sXML_np__text),
+ GetXMLToken(XML_N_TEXT),
+ XML_NAMESPACE_TEXT );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_TABLE_IDX,
+ OUString::createFromAscii(sXML_np__table),
+ GetXMLToken(XML_N_TABLE),
+ XML_NAMESPACE_TABLE );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_DRAW_IDX,
+ OUString::createFromAscii(sXML_np__draw),
+ GetXMLToken(XML_N_DRAW),
+ XML_NAMESPACE_DRAW );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_DR3D_IDX,
+ OUString::createFromAscii(sXML_np__dr3d),
+ GetXMLToken(XML_N_DR3D),
+ XML_NAMESPACE_DR3D );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_FO_IDX,
+ OUString::createFromAscii(sXML_np__fo),
+ GetXMLToken(XML_N_FO),
+ XML_NAMESPACE_FO );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_XLINK_IDX,
+ OUString::createFromAscii(sXML_np__xlink),
+ GetXMLToken(XML_N_XLINK),
+ XML_NAMESPACE_XLINK );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_DC_IDX,
+ OUString::createFromAscii(sXML_np__dc),
+ GetXMLToken(XML_N_DC),
+ XML_NAMESPACE_DC );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_META_IDX,
+ OUString::createFromAscii(sXML_np__meta),
+ GetXMLToken(XML_N_META),
+ XML_NAMESPACE_META );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_NUMBER_IDX,
+ OUString::createFromAscii(sXML_np__number),
+ GetXMLToken(XML_N_NUMBER),
+ XML_NAMESPACE_NUMBER );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_SVG_IDX,
+ OUString::createFromAscii(sXML_np__svg),
+ GetXMLToken(XML_N_SVG),
+ XML_NAMESPACE_SVG );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_CHART_IDX,
+ OUString::createFromAscii(sXML_np__chart),
+ GetXMLToken(XML_N_CHART),
+ XML_NAMESPACE_CHART );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_MATH_IDX,
+ OUString::createFromAscii(sXML_np__math),
+ GetXMLToken(XML_N_MATH),
+ XML_NAMESPACE_MATH );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_FORM_IDX,
+ OUString::createFromAscii(sXML_namespace_form),
+ GetXMLToken(XML_N_FORM),
+ XML_NAMESPACE_FORM );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_SCRIPT_IDX,
+ OUString::createFromAscii(sXML_np__script),
+ GetXMLToken(XML_N_SCRIPT),
+ XML_NAMESPACE_SCRIPT );
+ pNamespaceMap->AddAtIndex( XML_NAMESPACE_CONFIG_IDX,
+ OUString::createFromAscii(sXML_np__config),
+ GetXMLToken(XML_N_CONFIG),
+ XML_NAMESPACE_CONFIG );
// namespaces used in the technical preview (SO 5.2)
- pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_FO_IDX, sXML_np__fo_old,
- sXML_n_fo_old, XML_NAMESPACE_FO );
- pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_XLINK_IDX, sXML_np__xlink_old,
- sXML_n_xlink_old, XML_NAMESPACE_XLINK );
- pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_OFFICE_IDX, sXML_np__office,
- sXML_n_office_old, XML_NAMESPACE_OFFICE );
- pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_STYLE_IDX, sXML_np__style_old,
- sXML_n_style_old, XML_NAMESPACE_STYLE );
- pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_TEXT_IDX, sXML_np__text_old,
- sXML_n_text_old, XML_NAMESPACE_TEXT );
- pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_TABLE_IDX, sXML_np__table_old,
- sXML_n_table_old, XML_NAMESPACE_TABLE );
- pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_META_IDX, sXML_np__meta_old,
- sXML_n_meta_old, XML_NAMESPACE_META );
+ pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_FO_IDX,
+ OUString::createFromAscii(sXML_np__fo_old),
+ GetXMLToken(XML_N_FO_OLD),
+ XML_NAMESPACE_FO );
+ pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_XLINK_IDX,
+ OUString::createFromAscii(sXML_np__xlink_old),
+ GetXMLToken(XML_N_XLINK_OLD),
+ XML_NAMESPACE_XLINK );
+ pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_OFFICE_IDX,
+ OUString::createFromAscii(sXML_np__office),
+ GetXMLToken(XML_N_OFFICE_OLD),
+ XML_NAMESPACE_OFFICE );
+ pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_STYLE_IDX,
+ OUString::createFromAscii(sXML_np__style_old),
+ GetXMLToken(XML_N_STYLE_OLD),
+ XML_NAMESPACE_STYLE );
+ pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_TEXT_IDX,
+ OUString::createFromAscii(sXML_np__text_old),
+ GetXMLToken(XML_N_TEXT_OLD),
+ XML_NAMESPACE_TEXT );
+ pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_TABLE_IDX,
+ OUString::createFromAscii(sXML_np__table_old),
+ GetXMLToken(XML_N_TABLE_OLD),
+ XML_NAMESPACE_TABLE );
+ pNamespaceMap->AddAtIndex( XML_OLD_NAMESPACE_META_IDX,
+ OUString::createFromAscii(sXML_np__meta_old),
+ GetXMLToken(XML_N_META_OLD),
+ XML_NAMESPACE_META );
sPackageProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
if (xNumberFormatsSupplier.is())
@@ -966,7 +1018,7 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
// construct event helper and register StarBasic handler and standard
// event tables
pEventImportHelper = new XMLEventImportHelper();
- OUString sStarBasic(RTL_CONSTASCII_USTRINGPARAM(sXML_starbasic));
+ OUString sStarBasic(GetXMLToken(XML_STARBASIC));
pEventImportHelper->RegisterFactory(sStarBasic,
new XMLStarBasicContextFactory());
pEventImportHelper->AddTranslationTable(aStandardEventTable);
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 0b4f035644d0..2f1498a76e5a 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltoken.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: mib $ $Date: 2001-06-28 13:16:41 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,6 +63,10 @@
#include "xmltoken.hxx"
#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
#endif
@@ -2013,6 +2017,36 @@ namespace xmloff { namespace token {
TOKEN( "binary-data" ), // XML_BINARY_DATA
TOKEN( "notify-on-update-of-table" ), // XML_NOTIFY_ON_UPDATE_OF_TABLE
+ TOKEN( "0" ), // XML_0
+ TOKEN( "play" ), // XML_PLAY
+ TOKEN( "handout-master" ), // XML_HANDOUT_MASTER
+ TOKEN( "text-style-name" ), // XML_TEXT_STYLE_NAME
+ TOKEN( "escape-direction" ), // XML_ESCAPE_DIRECTION
+ TOKEN( "glue-point" ), // XML_GLUE_POINT
+ TOKEN( "primary-x" ), // XML_PRIMARY_X
+ TOKEN( "secondary-x" ), // XML_SECONDARY_X
+ TOKEN( "primary-y" ), // XML_PRIMARY_Y
+ TOKEN( "secondary-y" ), // XML_SECONDARY_Y
+ TOKEN( "primary-z" ), // XML_PRIMARY_Z
+
+ TOKEN( "caption-type" ), // XML_CAPTION_TYPE
+ TOKEN( "caption-angle-type" ), // XML_CAPTION_ANGLE_TYPE
+ TOKEN( "caption-angle" ), // XML_CAPTION_ANGLE
+ TOKEN( "caption-gap" ), // XML_CAPTION_GAP
+ TOKEN( "caption-escape-direction" ), // XML_CAPTION_ESCAPE_DIRECTION
+ TOKEN( "caption-escape" ), // XML_CAPTION_ESCAPE
+ TOKEN( "caption-line-length" ), // XML_CAPTION_LINE_LENGTH
+ TOKEN( "caption-fit-line-length" ), // XML_CAPTION_FIT_LINE_LENGTH
+ TOKEN( "free" ), // XML_FREE
+ TOKEN( "transition-type" ), // XML_TRANSITION_TYPE,
+ TOKEN( "transition-style" ), // XML_TRANSITION_STYLE
+ TOKEN( "transition-speed" ), // XML_TRANSITION_SPEED
+ TOKEN( "duration" ), // XML_DURATION,
+ TOKEN( "background-size" ), // XML_BACKGROUND_SIZE,
+ TOKEN( "background-objects-visible" ), // XML_BACKGROUND_OBJECTS_VISIBLE
+ TOKEN( "background-visible" ), // XML_BACKGROUND_VISIBLE
+
+
{ 0, NULL, NULL } // XML_TOKEN_END
};
@@ -2021,6 +2055,9 @@ namespace xmloff { namespace token {
// get OUString representation of token
const OUString& GetXMLToken( enum XMLTokenEnum eToken )
{
+ DBG_ASSERT( eToken > XML_TOKEN_INVALID, "token value too low!" );
+ DBG_ASSERT( eToken < XML_TOKEN_END, "token value too high!" );
+
XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken];
if (!pToken->pOUString)
pToken->pOUString = new OUString( pToken->pChar, pToken->nLength,
@@ -2033,6 +2070,9 @@ namespace xmloff { namespace token {
const OUString& rString,
enum XMLTokenEnum eToken )
{
+ DBG_ASSERT( eToken > XML_TOKEN_INVALID, "token value too low!" );
+ DBG_ASSERT( eToken < XML_TOKEN_END, "token value too high!" );
+
const XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken];
return rString.equalsAsciiL( pToken->pChar, pToken->nLength );
}
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 9b5fe5408e81..34f45a149e15 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmluconv.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:06 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include <xmluconv.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include <xmlkywd.hxx>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
#endif
#ifndef _TOOLS_SOLMATH_HXX
@@ -138,8 +138,8 @@ void SvXMLUnitConverter::initXMLStrings()
{
if( msXML_true.getLength() == 0 )
{
- msXML_true = OUString::createFromAscii( sXML_true );
- msXML_false = OUString::createFromAscii( sXML_false );
+ msXML_true = GetXMLToken(XML_TRUE);
+ msXML_false = GetXMLToken(XML_FALSE);
}
}
@@ -489,16 +489,16 @@ void SvXMLUnitConverter::convertMeasure( OUStringBuffer& rBuffer,
sal_Bool SvXMLUnitConverter::convertBool( sal_Bool& rBool,
const OUString& rString )
{
- rBool = rString.compareToAscii( sXML_true ) == 0L;
+ rBool = IsXMLToken(rString, XML_TRUE);
- return rBool || rString.compareToAscii( sXML_false ) == 0L;
+ return rBool || IsXMLToken(rString, XML_FALSE);
}
/** convert boolean to string */
void SvXMLUnitConverter::convertBool( OUStringBuffer& rBuffer,
sal_Bool bValue )
{
- rBuffer.appendAscii( bValue ? sXML_true : sXML_false );
+ rBuffer.append( GetXMLToken( bValue ? XML_TRUE : XML_FALSE ) );
}
/** convert string to percent */
@@ -1768,7 +1768,7 @@ sal_Bool SvXMLUnitConverter::convertNumFormat(
case sal_Unicode('I'): rType = NumberingType::ROMAN_UPPER; break;
default: bExt = sal_True; break;
}
- if( !bExt && rNumLetterSync.equalsAsciiL( sXML_true, sizeof(sXML_true)-1 ) )
+ if( !bExt && IsXMLToken( rNumLetterSync, XML_TRUE ) )
{
switch( rType )
{
@@ -1804,32 +1804,32 @@ sal_Bool SvXMLUnitConverter::convertNumFormat(
void SvXMLUnitConverter::convertNumFormat( OUStringBuffer& rBuffer,
sal_Int16 nType ) const
{
- const sal_Char *pFormat = 0;
+ enum XMLTokenEnum eFormat = XML_TOKEN_INVALID;
sal_Bool bExt = sal_False;
switch( nType )
{
- case NumberingType::CHARS_UPPER_LETTER: pFormat = sXML_A; break;
- case NumberingType::CHARS_LOWER_LETTER: pFormat = sXML_a; break;
- case NumberingType::ROMAN_UPPER: pFormat = sXML_I; break;
- case NumberingType::ROMAN_LOWER: pFormat = sXML_i; break;
- case NumberingType::ARABIC: pFormat = sXML_1; break;
- case NumberingType::CHARS_UPPER_LETTER_N: pFormat = sXML_A; break;
- case NumberingType::CHARS_LOWER_LETTER_N: pFormat = sXML_a; break;
- case NumberingType::NUMBER_NONE: pFormat = sXML__empty; break;
+ case NumberingType::CHARS_UPPER_LETTER: eFormat = XML_A_UPCASE; break;
+ case NumberingType::CHARS_LOWER_LETTER: eFormat = XML_A; break;
+ case NumberingType::ROMAN_UPPER: eFormat = XML_I_UPCASE; break;
+ case NumberingType::ROMAN_LOWER: eFormat = XML_I; break;
+ case NumberingType::ARABIC: eFormat = XML_1; break;
+ case NumberingType::CHARS_UPPER_LETTER_N: eFormat = XML_A_UPCASE; break;
+ case NumberingType::CHARS_LOWER_LETTER_N: eFormat = XML_A; break;
+ case NumberingType::NUMBER_NONE: eFormat = XML__EMPTY; break;
case NumberingType::CHAR_SPECIAL:
case NumberingType::PAGE_DESCRIPTOR:
case NumberingType::BITMAP:
- DBG_ASSERT( pFormat, "invalid number format" );
+ DBG_ASSERT( eFormat != XML_TOKEN_INVALID, "invalid number format" );
break;
default:
bExt = sal_True;
break;
}
- if( pFormat )
+ if( eFormat != XML_TOKEN_INVALID )
{
- rBuffer.appendAscii( pFormat );
+ rBuffer.append( GetXMLToken(eFormat) );
}
else
{
@@ -1842,7 +1842,7 @@ void SvXMLUnitConverter::convertNumFormat( OUStringBuffer& rBuffer,
void SvXMLUnitConverter::convertNumLetterSync( OUStringBuffer& rBuffer,
sal_Int16 nType ) const
{
- const sal_Char *pSync = 0;
+ enum XMLTokenEnum eSync = XML_TOKEN_INVALID;
switch( nType )
{
case NumberingType::CHARS_UPPER_LETTER:
@@ -1852,22 +1852,22 @@ void SvXMLUnitConverter::convertNumLetterSync( OUStringBuffer& rBuffer,
case NumberingType::ARABIC:
case NumberingType::NUMBER_NONE:
// default
- // pSync = sXML_false;
+ // eSync = XML_FALSE;
break;
case NumberingType::CHARS_UPPER_LETTER_N:
case NumberingType::CHARS_LOWER_LETTER_N:
- pSync = sXML_true;
+ eSync = XML_TRUE;
break;
case NumberingType::CHAR_SPECIAL:
case NumberingType::PAGE_DESCRIPTOR:
case NumberingType::BITMAP:
- DBG_ASSERT( pSync, "invalid number format" );
+ DBG_ASSERT( eSync != XML_TOKEN_INVALID, "invalid number format" );
break;
}
- if( pSync )
- rBuffer.appendAscii( pSync );
+ if( eSync != XML_TOKEN_INVALID )
+ rBuffer.append( GetXMLToken(eSync) );
}
void SvXMLUnitConverter::convertPropertySet(uno::Sequence<beans::PropertyValue>& rProps,
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
index 1ca1bfea62c0..a15f31c6f4bb 100644
--- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
+++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLGraphicsDefaultStyle.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: cl $ $Date: 2001-03-04 23:07:53 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,8 +79,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_FAMILIES_HXX
@@ -102,6 +102,9 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::xml::sax;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_PROPERTIES;
+
// ---------------------------------------------------------------------
TYPEINIT1( XMLGraphicsDefaultStyle, XMLPropStyleContext );
@@ -119,7 +122,7 @@ SvXMLImportContext *XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nPre
{
SvXMLImportContext *pContext = 0;
- if( XML_NAMESPACE_STYLE == nPrefix && rLocalName.compareToAscii( sXML_properties ) == 0 )
+ if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_PROPERTIES ) )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() );
if( xImpPrMap.is() )
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index 1d94bcb04eb8..c27dae7b7203 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLImageMapContext.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 08:20:39 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,8 +99,8 @@
#include <com/sun/star/awt/Rectangle.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLIMP_HXX
@@ -344,14 +344,14 @@ SvXMLImportContext* XMLImageMapObjectContext::CreateChildContext(
const Reference<XAttributeList> & xAttrList )
{
if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_events, sizeof(sXML_events)-1)) )
+ IsXMLToken(rLocalName, XML_EVENTS) )
{
Reference<XEventsSupplier> xEvents( xMapEntry, UNO_QUERY );
return new XMLEventsImportContext(
GetImport(), nPrefix, rLocalName, xEvents);
}
else if ( (XML_NAMESPACE_SVG == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_desc, sizeof(sXML_desc)-1)) )
+ IsXMLToken(rLocalName, XML_DESC) )
{
return new XMLStringBufferImportContext(
GetImport(), nPrefix, rLocalName, sDescriptionBuffer);
@@ -377,8 +377,7 @@ void XMLImageMapObjectContext::ProcessAttribute(
break;
case XML_TOK_IMAP_NOHREF:
- bIsActive = ! rValue.equalsAsciiL(sXML_nohref,
- sizeof(sXML_nohref)-1);
+ bIsActive = ! IsXMLToken(rValue, XML_NOHREF);
break;
case XML_TOK_IMAP_NAME:
@@ -763,20 +762,17 @@ SvXMLImportContext *XMLImageMapContext::CreateChildContext(
if ( XML_NAMESPACE_DRAW == nPrefix )
{
- if ( rLocalName.equalsAsciiL(sXML_area_rectangle,
- sizeof(sXML_area_rectangle)-1) )
+ if ( IsXMLToken(rLocalName, XML_AREA_RECTANGLE) )
{
pContext = new XMLImageMapRectangleContext(
GetImport(), nPrefix, rLocalName, xImageMap);
}
- else if ( rLocalName.equalsAsciiL(sXML_area_polygon,
- sizeof(sXML_area_polygon)-1) )
+ else if ( IsXMLToken(rLocalName, XML_AREA_POLYGON) )
{
pContext = new XMLImageMapPolygonContext(
GetImport(), nPrefix, rLocalName, xImageMap);
}
- else if ( rLocalName.equalsAsciiL(sXML_area_circle,
- sizeof(sXML_area_circle)-1) )
+ else if ( IsXMLToken(rLocalName, XML_AREA_CIRCLE) )
{
pContext = new XMLImageMapCircleContext(
GetImport(), nPrefix, rLocalName, xImageMap);
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx
index 449e1e532aa6..5dcc43dc91c4 100644
--- a/xmloff/source/draw/XMLImageMapExport.cxx
+++ b/xmloff/source/draw/XMLImageMapExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLImageMapExport.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 08:20:39 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,8 +123,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLEVENTEXPORT_HXX
@@ -142,6 +142,7 @@
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
@@ -204,8 +205,7 @@ void XMLImageMapExport::Export(
{
// image map container element
SvXMLElementExport aImageMapElement(
- rExport,
- XML_NAMESPACE_DRAW, sXML_image_map,
+ rExport, XML_NAMESPACE_DRAW, XML_IMAGE_MAP,
bWhiteSpace, bWhiteSpace);
// iterate over image map elements and call ExportMapEntry(...)
@@ -230,26 +230,13 @@ void XMLImageMapExport::Export(
}
-enum MapEntryType
-{
- RECTANGLE,
- CIRCLE,
- POLYGON,
- INVALID
-};
-
void XMLImageMapExport::ExportMapEntry(
const Reference<XPropertySet> & rPropertySet)
{
- OUString sAreaRectangle(RTL_CONSTASCII_USTRINGPARAM(sXML_area_rectangle));
- OUString sAreaCircle(RTL_CONSTASCII_USTRINGPARAM(sXML_area_circle));
- OUString sAreaPolygon(RTL_CONSTASCII_USTRINGPARAM(sXML_area_polygon));
-
-
Reference<XServiceInfo> xServiceInfo(rPropertySet, UNO_QUERY);
if (xServiceInfo.is())
{
- enum MapEntryType eType = INVALID;
+ enum XMLTokenEnum eType = XML_TOKEN_INVALID;
// distinguish map entries by their service name
Sequence<OUString> sServiceNames =
@@ -263,27 +250,27 @@ void XMLImageMapExport::ExportMapEntry(
if ( rName.equalsAsciiL(sAPI_ImageMapRectangleObject,
sizeof(sAPI_ImageMapRectangleObject)-1) )
{
- eType = RECTANGLE;
+ eType = XML_AREA_RECTANGLE;
break;
}
else if ( rName.equalsAsciiL(sAPI_ImageMapCircleObject,
sizeof(sAPI_ImageMapCircleObject)-1) )
{
- eType = CIRCLE;
+ eType = XML_AREA_CIRCLE;
break;
}
else if ( rName.equalsAsciiL(sAPI_ImageMapPolygonObject,
sizeof(sAPI_ImageMapPolygonObject)-1))
{
- eType = POLYGON;
+ eType = XML_AREA_POLYGON;
break;
}
}
// return from method if no proper service is found!
- DBG_ASSERT(INVALID != eType,
+ DBG_ASSERT(XML_TOKEN_INVALID != eType,
"Image map element doesn't support appropriate service!");
- if (INVALID == eType)
+ if (XML_TOKEN_INVALID == eType)
return;
// now: handle ImageMapObject properties (those for all types)
@@ -294,10 +281,9 @@ void XMLImageMapExport::ExportMapEntry(
aAny >>= sHref;
if (sHref.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, rExport.GetRelativeReference(sHref));
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, rExport.GetRelativeReference(sHref));
}
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type,
- sXML_simple );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
// Target property (and xlink:show)
aAny = rPropertySet->getPropertyValue(sTarget);
@@ -306,12 +292,12 @@ void XMLImageMapExport::ExportMapEntry(
if (sTargt.getLength() > 0)
{
rExport.AddAttribute(
- XML_NAMESPACE_OFFICE, sXML_target_frame_name, sTargt);
+ XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, sTargt);
- rExport.AddAttributeASCII(
- XML_NAMESPACE_XLINK, sXML_show,
+ rExport.AddAttribute(
+ XML_NAMESPACE_XLINK, XML_SHOW,
sTargt.equalsAsciiL( "_blank", sizeof("_blank")-1 )
- ? sXML_new : sXML_replace );
+ ? XML_NEW : XML_REPLACE );
}
// name
@@ -320,40 +306,35 @@ void XMLImageMapExport::ExportMapEntry(
aAny >>= sItemName;
if (sItemName.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_name, sItemName);
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, sItemName);
}
// is-active
aAny = rPropertySet->getPropertyValue(sIsActive);
if (! *(sal_Bool*)aAny.getValue())
{
- rExport.AddAttributeASCII(XML_NAMESPACE_DRAW, sXML_nohref,
- sXML_nohref);
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NOHREF, XML_NOHREF);
}
// call specific rectangle/circle/... method
// also prepare element name
- OUString* pElementName = NULL;
switch (eType)
{
- case RECTANGLE:
+ case XML_AREA_RECTANGLE:
ExportRectangle(rPropertySet);
- pElementName = &sAreaRectangle;
break;
- case CIRCLE:
+ case XML_AREA_CIRCLE:
ExportCircle(rPropertySet);
- pElementName = &sAreaCircle;
break;
- case POLYGON:
+ case XML_AREA_POLYGON:
ExportPolygon(rPropertySet);
- pElementName = &sAreaPolygon;
break;
}
// write element
- DBG_ASSERT(NULL != pElementName, "No name?! How did this happen?");
- SvXMLElementExport aAreaElement(rExport,
- XML_NAMESPACE_DRAW, *pElementName,
+ DBG_ASSERT(XML_TOKEN_INVALID != eType,
+ "No name?! How did this happen?");
+ SvXMLElementExport aAreaElement(rExport, XML_NAMESPACE_DRAW, eType,
bWhiteSpace, bWhiteSpace);
// description property (as <svg:desc> element)
@@ -362,7 +343,7 @@ void XMLImageMapExport::ExportMapEntry(
aAny >>= sDescription;
if (sDescription.getLength() > 0)
{
- SvXMLElementExport aDesc(rExport, XML_NAMESPACE_SVG, sXML_desc,
+ SvXMLElementExport aDesc(rExport, XML_NAMESPACE_SVG, XML_DESC,
bWhiteSpace, sal_False);
rExport.GetDocHandler()->characters(sDescription);
}
@@ -385,16 +366,16 @@ void XMLImageMapExport::ExportRectangle(
// parameters svg:x, svg:y, svg:width, svg:height
OUStringBuffer aBuffer;
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, aRectangle.X);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_x,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_X,
aBuffer.makeStringAndClear() );
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, aRectangle.Y);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_y,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_Y,
aBuffer.makeStringAndClear() );
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, aRectangle.Width);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_width,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH,
aBuffer.makeStringAndClear() );
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, aRectangle.Height);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_height,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT,
aBuffer.makeStringAndClear() );
}
@@ -409,10 +390,10 @@ void XMLImageMapExport::ExportCircle(
// parameters svg:cx, svg:cy
OUStringBuffer aBuffer;
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, aCenter.X);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_cx,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_CX,
aBuffer.makeStringAndClear() );
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, aCenter.Y);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_cy,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_CY,
aBuffer.makeStringAndClear() );
// radius
@@ -420,7 +401,7 @@ void XMLImageMapExport::ExportCircle(
sal_Int32 nRadius;
aAny >>= nRadius;
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, nRadius);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_r,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_R,
aBuffer.makeStringAndClear() );
}
@@ -457,18 +438,18 @@ void XMLImageMapExport::ExportPolygon(
// parameters svg:x, svg:y, svg:width, svg:height
OUStringBuffer aBuffer;
- rExport.AddAttributeASCII( XML_NAMESPACE_SVG, sXML_x, "0" );
- rExport.AddAttributeASCII( XML_NAMESPACE_SVG, sXML_y, "0" );
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_X, XML_0 );
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_Y, XML_0 );
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, nWidth);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_width,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH,
aBuffer.makeStringAndClear() );
rExport.GetMM100UnitConverter().convertMeasure(aBuffer, nHeight);
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_height,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT,
aBuffer.makeStringAndClear() );
// svg:viewbox
SdXMLImExViewBox aViewBox(0, 0, nWidth, nHeight);
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_viewBox,
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_VIEWBOX,
aViewBox.GetExportString(rExport.GetMM100UnitConverter()));
// export point sequence
@@ -476,6 +457,6 @@ void XMLImageMapExport::ExportPolygon(
awt::Size aSize(nWidth, nHeight);
SdXMLImExPointsElement aPoints( &aPoly, aViewBox, aPoint, aSize,
rExport.GetMM100UnitConverter() );
- rExport.AddAttribute( XML_NAMESPACE_SVG, sXML_points,
+ rExport.AddAttribute( XML_NAMESPACE_SVG, XML_POINTS,
aPoints.GetExportString());
}
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index d20c66a46a91..0189481e72a2 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLNumberStyles.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: cl $ $Date: 2001-05-11 09:19:17 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,15 +83,19 @@
#include "nmspmap.hxx"
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
#include "sdxmlexp_impl.hxx"
#include "sdxmlimp_impl.hxx"
using namespace rtl;
+using namespace ::xmloff::token;
struct SdXMLDataStyleNumber
{
- const char* mpNumberStyle;
+ enum XMLTokenEnum meNumberStyle;
sal_Bool mbLong;
sal_Bool mbTextual;
sal_Bool mbDecimal02;
@@ -99,26 +103,26 @@ struct SdXMLDataStyleNumber
}
aSdXMLDataStyleNumbers[] =
{
- { sXML_day, sal_False, sal_False, sal_False, NULL },
- { sXML_day, sal_True, sal_False, sal_False, NULL },
- { sXML_month, sal_True, sal_False, sal_False, NULL },
- { sXML_month, sal_False, sal_True, sal_False, NULL },
- { sXML_month, sal_True, sal_True, sal_False, NULL },
- { sXML_year, sal_False, sal_False, sal_False, NULL },
- { sXML_year, sal_True, sal_False, sal_False, NULL },
- { sXML_day_of_week, sal_False, sal_False, sal_False, NULL },
- { sXML_day_of_week, sal_True, sal_False, sal_False, NULL },
- { sXML_text, sal_False, sal_False, sal_False, "." },
- { sXML_text, sal_False, sal_False, sal_False, " " },
- { sXML_text, sal_False, sal_False, sal_False, ", " },
- { sXML_text, sal_False, sal_False, sal_False, ". " },
- { sXML_hours, sal_False, sal_False, sal_False, NULL },
- { sXML_minutes, sal_False, sal_False, sal_False, NULL },
- { sXML_text, sal_False, sal_False, sal_False, ":" },
- { sXML_am_pm, sal_False, sal_False, sal_False, NULL },
- { sXML_seconds, sal_False, sal_False, sal_False, NULL },
- { sXML_seconds, sal_False, sal_False, sal_True, NULL },
- { NULL }
+ { XML_DAY, sal_False, sal_False, sal_False, NULL },
+ { XML_DAY, sal_True, sal_False, sal_False, NULL },
+ { XML_MONTH, sal_True, sal_False, sal_False, NULL },
+ { XML_MONTH, sal_False, sal_True, sal_False, NULL },
+ { XML_MONTH, sal_True, sal_True, sal_False, NULL },
+ { XML_YEAR, sal_False, sal_False, sal_False, NULL },
+ { XML_YEAR, sal_True, sal_False, sal_False, NULL },
+ { XML_DAY_OF_WEEK, sal_False, sal_False, sal_False, NULL },
+ { XML_DAY_OF_WEEK, sal_True, sal_False, sal_False, NULL },
+ { XML_TEXT, sal_False, sal_False, sal_False, "." },
+ { XML_TEXT, sal_False, sal_False, sal_False, " " },
+ { XML_TEXT, sal_False, sal_False, sal_False, ", " },
+ { XML_TEXT, sal_False, sal_False, sal_False, ". " },
+ { XML_HOURS, sal_False, sal_False, sal_False, NULL },
+ { XML_MINUTES, sal_False, sal_False, sal_False, NULL },
+ { XML_TEXT, sal_False, sal_False, sal_False, ":" },
+ { XML_AM_PM, sal_False, sal_False, sal_False, NULL },
+ { XML_SECONDS, sal_False, sal_False, sal_False, NULL },
+ { XML_SECONDS, sal_False, sal_False, sal_True, NULL },
+ { XML_TOKEN_INVALID, NULL }
};
// date
@@ -376,19 +380,18 @@ static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* p
// name
sAttrValue = OUString::createFromAscii( pStyle->mpName );
- rExport.AddAttribute( XML_NAMESPACE_STYLE, sXML_name, sAttrValue );
+ rExport.AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, sAttrValue );
// family
sAttrValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("data-style"));
- rExport.AddAttribute( XML_NAMESPACE_STYLE, sXML_family, sAttrValue );
+ rExport.AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, sAttrValue );
if( pStyle->mbAutomatic )
{
- sAttrValue = OUString::createFromAscii( sXML_true );
- rExport.AddAttribute( XML_NAMESPACE_NUMBER, sXML_automatic_order, sAttrValue );
+ rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_AUTOMATIC_ORDER, XML_TRUE );
}
- SvXMLElementExport aElement( rExport, XML_NAMESPACE_NUMBER, pStyle->mbDateStyle ? sXML_date_style : sXML_time_style, sal_True, sal_True );
+ SvXMLElementExport aElement( rExport, XML_NAMESPACE_NUMBER, pStyle->mbDateStyle ? XML_DATE_STYLE : XML_TIME_STYLE, sal_True, sal_True );
const sal_uInt8* pElements = (const sal_uInt8*)&pStyle->mpFormat[0];
@@ -398,23 +401,20 @@ static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* p
if( rElement.mbDecimal02 )
{
- sAttrValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("2"));
- rExport.AddAttribute( XML_NAMESPACE_NUMBER, sXML_decimal_places, sAttrValue );
+ rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_DECIMAL_PLACES, XML_2 );
}
if( rElement.mbLong )
{
- sAttrValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_long));
- rExport.AddAttribute( XML_NAMESPACE_NUMBER, sXML_style, sAttrValue );
+ rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_STYLE, XML_LONG );
}
if( rElement.mbTextual )
{
- sAttrValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true));
- rExport.AddAttribute( XML_NAMESPACE_NUMBER, sXML_textual, sAttrValue );
+ rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TEXTUAL, XML_TRUE );
}
- SvXMLElementExport aNumberStyle( rExport, XML_NAMESPACE_NUMBER, rElement.mpNumberStyle, sal_True, sal_False );
+ SvXMLElementExport aNumberStyle( rExport, XML_NAMESPACE_NUMBER, rElement.meNumberStyle, sal_True, sal_False );
if( rElement.mpText )
{
sAttrValue = OUString::createFromAscii( rElement.mpText );
@@ -518,17 +518,17 @@ SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext( SvXM
if( nPrefix == XML_NAMESPACE_NUMBER )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_decimal_places ) ) )
+ if( IsXMLToken( aLocalName, XML_DECIMAL_PLACES ) )
{
- mbDecimal02 = sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("2") );
+ mbDecimal02 = IsXMLToken( sValue, XML_2 );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_style ) ) )
+ else if( IsXMLToken( aLocalName, XML_STYLE ) )
{
- mbLong = sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_long ) );
+ mbLong = IsXMLToken( sValue, XML_LONG );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_textual ) ) )
+ else if( IsXMLToken( aLocalName, XML_TEXTUAL ) )
{
- mbTextual = sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) );
+ mbTextual = IsXMLToken( sValue, XML_TRUE );
}
}
}
@@ -557,7 +557,7 @@ SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rIm
: SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList),
mbAutomatic( sal_False ), mnIndex(0), mrImport( rImport ), mnKey( -1 )
{
- mbTimeStyle = rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_time_style ) );
+ mbTimeStyle = IsXMLToken( rLocalName, XML_TIME_STYLE );
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -569,9 +569,9 @@ SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rIm
if( nPrefix == XML_NAMESPACE_NUMBER )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_automatic_order ) ) )
+ if( IsXMLToken( aLocalName, XML_AUTOMATIC_ORDER ) )
{
- mbAutomatic = sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) );
+ mbAutomatic = IsXMLToken( sValue, XML_TRUE );
}
}
}
@@ -590,9 +590,9 @@ void SdXMLNumberFormatImportContext::add( OUString& rNumberStyle, sal_Bool bLong
}
const SdXMLDataStyleNumber* pStyleMember = aSdXMLDataStyleNumbers;
- for( sal_uInt8 nIndex = 0; pStyleMember->mpNumberStyle; nIndex++, pStyleMember++ )
+ for( sal_uInt8 nIndex = 0; pStyleMember->meNumberStyle != XML_TOKEN_INVALID; nIndex++, pStyleMember++ )
{
- if( ((rNumberStyle.compareToAscii( pStyleMember->mpNumberStyle ) == 0) &&
+ if( (IsXMLToken(rNumberStyle, pStyleMember->meNumberStyle) &&
(pStyleMember->mbLong == bLong) &&
(pStyleMember->mbTextual == bTextual) &&
(pStyleMember->mbDecimal02 == bDecimal02) &&
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index f8dd500d591b..06232539b914 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLShapeStyleContext.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: fs $ $Date: 2001-05-28 15:07:00 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,8 +61,6 @@
#include <tools/debug.hxx>
-#include "xmlkywd.hxx"
-
#ifndef _XMLOFF_XMLSHAPESTYLECONTEXT_HXX
#include "XMLShapeStyleContext.hxx"
#endif
@@ -95,6 +93,8 @@
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_PROPERTIES;
//////////////////////////////////////////////////////////////////////////////
@@ -135,7 +135,7 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext(
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.compareToAscii( sXML_properties ) == 0 )
+ IsXMLToken( rLocalName, XML_PROPERTIES ) )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
GetStyles()->GetImportPropertyMapper( GetFamily() );
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index 36e7c05bbd5c..4f24a31d150b 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: animexp.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 13:56:27 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,7 +78,9 @@
#include <tools/color.hxx>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -539,7 +541,7 @@ void XMLAnimationsExporter::exportAnimations( SvXMLExport& rExport )
if( aIter != aEnd )
{
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, sXML_animations, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, XML_ANIMATIONS, sal_True, sal_True );
do
{
@@ -547,26 +549,26 @@ void XMLAnimationsExporter::exportAnimations( SvXMLExport& rExport )
DBG_ASSERT( rEffect.mnShapeId != -1, "shape id creation failed for animation effect?" );
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_shape_id, OUString::valueOf( rEffect.mnShapeId ) );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_SHAPE_ID, OUString::valueOf( rEffect.mnShapeId ) );
if( rEffect.meKind == XMLE_DIM )
{
// export a dim action;
SvXMLUnitConverter::convertColor( sTmp, rEffect.maDimColor );
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_color, sTmp.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_COLOR, sTmp.makeStringAndClear() );
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, sXML_dim, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, XML_DIM, sal_True, sal_True );
}
else if( rEffect.meKind == XMLE_PLAY )
{
if( rEffect.meSpeed != AnimationSpeed_MEDIUM )
{
SvXMLUnitConverter::convertEnum( sTmp, rEffect.meSpeed, aXML_AnimationSpeed_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_speed, sTmp.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_SPEED, sTmp.makeStringAndClear() );
}
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, sXML_play, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, XML_PLAY, sal_True, sal_True );
}
else
{
@@ -574,59 +576,59 @@ void XMLAnimationsExporter::exportAnimations( SvXMLExport& rExport )
if( rEffect.meEffect != EK_none )
{
SvXMLUnitConverter::convertEnum( sTmp, rEffect.meEffect, aXML_AnimationEffect_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_effect, sTmp.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_EFFECT, sTmp.makeStringAndClear() );
}
if( rEffect.meDirection != ED_none )
{
SvXMLUnitConverter::convertEnum( sTmp, rEffect.meDirection, aXML_AnimationDirection_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_direction, sTmp.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_DIRECTION, sTmp.makeStringAndClear() );
}
if( rEffect.mnStartScale != -1 )
{
SvXMLUnitConverter::convertPercent( sTmp, rEffect.mnStartScale );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_start_scale, sTmp.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_START_SCALE, sTmp.makeStringAndClear() );
}
if( rEffect.meSpeed != AnimationSpeed_MEDIUM )
{
SvXMLUnitConverter::convertEnum( sTmp, rEffect.meSpeed, aXML_AnimationSpeed_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_speed, sTmp.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_SPEED, sTmp.makeStringAndClear() );
}
if( rEffect.mnPathShapeId != -1 )
{
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_path_id, OUString::valueOf( rEffect.mnPathShapeId ) );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_PATH_ID, OUString::valueOf( rEffect.mnPathShapeId ) );
}
- char *pLocalName;
+ enum XMLTokenEnum eLocalName;
if( rEffect.meKind == XMLE_SHOW )
{
if( rEffect.mbTextEffect )
- pLocalName = sXML_show_text;
+ eLocalName = XML_SHOW_TEXT;
else
- pLocalName = sXML_show_shape;
+ eLocalName = XML_SHOW_SHAPE;
}
else
{
if( rEffect.mbTextEffect )
- pLocalName = sXML_hide_text;
+ eLocalName = XML_HIDE_TEXT;
else
- pLocalName = sXML_hide_shape;
+ eLocalName = XML_HIDE_SHAPE;
}
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, pLocalName, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, eLocalName, sal_True, sal_True );
if( rEffect.maSoundURL.getLength() != 0 )
{
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, rExport.GetRelativeReference(rEffect.maSoundURL) );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show, sXML_new );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onRequest );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, rExport.GetRelativeReference(rEffect.maSoundURL) );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_NEW );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
if( rEffect.mbPlayFull )
- rExport.AddAttributeASCII( XML_NAMESPACE_PRESENTATION, sXML_play_full, sXML_true );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_PLAY_FULL, XML_TRUE );
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, sXML_sound, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, XML_SOUND, sal_True, sal_True );
}
}
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index c20044ea48f6..19860ccbea4d 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: animimp.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 13:58:03 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,7 +87,9 @@
#include <comphelper/extract.hxx>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
@@ -129,6 +131,7 @@ using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::presentation;
+using namespace ::xmloff::token;
AnimationEffect ImplSdXMLgetEffect( XMLEffect eKind, XMLEffectDirection eDirection, sal_Int16 nStartScale, sal_Bool bIn )
{
@@ -433,7 +436,7 @@ TYPEINIT1( XMLAnimationsSoundContext, SvXMLImportContext );
XMLAnimationsSoundContext::XMLAnimationsSoundContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, XMLAnimationsEffectContext* pParent )
: SvXMLImportContext( rImport, nPrfx, rLocalName ), mpParent( pParent )
{
- if( mpParent && nPrfx == XML_NAMESPACE_PRESENTATION && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_sound ) ) )
+ if( mpParent && nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_SOUND ) )
{
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -446,15 +449,15 @@ XMLAnimationsSoundContext::XMLAnimationsSoundContext( SvXMLImport& rImport, sal_
switch( nPrefix )
{
case XML_NAMESPACE_XLINK:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_href ) ) )
+ if( IsXMLToken( aLocalName, XML_HREF ) )
{
mpParent->maSoundURL = rImport.GetAbsoluteReference(sValue);
}
break;
case XML_NAMESPACE_PRESENTATION:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_play_full ) ) )
+ if( IsXMLToken( aLocalName, XML_PLAY_FULL ) )
{
- mpParent->mbPlayFull = sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) );
+ mpParent->mbPlayFull = IsXMLToken( sValue, XML_TRUE );
}
}
}
@@ -475,29 +478,29 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport, s
meEffect( EK_none ), meDirection( ED_none ), mnStartScale( 100 ),
meSpeed( AnimationSpeed_MEDIUM ), maDimColor(0), mbPlayFull( sal_False )
{
- if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_show_shape ) ) )
+ if( IsXMLToken( rLocalName, XML_SHOW_SHAPE ) )
{
meKind = XMLE_SHOW;
}
- else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_show_text ) ) )
+ else if( IsXMLToken( rLocalName, XML_SHOW_TEXT ) )
{
meKind = XMLE_SHOW;
mbTextEffect = sal_True;
}
- else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_hide_shape ) ) )
+ else if( IsXMLToken( rLocalName, XML_HIDE_SHAPE ) )
{
meKind = XMLE_HIDE;
}
- else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_hide_text ) ) )
+ else if( IsXMLToken( rLocalName, XML_HIDE_TEXT ) )
{
meKind = XMLE_HIDE;
mbTextEffect = sal_True;
}
- else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_dim ) ) )
+ else if( IsXMLToken( rLocalName, XML_DIM ) )
{
meKind = XMLE_DIM;
}
- else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_play ) ) )
+ else if( IsXMLToken( rLocalName, XML_PLAY ) )
{
meKind = XMLE_PLAY;
}
@@ -519,42 +522,42 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport, s
switch( nPrefix )
{
case XML_NAMESPACE_DRAW:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_shape_id ) ) )
+ if( IsXMLToken( aLocalName, XML_SHAPE_ID ) )
{
SvXMLUnitConverter::convertNumber(mnShapeId, sValue);
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_color ) ) )
+ else if( IsXMLToken( aLocalName, XML_COLOR ) )
{
SvXMLUnitConverter::convertColor(maDimColor, sValue);
}
break;
case XML_NAMESPACE_PRESENTATION:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_effect ) ) )
+ if( IsXMLToken( aLocalName, XML_EFFECT ) )
{
USHORT eEnum;
if( SvXMLUnitConverter::convertEnum( eEnum, sValue, aXML_AnimationEffect_EnumMap ) )
meEffect = (XMLEffect)eEnum;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_direction ) ) )
+ else if( IsXMLToken(aLocalName, XML_DIRECTION ) )
{
USHORT eEnum;
if( SvXMLUnitConverter::convertEnum( eEnum, sValue, aXML_AnimationDirection_EnumMap ) )
meDirection = (XMLEffectDirection)eEnum;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_start_scale ) ) )
+ else if( IsXMLToken( aLocalName, XML_START_SCALE ) )
{
sal_Int32 nScale;
if( SvXMLUnitConverter::convertPercent( nScale, sValue ) )
mnStartScale = (sal_Int16)nScale;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_speed ) ) )
+ else if( IsXMLToken( aLocalName, XML_SPEED ) )
{
USHORT eEnum;
if( SvXMLUnitConverter::convertEnum( eEnum, sValue, aXML_AnimationSpeed_EnumMap ) )
meSpeed = (AnimationSpeed)eEnum;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_path_id ) ) )
+ else if( IsXMLToken( aLocalName, XML_PATH_ID ) )
{
SvXMLUnitConverter::convertNumber(mnPathShapeId, sValue);
}
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 4f573cf7dd21..cbd3c9d35e5d 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: eventimp.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 14:02:50 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,7 +84,9 @@
#include <comphelper/extract.hxx>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
@@ -197,7 +199,7 @@ TYPEINIT1( XMLEventSoundContext, SvXMLImportContext );
XMLEventSoundContext::XMLEventSoundContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, SdXMLEventContext* pParent )
: SvXMLImportContext( rImport, nPrfx, rLocalName ), mpParent( pParent )
{
- if( mpParent && nPrfx == XML_NAMESPACE_PRESENTATION && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_sound ) ) )
+ if( mpParent && nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_SOUND ) )
{
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -210,15 +212,15 @@ XMLEventSoundContext::XMLEventSoundContext( SvXMLImport& rImport, sal_uInt16 nPr
switch( nPrefix )
{
case XML_NAMESPACE_XLINK:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_href ) ) )
+ if( IsXMLToken( aLocalName, XML_HREF ) )
{
mpParent->msSoundURL = rImport.GetAbsoluteReference(sValue);
}
break;
case XML_NAMESPACE_PRESENTATION:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_play_full ) ) )
+ if( IsXMLToken( aLocalName, XML_PLAY_FULL ) )
{
- mpParent->mbPlayFull = sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) );
+ mpParent->mbPlayFull = IsXMLToken( sValue, XML_TRUE );
}
}
}
@@ -241,11 +243,11 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImport, sal_uInt16 nPrfx, c
{
const OUString msXMLEventName( RTL_CONSTASCII_USTRINGPARAM( "on-click" ) );
- if( nPrfx == XML_NAMESPACE_PRESENTATION && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_event ) ) )
+ if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT ) )
{
mbValid = sal_True;
}
- else if( nPrfx == XML_NAMESPACE_SCRIPT && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_event ) ) )
+ else if( nPrfx == XML_NAMESPACE_SCRIPT && IsXMLToken( rLocalName, XML_EVENT ) )
{
mbScript = sal_True;
mbValid = sal_True;
@@ -267,64 +269,64 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImport, sal_uInt16 nPrfx, c
switch( nPrefix )
{
case XML_NAMESPACE_PRESENTATION:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_action ) ) )
+ if( IsXMLToken( aLocalName, XML_ACTION ) )
{
USHORT eEnum;
if( SvXMLUnitConverter::convertEnum( eEnum, sValue, aXML_EventActions_EnumMap ) )
meClickAction = (ClickAction)eEnum;
}
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_effect ) ) )
+ if( IsXMLToken( aLocalName, XML_EFFECT ) )
{
USHORT eEnum;
if( SvXMLUnitConverter::convertEnum( eEnum, sValue, aXML_AnimationEffect_EnumMap ) )
meEffect = (XMLEffect)eEnum;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_direction ) ) )
+ else if( IsXMLToken( aLocalName, XML_DIRECTION ) )
{
USHORT eEnum;
if( SvXMLUnitConverter::convertEnum( eEnum, sValue, aXML_AnimationDirection_EnumMap ) )
meDirection = (XMLEffectDirection)eEnum;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_start_scale ) ) )
+ else if( IsXMLToken( aLocalName, XML_START_SCALE ) )
{
sal_Int32 nScale;
if( SvXMLUnitConverter::convertPercent( nScale, sValue ) )
mnStartScale = (sal_Int16)nScale;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_speed ) ) )
+ else if( IsXMLToken( aLocalName, XML_SPEED ) )
{
USHORT eEnum;
if( SvXMLUnitConverter::convertEnum( eEnum, sValue, aXML_AnimationSpeed_EnumMap ) )
meSpeed = (AnimationSpeed)eEnum;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_verb ) ) )
+ else if( IsXMLToken( aLocalName, XML_VERB ) )
{
SvXMLUnitConverter::convertNumber( mnVerb, sValue );
}
break;
case XML_NAMESPACE_SCRIPT:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_event_name ) ) )
+ if( IsXMLToken( aLocalName, XML_EVENT_NAME ) )
{
msEventName = sValue;
mbValid = msEventName == msXMLEventName;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_language ) ) )
+ else if( IsXMLToken( aLocalName, XML_LANGUAGE ) )
{
msLanguage = sValue;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_macro_name ) ) )
+ else if( IsXMLToken( aLocalName, XML_MACRO_NAME ) )
{
msMacroName = sValue;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_library ) ) )
+ else if( IsXMLToken( aLocalName, XML_LIBRARY ) )
{
msLibrary = sValue;
}
break;
case XML_NAMESPACE_XLINK:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_href ) ) )
+ if( IsXMLToken( aLocalName, XML_HREF ) )
{
msBookmark = rImport.GetAbsoluteReference(sValue);
}
diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx
index 4afc669ddf6c..aad3e03211bc 100644
--- a/xmloff/source/draw/layerexp.cxx
+++ b/xmloff/source/draw/layerexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: layerexp.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: cl $ $Date: 2001-05-14 11:35:10 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,7 +73,9 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -103,7 +105,7 @@ using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
-
+using namespace ::xmloff::token;
void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
{
@@ -125,7 +127,7 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
OUStringBuffer sTmp;
OUString aName;
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, sXML_layer_set, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_LAYER_SET, sal_True, sal_True );
for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
@@ -135,10 +137,10 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
{
if( xLayer->getPropertyValue( strName ) >>= aName )
{
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aName );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aName );
}
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, sXML_layer, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_LAYER, sal_True, sal_True );
}
}
}
diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx
index 47be200c355d..d5082ea7ecd1 100644
--- a/xmloff/source/draw/layerimp.cxx
+++ b/xmloff/source/draw/layerimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: layerimp.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cl $ $Date: 2001-05-11 07:38:35 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,7 +78,9 @@
#include <comphelper/extract.hxx>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
@@ -111,6 +113,9 @@ using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_NAME;
+
TYPEINIT1( SdXMLLayerSetContext, SvXMLImportContext );
@@ -145,7 +150,7 @@ SvXMLImportContext * SdXMLLayerSetContext::CreateChildContext( USHORT nPrefix, c
{
const OUString sValue( xAttrList->getValueByIndex( i ) );
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_name ) ) )
+ if( IsXMLToken( aLocalName, XML_NAME ) )
{
aName = sValue;
}
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 6d8d6b44d083..c78a5184f756 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdpropls.cxx,v $
*
- * $Revision: 1.45 $
+ * $Revision: 1.46 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 14:10:29 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -165,8 +165,8 @@
#include "ControlBorderHandler.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include <xmlkywd.hxx>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
#endif
#ifndef _SDPROPLS_HXX
@@ -227,182 +227,182 @@ using namespace ::xmloff::token;
const XMLPropertyMapEntry aXMLSDProperties[] =
{
// stroke attributes
- { "LineStyle", XML_NAMESPACE_DRAW, sXML_stroke, XML_SD_TYPE_STROKE, 0 },
- { "LineDashName", XML_NAMESPACE_DRAW, sXML_stroke_dash, XML_TYPE_STRING, CTF_DASHNAME },
- { "LineWidth", XML_NAMESPACE_SVG, sXML_stroke_width, XML_TYPE_MEASURE, 0 },
- { "LineColor", XML_NAMESPACE_SVG, sXML_stroke_color, XML_TYPE_COLOR, 0 },
- { "LineStartName", XML_NAMESPACE_DRAW, sXML_marker_start, XML_TYPE_STRING, CTF_LINESTARTNAME },
- { "LineStartWidth", XML_NAMESPACE_DRAW, sXML_marker_start_width, XML_TYPE_MEASURE, 0 },
- { "LineStartCenter", XML_NAMESPACE_DRAW, sXML_marker_start_center, XML_TYPE_BOOL, 0 },
- { "LineEndName", XML_NAMESPACE_DRAW, sXML_marker_end, XML_TYPE_STRING, CTF_LINEENDNAME },
- { "LineEndWidth", XML_NAMESPACE_DRAW, sXML_marker_end_width, XML_TYPE_MEASURE, 0 },
- { "LineEndCenter", XML_NAMESPACE_DRAW, sXML_marker_end_center, XML_TYPE_BOOL, 0 },
- { "LineTransparence", XML_NAMESPACE_SVG, sXML_stroke_opacity, XML_SD_TYPE_OPACITY, 0 },
- { "LineJoint", XML_NAMESPACE_SVG, sXML_stroke_linejoin, XML_SD_TYPE_LINEJOIN, 0 },
+ { "LineStyle", XML_NAMESPACE_DRAW, XML_STROKE, XML_SD_TYPE_STROKE, 0 },
+ { "LineDashName", XML_NAMESPACE_DRAW, XML_STROKE_DASH, XML_TYPE_STRING, CTF_DASHNAME },
+ { "LineWidth", XML_NAMESPACE_SVG, XML_STROKE_WIDTH, XML_TYPE_MEASURE, 0 },
+ { "LineColor", XML_NAMESPACE_SVG, XML_STROKE_COLOR, XML_TYPE_COLOR, 0 },
+ { "LineStartName", XML_NAMESPACE_DRAW, XML_MARKER_START, XML_TYPE_STRING, CTF_LINESTARTNAME },
+ { "LineStartWidth", XML_NAMESPACE_DRAW, XML_MARKER_START_WIDTH, XML_TYPE_MEASURE, 0 },
+ { "LineStartCenter", XML_NAMESPACE_DRAW, XML_MARKER_START_CENTER, XML_TYPE_BOOL, 0 },
+ { "LineEndName", XML_NAMESPACE_DRAW, XML_MARKER_END, XML_TYPE_STRING, CTF_LINEENDNAME },
+ { "LineEndWidth", XML_NAMESPACE_DRAW, XML_MARKER_END_WIDTH, XML_TYPE_MEASURE, 0 },
+ { "LineEndCenter", XML_NAMESPACE_DRAW, XML_MARKER_END_CENTER, XML_TYPE_BOOL, 0 },
+ { "LineTransparence", XML_NAMESPACE_SVG, XML_STROKE_OPACITY, XML_SD_TYPE_OPACITY, 0 },
+ { "LineJoint", XML_NAMESPACE_SVG, XML_STROKE_LINEJOIN, XML_SD_TYPE_LINEJOIN, 0 },
// fill attributes
- { "FillStyle", XML_NAMESPACE_DRAW, sXML_fill, XML_SD_TYPE_FILLSTYLE, 0 },
- { "FillColor", XML_NAMESPACE_DRAW, sXML_fill_color, XML_TYPE_COLOR, 0 },
- { "FillGradientName", XML_NAMESPACE_DRAW, sXML_fill_gradient_name, XML_TYPE_STRING, CTF_FILLGRADIENTNAME },
- { "FillGradientStepCount", XML_NAMESPACE_DRAW, sXML_gradient_step_count, XML_TYPE_NUMBER, 0 },
- { "FillHatchName", XML_NAMESPACE_DRAW, sXML_fill_hatch_name, XML_TYPE_STRING, CTF_FILLHATCHNAME },
- { "FillBackground", XML_NAMESPACE_DRAW, sXML_fill_hatch_solid, XML_TYPE_BOOL, 0 },
- { "FillBitmapName", XML_NAMESPACE_DRAW, sXML_fill_image_name, XML_TYPE_STRING, CTF_FILLBITMAPNAME },
- { "FillTransparence", XML_NAMESPACE_DRAW, sXML_transparency, XML_TYPE_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
- { "FillTransparenceGradientName", XML_NAMESPACE_DRAW, sXML_transparency_name, XML_TYPE_STRING, CTF_FILLTRANSNAME },
-
- { "FillBitmapSizeX", XML_NAMESPACE_DRAW, sXML_fill_image_width, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, sXML_fill_image_width, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapSizeY", XML_NAMESPACE_DRAW, sXML_fill_image_height, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, sXML_fill_image_height, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapMode", XML_NAMESPACE_STYLE,sXML_repeat, XML_SD_TYPE_BITMAP_MODE, 0 },
- { "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, sXML_fill_image_ref_point_x,XML_TYPE_PERCENT, 0 },
- { "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, sXML_fill_image_ref_point_y,XML_TYPE_PERCENT, 0 },
- { "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, sXML_fill_image_ref_point, XML_SD_TYPE_BITMAP_REFPOINT, 0 },
- { "FillBitmapOffsetX", XML_NAMESPACE_DRAW, sXML_tile_repeat_offset, XML_SD_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X },
- { "FillBitmapOffsetY", XML_NAMESPACE_DRAW, sXML_tile_repeat_offset, XML_SD_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y },
+ { "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SD_TYPE_FILLSTYLE, 0 },
+ { "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 },
+ { "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STRING, CTF_FILLGRADIENTNAME },
+ { "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER, 0 },
+ { "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STRING, CTF_FILLHATCHNAME },
+ { "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 },
+ { "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STRING, CTF_FILLBITMAPNAME },
+ { "FillTransparence", XML_NAMESPACE_DRAW, XML_TRANSPARENCY, XML_TYPE_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
+ { "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_TRANSPARENCY_NAME, XML_TYPE_STRING, CTF_FILLTRANSNAME },
+
+ { "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapSizeY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SD_TYPE_BITMAP_MODE, 0 },
+ { "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 },
+ { "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 },
+ { "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT, XML_SD_TYPE_BITMAP_REFPOINT, 0 },
+ { "FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X },
+ { "FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y },
// text frame attributes
- { "TextHorizontalAdjust", XML_NAMESPACE_DRAW, sXML_textarea_horizontal_align, XML_SD_TYPE_TEXT_ALIGN, 0 },
- { "TextVerticalAdjust", XML_NAMESPACE_DRAW, sXML_textarea_vertical_align, XML_SD_TYPE_VERTICAL_ALIGN, 0 },
- { "TextAutoGrowHeight", XML_NAMESPACE_DRAW, sXML_auto_grow_width, XML_TYPE_BOOL, 0 },
- { "TextAutoGrowWidth", XML_NAMESPACE_DRAW, sXML_auto_grow_height, XML_TYPE_BOOL, 0 },
- { "TextFitToSize", XML_NAMESPACE_DRAW, sXML_fit_to_size, XML_SD_TYPE_FITTOSIZE, 0 },
- { "TextContourFrame", XML_NAMESPACE_DRAW, sXML_fit_to_contour, XML_TYPE_BOOL, 0 },
- { "TextMaximumFrameHeight", XML_NAMESPACE_FO, sXML_max_height, XML_TYPE_MEASURE, 0 },
- { "TextMaximumFrameWidth", XML_NAMESPACE_FO, sXML_max_width, XML_TYPE_MEASURE, 0 },
- { "TextMinimumFrameHeight", XML_NAMESPACE_FO, sXML_min_height, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
- { "TextMinimumFrameWidth", XML_NAMESPACE_FO, sXML_min_width, XML_TYPE_MEASURE, 0 },
- { "TextUpperDistance", XML_NAMESPACE_FO, sXML_padding_top, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
- { "TextLowerDistance", XML_NAMESPACE_FO, sXML_padding_bottom, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
- { "TextLeftDistance", XML_NAMESPACE_FO, sXML_padding_left, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
- { "TextRightDistance", XML_NAMESPACE_FO, sXML_padding_right, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
- { "TextWritingMode", XML_NAMESPACE_DRAW, sXML_writing_mode, XML_SD_TYPE_WRITINGMODE, CTF_WRITINGMODE },
- { "NumberingRules", XML_NAMESPACE_TEXT, sXML_list_style, XML_SD_TYPE_NUMBULLET|MID_FLAG_ELEMENT_ITEM, CTF_NUMBERINGRULES },
- { "NumberingRules", XML_NAMESPACE_TEXT, sXML_list_style_name, XML_TYPE_STRING, CTF_NUMBERINGRULES_NAME },
+ { "TextHorizontalAdjust", XML_NAMESPACE_DRAW, XML_TEXTAREA_HORIZONTAL_ALIGN, XML_SD_TYPE_TEXT_ALIGN, 0 },
+ { "TextVerticalAdjust", XML_NAMESPACE_DRAW, XML_TEXTAREA_VERTICAL_ALIGN, XML_SD_TYPE_VERTICAL_ALIGN, 0 },
+ { "TextAutoGrowHeight", XML_NAMESPACE_DRAW, XML_AUTO_GROW_WIDTH, XML_TYPE_BOOL, 0 },
+ { "TextAutoGrowWidth", XML_NAMESPACE_DRAW, XML_AUTO_GROW_HEIGHT, XML_TYPE_BOOL, 0 },
+ { "TextFitToSize", XML_NAMESPACE_DRAW, XML_FIT_TO_SIZE, XML_SD_TYPE_FITTOSIZE, 0 },
+ { "TextContourFrame", XML_NAMESPACE_DRAW, XML_FIT_TO_CONTOUR, XML_TYPE_BOOL, 0 },
+ { "TextMaximumFrameHeight", XML_NAMESPACE_FO, XML_MAX_HEIGHT, XML_TYPE_MEASURE, 0 },
+ { "TextMaximumFrameWidth", XML_NAMESPACE_FO, XML_MAX_WIDTH, XML_TYPE_MEASURE, 0 },
+ { "TextMinimumFrameHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
+ { "TextMinimumFrameWidth", XML_NAMESPACE_FO, XML_MIN_WIDTH, XML_TYPE_MEASURE, 0 },
+ { "TextUpperDistance", XML_NAMESPACE_FO, XML_PADDING_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
+ { "TextLowerDistance", XML_NAMESPACE_FO, XML_PADDING_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
+ { "TextLeftDistance", XML_NAMESPACE_FO, XML_PADDING_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
+ { "TextRightDistance", XML_NAMESPACE_FO, XML_PADDING_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 }, // exists in SW, too
+ { "TextWritingMode", XML_NAMESPACE_DRAW, XML_WRITING_MODE, XML_SD_TYPE_WRITINGMODE, CTF_WRITINGMODE },
+ { "NumberingRules", XML_NAMESPACE_TEXT, XML_LIST_STYLE, XML_SD_TYPE_NUMBULLET|MID_FLAG_ELEMENT_ITEM, CTF_NUMBERINGRULES },
+ { "NumberingRules", XML_NAMESPACE_TEXT, XML_LIST_STYLE_NAME, XML_TYPE_STRING, CTF_NUMBERINGRULES_NAME },
// shadow attributes
- { "Shadow", XML_NAMESPACE_DRAW, sXML_shadow, XML_SD_TYPE_SHADOW, 0 },
- { "ShadowXDistance", XML_NAMESPACE_DRAW, sXML_shadow_offset_x, XML_TYPE_MEASURE, 0 },
- { "ShadowYDistance", XML_NAMESPACE_DRAW, sXML_shadow_offset_y, XML_TYPE_MEASURE, 0 },
- { "ShadowColor", XML_NAMESPACE_DRAW, sXML_shadow_color, XML_TYPE_COLOR, 0 },
- { "ShadowTransparence", XML_NAMESPACE_DRAW, sXML_shadow_transparency, XML_TYPE_PERCENT, 0 },
+ { "Shadow", XML_NAMESPACE_DRAW, XML_SHADOW, XML_SD_TYPE_SHADOW, 0 },
+ { "ShadowXDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_X, XML_TYPE_MEASURE, 0 },
+ { "ShadowYDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_Y, XML_TYPE_MEASURE, 0 },
+ { "ShadowColor", XML_NAMESPACE_DRAW, XML_SHADOW_COLOR, XML_TYPE_COLOR, 0 },
+ { "ShadowTransparence", XML_NAMESPACE_DRAW, XML_SHADOW_TRANSPARENCY, XML_TYPE_PERCENT, 0 },
// graphic attributes
- { "GraphicColorMode", XML_NAMESPACE_DRAW, sXML_color_mode, XML_TYPE_COLOR_MODE, 0 }, // exists in SW, too, with same property name
- { "AdjustLuminance", XML_NAMESPACE_DRAW, sXML_luminance, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
- { "AdjustContrast", XML_NAMESPACE_DRAW, sXML_contrast, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
- { "Gamma", XML_NAMESPACE_DRAW, sXML_gamma, XML_TYPE_DOUBLE, 0 }, // signed? exists in SW, too, with same property name
- { "AdjustRed", XML_NAMESPACE_DRAW, sXML_red, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
- { "AdjustGreen", XML_NAMESPACE_DRAW, sXML_green, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
- { "AdjustBlue", XML_NAMESPACE_DRAW, sXML_blue, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
- { "GraphicCrop", XML_NAMESPACE_FO, sXML_clip, XML_TYPE_TEXT_CLIP, 0 }, // exists in SW, too, with same property name
+ { "GraphicColorMode", XML_NAMESPACE_DRAW, XML_COLOR_MODE, XML_TYPE_COLOR_MODE, 0 }, // exists in SW, too, with same property name
+ { "AdjustLuminance", XML_NAMESPACE_DRAW, XML_LUMINANCE, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
+ { "AdjustContrast", XML_NAMESPACE_DRAW, XML_CONTRAST, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
+ { "Gamma", XML_NAMESPACE_DRAW, XML_GAMMA, XML_TYPE_DOUBLE, 0 }, // signed? exists in SW, too, with same property name
+ { "AdjustRed", XML_NAMESPACE_DRAW, XML_RED, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
+ { "AdjustGreen", XML_NAMESPACE_DRAW, XML_GREEN, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
+ { "AdjustBlue", XML_NAMESPACE_DRAW, XML_BLUE, XML_TYPE_PERCENT16, 0 }, // signed? exists in SW, too, with same property name
+ { "GraphicCrop", XML_NAMESPACE_FO, XML_CLIP, XML_TYPE_TEXT_CLIP, 0 }, // exists in SW, too, with same property name
// animation text attributes
- { "TextAnimationKind", XML_NAMESPACE_STYLE,sXML_text_blinking, XML_TYPE_TEXT_ANIMATION_BLINKING, CTF_TEXTANIMATION_BLINKING },
- { "TextAnimationKind", XML_NAMESPACE_TEXT, sXML_animation, XML_TYPE_TEXT_ANIMATION, CTF_TEXTANIMATION_KIND },
- { "TextAnimationDirection", XML_NAMESPACE_TEXT, sXML_animation_direction, XML_TYPE_TEXT_ANIMATION_DIRECTION, 0 },
- { "TextAnimationStartInside", XML_NAMESPACE_TEXT, sXML_animation_start_inside,XML_TYPE_BOOL, 0 },
- { "TextAnimationStopInside", XML_NAMESPACE_TEXT, sXML_animation_stop_inside, XML_TYPE_BOOL, 0 },
- { "TextAnimationCount", XML_NAMESPACE_TEXT, sXML_animation_repeat, XML_TYPE_NUMBER16, 0 },
- { "TextAnimationDelay", XML_NAMESPACE_TEXT, sXML_animation_delay, XML_TYPE_DURATION16_MS, 0 },
- { "TextAnimationAmount", XML_NAMESPACE_TEXT, sXML_animation_steps, XML_TYPE_TEXT_ANIMATION_STEPS, 0 },
+ { "TextAnimationKind", XML_NAMESPACE_STYLE,XML_TEXT_BLINKING, XML_TYPE_TEXT_ANIMATION_BLINKING, CTF_TEXTANIMATION_BLINKING },
+ { "TextAnimationKind", XML_NAMESPACE_TEXT, XML_ANIMATION, XML_TYPE_TEXT_ANIMATION, CTF_TEXTANIMATION_KIND },
+ { "TextAnimationDirection", XML_NAMESPACE_TEXT, XML_ANIMATION_DIRECTION, XML_TYPE_TEXT_ANIMATION_DIRECTION, 0 },
+ { "TextAnimationStartInside", XML_NAMESPACE_TEXT, XML_ANIMATION_START_INSIDE, XML_TYPE_BOOL, 0 },
+ { "TextAnimationStopInside", XML_NAMESPACE_TEXT, XML_ANIMATION_STOP_INSIDE, XML_TYPE_BOOL, 0 },
+ { "TextAnimationCount", XML_NAMESPACE_TEXT, XML_ANIMATION_REPEAT, XML_TYPE_NUMBER16, 0 },
+ { "TextAnimationDelay", XML_NAMESPACE_TEXT, XML_ANIMATION_DELAY, XML_TYPE_DURATION16_MS, 0 },
+ { "TextAnimationAmount", XML_NAMESPACE_TEXT, XML_ANIMATION_STEPS, XML_TYPE_TEXT_ANIMATION_STEPS, 0 },
// connector attributes
- { "EdgeNode1HorzDist", XML_NAMESPACE_DRAW, sXML_start_line_spacing_horizontal, XML_TYPE_MEASURE, 0 },
- { "EdgeNode1VertDist", XML_NAMESPACE_DRAW, sXML_start_line_spacing_vertical, XML_TYPE_MEASURE, 0 },
- { "EdgeNode2HorzDist", XML_NAMESPACE_DRAW, sXML_end_line_spacing_horizontal, XML_TYPE_MEASURE, 0 },
- { "EdgeNode2VertDist", XML_NAMESPACE_DRAW, sXML_end_line_spacing_vertical, XML_TYPE_MEASURE, 0 },
+ { "EdgeNode1HorzDist", XML_NAMESPACE_DRAW, XML_START_LINE_SPACING_HORIZONTAL, XML_TYPE_MEASURE, 0 },
+ { "EdgeNode1VertDist", XML_NAMESPACE_DRAW, XML_START_LINE_SPACING_VERTICAL, XML_TYPE_MEASURE, 0 },
+ { "EdgeNode2HorzDist", XML_NAMESPACE_DRAW, XML_END_LINE_SPACING_HORIZONTAL, XML_TYPE_MEASURE, 0 },
+ { "EdgeNode2VertDist", XML_NAMESPACE_DRAW, XML_END_LINE_SPACING_VERTICAL, XML_TYPE_MEASURE, 0 },
// measure attributes
- { "MeasureLineDistance", XML_NAMESPACE_DRAW, sXML_line_distance, XML_TYPE_MEASURE, 0 },
- { "MeasureHelpLineOverhang", XML_NAMESPACE_DRAW, sXML_guide_overhang, XML_TYPE_MEASURE, 0 },
- { "MeasureHelpLineDistance", XML_NAMESPACE_DRAW, sXML_guide_distance, XML_TYPE_MEASURE, 0 },
- { "MeasureHelpLine1Length", XML_NAMESPACE_DRAW, sXML_start_guide, XML_TYPE_MEASURE, 0 },
- { "MeasureHelpLine2Length", XML_NAMESPACE_DRAW, sXML_end_guide, XML_TYPE_MEASURE, 0 },
- { "MeasureTextHorizontalPosition", XML_NAMESPACE_DRAW, sXML_measure_align, XML_SD_TYPE_MEASURE_HALIGN, 0 },
- { "MeasureTextVerticalPosition", XML_NAMESPACE_DRAW, sXML_measure_vertical_align,XML_SD_TYPE_MEASURE_VALIGN, 0 },
- { "MeasureUnit", XML_NAMESPACE_DRAW, sXML_unit, XML_SD_TYPE_MEASURE_UNIT, 0 },
- { "MeasureShowUnit", XML_NAMESPACE_DRAW, sXML_show_unit, XML_TYPE_BOOL, 0 },
- { "MeasureBelowReferenceEdge", XML_NAMESPACE_DRAW, sXML_placing, XML_SD_TYPE_MEASURE_PLACING, 0 },
- { "MeasureTextRotate90", XML_NAMESPACE_DRAW, sXML_parallel, XML_TYPE_BOOL, 0 },
+ { "MeasureLineDistance", XML_NAMESPACE_DRAW, XML_LINE_DISTANCE, XML_TYPE_MEASURE, 0 },
+ { "MeasureHelpLineOverhang", XML_NAMESPACE_DRAW, XML_GUIDE_OVERHANG, XML_TYPE_MEASURE, 0 },
+ { "MeasureHelpLineDistance", XML_NAMESPACE_DRAW, XML_GUIDE_DISTANCE, XML_TYPE_MEASURE, 0 },
+ { "MeasureHelpLine1Length", XML_NAMESPACE_DRAW, XML_START_GUIDE, XML_TYPE_MEASURE, 0 },
+ { "MeasureHelpLine2Length", XML_NAMESPACE_DRAW, XML_END_GUIDE, XML_TYPE_MEASURE, 0 },
+ { "MeasureTextHorizontalPosition", XML_NAMESPACE_DRAW, XML_MEASURE_ALIGN, XML_SD_TYPE_MEASURE_HALIGN, 0 },
+ { "MeasureTextVerticalPosition", XML_NAMESPACE_DRAW, XML_MEASURE_VERTICAL_ALIGN, XML_SD_TYPE_MEASURE_VALIGN, 0 },
+ { "MeasureUnit", XML_NAMESPACE_DRAW, XML_UNIT, XML_SD_TYPE_MEASURE_UNIT, 0 },
+ { "MeasureShowUnit", XML_NAMESPACE_DRAW, XML_SHOW_UNIT, XML_TYPE_BOOL, 0 },
+ { "MeasureBelowReferenceEdge", XML_NAMESPACE_DRAW, XML_PLACING, XML_SD_TYPE_MEASURE_PLACING, 0 },
+ { "MeasureTextRotate90", XML_NAMESPACE_DRAW, XML_PARALLEL, XML_TYPE_BOOL, 0 },
// 3D geometry attributes
- { "D3DHorizontalSegments", XML_NAMESPACE_DR3D, sXML_horizontal_segments, XML_TYPE_NUMBER, 0 },
- { "D3DVerticalSegments", XML_NAMESPACE_DR3D, sXML_vertical_segments, XML_TYPE_NUMBER, 0 },
- { "D3DPercentDiagonal", XML_NAMESPACE_DR3D, sXML_edge_rounding, XML_TYPE_PERCENT, 0 },
- { "D3DBackscale", XML_NAMESPACE_DR3D, sXML_back_scale, XML_TYPE_PERCENT, 0 },
- { "D3DEndAngle", XML_NAMESPACE_DR3D, sXML_end_angle, XML_TYPE_NUMBER, 0 },
- { "D3DDepth", XML_NAMESPACE_DR3D, sXML_depth, XML_TYPE_MEASURE, 0 },
- { "D3DDoubleSided", XML_NAMESPACE_DR3D, sXML_backface_culling, XML_SD_TYPE_BACKFACE_CULLING, 0 },
+ { "D3DHorizontalSegments", XML_NAMESPACE_DR3D, XML_HORIZONTAL_SEGMENTS, XML_TYPE_NUMBER, 0 },
+ { "D3DVerticalSegments", XML_NAMESPACE_DR3D, XML_VERTICAL_SEGMENTS, XML_TYPE_NUMBER, 0 },
+ { "D3DPercentDiagonal", XML_NAMESPACE_DR3D, XML_EDGE_ROUNDING, XML_TYPE_PERCENT, 0 },
+ { "D3DBackscale", XML_NAMESPACE_DR3D, XML_BACK_SCALE, XML_TYPE_PERCENT, 0 },
+ { "D3DEndAngle", XML_NAMESPACE_DR3D, XML_END_ANGLE, XML_TYPE_NUMBER, 0 },
+ { "D3DDepth", XML_NAMESPACE_DR3D, XML_DEPTH, XML_TYPE_MEASURE, 0 },
+ { "D3DDoubleSided", XML_NAMESPACE_DR3D, XML_BACKFACE_CULLING, XML_SD_TYPE_BACKFACE_CULLING, 0 },
// 3D lighting attributes
- { "D3DNormalsKind", XML_NAMESPACE_DR3D, sXML_normals_kind, XML_SD_TYPE_NORMALS_KIND, 0 },
- { "D3DNormalsInvert", XML_NAMESPACE_DR3D, sXML_normals_direction, XML_SD_TYPE_NORMALS_DIRECTION, 0 },
+ { "D3DNormalsKind", XML_NAMESPACE_DR3D, XML_NORMALS_KIND, XML_SD_TYPE_NORMALS_KIND, 0 },
+ { "D3DNormalsInvert", XML_NAMESPACE_DR3D, XML_NORMALS_DIRECTION, XML_SD_TYPE_NORMALS_DIRECTION, 0 },
// 3D texture attributes
- { "D3DTextureProjectionX", XML_NAMESPACE_DR3D, sXML_tex_generation_mode_x, XML_SD_TYPE_TEX_GENERATION_MODE_X, 0 },
- { "D3DTextureProjectionY", XML_NAMESPACE_DR3D, sXML_tex_generation_mode_y, XML_SD_TYPE_TEX_GENERATION_MODE_Y, 0 },
- { "D3DTextureKind", XML_NAMESPACE_DR3D, sXML_tex_kind, XML_SD_TYPE_TEX_KIND, 0 },
- { "D3DTextureMode", XML_NAMESPACE_DR3D, sXML_tex_mode, XML_SD_TYPE_TEX_MODE, 0 },
- { "D3DTextureFilter", XML_NAMESPACE_DR3D, sXML_tex_filter, XML_SD_TYPE_BACKFACE_CULLING, 0 },
+ { "D3DTextureProjectionX", XML_NAMESPACE_DR3D, XML_TEX_GENERATION_MODE_X, XML_SD_TYPE_TEX_GENERATION_MODE_X, 0 },
+ { "D3DTextureProjectionY", XML_NAMESPACE_DR3D, XML_TEX_GENERATION_MODE_Y, XML_SD_TYPE_TEX_GENERATION_MODE_Y, 0 },
+ { "D3DTextureKind", XML_NAMESPACE_DR3D, XML_TEX_KIND, XML_SD_TYPE_TEX_KIND, 0 },
+ { "D3DTextureMode", XML_NAMESPACE_DR3D, XML_TEX_MODE, XML_SD_TYPE_TEX_MODE, 0 },
+ { "D3DTextureFilter", XML_NAMESPACE_DR3D, XML_TEX_FILTER, XML_SD_TYPE_BACKFACE_CULLING, 0 },
// 3D material attributes
- { "D3DMaterialColor", XML_NAMESPACE_DR3D, sXML_diffuse_color, XML_TYPE_COLOR, 0 },
- { "D3DMaterialEmission", XML_NAMESPACE_DR3D, sXML_emissive_color, XML_TYPE_COLOR, 0 },
- { "D3DMaterialSpecular", XML_NAMESPACE_DR3D, sXML_specular_color, XML_TYPE_COLOR, 0 },
- { "D3DMaterialSpecularIntensity", XML_NAMESPACE_DR3D, sXML_shininess, XML_TYPE_PERCENT, 0 },
+ { "D3DMaterialColor", XML_NAMESPACE_DR3D, XML_DIFFUSE_COLOR, XML_TYPE_COLOR, 0 },
+ { "D3DMaterialEmission", XML_NAMESPACE_DR3D, XML_EMISSIVE_COLOR, XML_TYPE_COLOR, 0 },
+ { "D3DMaterialSpecular", XML_NAMESPACE_DR3D, XML_SPECULAR_COLOR, XML_TYPE_COLOR, 0 },
+ { "D3DMaterialSpecularIntensity", XML_NAMESPACE_DR3D, XML_SHININESS, XML_TYPE_PERCENT, 0 },
// 3D shadow attributes
- { "D3DShadow3D", XML_NAMESPACE_DR3D, sXML_shadow, XML_SD_TYPE_SHADOW, 0 },
+ { "D3DShadow3D", XML_NAMESPACE_DR3D, XML_SHADOW, XML_SD_TYPE_SHADOW, 0 },
// #FontWork# attributes
- { "FontWorkStyle", XML_NAMESPACE_DRAW, sXML_fontwork_style, XML_SD_TYPE_FONTWORK_STYLE, CTF_FONTWORK_STYLE },
- { "FontWorkAdjust", XML_NAMESPACE_DRAW, sXML_fontwork_adjust, XML_SD_TYPE_FONTWORK_ADJUST,CTF_FONTWORK_ADJUST },
- { "FontWorkDistance", XML_NAMESPACE_DRAW, sXML_fontwork_distance, XML_TYPE_MEASURE, CTF_FONTWORK_DISTANCE },
- { "FontWorkStart", XML_NAMESPACE_DRAW, sXML_fontwork_start, XML_TYPE_MEASURE, CTF_FONTWORK_START },
- { "FontWorkMirror", XML_NAMESPACE_DRAW, sXML_fontwork_mirror, XML_TYPE_BOOL, CTF_FONTWORK_MIRROR },
- { "FontWorkOutline", XML_NAMESPACE_DRAW, sXML_fontwork_outline, XML_TYPE_BOOL, CTF_FONTWORK_OUTLINE },
- { "FontWorkShadow", XML_NAMESPACE_DRAW, sXML_fontwork_shadow, XML_SD_TYPE_FONTWORK_SHADOW,CTF_FONTWORK_SHADOW },
- { "FontWorkShadowColor", XML_NAMESPACE_DRAW, sXML_fontwork_shadow_color, XML_TYPE_COLOR, CTF_FONTWORK_SHADOWCOLOR },
- { "FontWorkShadowOffsetX", XML_NAMESPACE_DRAW, sXML_fontwork_shadow_offset_x, XML_TYPE_MEASURE, CTF_FONTWORK_SHADOWOFFSETX },
- { "FontWorkShadowOffsetY", XML_NAMESPACE_DRAW, sXML_fontwork_shadow_offset_y, XML_TYPE_MEASURE, CTF_FONTWORK_SHADOWOFFSETY },
- { "FontWorkForm", XML_NAMESPACE_DRAW, sXML_fontwork_form, XML_SD_TYPE_FONTWORK_FORM, CTF_FONTWORK_FORM },
- { "FontWorkHideForm", XML_NAMESPACE_DRAW, sXML_fontwork_hide_form, XML_TYPE_BOOL, CTF_FONTWORK_HIDEFORM },
- { "FontWorkShadowTransparence", XML_NAMESPACE_DRAW, sXML_fontwork_shadow_transparence, XML_TYPE_PERCENT, CTF_FONTWORK_SHADOWTRANSPARENCE },
+ { "FontWorkStyle", XML_NAMESPACE_DRAW, XML_FONTWORK_STYLE, XML_SD_TYPE_FONTWORK_STYLE, CTF_FONTWORK_STYLE },
+ { "FontWorkAdjust", XML_NAMESPACE_DRAW, XML_FONTWORK_ADJUST, XML_SD_TYPE_FONTWORK_ADJUST,CTF_FONTWORK_ADJUST },
+ { "FontWorkDistance", XML_NAMESPACE_DRAW, XML_FONTWORK_DISTANCE, XML_TYPE_MEASURE, CTF_FONTWORK_DISTANCE },
+ { "FontWorkStart", XML_NAMESPACE_DRAW, XML_FONTWORK_START, XML_TYPE_MEASURE, CTF_FONTWORK_START },
+ { "FontWorkMirror", XML_NAMESPACE_DRAW, XML_FONTWORK_MIRROR, XML_TYPE_BOOL, CTF_FONTWORK_MIRROR },
+ { "FontWorkOutline", XML_NAMESPACE_DRAW, XML_FONTWORK_OUTLINE, XML_TYPE_BOOL, CTF_FONTWORK_OUTLINE },
+ { "FontWorkShadow", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW, XML_SD_TYPE_FONTWORK_SHADOW,CTF_FONTWORK_SHADOW },
+ { "FontWorkShadowColor", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_COLOR, XML_TYPE_COLOR, CTF_FONTWORK_SHADOWCOLOR },
+ { "FontWorkShadowOffsetX", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_OFFSET_X, XML_TYPE_MEASURE, CTF_FONTWORK_SHADOWOFFSETX },
+ { "FontWorkShadowOffsetY", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_OFFSET_Y, XML_TYPE_MEASURE, CTF_FONTWORK_SHADOWOFFSETY },
+ { "FontWorkForm", XML_NAMESPACE_DRAW, XML_FONTWORK_FORM, XML_SD_TYPE_FONTWORK_FORM, CTF_FONTWORK_FORM },
+ { "FontWorkHideForm", XML_NAMESPACE_DRAW, XML_FONTWORK_HIDE_FORM, XML_TYPE_BOOL, CTF_FONTWORK_HIDEFORM },
+ { "FontWorkShadowTransparence", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_TRANSPARENCE, XML_TYPE_PERCENT, CTF_FONTWORK_SHADOWTRANSPARENCE },
// control attributes (border exists one mor time for the text additions of shapes)
- { "ControlBackground", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 },
- { "ControlBorder", XML_NAMESPACE_FO, sXML_border, XML_SD_TYPE_CONTROL_BORDER|MID_FLAG_MULTI_PROPERTY, 0 },
- { "ControlDataStyle", XML_NAMESPACE_STYLE,sXML_data_style_name, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_EXPORT|MID_FLAG_SPECIAL_ITEM, CTF_SD_CONTROL_SHAPE_DATA_STYLE },
- { "ControlTextEmphasis", XML_NAMESPACE_STYLE,sXML_text_emphasize, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 },
+ { "ControlBackground", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "ControlBorder", XML_NAMESPACE_FO, XML_BORDER, XML_SD_TYPE_CONTROL_BORDER|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "ControlDataStyle", XML_NAMESPACE_STYLE,XML_DATA_STYLE_NAME, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_EXPORT|MID_FLAG_SPECIAL_ITEM, CTF_SD_CONTROL_SHAPE_DATA_STYLE },
+ { "ControlTextEmphasis", XML_NAMESPACE_STYLE,XML_TEXT_EMPHASIZE, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 },
// special entries for floating frames
- { "FrameIsAutoScroll", XML_NAMESPACE_DRAW, sXML_frame_display_scrollbar, XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_SCROLLBAR },
- { "FrameIsBorder", XML_NAMESPACE_DRAW, sXML_frame_display_border, XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_BORDER },
- { "FrameMarginWidth", XML_NAMESPACE_DRAW, sXML_frame_margin_horizontal, XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_HORI },
- { "FrameMarginHeight", XML_NAMESPACE_DRAW, sXML_frame_margin_vertical, XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_VERT },
- { "VisibleArea", XML_NAMESPACE_DRAW, sXML_visible_area_left, XML_TYPE_RECTANGLE_LEFT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_LEFT },
- { "VisibleArea", XML_NAMESPACE_DRAW, sXML_visible_area_top, XML_TYPE_RECTANGLE_TOP|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_TOP },
- { "VisibleArea", XML_NAMESPACE_DRAW, sXML_visible_area_width, XML_TYPE_RECTANGLE_WIDTH|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_WIDTH },
- { "VisibleArea", XML_NAMESPACE_DRAW, sXML_visible_area_height, XML_TYPE_RECTANGLE_HEIGHT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_HEIGHT },
- { "IsInternal", XML_NAMESPACE_DRAW, NULL, XML_TYPE_BUILDIN_CMP_ONLY, CTF_SD_OLE_ISINTERNAL },
+ { "FrameIsAutoScroll", XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_SCROLLBAR, XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_SCROLLBAR },
+ { "FrameIsBorder", XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_BORDER, XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_BORDER },
+ { "FrameMarginWidth", XML_NAMESPACE_DRAW, XML_FRAME_MARGIN_HORIZONTAL, XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_HORI },
+ { "FrameMarginHeight", XML_NAMESPACE_DRAW, XML_FRAME_MARGIN_VERTICAL, XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_VERT },
+ { "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_LEFT, XML_TYPE_RECTANGLE_LEFT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_LEFT },
+ { "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_TOP, XML_TYPE_RECTANGLE_TOP|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_TOP },
+ { "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_WIDTH, XML_TYPE_RECTANGLE_WIDTH|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_WIDTH },
+ { "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_HEIGHT, XML_TYPE_RECTANGLE_HEIGHT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_VIS_AREA_HEIGHT },
+ { "IsInternal", XML_NAMESPACE_DRAW, XML__EMPTY, XML_TYPE_BUILDIN_CMP_ONLY, CTF_SD_OLE_ISINTERNAL },
// caption properties
- { "CaptionType", XML_NAMESPACE_DRAW, sXML_caption_type, XML_SD_TYPE_CAPTION_TYPE, 0 },
- { "CaptionIsFixedAngle", XML_NAMESPACE_DRAW, sXML_caption_angle_type, XML_SD_TYPE_CAPTION_ANGLE_TYPE, 0 },
- { "CaptionAngle", XML_NAMESPACE_DRAW, sXML_caption_angle, XML_TYPE_NUMBER, 0 },
- { "CaptionGap", XML_NAMESPACE_DRAW, sXML_caption_gap, XML_TYPE_MEASURE, 0 },
- { "CaptionEscapeDirection", XML_NAMESPACE_DRAW, sXML_caption_escape_direction, XML_SD_TYPE_CAPTION_ESC_DIR, 0 },
- { "CaptionIsEscapeRelative", XML_NAMESPACE_DRAW, sXML_caption_escape, XML_SD_TYPE_CAPTION_IS_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ISESCREL },
- { "CaptionEscapeRelative", XML_NAMESPACE_DRAW, sXML_caption_escape, XML_SD_TYPE_CAPTION_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCREL },
- { "CaptionEscapeAbsolute", XML_NAMESPACE_DRAW, sXML_caption_escape, XML_SD_TYPE_CAPTION_ESC_ABS|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCABS },
- { "CaptionLineLength", XML_NAMESPACE_DRAW, sXML_caption_line_length, XML_TYPE_MEASURE, 0 },
- { "CaptionIsFitLineLength", XML_NAMESPACE_DRAW, sXML_caption_fit_line_length, XML_TYPE_BOOL, 0 },
+ { "CaptionType", XML_NAMESPACE_DRAW, XML_CAPTION_TYPE, XML_SD_TYPE_CAPTION_TYPE, 0 },
+ { "CaptionIsFixedAngle", XML_NAMESPACE_DRAW, XML_CAPTION_ANGLE_TYPE, XML_SD_TYPE_CAPTION_ANGLE_TYPE, 0 },
+ { "CaptionAngle", XML_NAMESPACE_DRAW, XML_CAPTION_ANGLE, XML_TYPE_NUMBER, 0 },
+ { "CaptionGap", XML_NAMESPACE_DRAW, XML_CAPTION_GAP, XML_TYPE_MEASURE, 0 },
+ { "CaptionEscapeDirection", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE_DIRECTION, XML_SD_TYPE_CAPTION_ESC_DIR, 0 },
+ { "CaptionIsEscapeRelative", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE, XML_SD_TYPE_CAPTION_IS_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ISESCREL },
+ { "CaptionEscapeRelative", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE, XML_SD_TYPE_CAPTION_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCREL },
+ { "CaptionEscapeAbsolute", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE, XML_SD_TYPE_CAPTION_ESC_ABS|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCABS },
+ { "CaptionLineLength", XML_NAMESPACE_DRAW, XML_CAPTION_LINE_LENGTH, XML_TYPE_MEASURE, 0 },
+ { "CaptionIsFitLineLength", XML_NAMESPACE_DRAW, XML_CAPTION_FIT_LINE_LENGTH, XML_TYPE_BOOL, 0 },
// misc object properties
- { "MoveProtect", XML_NAMESPACE_DRAW, sXML_move_protect, XML_TYPE_BOOL, CTF_SD_MOVE_PROTECT },
- { "SizeProtect", XML_NAMESPACE_DRAW, sXML_size_protect, XML_TYPE_BOOL, CTF_SD_SIZE_PROTECT },
+ { "MoveProtect", XML_NAMESPACE_DRAW, XML_MOVE_PROTECT, XML_TYPE_BOOL, CTF_SD_MOVE_PROTECT },
+ { "SizeProtect", XML_NAMESPACE_DRAW, XML_SIZE_PROTECT, XML_TYPE_BOOL, CTF_SD_SIZE_PROTECT },
{ 0L }
};
@@ -411,34 +411,34 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
const XMLPropertyMapEntry aXMLSDPresPageProps[] =
{
- { "Change", XML_NAMESPACE_PRESENTATION, "transition-type", XML_SD_TYPE_PRESPAGE_TYPE, CTF_PAGE_TRANS_TYPE },
- { "Effect", XML_NAMESPACE_PRESENTATION, "transition-style", XML_SD_TYPE_PRESPAGE_STYLE, CTF_PAGE_TRANS_STYLE },
- { "Speed", XML_NAMESPACE_PRESENTATION, "transition-speed", XML_SD_TYPE_PRESPAGE_SPEED, CTF_PAGE_TRANS_SPEED },
- { "Duration", XML_NAMESPACE_PRESENTATION, "duration", XML_SD_TYPE_PRESPAGE_DURATION, CTF_PAGE_TRANS_DURATION },
- { "Visible", XML_NAMESPACE_PRESENTATION, "visibility", XML_SD_TYPE_PRESPAGE_VISIBILITY, CTF_PAGE_VISIBLE },
- { "Sound", XML_NAMESPACE_PRESENTATION, "sound", XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PAGE_SOUND_URL },
- { "BackgroundFullSize", XML_NAMESPACE_DRAW, "background-size", XML_SD_TYPE_PRESPAGE_BACKSIZE, CTF_PAGE_BACKSIZE },
-
- { "IsBackgroundVisible", XML_NAMESPACE_PRESENTATION, sXML_background_visible, XML_TYPE_BOOL, 0 },
- { "IsBackgroundObjectsVisible", XML_NAMESPACE_PRESENTATION, sXML_background_objects_visible, XML_TYPE_BOOL, 0 },
-
- { "FillStyle", XML_NAMESPACE_DRAW, sXML_fill, XML_SD_TYPE_FILLSTYLE, 0 },
- { "FillColor", XML_NAMESPACE_DRAW, sXML_fill_color, XML_TYPE_COLOR, 0 },
- { "FillGradientName", XML_NAMESPACE_DRAW, sXML_fill_gradient_name, XML_TYPE_STRING, 0 },
- { "FillGradientStepCount", XML_NAMESPACE_DRAW, sXML_gradient_step_count, XML_TYPE_NUMBER, 0 },
- { "FillHatchName", XML_NAMESPACE_DRAW, sXML_fill_hatch_name, XML_TYPE_STRING, 0 },
- { "FillBitmapName", XML_NAMESPACE_DRAW, sXML_fill_image_name, XML_TYPE_STRING, 0 },
- { "FillTransparenceName", XML_NAMESPACE_DRAW, sXML_transparency_name, XML_TYPE_STRING, 0 },
- { "FillBitmapSizeX", XML_NAMESPACE_DRAW, sXML_fill_image_width, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, sXML_fill_image_width, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapSizeY", XML_NAMESPACE_DRAW, sXML_fill_image_height, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, sXML_fill_image_height, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
- { "FillBitmapMode", XML_NAMESPACE_STYLE,sXML_repeat, XML_SD_TYPE_BITMAP_MODE, 0 },
- { "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, sXML_fill_image_ref_point_x,XML_TYPE_PERCENT, 0 },
- { "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, sXML_fill_image_ref_point_y,XML_TYPE_PERCENT, 0 },
- { "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, sXML_fill_image_ref_point, XML_SD_TYPE_BITMAP_REFPOINT, 0 },
- { "FillBitmapOffsetX", XML_NAMESPACE_DRAW, sXML_tile_repeat_offset, XML_SD_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X },
- { "FillBitmapOffsetY", XML_NAMESPACE_DRAW, sXML_tile_repeat_offset, XML_SD_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y },
+ { "Change", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_TYPE, XML_SD_TYPE_PRESPAGE_TYPE, CTF_PAGE_TRANS_TYPE },
+ { "Effect", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_STYLE, XML_SD_TYPE_PRESPAGE_STYLE, CTF_PAGE_TRANS_STYLE },
+ { "Speed", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_SPEED, XML_SD_TYPE_PRESPAGE_SPEED, CTF_PAGE_TRANS_SPEED },
+ { "Duration", XML_NAMESPACE_PRESENTATION, XML_DURATION, XML_SD_TYPE_PRESPAGE_DURATION, CTF_PAGE_TRANS_DURATION },
+ { "Visible", XML_NAMESPACE_PRESENTATION, XML_VISIBILITY, XML_SD_TYPE_PRESPAGE_VISIBILITY, CTF_PAGE_VISIBLE },
+ { "Sound", XML_NAMESPACE_PRESENTATION, XML_SOUND, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PAGE_SOUND_URL },
+ { "BackgroundFullSize", XML_NAMESPACE_DRAW, XML_BACKGROUND_SIZE, XML_SD_TYPE_PRESPAGE_BACKSIZE, CTF_PAGE_BACKSIZE },
+
+ { "IsBackgroundVisible", XML_NAMESPACE_PRESENTATION, XML_BACKGROUND_VISIBLE, XML_TYPE_BOOL, 0 },
+ { "IsBackgroundObjectsVisible", XML_NAMESPACE_PRESENTATION, XML_BACKGROUND_OBJECTS_VISIBLE, XML_TYPE_BOOL, 0 },
+
+ { "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SD_TYPE_FILLSTYLE, 0 },
+ { "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 },
+ { "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STRING, 0 },
+ { "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER, 0 },
+ { "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STRING, 0 },
+ { "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STRING, 0 },
+ { "FillTransparenceName", XML_NAMESPACE_DRAW, XML_TRANSPARENCY_NAME, XML_TYPE_STRING, 0 },
+ { "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapSizeY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "FillBitmapMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SD_TYPE_BITMAP_MODE, 0 },
+ { "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 },
+ { "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 },
+ { "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT, XML_SD_TYPE_BITMAP_REFPOINT, 0 },
+ { "FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X },
+ { "FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y },
{ 0L }
};
@@ -818,9 +818,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
}
case XML_SD_TYPE_SHADOW :
{
- const OUString aTrueStr( OUString::createFromAscii(sXML_visible) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_hidden) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE), GetXMLToken(XML_HIDDEN) );
break;
}
case XML_SD_TYPE_PRESPAGE_STYLE :
@@ -840,9 +838,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
}
case XML_SD_TYPE_TEXT_CROSSEDOUT :
{
- const OUString aTrueStr( OUString::createFromAscii(sXML_crossedout_single) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_none) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_CROSSEDOUT_SINGLE), GetXMLToken(XML_NONE) );
break;
}
case XML_SD_TYPE_OPACITY :
@@ -857,16 +853,12 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
}
case XML_SD_TYPE_PRESPAGE_VISIBILITY :
{
- const OUString aTrueStr( OUString::createFromAscii(sXML_visible) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_hidden) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE), GetXMLToken(XML_HIDDEN) );
break;
}
case XML_SD_TYPE_PRESPAGE_BACKSIZE:
{
- const OUString aTrueStr( OUString::createFromAscii(sXML_full) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_border) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FULL), GetXMLToken(XML_BORDER) );
break;
}
@@ -878,9 +870,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
// #87922# DoubleSided -> BackfaceCulling
// This BOOL needs to be flipped, DoubleSided TRUE -> NO Backface culling
// and vice versa.
- const OUString aTrueStr( OUString::createFromAscii(sXML_disabled) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_enabled) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_DISABLED), GetXMLToken(XML_ENABLED) );
break;
}
@@ -891,9 +881,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
}
case XML_SD_TYPE_NORMALS_DIRECTION:
{
- const OUString aTrueStr( OUString::createFromAscii(sXML_normal) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_inverse) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_NORMAL), GetXMLToken(XML_INVERSE) );
break;
}
case XML_SD_TYPE_TEX_GENERATION_MODE_X:
@@ -984,9 +972,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
break;
case XML_SD_TYPE_MEASURE_PLACING:
{
- const OUString aTrueStr( OUString::createFromAscii(sXML_below) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_above) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_BELOW), GetXMLToken(XML_ABOVE) );
}
break;
case XML_TYPE_TEXT_CLIP:
@@ -1016,9 +1002,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
case XML_SD_TYPE_CAPTION_ANGLE_TYPE:
{
- const OUString aTrueStr( OUString::createFromAscii(sXML_fixed) );
- const OUString aFalseStr( OUString::createFromAscii(sXML_free) );
- pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED), GetXMLToken(XML_FREE) );
break;
}
case XML_SD_TYPE_CAPTION_IS_ESC_REL:
@@ -1063,9 +1047,9 @@ XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const UniReference<
mpListAutoPool( pListAutoPool ),
mrExport( rExport ),
maNumRuleExp( rExport ),
- msCDATA( rtl::OUString::createFromAscii( sXML_CDATA )),
- msTrue( rtl::OUString::createFromAscii( sXML_true )),
- msFalse( rtl::OUString::createFromAscii( sXML_false )),
+ msCDATA( GetXMLToken(XML_CDATA)),
+ msTrue( GetXMLToken(XML_TRUE)),
+ msFalse( GetXMLToken(XML_FALSE)),
mbIsInAutoStyles( sal_False )
{
}
@@ -1167,7 +1151,7 @@ void XMLShapeExportPropertyMapper::ContextFilter(
case CTF_FILLHATCHNAME:
case CTF_FILLBITMAPNAME:
// #85953# take out this case to allow writing empty
-// sXML_transparency_name entries. This is used to represent
+// XML_TRANSPARENCY_NAME entries. This is used to represent
// disabled FillTransparencyItems.
// case CTF_FILLTRANSNAME:
{
@@ -1390,7 +1374,7 @@ XMLPagePropertySetMapper::~XMLPagePropertySetMapper()
XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) :
SvXMLExportPropertyMapper( rMapper ),
mrExport( rExport ),
- msCDATA( rtl::OUString::createFromAscii( sXML_CDATA ))
+ msCDATA( GetXMLToken(XML_CDATA))
{
}
@@ -1495,11 +1479,11 @@ void XMLPageExportPropertyMapper::handleElementItem(
OUString aSoundURL;
if( (rProperty.maValue >>= aSoundURL) && aSoundURL.getLength() != 0 )
{
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, mrExport.GetRelativeReference(aSoundURL) );
- mrExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- mrExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show, sXML_new );
- mrExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onRequest );
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_PRESENTATION, sXML_sound, sal_True, sal_True );
+ mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference(aSoundURL) );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_NEW );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_PRESENTATION, XML_SOUND, sal_True, sal_True );
}
}
break;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 5a266dac7178..433d0d708eb0 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdxmlexp.cxx,v $
*
- * $Revision: 1.69 $
+ * $Revision: 1.70 $
*
- * last change: $Author: dvo $ $Date: 2001-06-18 15:08:13 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,10 +73,6 @@
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -556,7 +552,7 @@ SdXMLExport::SdXMLExport( sal_Bool bIsDraw, sal_uInt16 nExportFlags )
mbIsDraw(bIsDraw),
mbFamilyGraphicUsed(FALSE),
mbFamilyPresentationUsed(FALSE),
- msZIndex( RTL_CONSTASCII_USTRINGPARAM(sXML_zindex) ),
+ msZIndex( GetXMLToken(XML_ZINDEX) ),
msEmptyPres( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ),
msModel( RTL_CONSTASCII_USTRINGPARAM("Model") ),
msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ),
@@ -697,7 +693,8 @@ void SAL_CALL SdXMLExport::setSourceDocument( const uno::Reference< lang::XCompo
// add namespaces
_GetNamespaceMap().AddAtIndex(
- XML_NAMESPACE_PRESENTATION, sXML_np_presentation, sXML_n_presentation, XML_NAMESPACE_PRESENTATION);
+ XML_NAMESPACE_PRESENTATION, GetXMLToken(XML_NP_PRESENTATION),
+ GetXMLToken(XML_N_PRESENTATION), XML_NAMESPACE_PRESENTATION);
GetShapeExport()->enableLayerExport();
}
@@ -856,10 +853,10 @@ void SdXMLExport::ImpWriteObjGraphicStyleInfos()
if( !xDefaults.is() )
return;
- aStEx.exportDefaultStyle( xDefaults, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, aMapperRef );
+ aStEx.exportDefaultStyle( xDefaults, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef );
// write graphic family styles
- aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, aMapperRef, FALSE, XML_STYLE_FAMILY_SD_GRAPHICS_ID);
+ aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef, FALSE, XML_STYLE_FAMILY_SD_GRAPHICS_ID);
}
//////////////////////////////////////////////////////////////////////////////
@@ -975,10 +972,10 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
if(pInfo)
{
// prepare presentation-page layout attributes, style-name
- AddAttribute(XML_NAMESPACE_STYLE, sXML_name, pInfo->GetLayoutName());
+ AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, pInfo->GetLayoutName());
// write draw-style attributes
- SvXMLElementExport aDSE(*this, XML_NAMESPACE_STYLE, sXML_presentation_page_layout, sal_True, sal_True);
+ SvXMLElementExport aDSE(*this, XML_NAMESPACE_STYLE, XML_PRESENTATION_PAGE_LAYOUT, sal_True, sal_True);
// write presentation placeholders
switch(pInfo->GetLayoutType())
@@ -1322,27 +1319,27 @@ void SdXMLExport::ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const Rectan
case XmlPlaceholderVerticalOutline: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("vertical_outline")); break;
}
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_object, aStr);
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_OBJECT, aStr);
// svg:x,y,width,height
GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.Left());
aStr = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+ AddAttribute(XML_NAMESPACE_SVG, XML_X, aStr);
GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.Top());
aStr = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+ AddAttribute(XML_NAMESPACE_SVG, XML_Y, aStr);
GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.GetWidth());
aStr = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+ AddAttribute(XML_NAMESPACE_SVG, XML_WIDTH, aStr);
GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.GetHeight());
aStr = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+ AddAttribute(XML_NAMESPACE_SVG, XML_HEIGHT, aStr);
// write presentation-placeholder
- SvXMLElementExport aPPL(*this, XML_NAMESPACE_PRESENTATION, sXML_placeholder, sal_True, sal_True);
+ SvXMLElementExport aPPL(*this, XML_NAMESPACE_PRESENTATION, XML_PLACEHOLDER, sal_True, sal_True);
}
//////////////////////////////////////////////////////////////////////////////
@@ -1405,43 +1402,43 @@ void SdXMLExport::ImpWritePageMasterInfos()
OUStringBuffer sStringBuffer;
sString = sNewName;
- AddAttribute(XML_NAMESPACE_STYLE, sXML_name, sString);
+ AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, sString);
// write page-master
- SvXMLElementExport aPME(*this, XML_NAMESPACE_STYLE, sXML_page_master, sal_True, sal_True);
+ SvXMLElementExport aPME(*this, XML_NAMESPACE_STYLE, XML_PAGE_MASTER, sal_True, sal_True);
// prepare style:properties inside page-master
GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderTop());
sString = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_FO, sXML_margin_top, sString);
+ AddAttribute(XML_NAMESPACE_FO, XML_MARGIN_TOP, sString);
GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderBottom());
sString = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_FO, sXML_margin_bottom, sString);
+ AddAttribute(XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, sString);
GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderLeft());
sString = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_FO, sXML_margin_left, sString);
+ AddAttribute(XML_NAMESPACE_FO, XML_MARGIN_LEFT, sString);
GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderRight());
sString = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_FO, sXML_margin_right, sString);
+ AddAttribute(XML_NAMESPACE_FO, XML_MARGIN_RIGHT, sString);
GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetWidth());
sString = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_FO, sXML_page_width, sString);
+ AddAttribute(XML_NAMESPACE_FO, XML_PAGE_WIDTH, sString);
GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetHeight());
sString = sStringBuffer.makeStringAndClear();
- AddAttribute(XML_NAMESPACE_FO, sXML_page_height, sString);
+ AddAttribute(XML_NAMESPACE_FO, XML_PAGE_HEIGHT, sString);
if(pInfo->GetOrientation() == view::PaperOrientation_PORTRAIT)
- AddAttributeASCII(XML_NAMESPACE_STYLE, sXML_print_orientation, sXML_portrait);
+ AddAttribute(XML_NAMESPACE_STYLE, XML_PRINT_ORIENTATION, XML_PORTRAIT);
else
- AddAttributeASCII(XML_NAMESPACE_STYLE, sXML_print_orientation, sXML_landscape);
+ AddAttribute(XML_NAMESPACE_STYLE, XML_PRINT_ORIENTATION, XML_LANDSCAPE);
// write style:properties
- SvXMLElementExport aPMF(*this, XML_NAMESPACE_STYLE, sXML_properties, sal_True, sal_True);
+ SvXMLElementExport aPMF(*this, XML_NAMESPACE_STYLE, XML_PROPERTIES, sal_True, sal_True);
}
}
}
@@ -1624,7 +1621,8 @@ void SdXMLExport::ImpWritePresentationStyles()
OUString aPrefix = xNamed->getName();
aPrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
aStEx.exportStyleFamily(xNamed->getName(),
- XML_STYLE_FAMILY_SD_PRESENTATION_NAME, aMapperRef, FALSE,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME)),
+ aMapperRef, FALSE,
XML_STYLE_FAMILY_SD_PRESENTATION_ID, &aPrefix);
}
}
@@ -1657,13 +1655,13 @@ void SdXMLExport::_ExportMeta()
if(mnObjectCount)
{
GetMM100UnitConverter().convertNumber(sBuffer, mnObjectCount);
- AddAttribute(XML_NAMESPACE_META, sXML_object_count, sBuffer.makeStringAndClear());
+ AddAttribute(XML_NAMESPACE_META, XML_OBJECT_COUNT, sBuffer.makeStringAndClear());
bContentUsed = TRUE;
}
// when there is data, export it
if(bContentUsed)
- SvXMLElementExport aElemStat(*this, XML_NAMESPACE_META, sXML_document_statistic, sal_True, sal_True);
+ SvXMLElementExport aElemStat(*this, XML_NAMESPACE_META, XML_DOCUMENT_STATISTIC, sal_True, sal_True);
}
//////////////////////////////////////////////////////////////////////////////
@@ -1683,14 +1681,14 @@ void SdXMLExport::_ExportContent()
// prepare page attributes, name of page
uno::Reference < container::XNamed > xNamed(xDrawPage, uno::UNO_QUERY);
if(xNamed.is())
- AddAttribute(XML_NAMESPACE_DRAW, sXML_name, xNamed->getName());
+ AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, xNamed->getName());
// draw:style-name (presentation page attributes AND background attributes)
if( maDrawPagesStyleNames[nPageInd].getLength() )
- AddAttribute(XML_NAMESPACE_DRAW, sXML_style_name, maDrawPagesStyleNames[nPageInd]);
+ AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, maDrawPagesStyleNames[nPageInd]);
if( IsImpress() )
- AddAttribute(XML_NAMESPACE_DRAW, sXML_id, OUString::valueOf( sal_Int32( nPageInd + 1 ) ) );
+ AddAttribute(XML_NAMESPACE_DRAW, XML_ID, OUString::valueOf( sal_Int32( nPageInd + 1 ) ) );
// draw:master-page-name
uno::Reference < drawing::XMasterPageTarget > xMasterPageInt(xDrawPage, uno::UNO_QUERY);
@@ -1702,7 +1700,7 @@ void SdXMLExport::_ExportContent()
uno::Reference < container::XNamed > xMasterNamed(xUsedMasterPage, uno::UNO_QUERY);
if(xMasterNamed.is())
{
- AddAttribute(XML_NAMESPACE_DRAW, sXML_master_page_name, xMasterNamed->getName());
+ AddAttribute(XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, xMasterNamed->getName());
}
}
}
@@ -1710,11 +1708,11 @@ void SdXMLExport::_ExportContent()
// presentation:page-layout-name
if( IsImpress() && maDrawPagesAutoLayoutNames[nPageInd+1].getLength())
{
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_presentation_page_layout_name, maDrawPagesAutoLayoutNames[nPageInd+1]);
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, maDrawPagesAutoLayoutNames[nPageInd+1]);
}
// write page
- SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, sXML_page, sal_True, sal_True);
+ SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, XML_PAGE, sal_True, sal_True);
// write optional office:forms
exportFormsElement( xDrawPage );
@@ -1753,7 +1751,7 @@ void SdXMLExport::_ExportContent()
if(xShapes.is() && xShapes->getCount())
{
// write presentation notes
- SvXMLElementExport aPSY(*this, XML_NAMESPACE_PRESENTATION, sXML_notes, sal_True, sal_True);
+ SvXMLElementExport aPSY(*this, XML_NAMESPACE_PRESENTATION, XML_NOTES, sal_True, sal_True);
// write optional office:forms
exportFormsElement( xNotesPage );
@@ -1797,7 +1795,7 @@ void SdXMLExport::exportPresentationSettings()
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FirstPage" ) ) ) >>= aFirstPage;
if( aFirstPage.getLength() )
{
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_start_page, aFirstPage );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_START_PAGE, aFirstPage );
bHasAttr = sal_True;
}
else
@@ -1806,7 +1804,7 @@ void SdXMLExport::exportPresentationSettings()
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomShow" ) ) ) >>= aCustomShow;
if( aCustomShow.getLength() )
{
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_show, aCustomShow );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_SHOW, aCustomShow );
bHasAttr = sal_True;
}
}
@@ -1815,7 +1813,7 @@ void SdXMLExport::exportPresentationSettings()
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsEndless" ) ) ) >>= bTemp;
if( bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_endless, sXML_true );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_ENDLESS, XML_TRUE );
bHasAttr = sal_True;
sal_Int32 nPause;
@@ -1825,69 +1823,69 @@ void SdXMLExport::exportPresentationSettings()
OUStringBuffer aOut;
SvXMLUnitConverter::convertTime( aOut, aTime );
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_pause, aOut.makeStringAndClear() );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PAUSE, aOut.makeStringAndClear() );
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AllowAnimations" ) ) ) >>= bTemp;
if( !bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_animations, sXML_disabled );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_ANIMATIONS, XML_DISABLED );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAlwaysOnTop" ) ) ) >>= bTemp;
if( bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_stay_on_top, sXML_true );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_STAY_ON_TOP, XML_TRUE );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAutomatic" ) ) ) >>= bTemp;
if( bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_force_manual, sXML_true );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_FORCE_MANUAL, XML_TRUE );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFullScreen" ) ) ) >>= bTemp;
if( !bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_full_screen, sXML_false );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_FULL_SCREEN, XML_FALSE );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsMouseVisible" ) ) ) >>= bTemp;
if( !bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_mouse_visible, sXML_false );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_VISIBLE, XML_FALSE );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "StartWithNavigator" ) ) ) >>= bTemp;
if( bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_start_with_navigator, sXML_true );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_START_WITH_NAVIGATOR, XML_TRUE );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "UsePen" ) ) ) >>= bTemp;
if( bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_mouse_as_pen, sXML_true );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_AS_PEN, XML_TRUE );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTransitionOnClick" ) ) ) >>= bTemp;
if( !bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_transition_on_click, sXML_disabled );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_TRANSITION_ON_CLICK, XML_DISABLED );
bHasAttr = sal_True;
}
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsShowLogo" ) ) ) >>= bTemp;
if( bTemp )
{
- AddAttributeASCII(XML_NAMESPACE_PRESENTATION, sXML_show_logo, sXML_true );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_SHOW_LOGO, XML_TRUE );
bHasAttr = sal_True;
}
@@ -1910,7 +1908,7 @@ void SdXMLExport::exportPresentationSettings()
if( bHasAttr || nShowCount != 0 )
{
- SvXMLElementExport aSettings(*this, XML_NAMESPACE_PRESENTATION, sXML_settings, sal_True, sal_True);
+ SvXMLElementExport aSettings(*this, XML_NAMESPACE_PRESENTATION, XML_SETTINGS, sal_True, sal_True);
if( nShowCount == 0 )
return;
@@ -1922,7 +1920,7 @@ void SdXMLExport::exportPresentationSettings()
for( sal_Int32 nIndex = 0; nIndex < nShowCount; nIndex++, pShowNames++ )
{
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_name, *pShowNames );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_NAME, *pShowNames );
xShows->getByName( *pShowNames ) >>= xShow;
DBG_ASSERT( xShow.is(), "invalid custom show!" );
@@ -1944,9 +1942,9 @@ void SdXMLExport::exportPresentationSettings()
}
if( sTmp.getLength() )
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_pages, sTmp.makeStringAndClear() );
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PAGES, sTmp.makeStringAndClear() );
- SvXMLElementExport aShows(*this, XML_NAMESPACE_PRESENTATION, sXML_show, sal_True, sal_True);
+ SvXMLElementExport aShows(*this, XML_NAMESPACE_PRESENTATION, XML_SHOW, sal_True, sal_True);
}
}
}
@@ -2191,11 +2189,11 @@ void SdXMLExport::_ExportMasterStyles()
// presentation:page-layout-name
if( IsImpress() && maDrawPagesAutoLayoutNames[0].getLength())
{
- AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_presentation_page_layout_name, maDrawPagesAutoLayoutNames[0]);
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, maDrawPagesAutoLayoutNames[0]);
}
// write masterpage
- SvXMLElementExport aMPG(*this, XML_NAMESPACE_STYLE, sXML_handout_master, sal_True, sal_True);
+ SvXMLElementExport aMPG(*this, XML_NAMESPACE_STYLE, XML_HANDOUT_MASTER, sal_True, sal_True);
// write graphic objects on this master page (if any)
uno::Reference< drawing::XShapes > xShapes(xHandoutPage, uno::UNO_QUERY);
@@ -2219,22 +2217,22 @@ void SdXMLExport::_ExportMasterStyles()
if(xNamed.is())
{
sMasterPageName = xNamed->getName();
- AddAttribute(XML_NAMESPACE_STYLE, sXML_name, sMasterPageName);
+ AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, sMasterPageName);
}
ImpXMLEXPPageMasterInfo* pInfo = mpPageMaterUsageList->GetObject(nMPageId);
if(pInfo)
{
OUString sString = pInfo->GetName();
- AddAttribute(XML_NAMESPACE_STYLE, sXML_page_master_name, sString);
+ AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_MASTER_NAME, sString);
}
// draw:style-name (background attributes)
if( maMasterPagesStyleNames[nMPageId].getLength() )
- AddAttribute(XML_NAMESPACE_DRAW, sXML_style_name, maMasterPagesStyleNames[nMPageId]);
+ AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, maMasterPagesStyleNames[nMPageId]);
// write masterpage
- SvXMLElementExport aMPG(*this, XML_NAMESPACE_STYLE, sXML_master_page, sal_True, sal_True);
+ SvXMLElementExport aMPG(*this, XML_NAMESPACE_STYLE, XML_MASTER_PAGE, sal_True, sal_True);
// write optional office:forms
exportFormsElement( xMasterPage );
@@ -2257,7 +2255,7 @@ void SdXMLExport::_ExportMasterStyles()
if(xShapes.is() && xShapes->getCount())
{
// write presentation notes
- SvXMLElementExport aPSY(*this, XML_NAMESPACE_PRESENTATION, sXML_notes, sal_True, sal_True);
+ SvXMLElementExport aPSY(*this, XML_NAMESPACE_PRESENTATION, XML_NOTES, sal_True, sal_True);
// write optional office:forms
exportFormsElement( xNotesPage );
@@ -2299,7 +2297,7 @@ void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps)
beans::PropertyValue* pProps = rProps.getArray();
if(pProps)
{
-// SvXMLElementExport aViewSettingsElem(*this, XML_NAMESPACE_DRAW, sXML_view_settings, sal_True, sal_True);
+// SvXMLElementExport aViewSettingsElem(*this, XML_NAMESPACE_DRAW, XML_VIEW_SETTINGS, sal_True, sal_True);
uno::Reference< beans::XPropertySet > xPropSet( GetModel(), uno::UNO_QUERY );
if( !xPropSet.is() )
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index befd68bad24c..aceecf9f29f3 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdxmlimp.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:27 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,10 +89,6 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -565,7 +561,8 @@ SdXMLImport::SdXMLImport( sal_Bool bIsDraw, sal_uInt16 nImportFlags )
{
// add namespaces
GetNamespaceMap().AddAtIndex(
- XML_NAMESPACE_PRESENTATION, sXML_np_presentation, sXML_n_presentation, XML_NAMESPACE_PRESENTATION);
+ XML_NAMESPACE_PRESENTATION, GetXMLToken(XML_NP_PRESENTATION),
+ GetXMLToken(XML_N_PRESENTATION), XML_NAMESPACE_PRESENTATION);
}
// XImporter
@@ -774,11 +771,11 @@ SvXMLImportContext *SdXMLImport::CreateContext(USHORT nPrefix,
SvXMLImportContext* pContext = 0;
if(XML_NAMESPACE_OFFICE == nPrefix &&
- ( 0 == rLocalName.compareToAscii(sXML_document) ||
- 0 == rLocalName.compareToAscii(sXML_document_meta) ||
- 0 == rLocalName.compareToAscii(sXML_document_styles) ||
- 0 == rLocalName.compareToAscii(sXML_document_content) ||
- 0 == rLocalName.compareToAscii(sXML_document_settings) ))
+ ( IsXMLToken( rLocalName, XML_DOCUMENT ) ||
+ IsXMLToken( rLocalName, XML_DOCUMENT_META ) ||
+ IsXMLToken( rLocalName, XML_DOCUMENT_STYLES ) ||
+ IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) ||
+ IsXMLToken( rLocalName, XML_DOCUMENT_SETTINGS ) ))
{
pContext = new SdXMLDocContext_Impl(*this, nPrefix, rLocalName, xAttrList);
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 95dc1ee5f747..6a050e0814df 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shapeexport.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 16:31:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,7 +107,14 @@
#include "contextid.hxx"
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
#include "xmlnmspe.hxx"
using namespace ::rtl;
@@ -452,7 +459,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
{
const OUString aName( xNamed->getName() );
if( aName.getLength() )
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_name, aName );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName );
}
}
@@ -462,9 +469,9 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
if( aShapeInfo.msStyleName.getLength() != 0 )
{
if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == aShapeInfo.mnFamily)
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_style_name, aShapeInfo.msStyleName);
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, aShapeInfo.msStyleName);
else
- rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_style_name, aShapeInfo.msStyleName);
+ rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_STYLE_NAME, aShapeInfo.msStyleName);
}
// ------------------
@@ -472,7 +479,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
// ------------------
if( aShapeInfo.msTextStyleName.getLength() != 0 )
{
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_text_style_name, aShapeInfo.msTextStyleName);
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_TEXT_STYLE_NAME, aShapeInfo.msTextStyleName);
}
// --------------------------
@@ -483,7 +490,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
if( nShapeId != -1 )
{
const OUString sId( OUString::valueOf( nShapeId ) );
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_id, sId );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_ID, sId );
}
}
@@ -501,7 +508,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY );
OUString aLayerName;
xProps->getPropertyValue( OUString::createFromAscii( "LayerName" ) ) >>= aLayerName;
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_layer, aLayerName );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LAYER, aLayerName );
}
catch( uno::Exception e )
@@ -979,27 +986,27 @@ void XMLShapeExport::ImpExportGluePoints( const uno::Reference< drawing::XShape
// export only user defined glue points
const OUString sId( OUString::valueOf( nIdentifier ) );
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_id, sId );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_ID, sId );
rExport.GetMM100UnitConverter().convertMeasure(msBuffer, aGluePoint.Position.X);
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x, msBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X, msBuffer.makeStringAndClear());
rExport.GetMM100UnitConverter().convertMeasure(msBuffer, aGluePoint.Position.Y);
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y, msBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y, msBuffer.makeStringAndClear());
if( !aGluePoint.IsRelative )
{
SvXMLUnitConverter::convertEnum( msBuffer, aGluePoint.PositionAlignment, aXML_GlueAlignment_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_align, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ALIGN, msBuffer.makeStringAndClear() );
}
if( aGluePoint.Escape != drawing::EscapeDirection_SMART )
{
SvXMLUnitConverter::convertEnum( msBuffer, aGluePoint.Escape, aXML_GlueEscapeDirection_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_escape_direction, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ESCAPE_DIRECTION, msBuffer.makeStringAndClear() );
}
- SvXMLElementExport aEventsElemt(rExport, XML_NAMESPACE_DRAW, sXML_glue_point, sal_True, sal_True);
+ SvXMLElementExport aEventsElemt(rExport, XML_NAMESPACE_DRAW, XML_GLUE_POINT, sal_True, sal_True);
}
}
}
diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx
index 5ac207e69df8..24d2d31ec664 100644
--- a/xmloff/source/draw/shapeexport2.cxx
+++ b/xmloff/source/draw/shapeexport2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shapeexport2.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 14:40:42 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,12 +135,16 @@
#include <vcl/salbtype.hxx> // FRound
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
-#include "xmlkywd.hxx"
#include "xmlnmspe.hxx"
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
//////////////////////////////////////////////////////////////////////////////
@@ -203,14 +207,14 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(Vector2D& rTRScale, doub
aTRScale.X() = 1.0;
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, FRound(aTRScale.X()));
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_WIDTH, aStr);
// svg: height
if(!(nFeatures & SEF_EXPORT_HEIGHT))
aTRScale.Y() = 1.0;
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, FRound(aTRScale.Y()));
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_HEIGHT, aStr);
// decide if transformation is neccessary
BOOL bTransformationIsNeccessary(fTRShear != 0.0 || fTRRotate != 0.0);
@@ -226,7 +230,7 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(Vector2D& rTRScale, doub
// does transformation need to be exported?
if(aTransform.NeedsAction())
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_transform, aTransform.GetExportString(rExport.GetMM100UnitConverter()));
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_TRANSFORM, aTransform.GetExportString(rExport.GetMM100UnitConverter()));
}
else
{
@@ -236,7 +240,7 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(Vector2D& rTRScale, doub
// svg: x
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, FRound(rTRTranslate.X()));
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X, aStr);
}
if(nFeatures & SEF_EXPORT_Y)
@@ -244,7 +248,7 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(Vector2D& rTRScale, doub
// svg: y
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, FRound(rTRTranslate.Y()));
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y, aStr);
}
}
}
@@ -258,7 +262,7 @@ sal_Bool XMLShapeExport::ImpExportPresentationAttributes( const uno::Reference<
OUStringBuffer sStringBuffer;
// write presentation class entry
- rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class, rClass);
+ rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_CLASS, rClass);
if( xPropSet.is() )
{
@@ -271,7 +275,7 @@ sal_Bool XMLShapeExport::ImpExportPresentationAttributes( const uno::Reference<
{
xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))) >>= bIsEmpty;
if( bIsEmpty )
- rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_placeholder, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+ rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PLACEHOLDER, XML_TRUE);
}
// is user-transformed?
@@ -279,7 +283,7 @@ sal_Bool XMLShapeExport::ImpExportPresentationAttributes( const uno::Reference<
{
xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent"))) >>= bTemp;
if(!bTemp)
- rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_user_transformed, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+ rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_USER_TRANSFORMED, XML_TRUE);
}
}
@@ -416,31 +420,31 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
if( eClickAction == presentation::ClickAction_NONE )
break;
- SvXMLElementExport aEventsElemt(rExport, XML_NAMESPACE_OFFICE, sXML_events, sal_True, sal_True);
+ SvXMLElementExport aEventsElemt(rExport, XML_NAMESPACE_OFFICE, XML_EVENTS, sal_True, sal_True);
- OUString aStrAction;
+ enum XMLTokenEnum eStrAction;
switch( eClickAction )
{
- case presentation::ClickAction_PREVPAGE: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_previous_page ) ); break;
- case presentation::ClickAction_NEXTPAGE: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_next_page ) ); break;
- case presentation::ClickAction_FIRSTPAGE: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_first_page ) ); break;
- case presentation::ClickAction_LASTPAGE: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_last_page ) ); break;
- case presentation::ClickAction_INVISIBLE: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_hide ) ); break;
- case presentation::ClickAction_STOPPRESENTATION:aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_stop ) ); break;
- case presentation::ClickAction_PROGRAM: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_execute ) ); break;
- case presentation::ClickAction_BOOKMARK: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_show ) ); break;
- case presentation::ClickAction_DOCUMENT: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_show ) ); break;
- case presentation::ClickAction_MACRO: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_execute_macro ) ); break;
- case presentation::ClickAction_VERB: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_verb ) ); break;
- case presentation::ClickAction_VANISH: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_fade_out ) ); break;
- case presentation::ClickAction_SOUND: aStrAction = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_sound ) ); break;
+ case presentation::ClickAction_PREVPAGE: eStrAction = XML_PREVIOUS_PAGE; break;
+ case presentation::ClickAction_NEXTPAGE: eStrAction = XML_NEXT_PAGE; break;
+ case presentation::ClickAction_FIRSTPAGE: eStrAction = XML_FIRST_PAGE; break;
+ case presentation::ClickAction_LASTPAGE: eStrAction = XML_LAST_PAGE; break;
+ case presentation::ClickAction_INVISIBLE: eStrAction = XML_HIDE; break;
+ case presentation::ClickAction_STOPPRESENTATION:eStrAction = XML_STOP; break;
+ case presentation::ClickAction_PROGRAM: eStrAction = XML_EXECUTE; break;
+ case presentation::ClickAction_BOOKMARK: eStrAction = XML_SHOW; break;
+ case presentation::ClickAction_DOCUMENT: eStrAction = XML_SHOW; break;
+ case presentation::ClickAction_MACRO: eStrAction = XML_EXECUTE_MACRO; break;
+ case presentation::ClickAction_VERB: eStrAction = XML_VERB; break;
+ case presentation::ClickAction_VANISH: eStrAction = XML_FADE_OUT; break;
+ case presentation::ClickAction_SOUND: eStrAction = XML_SOUND; break;
default:
DBG_ERROR( "unknown presentation::ClickAction found!" );
}
- rExport.AddAttribute( XML_NAMESPACE_SCRIPT, sXML_event_name, OUString( RTL_CONSTASCII_USTRINGPARAM( "on-click" ) ) );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_action, aStrAction );
+ rExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, OUString( RTL_CONSTASCII_USTRINGPARAM( "on-click" ) ) );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_ACTION, eStrAction );
if( eClickAction == presentation::ClickAction_VANISH )
{
@@ -456,19 +460,19 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
if( eEffect != EK_none )
{
SvXMLUnitConverter::convertEnum( msBuffer, eKind, aXML_AnimationEffect_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_effect, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_EFFECT, msBuffer.makeStringAndClear() );
}
if( eDirection != ED_none )
{
SvXMLUnitConverter::convertEnum( msBuffer, eDirection, aXML_AnimationDirection_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_direction, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_DIRECTION, msBuffer.makeStringAndClear() );
}
if( nStartScale != -1 )
{
SvXMLUnitConverter::convertPercent( msBuffer, nStartScale );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_start_scale, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_START_SCALE, msBuffer.makeStringAndClear() );
}
}
@@ -477,7 +481,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
if( eSpeed != presentation::AnimationSpeed_MEDIUM )
{
SvXMLUnitConverter::convertEnum( msBuffer, eSpeed, aXML_AnimationSpeed_EnumMap );
- rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, sXML_speed, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_SPEED, msBuffer.makeStringAndClear() );
}
}
}
@@ -490,32 +494,32 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
msBuffer.append( sal_Unicode('#') );
msBuffer.append( aStrBookmark );
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference(msBuffer.makeStringAndClear()) );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show, sXML_new );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onRequest );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(msBuffer.makeStringAndClear()) );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_NEW );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
}
if( ( nFound & FOUND_VERB ) && eClickAction == presentation::ClickAction_VERB )
{
msBuffer.append( nVerb );
- rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_verb, msBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_VERB, msBuffer.makeStringAndClear());
}
- SvXMLElementExport aEventElemt(rExport, XML_NAMESPACE_PRESENTATION, sXML_event, sal_True, sal_True);
+ SvXMLElementExport aEventElemt(rExport, XML_NAMESPACE_PRESENTATION, XML_EVENT, sal_True, sal_True);
if( eClickAction == presentation::ClickAction_VANISH || eClickAction == presentation::ClickAction_SOUND )
{
if( ( nFound & FOUND_SOUNDURL ) && aStrSoundURL.getLength() != 0 )
{
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference(aStrSoundURL) );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show, sXML_new );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onRequest );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStrSoundURL) );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_NEW );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
if( nFound & FOUND_PLAYFULL && bPlayFull )
- rExport.AddAttributeASCII( XML_NAMESPACE_PRESENTATION, sXML_play_full, sXML_true );
+ rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_PLAY_FULL, XML_TRUE );
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, sXML_sound, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_PRESENTATION, XML_SOUND, sal_True, sal_True );
}
}
break;
@@ -524,16 +528,16 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
{
if( nFound & FOUND_MACRO )
{
- SvXMLElementExport aEventsElemt(rExport, XML_NAMESPACE_OFFICE, sXML_events, sal_True, sal_True);
+ SvXMLElementExport aEventsElemt(rExport, XML_NAMESPACE_OFFICE, XML_EVENTS, sal_True, sal_True);
- rExport.AddAttribute( XML_NAMESPACE_SCRIPT, sXML_language, OUString( RTL_CONSTASCII_USTRINGPARAM( "starbasic" ) ) );
- rExport.AddAttribute( XML_NAMESPACE_SCRIPT, sXML_event_name, OUString( RTL_CONSTASCII_USTRINGPARAM( "on-click" ) ) );
- rExport.AddAttribute( XML_NAMESPACE_SCRIPT, sXML_macro_name, aStrMacro );
+ rExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_LANGUAGE, OUString( RTL_CONSTASCII_USTRINGPARAM( "starbasic" ) ) );
+ rExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, OUString( RTL_CONSTASCII_USTRINGPARAM( "on-click" ) ) );
+ rExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_MACRO_NAME, aStrMacro );
if( nFound & FOUND_LIBRARY )
- rExport.AddAttribute( XML_NAMESPACE_SCRIPT, sXML_library, aStrLibrary );
+ rExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_LIBRARY, aStrLibrary );
- SvXMLElementExport aEventElemt(rExport, XML_NAMESPACE_SCRIPT, sXML_event, sal_True, sal_True);
+ SvXMLElementExport aEventElemt(rExport, XML_NAMESPACE_SCRIPT, XML_EVENT, sal_True, sal_True);
}
}
}
@@ -548,7 +552,7 @@ void XMLShapeExport::ImpExportGroupShape( const uno::Reference< drawing::XShape
if(xShapes.is() && xShapes->getCount())
{
// write group shape
- SvXMLElementExport aPGR(rExport, XML_NAMESPACE_DRAW, sXML_g, sal_True, sal_True);
+ SvXMLElementExport aPGR(rExport, XML_NAMESPACE_DRAW, XML_G, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -578,25 +582,25 @@ void XMLShapeExport::ImpExportTextBoxShape(
{
case XmlShapeTypePresSubtitleShape:
{
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_subtitle));
+ aStr = GetXMLToken(XML_PRESENTATION_SUBTITLE);
bIsPresShape = TRUE;
break;
}
case XmlShapeTypePresTitleTextShape:
{
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_title));
+ aStr = GetXMLToken(XML_PRESENTATION_TITLE);
bIsPresShape = TRUE;
break;
}
case XmlShapeTypePresOutlinerShape:
{
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_outline));
+ aStr = GetXMLToken(XML_PRESENTATION_OUTLINE);
bIsPresShape = TRUE;
break;
}
case XmlShapeTypePresNotesShape:
{
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_notes));
+ aStr = GetXMLToken(XML_PRESENTATION_NOTES);
bIsPresShape = TRUE;
break;
}
@@ -609,7 +613,7 @@ void XMLShapeExport::ImpExportTextBoxShape(
bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, aStr );
// write text-box
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_text_box, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_TEXT_BOX, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -637,11 +641,11 @@ void XMLShapeExport::ImpExportRectangleShape(
{
OUStringBuffer sStringBuffer;
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, nCornerRadius);
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_corner_radius, sStringBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_CORNER_RADIUS, sStringBuffer.makeStringAndClear());
}
// write rectangle
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_rect, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_RECT, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -719,7 +723,7 @@ void XMLShapeExport::ImpExportLineShape(
// svg: x1
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.X);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x1, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X1, aStr);
}
else
{
@@ -731,7 +735,7 @@ void XMLShapeExport::ImpExportLineShape(
// svg: y1
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.Y);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y1, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y1, aStr);
}
else
{
@@ -741,15 +745,15 @@ void XMLShapeExport::ImpExportLineShape(
// svg: x2
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.X);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x2, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X2, aStr);
// svg: y2
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.Y);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y2, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y2, aStr);
// write line
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_line, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_LINE, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -790,21 +794,21 @@ void XMLShapeExport::ImpExportEllipseShape(
// export circle kind
SvXMLUnitConverter::convertEnum( sStringBuffer, (USHORT)eKind, aXML_CircleKind_EnumMap );
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_kind, sStringBuffer.makeStringAndClear() );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_KIND, sStringBuffer.makeStringAndClear() );
// export start angle
SvXMLUnitConverter::convertDouble( sStringBuffer, dStartAngle );
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_start_angle, sStringBuffer.makeStringAndClear() );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_START_ANGLE, sStringBuffer.makeStringAndClear() );
// export end angle
SvXMLUnitConverter::convertDouble( sStringBuffer, dEndAngle );
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_end_angle, sStringBuffer.makeStringAndClear() );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_ANGLE, sStringBuffer.makeStringAndClear() );
}
if(bCircle)
{
// write circle
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_circle, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_CIRCLE, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -813,7 +817,7 @@ void XMLShapeExport::ImpExportEllipseShape(
else
{
// write ellipse
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_ellipse, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_ELLIPSE, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -854,7 +858,7 @@ void XMLShapeExport::ImpExportPolygonShape(
awt::Point aPoint(0, 0);
awt::Size aSize(FRound(aTRScale.X()), FRound(aTRScale.Y()));
SdXMLImExViewBox aViewBox(0, 0, aSize.Width, aSize.Height);
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_viewBox, aViewBox.GetExportString(rExport.GetMM100UnitConverter()));
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_VIEWBOX, aViewBox.GetExportString(rExport.GetMM100UnitConverter()));
if(bBezier)
{
@@ -887,11 +891,11 @@ void XMLShapeExport::ImpExportPolygonShape(
}
// write point array
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_d, aSvgDElement.GetExportString());
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aSvgDElement.GetExportString());
}
// write object now
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_path, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_PATH, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -917,12 +921,12 @@ void XMLShapeExport::ImpExportPolygonShape(
SdXMLImExPointsElement aPoints(pSequence, aViewBox, aPoint, aSize, rExport.GetMM100UnitConverter());
// write point array
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_points, aPoints.GetExportString());
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_POINTS, aPoints.GetExportString());
}
// write object now
SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW,
- bClosed ? sXML_polygon : sXML_polyline , sal_True, sal_True);
+ bClosed ? XML_POLYGON : XML_POLYLINE , sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -948,11 +952,11 @@ void XMLShapeExport::ImpExportPolygonShape(
}
// write point array
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_d, aSvgDElement.GetExportString());
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aSvgDElement.GetExportString());
}
// write object now
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_path, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_PATH, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -979,7 +983,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
ImpExportNewTrans(xPropSet, nFeatures, pRefPoint);
if(eShapeType == XmlShapeTypePresGraphicObjectShape)
- bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_graphic)) );
+ bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_GRAPHIC) );
if( !bIsEmptyPresObj )
{
@@ -988,7 +992,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL"))) >>= aStr;
aStr = GetExport().GetRelativeReference( rExport.AddEmbeddedGraphicObject( aStr ) );
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr );
if( aStr.getLength() && aStr[ 0 ] == '#' )
{
@@ -1001,17 +1005,14 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
aAny <<= aStreamURL;
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicStreamURL")), aAny );
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_simple));
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_type, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_embed));
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_show, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_onLoad));
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_actuate, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
// write graphic object
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_image, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_IMAGE, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
ImpExportText( xShape );
@@ -1045,7 +1046,7 @@ void XMLShapeExport::ImpExportChartShape(
else
{
// write chart object (fake for now, replace later)
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_CHART, sXML_chart, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_CHART, XML_CHART, sal_True, sal_True);
}
}
*/
@@ -1081,11 +1082,11 @@ void XMLShapeExport::ImpExportControlShape(
DBG_ASSERT( xControlModel.is(), "Control shape has not XControlModel" );
if( xControlModel.is() )
{
- rExport.AddAttribute( XML_NAMESPACE_FORM, sXML_id, rExport.GetFormExport()->getControlId( xControlModel ) );
+ rExport.AddAttribute( XML_NAMESPACE_FORM, XML_ID, rExport.GetFormExport()->getControlId( xControlModel ) );
}
}
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_control, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_CONTROL, sal_True, sal_True);
}
//////////////////////////////////////////////////////////////////////////////
@@ -1108,7 +1109,7 @@ void XMLShapeExport::ImpExportConnectorShape(
{
SvXMLUnitConverter::convertEnum( sStringBuffer, (sal_uInt16)eType, aXML_ConnectionKind_EnumMap );
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_type, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_TYPE, aStr);
}
// export line skew
@@ -1137,7 +1138,7 @@ void XMLShapeExport::ImpExportConnectorShape(
}
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_line_skew, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LINE_SKEW, aStr);
}
// export start and end point
@@ -1160,7 +1161,7 @@ void XMLShapeExport::ImpExportConnectorShape(
// svg: x1
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.X);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x1, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X1, aStr);
}
else
{
@@ -1172,7 +1173,7 @@ void XMLShapeExport::ImpExportConnectorShape(
// svg: y1
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.Y);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y1, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y1, aStr);
}
else
{
@@ -1182,12 +1183,12 @@ void XMLShapeExport::ImpExportConnectorShape(
// svg: x2
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.X);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x2, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X2, aStr);
// svg: y2
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.Y);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y2, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y2, aStr);
uno::Reference< drawing::XShape > xTempShape;
@@ -1196,7 +1197,7 @@ void XMLShapeExport::ImpExportConnectorShape(
if( aAny >>= xTempShape )
{
sal_Int32 nShapeId = rExport.GetShapeExport()->getShapeId( xTempShape );
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_start_shape, OUString::valueOf( nShapeId ));
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_START_SHAPE, OUString::valueOf( nShapeId ));
aAny = xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("StartGluePointIndex")) );
sal_Int32 nGluePointId;
@@ -1204,7 +1205,7 @@ void XMLShapeExport::ImpExportConnectorShape(
{
if( nGluePointId != -1 )
{
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_start_glue_point, OUString::valueOf( nGluePointId ));
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_START_GLUE_POINT, OUString::valueOf( nGluePointId ));
}
}
}
@@ -1215,7 +1216,7 @@ void XMLShapeExport::ImpExportConnectorShape(
{
sal_Int32 nShapeId = rExport.GetShapeExport()->getShapeId( xTempShape );
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_end_shape, OUString::valueOf( nShapeId ));
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_SHAPE, OUString::valueOf( nShapeId ));
aAny = xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("EndGluePointIndex")) );
sal_Int32 nGluePointId;
@@ -1223,13 +1224,13 @@ void XMLShapeExport::ImpExportConnectorShape(
{
if( nGluePointId != -1 )
{
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_end_glue_point, OUString::valueOf( nGluePointId ));
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_GLUE_POINT, OUString::valueOf( nGluePointId ));
}
}
}
// write connector shape. Add Export later.
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_connector, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_CONNECTOR, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -1270,7 +1271,7 @@ void XMLShapeExport::ImpExportMeasureShape(
// svg: x1
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.X);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x1, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X1, aStr);
}
else
{
@@ -1282,7 +1283,7 @@ void XMLShapeExport::ImpExportMeasureShape(
// svg: y1
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.Y);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y1, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y1, aStr);
}
else
{
@@ -1292,15 +1293,15 @@ void XMLShapeExport::ImpExportMeasureShape(
// svg: x2
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.X);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_x2, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_X2, aStr);
// svg: y2
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.Y);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_y2, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y2, aStr);
// write measure shape
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_measure, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_MEASURE, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -1329,11 +1330,11 @@ void XMLShapeExport::ImpExportOLE2Shape(
// presentation settings
if(eShapeType == XmlShapeTypePresOLE2Shape)
- bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_object)));
+ bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_OBJECT) );
else if(eShapeType == XmlShapeTypePresChartShape)
- bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_chart)) );
+ bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_CHART) );
else if(eShapeType == XmlShapeTypePresTableShape)
- bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_table)) );
+ bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) );
OUString sClassId;
@@ -1350,18 +1351,18 @@ void XMLShapeExport::ImpExportOLE2Shape(
xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID"))) >>= sClassId;
if( sClassId.getLength() )
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_class_id, sClassId );
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_CLASS_ID, sClassId );
sURL = rExport.AddEmbeddedObject( sURL );
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference(sURL) );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show, sXML_embed );
- rExport.AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(sURL) );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
- const sal_Char *pElem = sClassId.getLength() ? sXML_object_ole : sXML_object;
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, pElem, sal_False, sal_True );
+ enum XMLTokenEnum eElem = sClassId.getLength() ? XML_OBJECT_OLE : XML_OBJECT;
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, eElem, sal_False, sal_True );
// see if we need to export a thumbnail bitmap
OUString aStr;
@@ -1369,18 +1370,15 @@ void XMLShapeExport::ImpExportOLE2Shape(
if( aStr.getLength() )
{
aStr = rExport.AddEmbeddedGraphicObject( GetExport().GetRelativeReference(aStr) );
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr );
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_simple));
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_type, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_embed));
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_show, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_onLoad));
- rExport.AddAttribute(XML_NAMESPACE_XLINK, sXML_actuate, aStr );
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, sXML_thumbnail, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_THUMBNAIL, sal_True, sal_True );
}
ImpExportEvents( xShape );
@@ -1407,7 +1405,7 @@ void XMLShapeExport::ImpExportPageShape(
{
sal_Int32 nPageNumber = 0;
xPropSet->getPropertyValue(aPageNumberStr) >>= nPageNumber;
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_page_number, OUString::valueOf(nPageNumber));
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_PAGE_NUMBER, OUString::valueOf(nPageNumber));
}
// a presentation page shape, normally used on notes pages only. If
@@ -1415,12 +1413,12 @@ void XMLShapeExport::ImpExportPageShape(
// copy-paste exchange between draw and impress (this IS possible...)
if(eShapeType == XmlShapeTypePresPageShape)
{
- rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class,
- OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_page)));
+ rExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_CLASS,
+ XML_PRESENTATION_PAGE);
}
// write Page shape
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_page_thumbnail, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_PAGE_THUMBNAIL, sal_True, sal_True);
}
}
@@ -1443,7 +1441,7 @@ void XMLShapeExport::ImpExportCaptionShape(
{
OUStringBuffer sStringBuffer;
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, nCornerRadius);
- rExport.AddAttribute(XML_NAMESPACE_DRAW, sXML_corner_radius, sStringBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_DRAW, XML_CORNER_RADIUS, sStringBuffer.makeStringAndClear());
}
awt::Point aCaptionPoint;
@@ -1457,12 +1455,12 @@ void XMLShapeExport::ImpExportCaptionShape(
}
rExport.GetMM100UnitConverter().convertMeasure(msBuffer, aCaptionPoint.X);
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_caption_point_x, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CAPTION_POINT_X, msBuffer.makeStringAndClear() );
rExport.GetMM100UnitConverter().convertMeasure(msBuffer, aCaptionPoint.Y);
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_caption_point_y, msBuffer.makeStringAndClear() );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CAPTION_POINT_Y, msBuffer.makeStringAndClear() );
// write Caption shape. Add export later.
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_caption, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_CAPTION, sal_True, sal_True);
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
@@ -1485,18 +1483,18 @@ void XMLShapeExport::ImpExportFrameShape(
// export frame url
OUString aStr;
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FrameURL" ) ) ) >>= aStr;
- rExport.AddAttribute ( XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference(aStr) );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_show, sXML_embed );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
// export name
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FrameName" ) ) ) >>= aStr;
if( aStr.getLength() )
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_frame_name, aStr );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_FRAME_NAME, aStr );
// write floating frame
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_floating_frame, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_FLOATING_FRAME, sal_True, sal_True);
}
}
@@ -1515,27 +1513,27 @@ void XMLShapeExport::ImpExportAppletShape(
// export frame url
OUString aStr;
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletCodeBase" ) ) ) >>= aStr;
- rExport.AddAttribute ( XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference(aStr) );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_show, sXML_embed );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
// export draw:applet-name
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletName" ) ) ) >>= aStr;
if( aStr.getLength() )
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_applet_name, aStr );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr );
// export draw:code
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletCode" ) ) ) >>= aStr;
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_code, aStr );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr );
// export draw:may-script
sal_Bool bIsScript;
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletIsScript" ) ) ) >>= bIsScript;
- rExport.AddAttributeASCII( XML_NAMESPACE_DRAW, sXML_may_script, bIsScript ? sXML_true : sXML_false );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bIsScript ? XML_TRUE : XML_FALSE );
// write applet
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_applet, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_APPLET, sal_True, sal_True);
// export parameters
uno::Sequence< beans::PropertyValue > aCommands;
@@ -1544,9 +1542,9 @@ void XMLShapeExport::ImpExportAppletShape(
for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
aCommands[nIndex].Value >>= aStr;
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aCommands[nIndex].Name );
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_value, aStr );
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, sXML_param, sal_False, sal_True );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aCommands[nIndex].Name );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aStr );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_PARAM, sal_False, sal_True );
}
}
}
@@ -1566,18 +1564,19 @@ void XMLShapeExport::ImpExportPluginShape(
// export plugin url
OUString aStr;
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PluginURL" ) ) ) >>= aStr;
- rExport.AddAttribute ( XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference(aStr) );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_show, sXML_embed );
- rExport.AddAttributeASCII ( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
+
// export mime-type
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PluginMimeType" ) ) ) >>= aStr;
if(aStr.getLength())
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_mime_type, aStr );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr );
// write plugin
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, sXML_plugin, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DRAW, XML_PLUGIN, sal_True, sal_True);
// export parameters
uno::Sequence< beans::PropertyValue > aCommands;
@@ -1586,9 +1585,9 @@ void XMLShapeExport::ImpExportPluginShape(
for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
aCommands[nIndex].Value >>= aStr;
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aCommands[nIndex].Name );
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_value, aStr );
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, sXML_param, sal_False, sal_True );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aCommands[nIndex].Name );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aStr );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_PARAM, sal_False, sal_True );
}
}
}
diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx
index de1729e20e92..1d0cff60948a 100644
--- a/xmloff/source/draw/shapeexport3.cxx
+++ b/xmloff/source/draw/shapeexport3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shapeexport3.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: cl $ $Date: 2001-03-28 11:19:11 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,11 +123,15 @@
#include "xexptran.hxx"
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
#include "xmlnmspe.hxx"
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
//////////////////////////////////////////////////////////////////////////////
@@ -154,7 +158,7 @@ void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShap
export3DSceneAttributes( xPropSet );
// write 3DScene shape
- SvXMLElementExport aOBJ( rExport, XML_NAMESPACE_DR3D, sXML_scene, sal_True, sal_True);
+ SvXMLElementExport aOBJ( rExport, XML_NAMESPACE_DR3D, XML_SCENE, sal_True, sal_True);
ImpExportEvents( xShape );
@@ -186,14 +190,14 @@ void XMLShapeExport::ImpExport3DShape(
SdXMLImExTransform3D aTransform;
aTransform.AddHomogenMatrix(xHomMat);
if(aTransform.NeedsAction())
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_transform, aTransform.GetExportString(rExport.GetMM100UnitConverter()));
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_TRANSFORM, aTransform.GetExportString(rExport.GetMM100UnitConverter()));
switch(eShapeType)
{
case XmlShapeTypeDraw3DCubeObject:
{
// write 3DCube shape
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, sXML_cube, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, XML_CUBE, sal_True, sal_True);
// minEdge
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition")));
@@ -215,7 +219,7 @@ void XMLShapeExport::ImpExport3DShape(
{
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aPos3D);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_min_edge, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_MIN_EDGE, aStr);
}
// write maxEdge
@@ -223,7 +227,7 @@ void XMLShapeExport::ImpExport3DShape(
{
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aDir3D);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_max_edge, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_MAX_EDGE, aStr);
}
break;
@@ -231,7 +235,7 @@ void XMLShapeExport::ImpExport3DShape(
case XmlShapeTypeDraw3DSphereObject:
{
// write 3DSphere shape
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, sXML_sphere, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, XML_SPHERE, sal_True, sal_True);
// Center
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition")));
@@ -250,7 +254,7 @@ void XMLShapeExport::ImpExport3DShape(
{
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aPos3D);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_center, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_CENTER, aStr);
}
// write Size
@@ -258,7 +262,7 @@ void XMLShapeExport::ImpExport3DShape(
{
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aDir3D);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_size, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SIZE, aStr);
}
break;
@@ -320,7 +324,7 @@ void XMLShapeExport::ImpExport3DShape(
awt::Size aMaxSize(FRound(fXMax) - aMinPoint.X, FRound(fYMax) - aMinPoint.Y);
SdXMLImExViewBox aViewBox(
aMinPoint.X, aMinPoint.Y, aMaxSize.Width, aMaxSize.Height);
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_viewBox,
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_VIEWBOX,
aViewBox.GetExportString(rExport.GetMM100UnitConverter()));
// prepare svx:d element export
@@ -359,17 +363,17 @@ void XMLShapeExport::ImpExport3DShape(
}
// write point array
- rExport.AddAttribute(XML_NAMESPACE_SVG, sXML_d, aSvgDElement.GetExportString());
+ rExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aSvgDElement.GetExportString());
if(eShapeType == XmlShapeTypeDraw3DLatheObject)
{
// write 3DLathe shape
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, sXML_rotate, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, XML_ROTATE, sal_True, sal_True);
}
else
{
// write 3DExtrude shape
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, sXML_extrude, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, XML_EXTRUDE, sal_True, sal_True);
}
break;
}
@@ -392,7 +396,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
SdXMLImExTransform3D aTransform;
aTransform.AddHomogenMatrix(xHomMat);
if(aTransform.NeedsAction())
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_transform, aTransform.GetExportString(rExport.GetMM100UnitConverter()));
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_TRANSFORM, aTransform.GetExportString(rExport.GetMM100UnitConverter()));
// VRP, VPN, VUP
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DCameraGeometry")));
@@ -404,7 +408,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
{
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aVRP);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_vrp, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_VRP, aStr);
}
Vector3D aVPN(aCamGeo.vpn.DirectionX, aCamGeo.vpn.DirectionY, aCamGeo.vpn.DirectionZ);
@@ -412,7 +416,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
{
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aVPN);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_vpn, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_VPN, aStr);
}
Vector3D aVUP(aCamGeo.vup.DirectionX, aCamGeo.vup.DirectionY, aCamGeo.vup.DirectionZ);
@@ -420,7 +424,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
{
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aVUP);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_vup, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_VUP, aStr);
}
// projection "D3DScenePerspective" drawing::ProjectionMode
@@ -428,10 +432,10 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
drawing::ProjectionMode xPrjMode;
aAny >>= xPrjMode;
if(xPrjMode == drawing::ProjectionMode_PARALLEL)
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_parallel));
+ aStr = GetXMLToken(XML_PARALLEL);
else
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_perspective));
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_projection, aStr);
+ aStr = GetXMLToken(XML_PERSPECTIVE);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_PROJECTION, aStr);
// distance
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneDistance")));
@@ -439,7 +443,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
aAny >>= nDistance;
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, nDistance);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_distance, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_DISTANCE, aStr);
// focalLength
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneFocalLength")));
@@ -447,7 +451,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
aAny >>= nFocalLength;
rExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, nFocalLength);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_focal_length, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_FOCAL_LENGTH, aStr);
// shadowSlant
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneShadowSlant")));
@@ -455,7 +459,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
aAny >>= nShadowSlant;
rExport.GetMM100UnitConverter().convertNumber(sStringBuffer, (sal_Int32)nShadowSlant);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_shadow_slant, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SHADOW_SLANT, aStr);
// shadeMode
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneShadeMode")));
@@ -463,20 +467,20 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
if(aAny >>= xShadeMode)
{
if(xShadeMode == drawing::ShadeMode_FLAT)
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_flat));
+ aStr = GetXMLToken(XML_FLAT);
else if(xShadeMode == drawing::ShadeMode_PHONG)
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_phong));
+ aStr = GetXMLToken(XML_PHONG);
else if(xShadeMode == drawing::ShadeMode_SMOOTH)
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_gouraud));
+ aStr = GetXMLToken(XML_GOURAUD);
else
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_draft));
+ aStr = GetXMLToken(XML_DRAFT);
}
else
{
// ShadeMode enum not there, write default
- aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_gouraud));
+ aStr = GetXMLToken(XML_GOURAUD);
}
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_shade_mode, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SHADE_MODE, aStr);
// ambientColor
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneAmbientColor")));
@@ -485,7 +489,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
aAny >>= aColTemp; aAmbientColor.SetColor(aColTemp);
rExport.GetMM100UnitConverter().convertColor(sStringBuffer, aAmbientColor);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_ambient_color, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_AMBIENT_COLOR, aStr);
// lightingMode
aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneTwoSidedLighting")));
@@ -493,7 +497,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen
aAny >>= bTwoSidedLighting;
rExport.GetMM100UnitConverter().convertBool(sStringBuffer, bTwoSidedLighting);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_lighting_mode, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_LIGHTING_MODE, aStr);
}
/** helper for chart that exports all lamps from the propertyset */
@@ -525,7 +529,7 @@ void XMLShapeExport::export3DLamps( const com::sun::star::uno::Reference< com::s
aLightColor.SetColor(aColTemp);
rExport.GetMM100UnitConverter().convertColor(sStringBuffer, aLightColor);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_diffuse_color, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_DIFFUSE_COLOR, aStr);
// lightdirection
aPropName = aDirectionPropName;
@@ -534,7 +538,7 @@ void XMLShapeExport::export3DLamps( const com::sun::star::uno::Reference< com::s
aLightDirection = Vector3D(xLightDir.DirectionX, xLightDir.DirectionY, xLightDir.DirectionZ);
rExport.GetMM100UnitConverter().convertVector3D(sStringBuffer, aLightDirection);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_direction, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_DIRECTION, aStr);
// lighton
aPropName = aLightOnPropName;
@@ -542,15 +546,14 @@ void XMLShapeExport::export3DLamps( const com::sun::star::uno::Reference< com::s
xPropSet->getPropertyValue(aPropName) >>= bLightOnOff;
rExport.GetMM100UnitConverter().convertBool(sStringBuffer, bLightOnOff);
aStr = sStringBuffer.makeStringAndClear();
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_enabled, aStr);
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_ENABLED, aStr);
// specular
- rExport.AddAttribute(XML_NAMESPACE_DR3D, sXML_specular,
- nLamp == 1 ? OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_true ) ) :
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_false ) ) );
+ rExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SPECULAR,
+ nLamp == 1 ? XML_TRUE : XML_FALSE);
// write light entry
- SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, sXML_light, sal_True, sal_True);
+ SvXMLElementExport aOBJ(rExport, XML_NAMESPACE_DR3D, XML_LIGHT, sal_True, sal_True);
}
}
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 0d9238c30247..076456132a2c 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shapeimport.cxx,v $
*
- * $Revision: 1.38 $
+ * $Revision: 1.39 $
*
- * last change: $Author: cl $ $Date: 2001-06-19 14:51:55 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,8 +81,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XIMPSTYLE_HXX
diff --git a/xmloff/source/draw/viewcontext.cxx b/xmloff/source/draw/viewcontext.cxx
index fc956f5d6e97..410005e93e5f 100644
--- a/xmloff/source/draw/viewcontext.cxx
+++ b/xmloff/source/draw/viewcontext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewcontext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: cl $ $Date: 2001-02-21 18:04:45 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,8 +66,8 @@
#include "sdxmlimp_impl.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -81,6 +81,9 @@
using namespace com::sun::star;
using namespace rtl;
+using ::xmloff::token::IsXMLToken;
+
+using ::xmloff::token::XML_EMBEDDED_VISIBLE_AREA;
//------------------------------------------------------------------
@@ -102,7 +105,7 @@ SvXMLImportContext *SdXMLViewSettingsContext::CreateChildContext( USHORT nPrefix
if (nPrefix == XML_NAMESPACE_OFFICE)
{
- if (rLocalName.compareToAscii(sXML_embedded_visible_area) == 0)
+ if ( IsXMLToken( rLocalName, XML_EMBEDDED_VISIBLE_AREA ) )
{
sal_Int16 nMeasureUnit = 0;
diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx
index f2cfaa9b80d9..b82dd3b626e1 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximp3dobject.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: cl $ $Date: 2001-05-18 08:40:43 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -105,8 +105,8 @@
#include "ximpstyl.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONSHAPE3D_HPP_
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index ddb0eff54fa1..eea181e431f2 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximp3dscene.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: cl $ $Date: 2001-05-18 08:40:43 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,8 +73,8 @@
#include "xexptran.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
@@ -91,6 +91,7 @@
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
//////////////////////////////////////////////////////////////////////////////
// dr3d:3dlight context
@@ -222,7 +223,7 @@ SvXMLImportContext* SdXML3DSceneShapeContext::CreateChildContext( USHORT nPrefix
// look for local light context first
if(nPrefix == XML_NAMESPACE_DR3D
- && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_light))))
+ && IsXMLToken( rLocalName, XML_LIGHT ) )
{
// dr3d:light inside dr3d:scene context
pContext = create3DLightContext( nPrefix, rLocalName, xAttrList );
@@ -293,14 +294,14 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co
{
if( XML_NAMESPACE_DR3D == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_transform)) )
+ if( IsXMLToken( rLocalName, XML_TRANSFORM ) )
{
SdXMLImExTransform3D aTransform(rValue, mrImport.GetMM100UnitConverter());
if(aTransform.NeedsAction())
mbSetTransform = aTransform.GetFullHomogenTransform(mxHomMat);
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_vrp)) )
+ else if( IsXMLToken( rLocalName, XML_VRP ) )
{
Vector3D aNewVec;
mrImport.GetMM100UnitConverter().convertVector3D(aNewVec, rValue);
@@ -312,7 +313,7 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co
}
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_vpn)) )
+ else if( IsXMLToken( rLocalName, XML_VPN ) )
{
Vector3D aNewVec;
mrImport.GetMM100UnitConverter().convertVector3D(aNewVec, rValue);
@@ -324,7 +325,7 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co
}
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_vup)) )
+ else if( IsXMLToken( rLocalName, XML_VUP ) )
{
Vector3D aNewVec;
mrImport.GetMM100UnitConverter().convertVector3D(aNewVec, rValue);
@@ -336,47 +337,47 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co
}
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_projection)) )
+ else if( IsXMLToken( rLocalName, XML_PROJECTION ) )
{
- if(rValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_parallel))))
+ if( IsXMLToken( rValue, XML_PARALLEL ) )
mxPrjMode = drawing::ProjectionMode_PARALLEL;
else
mxPrjMode = drawing::ProjectionMode_PERSPECTIVE;
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_distance)) )
+ else if( IsXMLToken( rLocalName, XML_DISTANCE ) )
{
mrImport.GetMM100UnitConverter().convertMeasure(mnDistance, rValue);
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_focal_length)) )
+ else if( IsXMLToken( rLocalName, XML_FOCAL_LENGTH ) )
{
mrImport.GetMM100UnitConverter().convertMeasure(mnFocalLength, rValue);
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_shadow_slant)) )
+ else if( IsXMLToken( rLocalName, XML_SHADOW_SLANT ) )
{
mrImport.GetMM100UnitConverter().convertNumber(mnShadowSlant, rValue);
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_shade_mode)) )
+ else if( IsXMLToken( rLocalName, XML_SHADE_MODE ) )
{
- if(rValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_flat))))
+ if( IsXMLToken( rValue, XML_FLAT ) )
mxShadeMode = drawing::ShadeMode_FLAT;
- else if(rValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_phong))))
+ else if( IsXMLToken( rValue, XML_PHONG ) )
mxShadeMode = drawing::ShadeMode_PHONG;
- else if(rValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_gouraud))))
+ else if( IsXMLToken( rValue, XML_GOURAUD ) )
mxShadeMode = drawing::ShadeMode_SMOOTH;
else
mxShadeMode = drawing::ShadeMode_DRAFT;
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_ambient_color)) )
+ else if( IsXMLToken( rLocalName, XML_AMBIENT_COLOR ) )
{
mrImport.GetMM100UnitConverter().convertColor(maAmbientColor, rValue);
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_lighting_mode)) )
+ else if( IsXMLToken( rLocalName, XML_LIGHTING_MODE ) )
{
mrImport.GetMM100UnitConverter().convertBool(mbLightingMode, rValue);
return;
diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx
index e58089fe796b..f9a5a915eee3 100644
--- a/xmloff/source/draw/ximpgrp.cxx
+++ b/xmloff/source/draw/ximpgrp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpgrp.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: cl $ $Date: 2001-05-08 12:47:11 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,8 +69,8 @@
#include "ximpgrp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XIMPSHAPE_HXX
@@ -83,6 +83,8 @@
using namespace ::rtl;
using namespace ::com::sun::star;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_EVENTS;
//////////////////////////////////////////////////////////////////////////////
@@ -111,7 +113,7 @@ SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( USHORT nPrefix,
{
SvXMLImportContext* pContext = 0L;
- if( nPrefix == XML_NAMESPACE_OFFICE && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_events ) ) )
+ if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_EVENTS ) )
{
pContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape );
}
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index cc400362132c..de2d1badeab4 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximppage.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: cl $ $Date: 2001-05-28 13:32:20 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,7 +61,9 @@
#pragma hdrstop
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLSTYLE_HXX
#include "xmlstyle.hxx"
@@ -97,6 +99,7 @@
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
//////////////////////////////////////////////////////////////////////////////
@@ -136,11 +139,11 @@ SvXMLImportContext* SdXMLGenericPageContext::CreateChildContext( USHORT nPrefix,
{
SvXMLImportContext* pContext = 0L;
- if( nPrefix == XML_NAMESPACE_PRESENTATION && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_animations ) ) )
+ if( nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_ANIMATIONS ) )
{
pContext = new XMLAnimationsContext( GetImport(), nPrefix, rLocalName, xAttrList );
}
- else if( nPrefix == XML_NAMESPACE_OFFICE && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_forms ) ) )
+ else if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_FORMS ) )
{
if( GetImport().IsFormsSupported() )
pContext = GetImport().GetFormImport()->createOfficeFormsContext( GetImport(), nPrefix, rLocalName );
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 2d902661cdd1..901d455e2616 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpshap.cxx,v $
*
- * $Revision: 1.53 $
+ * $Revision: 1.54 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 14:56:38 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -167,8 +167,8 @@
#include"xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLIMAGEMAPCONTEXT_HXX_
@@ -185,6 +185,7 @@
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
extern SvXMLEnumMapEntry aXML_GlueAlignment_EnumMap[];
extern SvXMLEnumMapEntry aXML_GlueEscapeDirection_EnumMap[];
@@ -241,15 +242,15 @@ SvXMLImportContext *SdXMLShapeContext::CreateChildContext( USHORT nPrefix,
{
SvXMLImportContext * pContext = NULL;
- if( nPrefix == XML_NAMESPACE_OFFICE && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_events ) ) )
+ if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_EVENTS ) )
{
pContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape );
}
- else if( nPrefix == XML_NAMESPACE_DRAW && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_glue_point ) ) )
+ else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_GLUE_POINT ) )
{
addGluePoint( xAttrList );
}
- else if( nPrefix == XML_NAMESPACE_DRAW && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_thumbnail ) ) )
+ else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_THUMBNAIL ) )
{
// search attributes for xlink:href
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -261,7 +262,7 @@ SvXMLImportContext *SdXMLShapeContext::CreateChildContext( USHORT nPrefix,
if( nPrefix == XML_NAMESPACE_XLINK )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_href ) ) )
+ if( IsXMLToken( aLocalName, XML_HREF ) )
{
maThumbnailURL = GetImport().GetAbsoluteReference(xAttrList->getValueByIndex( i ));
break;
@@ -337,22 +338,22 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttribute
if( nPrefix == XML_NAMESPACE_SVG )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_x ) ) )
+ if( IsXMLToken( aLocalName, XML_X ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(aGluePoint.Position.X, sValue);
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_y ) ) )
+ else if( IsXMLToken( aLocalName, XML_Y ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(aGluePoint.Position.Y, sValue);
}
}
else if( nPrefix == XML_NAMESPACE_DRAW )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_id ) ) )
+ if( IsXMLToken( aLocalName, XML_ID ) )
{
nId = sValue.toInt32();
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_align ) ) )
+ else if( IsXMLToken( aLocalName, XML_ALIGN ) )
{
USHORT eKind;
if( SvXMLUnitConverter::convertEnum( eKind, sValue, aXML_GlueAlignment_EnumMap ) )
@@ -361,7 +362,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttribute
aGluePoint.IsRelative = sal_False;
}
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_escape_direction ) ) )
+ else if( IsXMLToken( aLocalName, XML_ESCAPE_DIRECTION ) )
{
USHORT eKind;
if( SvXMLUnitConverter::convertEnum( eKind, sValue, aXML_GlueEscapeDirection_EnumMap ) )
@@ -697,50 +698,50 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr
{
if( XML_NAMESPACE_DRAW == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_zindex)) )
+ if( IsXMLToken( rLocalName, XML_ZINDEX ) )
{
mnZOrder = rValue.toInt32();
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_id)) )
+ else if( IsXMLToken( rLocalName, XML_ID ) )
{
mnShapeId = rValue.toInt32();
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_name)) )
+ else if( IsXMLToken( rLocalName, XML_NAME ) )
{
maShapeName = rValue;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_style_name)) )
+ else if( IsXMLToken( rLocalName, XML_STYLE_NAME ) )
{
maDrawStyleName = rValue;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_text_style_name)) )
+ else if( IsXMLToken( rLocalName, XML_TEXT_STYLE_NAME ) )
{
maTextStyleName = rValue;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_layer)) )
+ else if( IsXMLToken( rLocalName, XML_LAYER ) )
{
maLayerName = rValue;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_transform)) )
+ else if( IsXMLToken( rLocalName, XML_TRANSFORM ) )
{
mnTransform.SetString(rValue, GetImport().GetMM100UnitConverter());
}
}
else if( XML_NAMESPACE_PRESENTATION == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_user_transformed)) )
+ if( IsXMLToken( rLocalName, XML_USER_TRANSFORMED ) )
{
- mbIsUserTransformed = rValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_true));
+ mbIsUserTransformed = IsXMLToken( rValue, XML_TRUE );
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_placeholder)) )
+ else if( IsXMLToken( rLocalName, XML_PLACEHOLDER ) )
{
- mbIsPlaceholder = rValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_true));
+ mbIsPlaceholder = IsXMLToken( rValue, XML_TRUE );
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_class)) )
+ else if( IsXMLToken( rLocalName, XML_CLASS ) )
{
maPresentationClass = rValue;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_style_name)) )
+ else if( IsXMLToken( rLocalName, XML_STYLE_NAME ) )
{
maDrawStyleName = rValue;
mnStyleFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID;
@@ -748,23 +749,23 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr
}
else if( XML_NAMESPACE_SVG == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_x)) )
+ if( IsXMLToken( rLocalName, XML_X ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maPosition.X, rValue);
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_y)) )
+ else if( IsXMLToken( rLocalName, XML_Y ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maPosition.Y, rValue);
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_width)) )
+ else if( IsXMLToken( rLocalName, XML_WIDTH ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maSize.Width, rValue);
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_height)) )
+ else if( IsXMLToken( rLocalName, XML_HEIGHT ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maSize.Height, rValue);
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_transform)) )
+ else if( IsXMLToken( rLocalName, XML_TRANSFORM ) )
{
// because of #85127# take svg:transform into account and hanle like
// draw:transform for compatibility
@@ -802,7 +803,7 @@ void SdXMLRectShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::O
{
if( XML_NAMESPACE_DRAW == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_corner_radius)) )
+ if( IsXMLToken( rLocalName, XML_CORNER_RADIUS ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnRadius, rValue);
return;
@@ -874,22 +875,22 @@ void SdXMLLineShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::O
{
if( XML_NAMESPACE_SVG == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_x1)) )
+ if( IsXMLToken( rLocalName, XML_X1 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnX1, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_y1)) )
+ if( IsXMLToken( rLocalName, XML_Y1 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnY1, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_x2)) )
+ if( IsXMLToken( rLocalName, XML_X2 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnX2, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_y2)) )
+ if( IsXMLToken( rLocalName, XML_Y2 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnY2, rValue);
return;
@@ -998,27 +999,27 @@ void SdXMLEllipseShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
{
if( XML_NAMESPACE_SVG == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_rx)) )
+ if( IsXMLToken( rLocalName, XML_RX ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnRX, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_ry)) )
+ if( IsXMLToken( rLocalName, XML_RY ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnRY, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_cx)) )
+ if( IsXMLToken( rLocalName, XML_CX ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnCX, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_cy)) )
+ if( IsXMLToken( rLocalName, XML_CY ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnCY, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_r)) )
+ if( IsXMLToken( rLocalName, XML_R ) )
{
// single radius, it's a circle and both radii are the same
GetImport().GetMM100UnitConverter().convertMeasure(mnRX, rValue);
@@ -1028,7 +1029,7 @@ void SdXMLEllipseShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
}
else if( XML_NAMESPACE_DRAW == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_kind)) )
+ if( IsXMLToken( rLocalName, XML_KIND ) )
{
USHORT eKind;
if( SvXMLUnitConverter::convertEnum( eKind, rValue, aXML_CircleKind_EnumMap ) )
@@ -1037,14 +1038,14 @@ void SdXMLEllipseShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
}
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_start_angle)) )
+ if( IsXMLToken( rLocalName, XML_START_ANGLE ) )
{
double dStartAngle;
if( SvXMLUnitConverter::convertDouble( dStartAngle, rValue ) )
mnStartAngle = (sal_Int32)(dStartAngle * 100.0);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_end_angle)) )
+ if( IsXMLToken( rLocalName, XML_END_ANGLE ) )
{
double dEndAngle;
if( SvXMLUnitConverter::convertDouble( dEndAngle, rValue ) )
@@ -1115,7 +1116,7 @@ void SdXMLPolygonShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
{
if( XML_NAMESPACE_SVG == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_viewBox)) )
+ if( IsXMLToken( rLocalName, XML_VIEWBOX ) )
{
maViewBox = rValue;
return;
@@ -1123,7 +1124,7 @@ void SdXMLPolygonShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
}
else if( XML_NAMESPACE_DRAW == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_points)) )
+ if( IsXMLToken( rLocalName, XML_POINTS ) )
{
maPoints = rValue;
return;
@@ -1210,12 +1211,12 @@ void SdXMLPathShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::O
{
if( XML_NAMESPACE_SVG == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_viewBox)) )
+ if( IsXMLToken( rLocalName, XML_VIEWBOX ) )
{
maViewBox = rValue;
return;
}
- else if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_d)) )
+ else if( IsXMLToken( rLocalName, XML_D ) )
{
maD = rValue;
return;
@@ -1339,22 +1340,22 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
if(maPresentationClass.getLength())
{
- if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_subtitle))))
+ if( IsXMLToken( maPresentationClass, XML_PRESENTATION_SUBTITLE ))
{
// XmlShapeTypePresSubtitleShape
pService = "com.sun.star.presentation.SubtitleShape";
}
- else if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_outline))))
+ else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OUTLINE ) )
{
// XmlShapeTypePresOutlinerShape
pService = "com.sun.star.presentation.OutlinerShape";
}
- else if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_notes))))
+ else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_NOTES ) )
{
// XmlShapeTypePresNotesShape
pService = "com.sun.star.presentation.NotesShape";
}
- else // if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_title))))
+ else // IsXMLToken( maPresentationClass, XML_PRESENTATION_TITLE ) )
{
// XmlShapeTypePresTitleTextShape
pService = "com.sun.star.presentation.TitleTextShape";
@@ -1437,7 +1438,7 @@ void SdXMLControlShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
{
if( XML_NAMESPACE_FORM == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_id)) )
+ if( IsXMLToken( rLocalName, XML_ID ) )
{
maFormId = rValue;
return;
@@ -1520,27 +1521,27 @@ void SdXMLConnectorShapeContext::processAttribute( sal_uInt16 nPrefix, const ::r
{
case XML_NAMESPACE_DRAW:
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_start_shape)) )
+ if( IsXMLToken( rLocalName, XML_START_SHAPE ) )
{
mnStartShapeId = rValue.toInt32();
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_start_glue_point)) )
+ if( IsXMLToken( rLocalName, XML_START_GLUE_POINT ) )
{
mnStartGlueId = rValue.toInt32();
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_end_shape)) )
+ if( IsXMLToken( rLocalName, XML_END_SHAPE ) )
{
mnEndShapeId = rValue.toInt32();
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_end_glue_point)) )
+ if( IsXMLToken( rLocalName, XML_END_GLUE_POINT ) )
{
mnEndGlueId = rValue.toInt32();
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_line_skew)) )
+ if( IsXMLToken( rLocalName, XML_LINE_SKEW ) )
{
SvXMLTokenEnumerator aTokenEnum( rValue );
OUString aToken;
@@ -1558,7 +1559,7 @@ void SdXMLConnectorShapeContext::processAttribute( sal_uInt16 nPrefix, const ::r
}
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_type)) )
+ if( IsXMLToken( rLocalName, XML_TYPE ) )
{
SvXMLUnitConverter::convertEnum( mnType, rValue, aXML_ConnectionKind_EnumMap );
return;
@@ -1566,22 +1567,22 @@ void SdXMLConnectorShapeContext::processAttribute( sal_uInt16 nPrefix, const ::r
}
case XML_NAMESPACE_SVG:
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_x1)) )
+ if( IsXMLToken( rLocalName, XML_X1 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maStart.X, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_y1)) )
+ if( IsXMLToken( rLocalName, XML_Y1 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maStart.Y, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_x2)) )
+ if( IsXMLToken( rLocalName, XML_X2 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maEnd.X, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_y2)) )
+ if( IsXMLToken( rLocalName, XML_Y2 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maEnd.Y, rValue);
return;
@@ -1666,22 +1667,22 @@ void SdXMLMeasureShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
{
case XML_NAMESPACE_SVG:
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_x1)) )
+ if( IsXMLToken( rLocalName, XML_X1 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maStart.X, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_y1)) )
+ if( IsXMLToken( rLocalName, XML_Y1 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maStart.Y, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_x2)) )
+ if( IsXMLToken( rLocalName, XML_X2 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maEnd.X, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_y2)) )
+ if( IsXMLToken( rLocalName, XML_Y2 ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maEnd.Y, rValue);
return;
@@ -1777,7 +1778,7 @@ void SdXMLPageShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::O
{
if( XML_NAMESPACE_DRAW == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_page_number)) )
+ if( IsXMLToken( rLocalName, XML_PAGE_NUMBER ) )
{
mnPageNumber = rValue.toInt32();
return;
@@ -1795,7 +1796,7 @@ void SdXMLPageShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
// add, set style and properties from base shape
// #86163# take into account which type of PageShape needs to
- // be constructed. It's an pres shape if presentation:sXML_class == sXML_presentation_page.
+ // be constructed. It's an pres shape if presentation:XML_CLASS == XML_PRESENTATION_PAGE.
sal_Bool bIsPresentation(maPresentationClass.getLength() != 0);
uno::Reference< lang::XServiceInfo > xInfo( mxShapes, uno::UNO_QUERY );
@@ -1808,7 +1809,7 @@ void SdXMLPageShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
else
{
if(bIsPresentation
- && !maPresentationClass.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_presentation_page)))
+ && !IsXMLToken( maPresentationClass, XML_PRESENTATION_PAGE ) )
{
bIsPresentation = FALSE;
}
@@ -1907,17 +1908,17 @@ void SdXMLCaptionShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl
{
if( XML_NAMESPACE_DRAW == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_caption_point_x)) )
+ if( IsXMLToken( rLocalName, XML_CAPTION_POINT_X ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maCaptionPoint.X, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_caption_point_y)) )
+ if( IsXMLToken( rLocalName, XML_CAPTION_POINT_Y ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(maCaptionPoint.Y, rValue);
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_corner_radius)) )
+ if( IsXMLToken( rLocalName, XML_CORNER_RADIUS ) )
{
GetImport().GetMM100UnitConverter().convertMeasure(mnRadius, rValue);
return;
@@ -1949,7 +1950,7 @@ void SdXMLGraphicObjectShapeContext::processAttribute( sal_uInt16 nPrefix, const
{
if( XML_NAMESPACE_XLINK == nPrefix )
{
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_href)) )
+ if( IsXMLToken( rLocalName, XML_HREF ) )
{
maURL = GetImport().GetAbsoluteReference(rValue);
return;
@@ -1966,7 +1967,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
// create graphic object shape
char *pService;
- if(maPresentationClass.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_graphic ) ) )
+ if( IsXMLToken( maPresentationClass, XML_GRAPHIC ) )
{
pService = "com.sun.star.presentation.GraphicObjectShape";
}
@@ -2036,7 +2037,7 @@ SvXMLImportContext* SdXMLGraphicObjectShapeContext::CreateChildContext(
SvXMLImportContext* pContext = NULL;
if ( (XML_NAMESPACE_DRAW == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_image_map, sizeof(sXML_image_map)-1) )
+ IsXMLToken( rLocalName, XML_IMAGE_MAP ) )
{
uno::Reference< beans::XPropertySet > xPropSet(mxShape,uno::UNO_QUERY);
if (xPropSet.is())
@@ -2117,7 +2118,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
uno::Reference< frame::XModel > xChartModel;
if( aAny >>= xChartModel )
{
- mpChartContext = GetImport().GetChartImport()->CreateChartContext( GetImport(), XML_NAMESPACE_SVG, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_chart)), xChartModel, xAttrList );
+ mpChartContext = GetImport().GetChartImport()->CreateChartContext( GetImport(), XML_NAMESPACE_SVG, GetXMLToken(XML_CHART), xChartModel, xAttrList );
}
}
}
@@ -2191,15 +2192,15 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen
sal_Bool bIsPresShape = maPresentationClass.getLength() != 0;
if( bIsPresShape )
{
- if( maPresentationClass.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_presentation_chart)) )
+ if( IsXMLToken( maPresentationClass, XML_PRESENTATION_CHART ) )
{
pService = "com.sun.star.presentation.ChartShape";
}
- else if( maPresentationClass.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_presentation_table)) )
+ else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) )
{
pService = "com.sun.star.presentation.TableShape";
}
- else if( maPresentationClass.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_presentation_object)) )
+ else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) )
{
pService = "com.sun.star.presentation.OLE2Shape";
}
@@ -2260,14 +2261,14 @@ void SdXMLObjectShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl:
switch( nPrefix )
{
case XML_NAMESPACE_DRAW:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_class_id)) )
+ if( IsXMLToken( rLocalName, XML_CLASS_ID ) )
{
maCLSID = rValue;
return;
}
break;
case XML_NAMESPACE_XLINK:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_href)) )
+ if( IsXMLToken( rLocalName, XML_HREF ) )
{
maHref = GetImport().GetAbsoluteReference(rValue);
return;
@@ -2316,24 +2317,24 @@ void SdXMLAppletShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl:
switch( nPrefix )
{
case XML_NAMESPACE_DRAW:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_applet_name)) )
+ if( IsXMLToken( rLocalName, XML_APPLET_NAME ) )
{
maAppletName = rValue;
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_code)) )
+ if( IsXMLToken( rLocalName, XML_CODE ) )
{
maAppletCode = rValue;
return;
}
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_may_script)) )
+ if( IsXMLToken( rLocalName, XML_MAY_SCRIPT ) )
{
- mbIsScript = rValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_true));
+ mbIsScript = IsXMLToken( rValue, XML_TRUE );
return;
}
break;
case XML_NAMESPACE_XLINK:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_href)) )
+ if( IsXMLToken( rLocalName, XML_HREF ) )
{
maHref = GetImport().GetAbsoluteReference(rValue);
return;
@@ -2390,7 +2391,7 @@ SvXMLImportContext * SdXMLAppletShapeContext::CreateChildContext( USHORT nPrefix
{
SvXMLImportContext * pContext = NULL;
- if( nPrefix == XML_NAMESPACE_DRAW && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_param ) ) )
+ if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_PARAM ) )
{
OUString aParamName, aParamValue;
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -2404,11 +2405,11 @@ SvXMLImportContext * SdXMLAppletShapeContext::CreateChildContext( USHORT nPrefix
if( nPrefix == XML_NAMESPACE_DRAW )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_name ) ) )
+ if( IsXMLToken( aLocalName, XML_NAME ) )
{
aParamName = aValue;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_value ) ) )
+ else if( IsXMLToken( aLocalName, XML_VALUE ) )
{
aParamValue = aValue;
}
@@ -2468,14 +2469,14 @@ void SdXMLPluginShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl:
switch( nPrefix )
{
case XML_NAMESPACE_DRAW:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_mime_type)) )
+ if( IsXMLToken( rLocalName, XML_MIME_TYPE ) )
{
maMimeType = rValue;
return;
}
break;
case XML_NAMESPACE_XLINK:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_href)) )
+ if( IsXMLToken( rLocalName, XML_HREF ) )
{
maHref = GetImport().GetAbsoluteReference(rValue);
return;
@@ -2519,7 +2520,7 @@ SvXMLImportContext * SdXMLPluginShapeContext::CreateChildContext( USHORT nPrefix
{
SvXMLImportContext * pContext = NULL;
- if( nPrefix == XML_NAMESPACE_DRAW && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_param ) ) )
+ if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_PARAM ) )
{
OUString aParamName, aParamValue;
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -2533,11 +2534,11 @@ SvXMLImportContext * SdXMLPluginShapeContext::CreateChildContext( USHORT nPrefix
if( nPrefix == XML_NAMESPACE_DRAW )
{
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_name ) ) )
+ if( IsXMLToken( aLocalName, XML_NAME ) )
{
aParamName = aValue;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_value ) ) )
+ else if( IsXMLToken( aLocalName, XML_VALUE ) )
{
aParamValue = aValue;
}
@@ -2618,14 +2619,14 @@ void SdXMLFrameShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::
switch( nPrefix )
{
case XML_NAMESPACE_DRAW:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_frame_name)) )
+ if( IsXMLToken( rLocalName, XML_FRAME_NAME ) )
{
maFrameName = rValue;
return;
}
break;
case XML_NAMESPACE_XLINK:
- if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_href)) )
+ if( IsXMLToken( rLocalName, XML_HREF ) )
{
maHref = GetImport().GetAbsoluteReference(rValue);
return;
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 5da47b17356d..a51586c1e7c8 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpshow.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: cl $ $Date: 2001-05-18 08:39:24 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,7 +86,9 @@
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
@@ -120,6 +122,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::presentation;
+using namespace ::xmloff::token;
///////////////////////////////////////////////////////////////////////
@@ -180,18 +183,18 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
switch( nPrefix )
{
case XML_NAMESPACE_PRESENTATION:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_start_page ) ) )
+ if( IsXMLToken( aLocalName, XML_START_PAGE ) )
{
aAny <<= sValue;
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FirstPage" ) ), aAny );
bAll = sal_False;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_show ) ) )
+ else if( IsXMLToken( aLocalName, XML_SHOW ) )
{
mpImpl->maCustomShowName = sValue;
bAll = sal_False;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_pause ) ) )
+ else if( IsXMLToken( aLocalName, XML_PAUSE ) )
{
DateTime aTime;
if( !SvXMLUnitConverter::convertTime( aTime, sValue ) )
@@ -201,54 +204,54 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
aAny <<= nMS;
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Pause" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_animations ) ) )
+ else if( IsXMLToken( aLocalName, XML_ANIMATIONS ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_enabled ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AllowAnimations" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_stay_on_top ) ) )
+ else if( IsXMLToken( aLocalName, XML_STAY_ON_TOP ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAlwaysOnTop" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_force_manual ) ) )
+ else if( IsXMLToken( aLocalName, XML_FORCE_MANUAL ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAutomatic" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_endless ) ) )
+ else if( IsXMLToken( aLocalName, XML_ENDLESS ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsEndless" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_full_screen ) ) )
+ else if( IsXMLToken( aLocalName, XML_FULL_SCREEN ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFullScreen" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_mouse_visible ) ) )
+ else if( IsXMLToken( aLocalName, XML_MOUSE_VISIBLE ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsMouseVisible" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_start_with_navigator ) ) )
+ else if( IsXMLToken( aLocalName, XML_START_WITH_NAVIGATOR ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "StartWithNavigator" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_mouse_as_pen ) ) )
+ else if( IsXMLToken( aLocalName, XML_MOUSE_AS_PEN ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "UsePen" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_transition_on_click ) ) )
+ else if( IsXMLToken( aLocalName, XML_TRANSITION_ON_CLICK ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_enabled ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTransitionOnClick" ) ), aAny );
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_show_logo ) ) )
+ else if( IsXMLToken( aLocalName, XML_SHOW_LOGO ) )
{
- aAny = bool2any( sValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_true ) ) );
+ aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
mpImpl->mxPresProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsShowLogo" ) ), aAny );
}
}
@@ -272,7 +275,7 @@ SdXMLShowsContext::~SdXMLShowsContext()
SvXMLImportContext * SdXMLShowsContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList )
{
- if( mpImpl && nPrefix == XML_NAMESPACE_PRESENTATION && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_show ) ) )
+ if( mpImpl && nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_SHOW ) )
{
OUString aName;
OUString aPages;
@@ -289,11 +292,11 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( USHORT nPrefix, cons
switch( nPrefix )
{
case XML_NAMESPACE_PRESENTATION:
- if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_name ) ) )
+ if( IsXMLToken( aLocalName, XML_NAME ) )
{
aName = sValue;
}
- else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_pages ) ) )
+ else if( IsXMLToken( rLocalName, XML_PAGES ) )
{
aPages = sValue;
}
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 99b9b9a7d200..e4a9e6911fd4 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpstyl.cxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: cl $ $Date: 2001-06-27 15:06:41 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,8 +73,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -153,6 +153,7 @@ using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax;
+using namespace ::xmloff::token;
//////////////////////////////////////////////////////////////////////////////
@@ -213,7 +214,7 @@ SvXMLImportContext *SdXMLDrawingPagePropertySetContext::CreateChildContext(
OUString aLocalName;
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName(xAttrList->getNameByIndex(i), &aLocalName);
- if( (nPrefix == XML_NAMESPACE_XLINK) && aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_href ) ) )
+ if( (nPrefix == XML_NAMESPACE_XLINK) && IsXMLToken( aLocalName, XML_HREF ) )
{
uno::Any aAny;
aAny <<= GetImport().GetAbsoluteReference( xAttrList->getValueByIndex(i) );
@@ -280,7 +281,7 @@ SvXMLImportContext *SdXMLDrawingPageStyleContext::CreateChildContext(
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.compareToAscii( sXML_properties ) == 0 )
+ IsXMLToken( rLocalName, XML_PROPERTIES ) )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
GetStyles()->GetImportPropertyMapper( GetFamily() );
@@ -362,7 +363,7 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext(
}
case XML_TOK_PAGEMASTERSTYLE_PAGE_ORIENTATION:
{
- if(sValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_portrait))))
+ if( IsXMLToken( sValue, XML_PORTRAIT ) )
meOrientation = view::PaperOrientation_PORTRAIT;
else
meOrientation = view::PaperOrientation_LANDSCAPE;
@@ -435,7 +436,7 @@ SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext(
{
SvXMLImportContext* pContext = 0;
- if(nPrefix == XML_NAMESPACE_STYLE && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_properties))))
+ if(nPrefix == XML_NAMESPACE_STYLE && IsXMLToken( rLocalName, XML_PROPERTIES) )
{
pContext = new SdXMLPageMasterStyleContext(GetSdImport(), nPrefix, rLocalName, xAttrList);
@@ -478,7 +479,7 @@ SdXMLPresentationPageLayoutContext::SdXMLPresentationPageLayoutContext(
OUString aLocalName;
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
- if(nPrefix == XML_NAMESPACE_STYLE && aLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_name))))
+ if(nPrefix == XML_NAMESPACE_STYLE && IsXMLToken( aLocalName, XML_NAME ) )
{
msName = xAttrList->getValueByIndex( i );
}
@@ -496,7 +497,7 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext(
{
SvXMLImportContext* pContext = 0;
- if(nPrefix == XML_NAMESPACE_PRESENTATION && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_placeholder))))
+ if(nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_PLACEHOLDER ) )
{
// presentation:placeholder inside style:presentation-page-layout context
pContext = new SdXMLPresentationPlaceholderContext(
@@ -785,7 +786,7 @@ SdXMLMasterPageContext::SdXMLMasterPageContext(
uno::Reference< drawing::XShapes >& rShapes)
: SdXMLGenericPageContext( rImport, nPrfx, rLName, xAttrList, rShapes )
{
- const sal_Bool bHandoutMaster = rLName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_handout_master));
+ const sal_Bool bHandoutMaster = IsXMLToken( rLName, XML_HANDOUT_MASTER );
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -1512,7 +1513,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext(
SvXMLImportContext* pContext = 0;
if(nPrefix == XML_NAMESPACE_STYLE
- && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_master_page))))
+ && IsXMLToken( rLocalName, XML_MASTER_PAGE ) )
{
// style:masterpage inside office:styles context
uno::Reference< drawing::XDrawPage > xNewMasterPage;
@@ -1550,7 +1551,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext(
}
}
else if(nPrefix == XML_NAMESPACE_STYLE
- && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_handout_master))))
+ && IsXMLToken( rLocalName, XML_HANDOUT_MASTER ) )
{
uno::Reference< presentation::XHandoutMasterSupplier > xHandoutSupp( GetSdImport().GetModel(), uno::UNO_QUERY );
if( xHandoutSupp.is() )
@@ -1564,7 +1565,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext(
}
}
else if( nPrefix == XML_NAMESPACE_DRAW
- && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_layer_set))))
+ && IsXMLToken( rLocalName, XML_LAYER_SET ) )
{
pContext = new SdXMLLayerSetContext( GetImport(), nPrefix, rLocalName, xAttrList );
}
diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx
index ef2f2fb63b65..21e91f902dde 100644
--- a/xmloff/source/forms/controlpropertyhdl.cxx
+++ b/xmloff/source/forms/controlpropertyhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: controlpropertyhdl.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 12:35:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,8 +80,8 @@
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
@@ -200,7 +200,7 @@ namespace xmloff
if (bSuccess = _rUnitConverter.convertEnum(aReturn, nType, OEnumMapper::getEnumMap(OEnumMapper::epFontEmphasis), XML_NONE))
{
aReturn.append( (sal_Unicode)' ' );
- aReturn.appendAscii( (const sal_Char*)(bBelow ? sXML_below : sXML_above) );
+ aReturn.append( GetXMLToken(bBelow ? XML_BELOW : XML_ABOVE) );
_rStrExpValue = aReturn.makeStringAndClear();
}
@@ -224,12 +224,12 @@ namespace xmloff
{
if (!bHasPos)
{
- if (sToken.equalsAsciiL( sXML_above, sizeof(sXML_above)-1))
+ if (IsXMLToken(sToken, XML_ABOVE))
{
bBelow = sal_False;
bHasPos = sal_True;
}
- else if (sToken.equalsAsciiL(sXML_below, sizeof(sXML_below)-1))
+ else if (IsXMLToken(sToken, XML_BELOW))
{
bBelow = sal_True;
bHasPos = sal_True;
@@ -384,6 +384,9 @@ namespace xmloff
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.8 2001/06/15 12:35:28 dvo
+ * #86004# changes sXML_* string to XML_* tokens continued
+ *
* Revision 1.7 2001/06/07 12:27:21 fs
* #86096# handler for FontEmphasis/FontRelief / substituted OEnumInt16Handler by XMLConstantsPropertyHandler
*
diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx
index 1b1bdf71880b..e6b1f1fe5028 100644
--- a/xmloff/source/forms/controlpropertymap.cxx
+++ b/xmloff/source/forms/controlpropertymap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: controlpropertymap.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: fs $ $Date: 2001-06-07 12:28:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,8 +62,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
#include "maptype.hxx"
@@ -79,6 +79,8 @@
#include "strings.hxx"
#endif
+using namespace ::xmloff::token;
+
//.........................................................................
namespace xmloff
{
@@ -86,30 +88,30 @@ namespace xmloff
XMLPropertyMapEntry aControlStyleProperties[] =
{
- { PROPERTY_BACKGROUNDCOLOR, XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_COLOR, 0 },
- { PROPERTY_ALIGN, XML_NAMESPACE_STYLE, sXML_text_align, XML_TYPE_TEXT_ALIGN, 0 },
- { PROPERTY_BORDER, XML_NAMESPACE_FO, sXML_border, XML_TYPE_CONTROL_BORDER, 0 },
- { "FontCharWidth", XML_NAMESPACE_STYLE, sXML_font_char_width, XML_TYPE_NUMBER16, 0 },
- { "FontCharset", XML_NAMESPACE_STYLE, sXML_font_charset, XML_TYPE_TEXT_FONTENCODING, 0 },
- { "FontFamily", XML_NAMESPACE_STYLE, sXML_font_family_generic, XML_TYPE_TEXT_FONTFAMILY, 0 },
- { "FontHeight", XML_NAMESPACE_FO, sXML_font_size, XML_TYPE_CHAR_HEIGHT, 0 },
- { "FontKerning", XML_NAMESPACE_STYLE, sXML_letter_kerning, XML_TYPE_BOOL, 0 },
- { "FontName", XML_NAMESPACE_STYLE, sXML_font_name, XML_TYPE_STRING, 0 },
- { "FontOrientation", XML_NAMESPACE_STYLE, sXML_rotation_angle, XML_TYPE_ROTATION_ANGLE, 0 },
- { "FontPitch", XML_NAMESPACE_STYLE, sXML_font_pitch, XML_TYPE_TEXT_FONTPITCH, 0 },
- { "FontSlant", XML_NAMESPACE_FO, sXML_font_style, XML_TYPE_TEXT_POSTURE, 0 },
- { "FontStrikeout", XML_NAMESPACE_STYLE, sXML_text_crossing_out, XML_TYPE_TEXT_CROSSEDOUT, 0 },
- { "FontStyleName", XML_NAMESPACE_STYLE, sXML_font_style_name, XML_TYPE_STRING, 0 },
- { "FontUnderline", XML_NAMESPACE_STYLE, sXML_text_underline, XML_TYPE_TEXT_UNDERLINE, 0 },
- { "FontWeight", XML_NAMESPACE_FO, sXML_font_weight, XML_TYPE_TEXT_WEIGHT, 0 },
- { "FontWidth", XML_NAMESPACE_STYLE, sXML_font_width, XML_TYPE_FONT_WIDTH, 0 },
- { "FontWordLineMode", XML_NAMESPACE_FO, sXML_score_spaces, XML_TYPE_NBOOL, 0 },
- { "TextColor", XML_NAMESPACE_FO, sXML_color, XML_TYPE_COLOR, 0 },
- { PROPERTY_FORMATKEY, XML_NAMESPACE_STYLE, sXML_data_style_name, XML_TYPE_STRING, 0 },
- { "FontEmphasisMark", XML_NAMESPACE_STYLE, sXML_text_emphasize, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 },
- { "FontRelief", XML_NAMESPACE_STYLE, sXML_font_relief, XML_TYPE_TEXT_FONT_RELIEF|MID_FLAG_MULTI_PROPERTY, 0 },
- { "TextLineColor", XML_NAMESPACE_STYLE, sXML_text_underline_color, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 },
- { 0, 0, 0, 0 }
+ { PROPERTY_BACKGROUNDCOLOR, XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLOR, 0 },
+ { PROPERTY_ALIGN, XML_NAMESPACE_STYLE, XML_TEXT_ALIGN, XML_TYPE_TEXT_ALIGN, 0 },
+ { PROPERTY_BORDER, XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_CONTROL_BORDER, 0 },
+ { "FontCharWidth", XML_NAMESPACE_STYLE, XML_FONT_CHAR_WIDTH, XML_TYPE_NUMBER16, 0 },
+ { "FontCharset", XML_NAMESPACE_STYLE, XML_FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, 0 },
+ { "FontFamily", XML_NAMESPACE_STYLE, XML_FONT_FAMILY_GENERIC, XML_TYPE_TEXT_FONTFAMILY, 0 },
+ { "FontHeight", XML_NAMESPACE_FO, XML_FONT_SIZE, XML_TYPE_CHAR_HEIGHT, 0 },
+ { "FontKerning", XML_NAMESPACE_STYLE, XML_LETTER_KERNING, XML_TYPE_BOOL, 0 },
+ { "FontName", XML_NAMESPACE_STYLE, XML_FONT_NAME, XML_TYPE_STRING, 0 },
+ { "FontOrientation", XML_NAMESPACE_STYLE, XML_ROTATION_ANGLE, XML_TYPE_ROTATION_ANGLE, 0 },
+ { "FontPitch", XML_NAMESPACE_STYLE, XML_FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, 0 },
+ { "FontSlant", XML_NAMESPACE_FO, XML_FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 },
+ { "FontStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_CROSSING_OUT, XML_TYPE_TEXT_CROSSEDOUT, 0 },
+ { "FontStyleName", XML_NAMESPACE_STYLE, XML_FONT_STYLE_NAME, XML_TYPE_STRING, 0 },
+ { "FontUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE, XML_TYPE_TEXT_UNDERLINE, 0 },
+ { "FontWeight", XML_NAMESPACE_FO, XML_FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 },
+ { "FontWidth", XML_NAMESPACE_STYLE, XML_FONT_WIDTH, XML_TYPE_FONT_WIDTH, 0 },
+ { "FontWordLineMode", XML_NAMESPACE_FO, XML_SCORE_SPACES, XML_TYPE_NBOOL, 0 },
+ { "TextColor", XML_NAMESPACE_FO, XML_COLOR, XML_TYPE_COLOR, 0 },
+ { PROPERTY_FORMATKEY, XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, XML_TYPE_STRING, 0 },
+ { "FontEmphasisMark", XML_NAMESPACE_STYLE, XML_TEXT_EMPHASIZE, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 },
+ { "FontRelief", XML_NAMESPACE_STYLE, XML_FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "TextLineColor", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 },
+ { 0, 0, XML_TOKEN_INVALID, 0 }
};
//=====================================================================
@@ -149,6 +151,9 @@ namespace xmloff
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.10 2001/06/07 12:28:30 fs
+ * #86096# FontEmphasisMark/FontRelief/TextLineColor
+ *
* Revision 1.9 2001/05/28 15:01:19 fs
* #86712# added a format key property
*
diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx
index 334a2627002e..992e27b8e1d4 100644
--- a/xmloff/source/forms/formenums.cxx
+++ b/xmloff/source/forms/formenums.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: formenums.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -102,9 +102,6 @@
#ifndef _SV_WINTYPES_HXX
#include <vcl/wintypes.hxx> // for check states
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -326,6 +323,11 @@ namespace xmloff
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.7 2001/06/15 10:37:07 dvo
+ * #86004# #88312#
+ * - changed convertEnum and appropriate maps to use token constants (rahter than sal_Char*)
+ * - user index marks in the process
+ *
* Revision 1.6 2001/06/07 12:25:52 fs
* #86096# enums for FontEmphasis and FontRelief
*
diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx
index d3e12810550e..0f1ba1a65dea 100644
--- a/xmloff/source/forms/officeforms.cxx
+++ b/xmloff/source/forms/officeforms.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: officeforms.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-03-20 13:41:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,8 +65,8 @@
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -96,6 +96,7 @@ namespace xmloff
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::xml;
+ using ::xmloff::token::XML_FORMS;
//=========================================================================
//= OFormsRootImport
@@ -170,7 +171,7 @@ namespace xmloff
{
addModelAttributes(_rExp);
- m_pImplElement = new SvXMLElementExport(_rExp, XML_NAMESPACE_OFFICE, sXML_forms, sal_True, sal_True);
+ m_pImplElement = new SvXMLElementExport(_rExp, XML_NAMESPACE_OFFICE, XML_FORMS, sal_True, sal_True);
}
//---------------------------------------------------------------------
@@ -227,6 +228,9 @@ namespace xmloff
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/03/20 13:41:05 fs
+ * initial checkin - importing/exporting the office:forms element
+ *
*
* Revision 1.0 20.03.01 13:12:35 fs
************************************************************************/
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index e5d57903af0d..d193f27919d2 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MetaExportComponent.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-18 15:08:14 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,12 +103,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLMETAE_HXX
@@ -132,7 +128,7 @@ XMLMetaExportComponent::~XMLMetaExportComponent()
{
}
-sal_uInt32 XMLMetaExportComponent::exportDoc( const sal_Char *pClass )
+sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum eClass )
{
GetDocHandler()->startDocument();
{
@@ -146,11 +142,11 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( const sal_Char *pClass )
GetNamespaceMap().GetAttrNameByIndex( XML_NAMESPACE_OFFICE ),
sCDATA, GetNamespaceMap().GetNameByIndex( XML_NAMESPACE_OFFICE ) );
- SvXMLElementExport aDocElem( *this, XML_NAMESPACE_OFFICE, sXML_document_meta,
+ SvXMLElementExport aDocElem( *this, XML_NAMESPACE_OFFICE, XML_DOCUMENT_META,
sal_True, sal_True );
{
- SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, sXML_meta,
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_META,
sal_True, sal_True );
SfxXMLMetaExport aMeta( GetDocHandler(), GetModel() );
aMeta.Export( GetNamespaceMap() );
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index cc155ebcbb46..9aa9000b4cee 100644
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MetaImportComponent.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: sab $ $Date: 2001-03-16 14:20:06 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,8 +67,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLMETAI_HXX
@@ -76,6 +76,7 @@
#endif
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
class SvXMLMetaDocumentContext : public SvXMLImportContext
{
@@ -111,7 +112,7 @@ SvXMLImportContext *SvXMLMetaDocumentContext::CreateChildContext( USHORT nPrefix
::com::sun::star::xml::sax::XAttributeList>& xAttrList )
{
if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_meta, sizeof(sXML_meta)-1) )
+ IsXMLToken(rLocalName, XML_META) )
{
return new SfxXMLMetaContext(GetImport(), nPrefix, rLocalName, GetImport().GetModel());
}
@@ -143,7 +144,7 @@ SvXMLImportContext* XMLMetaImportComponent::CreateContext(
const uno::Reference<xml::sax::XAttributeList > & xAttrList )
{
if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_document_meta, sizeof(sXML_meta)-1) )
+ IsXMLToken(rLocalName, XML_DOCUMENT_META) )
{
return new SvXMLMetaDocumentContext(*this, nPrefix, rLocalName, xAttrList);
}
diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx
index 9017b813ae9f..b359f8fd8f78 100644
--- a/xmloff/source/meta/xmlmetae.cxx
+++ b/xmloff/source/meta/xmlmetae.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlmetae.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 07:30:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,7 +68,6 @@
#include <unotools/configmgr.hxx>
#include "xmlmetae.hxx"
-#include "xmlkywd.hxx"
#include "attrlist.hxx"
#include "nmspmap.hxx"
#include "rscrev.hxx"
@@ -90,6 +89,7 @@
#endif
using namespace com::sun::star;
+using namespace ::xmloff::token;
//-------------------------------------------------------------------------
@@ -193,8 +193,8 @@ SfxXMLMetaExport::SfxXMLMetaExport(
const uno::Reference<frame::XModel>& rDocModel ) :
xHandler( rHdl ),
pNamespaceMap( NULL ),
- sCDATA( ::rtl::OUString::createFromAscii(sXML_CDATA) ),
- sWS( ::rtl::OUString::createFromAscii(sXML_WS) )
+ sCDATA( GetXMLToken(XML_CDATA) ),
+ sWS( GetXMLToken(XML_WS) )
{
uno::Reference<document::XDocumentInfoSupplier> xSupp( rDocModel, uno::UNO_QUERY );
if ( xSupp.is() )
@@ -234,7 +234,7 @@ SfxXMLMetaExport::~SfxXMLMetaExport()
void SfxXMLMetaExport::SimpleStringElement( const rtl::OUString& rPropertyName,
sal_uInt16 nNamespace,
- const sal_Char* pElementName )
+ enum XMLTokenEnum eElementName )
{
uno::Any aAny = xInfoProp->getPropertyValue( rPropertyName );
rtl::OUString sValue;
@@ -243,7 +243,7 @@ void SfxXMLMetaExport::SimpleStringElement( const rtl::OUString& rPropertyName,
if ( sValue.getLength() )
{
rtl::OUString sElem = pNamespaceMap->GetQNameByKey( nNamespace,
- ::rtl::OUString::createFromAscii(pElementName) );
+ GetXMLToken(eElementName) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->characters( sValue );
@@ -254,7 +254,7 @@ void SfxXMLMetaExport::SimpleStringElement( const rtl::OUString& rPropertyName,
void SfxXMLMetaExport::SimpleDateTimeElement(
const rtl::OUString& rPropertyName, sal_uInt16 nNamespace,
- const sal_Char* pElementName )
+ enum XMLTokenEnum eElementName )
{
uno::Any aAny = xInfoProp->getPropertyValue( rPropertyName );
util::DateTime aDateTime;
@@ -263,7 +263,7 @@ void SfxXMLMetaExport::SimpleDateTimeElement(
rtl::OUString sValue = GetISODateTimeString( aDateTime );
rtl::OUString sElem = pNamespaceMap->GetQNameByKey( nNamespace,
- ::rtl::OUString::createFromAscii(pElementName) );
+ GetXMLToken(eElementName) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->characters( sValue );
@@ -310,7 +310,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
// generator (exported only)
sValue = lcl_GetProductName();
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_generator) );
+ GetXMLToken(XML_GENERATOR) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->characters( sValue );
@@ -327,33 +327,33 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
// document title
SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_TITLE),
- XML_NAMESPACE_DC, sXML_title );
+ XML_NAMESPACE_DC, XML_TITLE );
// description
SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_DESCRIPTION),
- XML_NAMESPACE_DC, sXML_description );
+ XML_NAMESPACE_DC, XML_DESCRIPTION );
// subject
SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_THEME),
- XML_NAMESPACE_DC, sXML_subject );
+ XML_NAMESPACE_DC, XML_SUBJECT );
// created...
SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_AUTHOR),
- XML_NAMESPACE_META, sXML_initial_creator );
+ XML_NAMESPACE_META, XML_INITIAL_CREATOR );
SimpleDateTimeElement( ::rtl::OUString::createFromAscii(PROP_CREATIONDATE),
- XML_NAMESPACE_META, sXML_creation_date );
+ XML_NAMESPACE_META, XML_CREATION_DATE );
// modified...
SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_MODIFIEDBY),
- XML_NAMESPACE_DC, sXML_creator );
+ XML_NAMESPACE_DC, XML_CREATOR );
SimpleDateTimeElement( ::rtl::OUString::createFromAscii(PROP_MODIFYDATE),
- XML_NAMESPACE_DC, sXML_date );
+ XML_NAMESPACE_DC, XML_DATE );
// printed...
SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_PRINTEDBY),
- XML_NAMESPACE_META, sXML_printed_by );
+ XML_NAMESPACE_META, XML_PRINTED_BY );
SimpleDateTimeElement( ::rtl::OUString::createFromAscii(PROP_PRINTDATE),
- XML_NAMESPACE_META, sXML_print_date );
+ XML_NAMESPACE_META, XML_PRINT_DATE );
// keywords
// service DocumentInfo contains keywords in a single string, comma separated.
@@ -364,7 +364,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
if ( sKeywords.getLength() )
{
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_keywords) );
+ GetXMLToken(XML_KEYWORDS) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
sal_Int32 nTokenIndex = 0;
@@ -373,7 +373,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
rtl::OUString sKeyword = sKeywords.getToken( 0, ',', nTokenIndex ).trim();
sSubElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_keyword) );
+ GetXMLToken(XML_KEYWORD) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sSubElem, xAttrList );
xHandler->characters( sKeyword );
@@ -392,7 +392,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
if ( sValue.getLength() )
{
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_DC,
- ::rtl::OUString::createFromAscii(sXML_language) );
+ GetXMLToken(XML_LANGUAGE) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->characters( sValue );
@@ -409,7 +409,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
sValue += aLocale.Country;
}
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_DC,
- ::rtl::OUString::createFromAscii(sXML_language) );
+ GetXMLToken(XML_LANGUAGE) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->characters( sValue );
@@ -425,7 +425,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
sValue = rtl::OUString::valueOf( nCycles );
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_editing_cycles) );
+ GetXMLToken(XML_EDITING_CYCLES) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->characters( sValue );
@@ -443,7 +443,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
sValue = GetISODurationString( aDurTime );
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_editing_duration) );
+ GetXMLToken(XML_EDITING_DURATION) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->characters( sValue );
@@ -458,20 +458,20 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
if ( sDefTarget.getLength() )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE,
- ::rtl::OUString::createFromAscii(sXML_target_frame_name) );
+ GetXMLToken(XML_TARGET_FRAME_NAME) );
pAttrList->AddAttribute( sAttrName, sCDATA, sDefTarget );
//! define strings for xlink:show values
- rtl::OUString sShow = ::rtl::OUString::createFromAscii(
- sDefTarget.compareToAscii( "_blank" ) == 0 ? sXML_new
- : sXML_replace );
+ rtl::OUString sShow = GetXMLToken(
+ sDefTarget.compareToAscii( "_blank" ) == 0 ? XML_NEW
+ : XML_REPLACE );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
- ::rtl::OUString::createFromAscii(sXML_show) );
+ GetXMLToken(XML_SHOW) );
pAttrList->AddAttribute( sAttrName, sCDATA, sShow );
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_hyperlink_behaviour) );
+ GetXMLToken(XML_HYPERLINK_BEHAVIOUR) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
@@ -495,7 +495,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
if ( sReloadURL.getLength() )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
- ::rtl::OUString::createFromAscii(sXML_href) );
+ GetXMLToken(XML_HREF) );
pAttrList->AddAttribute( sAttrName, sCDATA, INetURLObject::AbsToRel( sReloadURL) );
}
@@ -509,12 +509,12 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
rtl::OUString sReloadTime = GetISODurationString( aTime );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_delay) );
+ GetXMLToken(XML_DELAY) );
pAttrList->AddAttribute( sAttrName, sCDATA, sReloadTime );
}
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_auto_reload) );
+ GetXMLToken(XML_AUTO_RELOAD) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
@@ -531,23 +531,23 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
if ( sTplPath.getLength() )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
- ::rtl::OUString::createFromAscii(sXML_type) );
+ GetXMLToken(XML_TYPE) );
pAttrList->AddAttribute( sAttrName, sCDATA,
- ::rtl::OUString::createFromAscii(sXML_simple) );
+ GetXMLToken(XML_SIMPLE) );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
- ::rtl::OUString::createFromAscii(sXML_actuate) );
+ GetXMLToken(XML_ACTUATE) );
pAttrList->AddAttribute( sAttrName, sCDATA,
- ::rtl::OUString::createFromAscii(sXML_onRequest) );
+ GetXMLToken(XML_ONREQUEST) );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
- ::rtl::OUString::createFromAscii(sXML_role) );
+ GetXMLToken(XML_ROLE) );
pAttrList->AddAttribute( sAttrName, sCDATA,
pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE,
- ::rtl::OUString::createFromAscii(sXML_template) ) );
+ GetXMLToken(XML_TEMPLATE) ) );
// template URL
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
- ::rtl::OUString::createFromAscii(sXML_href) );
+ GetXMLToken(XML_HREF) );
pAttrList->AddAttribute( sAttrName, sCDATA, INetURLObject::AbsToRel(sTplPath) );
// template name
@@ -558,7 +558,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
if ( sTplName.getLength() )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
- ::rtl::OUString::createFromAscii(sXML_title) );
+ GetXMLToken(XML_TITLE) );
pAttrList->AddAttribute( sAttrName, sCDATA, sTplName );
}
@@ -571,12 +571,12 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
rtl::OUString sTplDate = GetISODateTimeString( aDateTime );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_date) );
+ GetXMLToken(XML_DATE) );
pAttrList->AddAttribute( sAttrName, sCDATA, sTplDate );
}
sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_template) );
+ GetXMLToken(XML_TEMPLATE) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
@@ -590,9 +590,9 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
if ( nUFCount )
{
sSubElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_user_defined) );
+ GetXMLToken(XML_USER_DEFINED) );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
- ::rtl::OUString::createFromAscii(sXML_name) );
+ GetXMLToken(XML_NAME) );
for (sal_Int16 nUF=0; nUF<nUFCount; nUF++)
{
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 63f867455a93..2eb2a7324cad 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlmetai.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 07:30:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,10 +70,13 @@
#include "xmlmetai.hxx"
#include "xmltkmap.hxx"
#include "xmlnmspe.hxx"
-#include "xmlkywd.hxx"
#include "xmlimp.hxx"
#include "nmspmap.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
using namespace com::sun::star;
using namespace ::xmloff::token;
@@ -533,7 +536,7 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uI
sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
if ( nPrefix == XML_NAMESPACE_OFFICE &&
- aLocalName.compareToAscii(sXML_target_frame_name) == 0 )
+ IsXMLToken(aLocalName, XML_TARGET_FRAME_NAME) )
{
rtl::OUString sValue = xAttrList->getValueByIndex( i );
aPropAny <<= sValue;
@@ -556,7 +559,7 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uI
sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
if ( nPrefix == XML_NAMESPACE_META &&
- aLocalName.compareToAscii(sXML_name) == 0 )
+ IsXMLToken(aLocalName, XML_NAME) )
{
sFieldName = xAttrList->getValueByIndex( i );
}
@@ -579,7 +582,7 @@ SvXMLImportContext* SfxXMLMetaElementContext::CreateChildContext( sal_uInt16 nPr
if ( nElementType == XML_TOK_META_KEYWORDS &&
nPrefix == XML_NAMESPACE_META &&
- rLName.compareToAscii(sXML_keyword) == 0 )
+ IsXMLToken(rLName, XML_KEYWORD) )
{
// <office:keyword> inside of <office:keywords>
pContext = new SfxXMLMetaElementContext( GetImport(), nPrefix, rLName,
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index f517325091b1..f0aa5f9fd295 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLEventExport.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-02-21 20:30:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include "xmlexp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
@@ -104,12 +104,14 @@ using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::document::XEventsSupplier;
using ::com::sun::star::container::XNameReplace;
using ::com::sun::star::container::XNameAccess;
+using ::xmloff::token::GetXMLToken;
+using ::xmloff::token::XML_EVENTS;
XMLEventExport::XMLEventExport(SvXMLExport& rExp,
const XMLEventNameTranslation* pTranslationTable) :
rExport(rExp),
- sEvents(RTL_CONSTASCII_USTRINGPARAM(sXML_events)),
+ sEvents(GetXMLToken(XML_EVENTS)),
sScriptEvents(rExp.GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_OFFICE, sEvents)),
sEventType(RTL_CONSTASCII_USTRINGPARAM("EventType"))
diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx
index 75097a37055e..94f09eb05d77 100644
--- a/xmloff/source/script/XMLEventImportHelper.cxx
+++ b/xmloff/source/script/XMLEventImportHelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLEventImportHelper.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-01-23 13:20:04 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,10 +79,6 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
using ::rtl::OUString;
using ::com::sun::star::xml::sax::XAttributeList;
diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx
index 6fec3421479c..ec824202a602 100644
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLEventsImportContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-01-30 13:09:59 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,11 +87,12 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
using ::rtl::OUString;
using ::com::sun::star::xml::sax::XAttributeList;
@@ -183,13 +184,11 @@ SvXMLImportContext* XMLEventsImportContext::CreateChildContext(
if (XML_NAMESPACE_SCRIPT == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_event_name,
- sizeof(sXML_event_name)-1))
+ if (IsXMLToken(sLocalName, XML_EVENT_NAME))
{
sEventName = xAttrList->getValueByIndex(nAttr);
}
- else if (sLocalName.equalsAsciiL(sXML_language,
- sizeof(sXML_language)-1))
+ else if (IsXMLToken(sLocalName, XML_LANGUAGE))
{
sLanguage = xAttrList->getValueByIndex(nAttr);
}
diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx
index 086dda3ca819..9e731178db93 100644
--- a/xmloff/source/script/XMLStarBasicContextFactory.cxx
+++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLStarBasicContextFactory.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dvo $ $Date: 2000-12-19 18:56:45 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
@@ -94,6 +94,9 @@ using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_LIBRARY;
+using ::xmloff::token::XML_MACRO_NAME;
XMLStarBasicContextFactory::XMLStarBasicContextFactory() :
@@ -129,12 +132,11 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext(
if (XML_NAMESPACE_SCRIPT == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_library, sizeof(sXML_library)-1))
+ if (IsXMLToken(sLocalName, XML_LIBRARY))
{
sLibraryVal = xAttrList->getValueByIndex(nAttr);
}
- else if (sLocalName.equalsAsciiL(sXML_macro_name,
- sizeof(sXML_macro_name)-1))
+ else if (IsXMLToken(sLocalName, XML_MACRO_NAME))
{
sMacroNameVal = xAttrList->getValueByIndex(nAttr);
}
diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx
index 203c2c248c30..f12fb1950163 100644
--- a/xmloff/source/script/XMLStarBasicExportHandler.cxx
+++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLStarBasicExportHandler.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-02-06 11:51:27 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,8 +75,8 @@
#include "xmlexp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
@@ -85,13 +85,14 @@
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
using ::rtl::OUString;
using ::com::sun::star::beans::PropertyValue;
XMLStarBasicExportHandler::XMLStarBasicExportHandler() :
- sStarBasic(RTL_CONSTASCII_USTRINGPARAM(sXML_starbasic)),
+ sStarBasic(GetXMLToken(XML_STARBASIC)),
sLibrary(RTL_CONSTASCII_USTRINGPARAM("Library")),
sMacroName(RTL_CONSTASCII_USTRINGPARAM("MacroName"))
{
@@ -107,8 +108,8 @@ void XMLStarBasicExportHandler::Export(
Sequence<PropertyValue> & rValues,
sal_Bool bUseWhitespace)
{
- rExport.AddAttribute(XML_NAMESPACE_SCRIPT, sXML_language, sStarBasic);
- rExport.AddAttribute(XML_NAMESPACE_SCRIPT, sXML_event_name, rEventName);
+ rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_LANGUAGE, sStarBasic);
+ rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, rEventName);
sal_Int32 nCount = rValues.getLength();
for(sal_Int32 i = 0; i < nCount; i++)
@@ -117,17 +118,17 @@ void XMLStarBasicExportHandler::Export(
{
OUString sTmp;
rValues[i].Value >>= sTmp;
- rExport.AddAttribute(XML_NAMESPACE_SCRIPT, sXML_library, sTmp);
+ rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_LIBRARY, sTmp);
}
else if (sMacroName.equals(rValues[i].Name))
{
OUString sTmp;
rValues[i].Value >>= sTmp;
- rExport.AddAttribute(XML_NAMESPACE_SCRIPT, sXML_macro_name, sTmp);
+ rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_MACRO_NAME, sTmp);
}
// else: disregard
}
- SvXMLElementExport aEventElemt(rExport, XML_NAMESPACE_SCRIPT, sXML_event,
+ SvXMLElementExport aEventElemt(rExport, XML_NAMESPACE_SCRIPT, XML_EVENT,
bUseWhitespace, sal_False);
}
diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx
index 5966e410dca2..ca1f10e9d8e3 100644
--- a/xmloff/source/script/xmlscripti.cxx
+++ b/xmloff/source/script/xmlscripti.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlscripti.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 07:32:06 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,7 +65,7 @@
#include "xmlscripti.hxx"
#include "xmlnmspe.hxx"
-#include "xmlkywd.hxx"
+#include "xmltoken.hxx"
#include "xmlimp.hxx"
#include "nmspmap.hxx"
#include "XMLEventsImportContext.hxx"
@@ -83,6 +83,7 @@ using namespace com::sun::star::frame;
using namespace com::sun::star::script;
using namespace com::sun::star::document;
using namespace com::sun::star::xml::sax;
+using namespace ::xmloff::token;
//-------------------------------------------------------------------------
@@ -165,9 +166,9 @@ XMLScriptElementContext::XMLScriptElementContext( SvXMLImport& rImport, sal_uInt
sal_Bool bEmbedded = sal_False;
sal_Bool bLinked = sal_False;
- if( msLName.equalsAsciiL( sXML_library_embedded, sizeof(sXML_library_embedded)-1 ) )
+ if( IsXMLToken( msLName, XML_LIBRARY_EMBEDDED ) )
bEmbedded = sal_True;
- else if( msLName.equalsAsciiL( sXML_library_linked, sizeof(sXML_library_linked)-1 ) )
+ else if( IsXMLToken( msLName, XML_LIBRARY_LINKED ) )
bLinked = sal_True;
if( bEmbedded || bLinked )
@@ -182,22 +183,21 @@ XMLScriptElementContext::XMLScriptElementContext( SvXMLImport& rImport, sal_uInt
&sAttrName );
if( (XML_NAMESPACE_SCRIPT == nAttrPrefix) &&
- sAttrName.equalsAsciiL( sXML_name, sizeof(sXML_name)-1 ) )
+ IsXMLToken( sAttrName, XML_NAME ) )
{
msLibName = xAttrList->getValueByIndex( i );
}
else if( (XML_NAMESPACE_SCRIPT == nAttrPrefix) &&
- sAttrName.equalsAsciiL( sXML_password,
- sizeof(sXML_password)-1 ) )
+ IsXMLToken( sAttrName, XML_PASSWORD ) )
{
sPassword = xAttrList->getValueByIndex( i );
}
else if( (XML_NAMESPACE_XLINK == nAttrPrefix) && bLinked &&
- sAttrName.equalsAsciiL( sXML_href, sizeof(sXML_href)-1 ) )
+ IsXMLToken( sAttrName, XML_HREF ) )
{
sLinkTargetURL = GetImport().GetAbsoluteReference(xAttrList->getValueByIndex( i ));
}
- //else if( msLName.equalsAsciiL( sXML_external_source_url, sizeof(sXML_external_source_url)-1 ) )
+ //else if( IsXMLToken(msLName, XML_EXTERNAL_SOURCE_URL) )
//{
//sLinkTargetURL = xAttrList->getValueByIndex( i );
//}
@@ -222,14 +222,14 @@ SvXMLImportContext* XMLScriptElementContext::CreateChildContext( sal_uInt16 nPre
if ( XML_NAMESPACE_SCRIPT == nPrefix)
{
- if( msLName.equalsAsciiL( sXML_library_embedded, sizeof(sXML_library_embedded)-1 ) )
+ if( IsXMLToken( msLName, XML_LIBRARY_EMBEDDED ) )
{
- if( rLName.equalsAsciiL( sXML_module, sizeof(sXML_module)-1 ) )
+ if( IsXMLToken( rLName, XML_MODULE ) )
{
pContext = new XMLScriptModuleContext( GetImport(), nPrefix,
rLName, msLibName, xAttrList, *this, mxBasicAccess );
}
- //else if( rLName.equalsAsciiL( sXML_dialog, sizeof(sXML_dilaog)-1 ) )
+ //else if( IsXMLToken( rLName, XML_DIALOG ) )
//{
//pContext = new XMLScriptDialogContext( GetImport(),
//nPrefix, rLName, xAttrList, *this, mxBasicAccess );
@@ -279,13 +279,12 @@ XMLScriptModuleContext::XMLScriptModuleContext( SvXMLImport& rImport, sal_uInt16
&sAttrName );
if( (XML_NAMESPACE_SCRIPT == nAttrPrefix) &&
- sAttrName.equalsAsciiL( sXML_name, sizeof(sXML_name)-1 ) )
+ IsXMLToken( sAttrName, XML_NAME ) )
{
msModuleName = xAttrList->getValueByIndex( i );
}
else if( (XML_NAMESPACE_SCRIPT == nAttrPrefix) &&
- sAttrName.equalsAsciiL( sXML_language,
- sizeof(sXML_language)-1 ) )
+ IsXMLToken( sAttrName, XML_LANGUAGE ) )
{
msLanguage = xAttrList->getValueByIndex( i );
}
@@ -343,10 +342,8 @@ SvXMLImportContext* XMLScriptContext::CreateChildContext( sal_uInt16 nPrefix,
if (XML_NAMESPACE_SCRIPT == nPrefix)
{
- if( rLName.equalsAsciiL( sXML_library_embedded,
- sizeof(sXML_library_embedded)-1 ) ||
- rLName.equalsAsciiL( sXML_library_linked,
- sizeof(sXML_library_linked)-1 ) )
+ if( IsXMLToken( rLName, XML_LIBRARY_EMBEDDED ) ||
+ IsXMLToken( rLName, XML_LIBRARY_LINKED ) )
{
pContext = new XMLScriptElementContext(
GetImport(), nPrefix, rLName, xAttrList, *this, mxBasicAccess);
@@ -354,7 +351,7 @@ SvXMLImportContext* XMLScriptContext::CreateChildContext( sal_uInt16 nPrefix,
}
else if (XML_NAMESPACE_OFFICE == nPrefix)
{
- if ( rLName.equalsAsciiL(sXML_events, sizeof(sXML_events)-1) )
+ if ( IsXMLToken( rLName, XML_EVENTS ) )
{
Reference<XEventsSupplier> xSupplier(GetImport().GetModel(),
UNO_QUERY);
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx
index 8727942f692e..04bfa8ea0de3 100644
--- a/xmloff/source/style/DashStyle.cxx
+++ b/xmloff/source/style/DashStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DashStyle.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:29 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,10 +87,6 @@
#include"xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -161,10 +157,10 @@ XMLDashStyle::~XMLDashStyle()
{
}
-void XMLDashStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+void XMLDashStyle::AddAttribute( sal_uInt16 nPrefix, enum XMLTokenEnum eName, const OUString& rStrValue )
{
- const OUString aStrName( OUString::createFromAscii( pName ) );
- const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+ const OUString aStrName( GetXMLToken( eName ) );
+ const OUString aStrCDATA( GetXMLToken( XML_CDATA ) );
mpAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
}
@@ -200,18 +196,18 @@ sal_Bool XMLDashStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::c
OUStringBuffer aOut;
// Name
- AddAttribute( XML_NAMESPACE_DRAW, sXML_name, rStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName );
// Style
rUnitConverter.convertEnum( aOut, aLineDash.Style, pXML_DashStyle_Enum );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue );
// dots
if( aLineDash.Dots )
{
- AddAttribute( XML_NAMESPACE_DRAW, sXML_dots1, OUString::valueOf( (sal_Int32)aLineDash.Dots ) );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS1, OUString::valueOf( (sal_Int32)aLineDash.Dots ) );
if( aLineDash.DotLen )
{
@@ -225,14 +221,14 @@ sal_Bool XMLDashStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::c
rUnitConverter.convertMeasure( aOut, aLineDash.DotLen );
}
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_dots1_length, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS1_LENGTH, aStrValue );
}
}
// dashes
if( aLineDash.Dashes )
{
- AddAttribute( XML_NAMESPACE_DRAW, sXML_dots2, OUString::valueOf( (sal_Int32)aLineDash.Dashes ) );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS2, OUString::valueOf( (sal_Int32)aLineDash.Dashes ) );
if( aLineDash.DashLen )
{
@@ -246,7 +242,7 @@ sal_Bool XMLDashStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::c
rUnitConverter.convertMeasure( aOut, aLineDash.DashLen );
}
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_dots2_length, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS2_LENGTH, aStrValue );
}
}
@@ -260,14 +256,14 @@ sal_Bool XMLDashStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::c
rUnitConverter.convertMeasure( aOut, aLineDash.Distance );
}
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_distance, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_DISTANCE, aStrValue );
// Do Write
- OUString sWS( RTL_CONSTASCII_USTRINGPARAM( sXML_WS ) );
+ OUString sWS( GetXMLToken( XML_WS ) );
rHandler->ignorableWhitespace( sWS );
OUString sElem = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW,
- OUString::createFromAscii(sXML_stroke_dash) );
+ GetXMLToken(XML_STROKE_DASH) );
rHandler->startElement( sElem, xAttrList );
rHandler->endElement( sElem );
diff --git a/xmloff/source/style/DrawAspectHdl.cxx b/xmloff/source/style/DrawAspectHdl.cxx
index 6b8cd5109d68..7b4d6d399730 100644
--- a/xmloff/source/style/DrawAspectHdl.cxx
+++ b/xmloff/source/style/DrawAspectHdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DrawAspectHdl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mib $ $Date: 2001-06-29 08:13:00 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,8 +71,8 @@
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include <xmlkywd.hxx>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
#endif
#ifndef _XMLOFF_DRAWASPECTHDL_HXX
@@ -131,27 +131,27 @@ sal_Bool DrawAspectHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValu
if( rValue >>= nAspect )
{
if( (nAspect & 1) != 0 )
- aOut.appendAscii( sXML_content );
+ aOut.append( GetXMLToken(XML_CONTENT) );
if( (nAspect & 2) != 0 )
{
if( aOut.getLength() )
aOut.append( sal_Unicode(' ') );
- aOut.appendAscii( sXML_thumbnail );
+ aOut.append( GetXMLToken(XML_THUMBNAIL) );
}
if( (nAspect & 4) != 0 )
{
if( aOut.getLength() )
aOut.append( sal_Unicode(' ') );
- aOut.appendAscii( sXML_icon );
+ aOut.append( GetXMLToken(XML_ICON) );
}
if( (nAspect & 8) != 0 )
{
if( aOut.getLength() )
aOut.append( sal_Unicode(' ') );
- aOut.appendAscii( sXML_print );
+ aOut.append( GetXMLToken(XML_PRINT) );
}
rStrExpValue = aOut.makeStringAndClear();
diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx
index 039ab1cd88ff..02b80acbaa0c 100644
--- a/xmloff/source/style/FillStyleContext.cxx
+++ b/xmloff/source/style/FillStyleContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FillStyleContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: cl $ $Date: 2000-12-20 16:34:16 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -102,10 +102,6 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
using namespace ::com::sun::star;
using namespace ::rtl;
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index e4f0156b8c44..bb11f8cfd40d 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: GradientStyle.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,16 +83,16 @@
#include"xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _RTL_USTRBUF_HXX_
-#include<rtl/ustrbuf.hxx>
+#include <rtl/ustrbuf.hxx>
#endif
#ifndef _RTL_USTRING_
-#include<rtl/ustring>
+#include <rtl/ustring>
#endif
#ifndef _TOOLS_DEBUG_HXX
@@ -161,10 +161,10 @@ XMLGradientStyle::~XMLGradientStyle()
{
}
-void XMLGradientStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+void XMLGradientStyle::AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const OUString& rStrValue )
{
- const OUString aStrName( OUString::createFromAscii( pName ) );
- const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+ const OUString aStrName( GetXMLToken( eName ) );
+ const OUString aStrCDATA( GetXMLToken( XML_CDATA ) );
mpAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
}
@@ -198,13 +198,13 @@ sal_Bool XMLGradientStyle::ImpExportXML( const ::com::sun::star::uno::Reference<
// Name
OUString aStrName( rStrName );
- AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aStrName );
// Style
if( !rUnitConverter.convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) )
return sal_False;
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue );
// Center x/y
if( aGradient.Style != awt::GradientStyle_LINEAR &&
@@ -212,11 +212,11 @@ sal_Bool XMLGradientStyle::ImpExportXML( const ::com::sun::star::uno::Reference<
{
rUnitConverter.convertPercent( aOut, aGradient.XOffset );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_cx, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_CX, aStrValue );
rUnitConverter.convertPercent( aOut, aGradient.YOffset );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_cy, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_CY, aStrValue );
}
Color aColor;
@@ -225,44 +225,44 @@ sal_Bool XMLGradientStyle::ImpExportXML( const ::com::sun::star::uno::Reference<
aColor.SetColor( aGradient.StartColor );
rUnitConverter.convertColor( aOut, aColor );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_start_color, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_START_COLOR, aStrValue );
// Color end
aColor.SetColor( aGradient.EndColor );
rUnitConverter.convertColor( aOut, aColor );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_end_color, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_END_COLOR, aStrValue );
// Intensity start
rUnitConverter.convertPercent( aOut, aGradient.StartIntensity );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_start_intensity, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_START_INTENSITY, aStrValue );
// Intensity end
rUnitConverter.convertPercent( aOut, aGradient.EndIntensity );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_end_intensity, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_END_INTENSITY, aStrValue );
// Angle
if( aGradient.Style != awt::GradientStyle_RADIAL )
{
rUnitConverter.convertNumber( aOut, sal_Int32( aGradient.Angle ) );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_angle, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_GRADIENT_ANGLE, aStrValue );
}
// Border
rUnitConverter.convertPercent( aOut, aGradient.Border );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_border, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_GRADIENT_BORDER, aStrValue );
// Do Write
- OUString sWS( RTL_CONSTASCII_USTRINGPARAM( sXML_WS ) );
+ OUString sWS( GetXMLToken( XML_WS ) );
rHandler->ignorableWhitespace( sWS );
- OUString aStrTmp( RTL_CONSTASCII_USTRINGPARAM( sXML_gradient ) );
+ OUString aStrTmp( GetXMLToken( XML_GRADIENT ) );
rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, aStrTmp ),
xAttrList );
- rHandler->endElement( OUString::createFromAscii( sXML_gradient ) );
+ rHandler->endElement( GetXMLToken( XML_GRADIENT ) );
rHandler->ignorableWhitespace( sWS );
}
}
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index 635493fe3a55..f65a4bf34eca 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: HatchStyle.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include"xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _RTL_USTRBUF_HXX_
@@ -148,10 +148,10 @@ XMLHatchStyle::~XMLHatchStyle()
{
}
-void XMLHatchStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue )
+void XMLHatchStyle::AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const ::rtl::OUString& rStrValue )
{
- const ::rtl::OUString aStrName( ::rtl::OUString::createFromAscii( pName ) );
- const ::rtl::OUString aStrCDATA( ::rtl::OUString::createFromAscii( sXML_CDATA ) );
+ const ::rtl::OUString aStrName( GetXMLToken( eName ) );
+ const ::rtl::OUString aStrCDATA( GetXMLToken( XML_CDATA ) );
pAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
}
@@ -185,35 +185,35 @@ sal_Bool XMLHatchStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::
::rtl::OUStringBuffer aOut;
// Name
- AddAttribute( XML_NAMESPACE_DRAW, sXML_name, rStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName );
// Style
if( !rUnitConverter.convertEnum( aOut, aHatch.Style, pXML_HatchStyle_Enum ) )
return sal_False;
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue );
// Color
rUnitConverter.convertColor( aOut, Color( aHatch.Color ) );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_color, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_COLOR, aStrValue );
// Distance
rUnitConverter.convertMeasure( aOut, aHatch.Distance );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_hatch_distance, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_HATCH_DISTANCE, aStrValue );
// Angle
rUnitConverter.convertNumber( aOut, sal_Int32( aHatch.Angle ) );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_rotation, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_ROTATION, aStrValue );
// Do Write
- OUString sWS( RTL_CONSTASCII_USTRINGPARAM( sXML_WS ) );
+ OUString sWS( GetXMLToken( XML_WS ) );
rHandler->ignorableWhitespace( sWS );
- rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, ::rtl::OUString::createFromAscii(sXML_hatch) ),
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, GetXMLToken(XML_HATCH) ),
xAttrList );
- rHandler->endElement( ::rtl::OUString::createFromAscii( sXML_gradient ) );
+ rHandler->endElement( GetXMLToken( XML_GRADIENT ) );
rHandler->ignorableWhitespace( sWS );
}
}
diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx
index da3f8b741f87..699f1d96fffb 100644
--- a/xmloff/source/style/ImageStyle.cxx
+++ b/xmloff/source/style/ImageStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ImageStyle.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include"xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLEXP_HXX
@@ -96,11 +96,11 @@
#endif
#ifndef _RTL_USTRBUF_HXX_
-#include<rtl/ustrbuf.hxx>
+#include <rtl/ustrbuf.hxx>
#endif
#ifndef _RTL_USTRING_
-#include<rtl/ustring>
+#include <rtl/ustring>
#endif
#ifndef _TOOLS_DEBUG_HXX
@@ -171,13 +171,13 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any&
OUStringBuffer aOut;
// Name
- rExport.AddAttribute( XML_NAMESPACE_DRAW, sXML_name, rStrName );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName );
// uri
- rExport.AddAttribute( XML_NAMESPACE_XLINK, sXML_href, rExport.AddEmbeddedGraphicObject( aURL ) );
- rExport.AddAttribute( XML_NAMESPACE_XLINK, sXML_type, OUString::createFromAscii(sXML_simple) );
- rExport.AddAttribute( XML_NAMESPACE_XLINK, sXML_show, OUString::createFromAscii(sXML_embed) );
- rExport.AddAttribute( XML_NAMESPACE_XLINK, sXML_actuate, OUString::createFromAscii(sXML_onLoad) );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, rExport.AddEmbeddedGraphicObject( aURL ) );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
/*
// size
@@ -185,14 +185,14 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any&
rUnitConverter.convertNumber( aOut, aSize.Width );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_SVG, sXML_width, aStrValue );
+ AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, aStrValue );
rUnitConverter.convertNumber( aOut, aSize.Height );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_SVG, sXML_height, aStrValue );
+ AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, aStrValue );
*/
// Do Write
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, sXML_fill_image, sal_True, sal_True );
+ SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_FILL_IMAGE, sal_True, sal_True );
}
}
diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx
index 54cf7a250fa2..726e6b968e02 100644
--- a/xmloff/source/style/MarkerStyle.cxx
+++ b/xmloff/source/style/MarkerStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MarkerStyle.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: aw $ $Date: 2001-03-08 17:41:23 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,7 +68,7 @@
#endif
#ifndef _XMLOFF_ATTRLIST_HXX
-#include"attrlist.hxx"
+#include "attrlist.hxx"
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
@@ -76,23 +76,23 @@
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
-#include"xmluconv.hxx"
+#include "xmluconv.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
-#include"xmlnmspe.hxx"
+#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _RTL_USTRBUF_HXX_
-#include<rtl/ustrbuf.hxx>
+#include <rtl/ustrbuf.hxx>
#endif
#ifndef _RTL_USTRING_
-#include<rtl/ustring>
+#include <rtl/ustring>
#endif
#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONBEZIERCOORDS_HPP_
@@ -101,6 +101,7 @@
using namespace ::com::sun::star;
using namespace ::rtl;
+using namespace ::xmloff::token;
XMLMarkerStyle::XMLMarkerStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter )
@@ -115,10 +116,10 @@ XMLMarkerStyle::~XMLMarkerStyle()
{
}
-void XMLMarkerStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+void XMLMarkerStyle::AddAttribute( sal_uInt16 nPrefix, enum XMLTokenEnum eName, const OUString& rStrValue )
{
- const OUString aStrName( OUString::createFromAscii( pName ) );
- const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+ const OUString aStrName( GetXMLToken( eName ) );
+ const OUString aStrCDATA( GetXMLToken( XML_CDATA ) );
pAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
}
@@ -153,7 +154,7 @@ sal_Bool XMLMarkerStyle::ImpExportXML( const uno::Reference< xml::sax::XDocument
/////////////////
// Name
OUString aStrName( rStrName );
- AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aStrName );
/////////////////
// Viewbox (viewBox="0 0 1500 1000")
@@ -205,7 +206,7 @@ sal_Bool XMLMarkerStyle::ImpExportXML( const uno::Reference< xml::sax::XDocument
sal_Int32 nDifY(nMaxY - nMinY);
SdXMLImExViewBox aViewBox( 0, 0, nDifX, nDifY );
- AddAttribute( XML_NAMESPACE_SVG, sXML_viewBox, aViewBox.GetExportString( rUnitConverter ) );
+ AddAttribute( XML_NAMESPACE_SVG, XML_VIEWBOX, aViewBox.GetExportString( rUnitConverter ) );
/////////////////
// Pathdata
@@ -225,16 +226,16 @@ sal_Bool XMLMarkerStyle::ImpExportXML( const uno::Reference< xml::sax::XDocument
}
// write point array
- AddAttribute(XML_NAMESPACE_SVG, sXML_d, aSvgDElement.GetExportString());
+ AddAttribute(XML_NAMESPACE_SVG, XML_D, aSvgDElement.GetExportString());
/////////////////
// Do Write
- OUString sWS( RTL_CONSTASCII_USTRINGPARAM( sXML_WS ) );
+ OUString sWS( GetXMLToken( XML_WS ) );
- OUString aStrTmp( RTL_CONSTASCII_USTRINGPARAM( sXML_marker ) );
+ OUString aStrTmp( GetXMLToken( XML_MARKER ) );
rHandler->ignorableWhitespace( sWS );
rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, aStrTmp ), xAttrList );
- rHandler->endElement( OUString::createFromAscii( sXML_marker ) );
+ rHandler->endElement( GetXMLToken( XML_MARKER ) );
rHandler->ignorableWhitespace( sWS );
}
}
@@ -260,17 +261,17 @@ sal_Bool XMLMarkerStyle::ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
mrNamespaceMap.GetKeyByAttrName( aStrFullAttrName, &aStrAttrName );
OUString aStrValue = xAttrList->getValueByIndex( i );
- if( aStrAttrName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_name ) ) == 0 )
+ if( IsXMLToken( aStrAttrName, XML_NAME ) )
{
rStrName = aStrValue;
}
- else if( aStrAttrName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_viewBox ) ) == 0 )
+ else if( IsXMLToken( aStrAttrName, XML_VIEWBOX ) )
{
pViewBox = new SdXMLImExViewBox( aStrValue, rUnitConverter );
bHasViewBox = sal_True;
}
- else if( bHasViewBox && aStrAttrName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_d ) ) == 0 )
+ else if( bHasViewBox && IsXMLToken( aStrAttrName, XML_D ) )
{
SdXMLImExSvgDElement aPoints(aStrValue, *pViewBox, awt::Point( 0, 0 ),
awt::Size( pViewBox->GetWidth(), pViewBox->GetHeight() ),
diff --git a/xmloff/source/style/PageHeaderFooterContext.cxx b/xmloff/source/style/PageHeaderFooterContext.cxx
index ee34d78861a7..881ed51020d9 100644
--- a/xmloff/source/style/PageHeaderFooterContext.cxx
+++ b/xmloff/source/style/PageHeaderFooterContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PageHeaderFooterContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: sab $ $Date: 2001-03-16 14:20:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,14 +73,16 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_PAGEPROPERTYSETCONTEXT_HXX
#include "PagePropertySetContext.hxx"
#endif
using namespace com::sun::star;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_PROPERTIES;
//------------------------------------------------------------------
@@ -113,8 +115,7 @@ SvXMLImportContext *PageHeaderFooterContext::CreateChildContext( USHORT nPrefix,
{
SvXMLImportContext *pContext = 0;
- if( XML_NAMESPACE_STYLE == nPrefix &&
- rLName.compareToAscii( sXML_properties ) == 0 )
+ if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLName, XML_PROPERTIES ) )
{
PageContextType aType = Header;
if (!bHeader)
diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx
index 7fe7fbb07622..66f3143741b6 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PageMasterImportContext.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: th $ $Date: 2001-05-11 10:50:21 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,8 +68,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_PAGEMASTERPROPHDL_HXX_
#include "PageMasterPropHdl.hxx"
@@ -91,13 +91,14 @@
#endif
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
void PageStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
const rtl::OUString& rLocalName,
const rtl::OUString& rValue )
{
// TODO: use a map here
- if( XML_NAMESPACE_STYLE == nPrefixKey && rLocalName.compareToAscii( sXML_page_usage ) == 0 )
+ if( XML_NAMESPACE_STYLE == nPrefixKey && IsXMLToken( rLocalName, XML_PAGE_USAGE ) )
{
sPageUsage = rValue;
}
@@ -130,10 +131,10 @@ SvXMLImportContext *PageStyleContext::CreateChildContext(
SvXMLImportContext *pContext = NULL;
if( XML_NAMESPACE_STYLE == nPrefix &&
- ((rLocalName.compareToAscii( sXML_header_style ) == 0) ||
- (rLocalName.compareToAscii( sXML_footer_style ) == 0) ) )
+ ((IsXMLToken(rLocalName, XML_HEADER_STYLE )) ||
+ (IsXMLToken(rLocalName, XML_FOOTER_STYLE )) ) )
{
- sal_Bool bHeader = (rLocalName.compareToAscii(sXML_header_style) == 0);
+ sal_Bool bHeader = IsXMLToken(rLocalName, XML_HEADER_STYLE);
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
GetStyles()->GetImportPropertyMapper( GetFamily() );
if( xImpPrMap.is() )
@@ -173,7 +174,7 @@ SvXMLImportContext *PageStyleContext::CreateChildContext(
}
}
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.compareToAscii( sXML_properties ) == 0 )
+ IsXMLToken(rLocalName, XML_PROPERTIES) )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
GetStyles()->GetImportPropertyMapper( GetFamily() );
diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx
index 516f2281ca04..ad9300633dff 100644
--- a/xmloff/source/style/PageMasterPropHdl.cxx
+++ b/xmloff/source/style/PageMasterPropHdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PageMasterPropHdl.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: mib $ $Date: 2001-06-29 11:18:45 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include "PageMasterPropHdl.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
@@ -99,6 +99,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::style;
using namespace ::comphelper;
+using namespace ::xmloff::token;
//______________________________________________________________________________
@@ -126,13 +127,13 @@ sal_Bool XMLPMPropHdl_PageStyleLayout::importXML(
{
sal_Bool bRet = sal_True;
- if( rStrImpValue.compareToAscii( sXML_all ) == 0 )
+ if( IsXMLToken( rStrImpValue, XML_ALL ) )
rValue <<= PageStyleLayout_ALL;
- else if( rStrImpValue.compareToAscii( sXML_left ) == 0 )
+ else if( IsXMLToken( rStrImpValue, XML_LEFT ) )
rValue <<= PageStyleLayout_LEFT;
- else if( rStrImpValue.compareToAscii( sXML_right ) == 0 )
+ else if( IsXMLToken( rStrImpValue, XML_RIGHT ) )
rValue <<= PageStyleLayout_RIGHT;
- else if( rStrImpValue.compareToAscii( sXML_mirrored ) == 0 )
+ else if( IsXMLToken( rStrImpValue, XML_MIRRORED ) )
rValue <<= PageStyleLayout_MIRRORED;
else
bRet = sal_False;
@@ -154,16 +155,16 @@ sal_Bool XMLPMPropHdl_PageStyleLayout::exportXML(
switch( eLayout )
{
case PageStyleLayout_ALL:
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_all ) );
+ rStrExpValue = GetXMLToken( XML_ALL );
break;
case PageStyleLayout_LEFT:
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_left ) );
+ rStrExpValue = GetXMLToken( XML_LEFT );
break;
case PageStyleLayout_RIGHT:
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_right ) );
+ rStrExpValue = GetXMLToken( XML_RIGHT );
break;
case PageStyleLayout_MIRRORED:
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_mirrored ) );
+ rStrExpValue = GetXMLToken( XML_MIRRORED );
break;
default:
bRet = sal_False;
@@ -248,8 +249,7 @@ sal_Bool XMLPMPropHdl_NumLetterSync::importXML(
sal_Int16 nNumType;
sal_Int16 nSync = NumberingType::NUMBER_NONE;
rUnitConverter.convertNumFormat( nSync, rStrImpValue,
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_a ) ),
- sal_True );
+ GetXMLToken( XML_A ), sal_True );
if( !(rValue >>= nNumType) )
nNumType = NumberingType::NUMBER_NONE;
@@ -304,7 +304,7 @@ sal_Bool XMLPMPropHdl_PaperTrayNumber::importXML(
{
sal_Bool bRet = sal_False;
- if( rStrImpValue.compareToAscii( sXML_default ) == 0 )
+ if( IsXMLToken( rStrImpValue, XML_DEFAULT ) )
{
rValue <<= DEFAULT_PAPERTRAY;
bRet = sal_True;
@@ -333,7 +333,7 @@ sal_Bool XMLPMPropHdl_PaperTrayNumber::exportXML(
if( rValue >>= nPaperTray )
{
if( nPaperTray == DEFAULT_PAPERTRAY )
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_default ) );
+ rStrExpValue = GetXMLToken( XML_DEFAULT );
else
{
OUStringBuffer aBuffer;
@@ -349,8 +349,8 @@ sal_Bool XMLPMPropHdl_PaperTrayNumber::exportXML(
//______________________________________________________________________________
// property handler for style:print
-XMLPMPropHdl_Print::XMLPMPropHdl_Print( const sal_Char* sValue ) :
- sAttrValue( OUString::createFromAscii( sValue ) )
+XMLPMPropHdl_Print::XMLPMPropHdl_Print( enum XMLTokenEnum eValue ) :
+ sAttrValue( GetXMLToken( eValue ) )
{
}
@@ -407,8 +407,8 @@ sal_Bool XMLPMPropHdl_CenterHorizontal::importXML(
sal_Bool bRet = sal_False;
if (rStrImpValue.getLength())
- if ((rStrImpValue.compareToAscii(sXML_both) == 0) ||
- (rStrImpValue.compareToAscii(sXML_horizontal) == 0))
+ if (IsXMLToken( rStrImpValue, XML_BOTH) ||
+ IsXMLToken( rStrImpValue, XML_HORIZONTAL))
{
rValue = ::cppu::bool2any(sal_True);
bRet = sal_True;
@@ -429,9 +429,9 @@ sal_Bool XMLPMPropHdl_CenterHorizontal::exportXML(
{
bRet = sal_True;
if (rStrExpValue.getLength())
- rStrExpValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_both));
+ rStrExpValue = GetXMLToken(XML_BOTH);
else
- rStrExpValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_horizontal));
+ rStrExpValue = GetXMLToken(XML_HORIZONTAL);
}
return bRet;
@@ -449,8 +449,8 @@ sal_Bool XMLPMPropHdl_CenterVertical::importXML(
sal_Bool bRet = sal_False;
if (rStrImpValue.getLength())
- if ((rStrImpValue.compareToAscii(sXML_both) == 0) ||
- (rStrImpValue.compareToAscii(sXML_vertical) == 0))
+ if (IsXMLToken(rStrImpValue, XML_BOTH) ||
+ IsXMLToken(rStrImpValue, XML_VERTICAL) )
{
rValue = ::cppu::bool2any(sal_True);
bRet = sal_True;
@@ -470,9 +470,9 @@ sal_Bool XMLPMPropHdl_CenterVertical::exportXML(
{
bRet = sal_True;
if (rStrExpValue.getLength())
- rStrExpValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_both));
+ rStrExpValue = GetXMLToken(XML_BOTH);
else
- rStrExpValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_vertical));
+ rStrExpValue = GetXMLToken(XML_VERTICAL);
}
return bRet;
diff --git a/xmloff/source/style/PageMasterPropHdl.hxx b/xmloff/source/style/PageMasterPropHdl.hxx
index cccc824119fa..9525230ad941 100644
--- a/xmloff/source/style/PageMasterPropHdl.hxx
+++ b/xmloff/source/style/PageMasterPropHdl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PageMasterPropHdl.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: sab $ $Date: 2001-02-01 17:47:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,10 @@
#include <rtl/ustring>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
//______________________________________________________________________________
// property handler for style:page-usage (style::PageStyleLayout)
@@ -164,7 +168,7 @@ protected:
::rtl::OUString sAttrValue;
public:
- XMLPMPropHdl_Print( const sal_Char* sValue );
+ XMLPMPropHdl_Print( enum ::xmloff::token::XMLTokenEnum eValue );
virtual ~XMLPMPropHdl_Print();
virtual sal_Bool importXML(
diff --git a/xmloff/source/style/PageMasterPropHdlFactory.cxx b/xmloff/source/style/PageMasterPropHdlFactory.cxx
index e08f5210234d..a64ddfbcbdff 100644
--- a/xmloff/source/style/PageMasterPropHdlFactory.cxx
+++ b/xmloff/source/style/PageMasterPropHdlFactory.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PageMasterPropHdlFactory.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: sab $ $Date: 2001-02-01 17:47:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,8 +66,8 @@
#ifndef _XMLOFF_XMLTYPES_HXX
#include "xmltypes.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
#include "xmlbahdl.hxx"
@@ -88,6 +88,7 @@
using namespace ::rtl;
+using namespace ::xmloff::token;
//______________________________________________________________________________
@@ -123,40 +124,39 @@ const XMLPropertyHandler* XMLPageMasterPropHdlFactory::GetPropertyHandler( sal_I
break;
case XML_PM_TYPE_PRINTORIENTATION:
pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_landscape ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_portrait ) ) );
+ GetXMLToken( XML_LANDSCAPE ),
+ GetXMLToken( XML_PORTRAIT ) );
break;
case XML_PM_TYPE_PRINTANNOTATIONS:
- pHdl = new XMLPMPropHdl_Print( sXML_annotations );
+ pHdl = new XMLPMPropHdl_Print( XML_ANNOTATIONS );
break;
case XML_PM_TYPE_PRINTCHARTS:
- pHdl = new XMLPMPropHdl_Print( sXML_charts );
+ pHdl = new XMLPMPropHdl_Print( XML_CHARTS );
break;
case XML_PM_TYPE_PRINTDRAWING:
- pHdl = new XMLPMPropHdl_Print( sXML_drawings );
+ pHdl = new XMLPMPropHdl_Print( XML_DRAWINGS );
break;
case XML_PM_TYPE_PRINTFORMULAS:
- pHdl = new XMLPMPropHdl_Print( sXML_formulas );
+ pHdl = new XMLPMPropHdl_Print( XML_FORMULAS );
break;
case XML_PM_TYPE_PRINTGRID:
- pHdl = new XMLPMPropHdl_Print( sXML_grid );
+ pHdl = new XMLPMPropHdl_Print( XML_GRID );
break;
case XML_PM_TYPE_PRINTHEADERS:
- pHdl = new XMLPMPropHdl_Print( sXML_headers );
+ pHdl = new XMLPMPropHdl_Print( XML_HEADERS );
break;
case XML_PM_TYPE_PRINTOBJECTS:
- pHdl = new XMLPMPropHdl_Print( sXML_objects );
+ pHdl = new XMLPMPropHdl_Print( XML_OBJECTS );
break;
case XML_PM_TYPE_PRINTZEROVALUES:
- pHdl = new XMLPMPropHdl_Print( sXML_zero_values );
+ pHdl = new XMLPMPropHdl_Print( XML_ZERO_VALUES );
break;
case XML_PM_TYPE_PRINTPAGEORDER:
- pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_ttb ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_ltr ) ) );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_TTB ),
+ GetXMLToken( XML_LTR ) );
break;
case XML_PM_TYPE_FIRSTPAGENUMBER:
- pHdl = new XMLNumberNonePropHdl( sXML_continue, 2 );
+ pHdl = new XMLNumberNonePropHdl( XML_CONTINUE, 2 );
break;
case XML_PM_TYPE_CENTER_HORIZONTAL:
pHdl = new XMLPMPropHdl_CenterHorizontal();
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 4dd6b56ec8ca..760a680b12f8 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PageMasterStyleMap.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: mib $ $Date: 2001-05-04 09:52:09 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,131 +66,132 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
+using namespace ::xmloff::token;
//______________________________________________________________________________
const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
{
// page master
- { "PageStyleLayout", XML_NAMESPACE_STYLE, sXML_page_usage, XML_PM_TYPE_PAGESTYLELAYOUT | MID_FLAG_SPECIAL_ITEM, CTF_PM_PAGEUSAGE },
- { "Width", XML_NAMESPACE_FO, sXML_page_width, XML_TYPE_MEASURE, 0 },
- { "Height", XML_NAMESPACE_FO, sXML_page_height, XML_TYPE_MEASURE, 0 },
- { "NumberingType", XML_NAMESPACE_STYLE, sXML_num_format, XML_PM_TYPE_NUMFORMAT | MID_FLAG_MERGE_PROPERTY, 0 },
- { "NumberingType", XML_NAMESPACE_STYLE, sXML_num_letter_sync, XML_PM_TYPE_NUMLETTERSYNC, 0 },
-// { "PrinterPaperTray", XML_NAMESPACE_STYLE, sXML_paper_tray_number, XML_PM_TYPE_PAPERTRAYNUMBER, 0 },
- { "IsLandscape", XML_NAMESPACE_STYLE, sXML_print_orientation, XML_PM_TYPE_PRINTORIENTATION, 0 },
- { "TopMargin", XML_NAMESPACE_FO, sXML_margin_top, XML_TYPE_MEASURE, 0 },
- { "BottomMargin", XML_NAMESPACE_FO, sXML_margin_bottom, XML_TYPE_MEASURE, 0 },
- { "LeftMargin", XML_NAMESPACE_FO, sXML_margin_left, XML_TYPE_MEASURE, 0 },
- { "RightMargin", XML_NAMESPACE_FO, sXML_margin_right, XML_TYPE_MEASURE, 0 },
- { "TopBorder", XML_NAMESPACE_FO, sXML_border, XML_TYPE_BORDER, CTF_PM_BORDERALL },
- { "TopBorder", XML_NAMESPACE_FO, sXML_border_top, XML_TYPE_BORDER, CTF_PM_BORDERTOP },
- { "BottomBorder", XML_NAMESPACE_FO, sXML_border_bottom, XML_TYPE_BORDER, CTF_PM_BORDERBOTTOM },
- { "LeftBorder", XML_NAMESPACE_FO, sXML_border_left, XML_TYPE_BORDER, CTF_PM_BORDERLEFT },
- { "RightBorder", XML_NAMESPACE_FO, sXML_border_right, XML_TYPE_BORDER, CTF_PM_BORDERRIGHT },
- { "TopBorder", XML_NAMESPACE_STYLE, sXML_border_line_width, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHALL },
- { "TopBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHTOP },
- { "BottomBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_bottom, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHBOTTOM },
- { "LeftBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_left, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHLEFT },
- { "RightBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_right, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHRIGHT },
- { "TopBorderDistance", XML_NAMESPACE_FO, sXML_padding, XML_TYPE_MEASURE, CTF_PM_PADDINGALL },
- { "TopBorderDistance", XML_NAMESPACE_FO, sXML_padding_top, XML_TYPE_MEASURE, CTF_PM_PADDINGTOP },
- { "BottomBorderDistance", XML_NAMESPACE_FO, sXML_padding_bottom, XML_TYPE_MEASURE, CTF_PM_PADDINGBOTTOM },
- { "LeftBorderDistance", XML_NAMESPACE_FO, sXML_padding_left, XML_TYPE_MEASURE, CTF_PM_PADDINGLEFT },
- { "RightBorderDistance", XML_NAMESPACE_FO, sXML_padding_right, XML_TYPE_MEASURE, CTF_PM_PADDINGRIGHT },
- { "ShadowFormat", XML_NAMESPACE_STYLE, sXML_shadow, XML_TYPE_TEXT_SHADOW, 0 },
- { "BackColor", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_COLORTRANSPARENT | MID_FLAG_MULTI_PROPERTY, 0 },
- { "BackTransparent", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "BackGraphicLocation", XML_NAMESPACE_STYLE, sXML_position, XML_TYPE_BUILDIN_CMP_ONLY | MID_FLAG_SPECIAL_ITEM, CTF_PM_GRAPHICPOSITION },
- { "BackGraphicFilter", XML_NAMESPACE_STYLE, sXML_filter_name, XML_TYPE_STRING | MID_FLAG_SPECIAL_ITEM, CTF_PM_GRAPHICFILTER },
- { "BackGraphicURL", XML_NAMESPACE_STYLE, sXML_background_image, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_GRAPHICURL },
- { "PrintAnnotations", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTANNOTATIONS | MID_FLAG_MULTI_PROPERTY, 0 },
- { "PrintCharts", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTCHARTS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "PrintDrawing", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTDRAWING | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "PrintFormulas", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTFORMULAS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "PrintGrid", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTGRID | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "PrintHeaders", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTHEADERS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "PrintObjects", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTOBJECTS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "PrintZeroValues", XML_NAMESPACE_STYLE, sXML_print, XML_PM_TYPE_PRINTZEROVALUES | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "PrintDownFirst", XML_NAMESPACE_STYLE, sXML_print_page_order, XML_PM_TYPE_PRINTPAGEORDER, 0 },
- { "FirstPageNumber", XML_NAMESPACE_STYLE, sXML_first_page_number, XML_PM_TYPE_FIRSTPAGENUMBER, 0 },
- { "PageScale", XML_NAMESPACE_STYLE, sXML_scale_to, XML_TYPE_NUMBER16, CTF_PM_SCALETO },
- { "ScaleToPages", XML_NAMESPACE_STYLE, sXML_scale_to_pages, XML_TYPE_NUMBER16, CTF_PM_SCALETOPAGES },
- { "CenterHorizontally", XML_NAMESPACE_STYLE, sXML_table_centering, XML_PM_TYPE_CENTER_HORIZONTAL | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "CenterVertically", XML_NAMESPACE_STYLE, sXML_table_centering, XML_PM_TYPE_CENTER_VERTICAL | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "TextColumns", XML_NAMESPACE_STYLE, sXML_columns, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_PM_TEXTCOLUMNS },
- { "RegisterModeActive", XML_NAMESPACE_STYLE, sXML_register_true, XML_TYPE_BOOL, 0 },
- { "RegisterParagraphStyle", XML_NAMESPACE_STYLE, sXML_register_truth_ref_style_name, XML_TYPE_STRING| MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_PM_REGISTER_STYLE },
+ { "PageStyleLayout", XML_NAMESPACE_STYLE, XML_PAGE_USAGE, XML_PM_TYPE_PAGESTYLELAYOUT | MID_FLAG_SPECIAL_ITEM, CTF_PM_PAGEUSAGE },
+ { "Width", XML_NAMESPACE_FO, XML_PAGE_WIDTH, XML_TYPE_MEASURE, 0 },
+ { "Height", XML_NAMESPACE_FO, XML_PAGE_HEIGHT, XML_TYPE_MEASURE, 0 },
+ { "NumberingType", XML_NAMESPACE_STYLE, XML_NUM_FORMAT, XML_PM_TYPE_NUMFORMAT | MID_FLAG_MERGE_PROPERTY, 0 },
+ { "NumberingType", XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC, XML_PM_TYPE_NUMLETTERSYNC, 0 },
+// { "PrinterPaperTray", XML_NAMESPACE_STYLE, XML_PAPER_TRAY_NUMBER, XML_PM_TYPE_PAPERTRAYNUMBER, 0 },
+ { "IsLandscape", XML_NAMESPACE_STYLE, XML_PRINT_ORIENTATION, XML_PM_TYPE_PRINTORIENTATION, 0 },
+ { "TopMargin", XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TYPE_MEASURE, 0 },
+ { "BottomMargin", XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TYPE_MEASURE, 0 },
+ { "LeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, 0 },
+ { "RightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, 0 },
+ { "TopBorder", XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_BORDER, CTF_PM_BORDERALL },
+ { "TopBorder", XML_NAMESPACE_FO, XML_BORDER_TOP, XML_TYPE_BORDER, CTF_PM_BORDERTOP },
+ { "BottomBorder", XML_NAMESPACE_FO, XML_BORDER_BOTTOM, XML_TYPE_BORDER, CTF_PM_BORDERBOTTOM },
+ { "LeftBorder", XML_NAMESPACE_FO, XML_BORDER_LEFT, XML_TYPE_BORDER, CTF_PM_BORDERLEFT },
+ { "RightBorder", XML_NAMESPACE_FO, XML_BORDER_RIGHT, XML_TYPE_BORDER, CTF_PM_BORDERRIGHT },
+ { "TopBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHALL },
+ { "TopBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHTOP },
+ { "BottomBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHBOTTOM },
+ { "LeftBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHLEFT },
+ { "RightBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_PM_BORDERWIDTHRIGHT },
+ { "TopBorderDistance", XML_NAMESPACE_FO, XML_PADDING, XML_TYPE_MEASURE, CTF_PM_PADDINGALL },
+ { "TopBorderDistance", XML_NAMESPACE_FO, XML_PADDING_TOP, XML_TYPE_MEASURE, CTF_PM_PADDINGTOP },
+ { "BottomBorderDistance", XML_NAMESPACE_FO, XML_PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_PM_PADDINGBOTTOM },
+ { "LeftBorderDistance", XML_NAMESPACE_FO, XML_PADDING_LEFT, XML_TYPE_MEASURE, CTF_PM_PADDINGLEFT },
+ { "RightBorderDistance", XML_NAMESPACE_FO, XML_PADDING_RIGHT, XML_TYPE_MEASURE, CTF_PM_PADDINGRIGHT },
+ { "ShadowFormat", XML_NAMESPACE_STYLE, XML_SHADOW, XML_TYPE_TEXT_SHADOW, 0 },
+ { "BackColor", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT | MID_FLAG_MULTI_PROPERTY, 0 },
+ { "BackTransparent", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "BackGraphicLocation", XML_NAMESPACE_STYLE, XML_POSITION, XML_TYPE_BUILDIN_CMP_ONLY | MID_FLAG_SPECIAL_ITEM, CTF_PM_GRAPHICPOSITION },
+ { "BackGraphicFilter", XML_NAMESPACE_STYLE, XML_FILTER_NAME, XML_TYPE_STRING | MID_FLAG_SPECIAL_ITEM, CTF_PM_GRAPHICFILTER },
+ { "BackGraphicURL", XML_NAMESPACE_STYLE, XML_BACKGROUND_IMAGE, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_GRAPHICURL },
+ { "PrintAnnotations", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTANNOTATIONS | MID_FLAG_MULTI_PROPERTY, 0 },
+ { "PrintCharts", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTCHARTS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "PrintDrawing", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTDRAWING | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "PrintFormulas", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTFORMULAS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "PrintGrid", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTGRID | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "PrintHeaders", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTHEADERS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "PrintObjects", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTOBJECTS | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "PrintZeroValues", XML_NAMESPACE_STYLE, XML_PRINT, XML_PM_TYPE_PRINTZEROVALUES | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "PrintDownFirst", XML_NAMESPACE_STYLE, XML_PRINT_PAGE_ORDER, XML_PM_TYPE_PRINTPAGEORDER, 0 },
+ { "FirstPageNumber", XML_NAMESPACE_STYLE, XML_FIRST_PAGE_NUMBER, XML_PM_TYPE_FIRSTPAGENUMBER, 0 },
+ { "PageScale", XML_NAMESPACE_STYLE, XML_SCALE_TO, XML_TYPE_NUMBER16, CTF_PM_SCALETO },
+ { "ScaleToPages", XML_NAMESPACE_STYLE, XML_SCALE_TO_PAGES, XML_TYPE_NUMBER16, CTF_PM_SCALETOPAGES },
+ { "CenterHorizontally", XML_NAMESPACE_STYLE, XML_TABLE_CENTERING, XML_PM_TYPE_CENTER_HORIZONTAL | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "CenterVertically", XML_NAMESPACE_STYLE, XML_TABLE_CENTERING, XML_PM_TYPE_CENTER_VERTICAL | MID_FLAG_MULTI_PROPERTY | MID_FLAG_MERGE_ATTRIBUTE, 0 },
+ { "TextColumns", XML_NAMESPACE_STYLE, XML_COLUMNS, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_PM_TEXTCOLUMNS },
+ { "RegisterModeActive", XML_NAMESPACE_STYLE, XML_REGISTER_TRUE, XML_TYPE_BOOL, 0 },
+ { "RegisterParagraphStyle", XML_NAMESPACE_STYLE, XML_REGISTER_TRUTH_REF_STYLE_NAME, XML_TYPE_STRING| MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_PM_REGISTER_STYLE },
// footnote
- { "FootnoteHeight", XML_NAMESPACE_STYLE, sXML_footnote_max_height, XML_TYPE_MEASURE, CTF_PM_FTN_HEIGTH },
- { "FootnoteLineAdjust", XML_NAMESPACE_STYLE, sXML__empty, XML_TYPE_TEXT_HORIZONTAL_ADJUST|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_ADJUST },
- { "FootnoteLineColor", XML_NAMESPACE_STYLE, sXML__empty, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_COLOR },
- { "FootnoteLineDistance", XML_NAMESPACE_STYLE, sXML__empty, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM,CTF_PM_FTN_DISTANCE },
- { "FootnoteLineRelativeWidth", XML_NAMESPACE_STYLE, sXML__empty, XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_WIDTH },
- { "FootnoteLineTextDistance", XML_NAMESPACE_STYLE, sXML__empty, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_DISTANCE },
- { "FootnoteLineWeight", XML_NAMESPACE_STYLE, sXML_footnote_sep, XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_WEIGTH },
+ { "FootnoteHeight", XML_NAMESPACE_STYLE, XML_FOOTNOTE_MAX_HEIGHT, XML_TYPE_MEASURE, CTF_PM_FTN_HEIGTH },
+ { "FootnoteLineAdjust", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_TEXT_HORIZONTAL_ADJUST|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_ADJUST },
+ { "FootnoteLineColor", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_COLOR },
+ { "FootnoteLineDistance", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM,CTF_PM_FTN_DISTANCE },
+ { "FootnoteLineRelativeWidth", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_WIDTH },
+ { "FootnoteLineTextDistance", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_DISTANCE },
+ { "FootnoteLineWeight", XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_WEIGTH },
// header
- { "HeaderHeight", XML_NAMESPACE_SVG, sXML_height, XML_TYPE_MEASURE, CTF_PM_HEADERHEIGHT },
- { "HeaderHeight", XML_NAMESPACE_FO, sXML_min_height, XML_TYPE_MEASURE, CTF_PM_HEADERMINHEIGHT },
- { "HeaderIsDynamicHeight", XML_NAMESPACE_STYLE, sXML__empty, XML_TYPE_BOOL, CTF_PM_HEADERDYNAMIC },
- { "HeaderLeftMargin", XML_NAMESPACE_FO, sXML_margin_left, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG },
- { "HeaderRightMargin", XML_NAMESPACE_FO, sXML_margin_right, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG },
- { "HeaderBodyDistance", XML_NAMESPACE_FO, sXML_margin_bottom, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG },
- { "HeaderTopBorder", XML_NAMESPACE_FO, sXML_border, XML_TYPE_BORDER, CTF_PM_HEADERBORDERALL },
- { "HeaderTopBorder", XML_NAMESPACE_FO, sXML_border_top, XML_TYPE_BORDER, CTF_PM_HEADERBORDERTOP },
- { "HeaderBottomBorder", XML_NAMESPACE_FO, sXML_border_bottom, XML_TYPE_BORDER, CTF_PM_HEADERBORDERBOTTOM },
- { "HeaderLeftBorder", XML_NAMESPACE_FO, sXML_border_left, XML_TYPE_BORDER, CTF_PM_HEADERBORDERLEFT },
- { "HeaderRightBorder", XML_NAMESPACE_FO, sXML_border_right, XML_TYPE_BORDER, CTF_PM_HEADERBORDERRIGHT },
- { "HeaderTopBorder", XML_NAMESPACE_STYLE, sXML_border_line_width, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHALL },
- { "HeaderTopBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHTOP },
- { "HeaderBottomBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_bottom, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHBOTTOM },
- { "HeaderLeftBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_left, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHLEFT },
- { "HeaderRightBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_right, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHRIGHT },
- { "HeaderTopBorderDistance", XML_NAMESPACE_FO, sXML_padding, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGALL },
- { "HeaderTopBorderDistance", XML_NAMESPACE_FO, sXML_padding_top, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGTOP },
- { "HeaderBottomBorderDistance", XML_NAMESPACE_FO, sXML_padding_bottom, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGBOTTOM },
- { "HeaderLeftBorderDistance", XML_NAMESPACE_FO, sXML_padding_left, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGLEFT },
- { "HeaderRightBorderDistance", XML_NAMESPACE_FO, sXML_padding_right, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGRIGHT },
- { "HeaderShadowFormat", XML_NAMESPACE_STYLE, sXML_shadow, XML_TYPE_TEXT_SHADOW, CTF_PM_HEADERFLAG },
- { "HeaderBackColor", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_COLORTRANSPARENT | MID_FLAG_MULTI_PROPERTY, CTF_PM_HEADERFLAG },
- { "HeaderBackTransparent", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, CTF_PM_HEADERFLAG },
- { "HeaderBackGraphicLocation", XML_NAMESPACE_STYLE, sXML_position, XML_TYPE_BUILDIN_CMP_ONLY | MID_FLAG_SPECIAL_ITEM, CTF_PM_HEADERGRAPHICPOSITION },
- { "HeaderBackGraphicFilter", XML_NAMESPACE_STYLE, sXML_filter_name, XML_TYPE_STRING | MID_FLAG_SPECIAL_ITEM, CTF_PM_HEADERGRAPHICFILTER },
- { "HeaderBackGraphicURL", XML_NAMESPACE_STYLE, sXML_background_image, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_HEADERGRAPHICURL },
+ { "HeaderHeight", XML_NAMESPACE_SVG, XML_HEIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERHEIGHT },
+ { "HeaderHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERMINHEIGHT },
+ { "HeaderIsDynamicHeight", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_BOOL, CTF_PM_HEADERDYNAMIC },
+ { "HeaderLeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG },
+ { "HeaderRightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG },
+ { "HeaderBodyDistance", XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG },
+ { "HeaderTopBorder", XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_BORDER, CTF_PM_HEADERBORDERALL },
+ { "HeaderTopBorder", XML_NAMESPACE_FO, XML_BORDER_TOP, XML_TYPE_BORDER, CTF_PM_HEADERBORDERTOP },
+ { "HeaderBottomBorder", XML_NAMESPACE_FO, XML_BORDER_BOTTOM, XML_TYPE_BORDER, CTF_PM_HEADERBORDERBOTTOM },
+ { "HeaderLeftBorder", XML_NAMESPACE_FO, XML_BORDER_LEFT, XML_TYPE_BORDER, CTF_PM_HEADERBORDERLEFT },
+ { "HeaderRightBorder", XML_NAMESPACE_FO, XML_BORDER_RIGHT, XML_TYPE_BORDER, CTF_PM_HEADERBORDERRIGHT },
+ { "HeaderTopBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHALL },
+ { "HeaderTopBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHTOP },
+ { "HeaderBottomBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHBOTTOM },
+ { "HeaderLeftBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHLEFT },
+ { "HeaderRightBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_PM_HEADERBORDERWIDTHRIGHT },
+ { "HeaderTopBorderDistance", XML_NAMESPACE_FO, XML_PADDING, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGALL },
+ { "HeaderTopBorderDistance", XML_NAMESPACE_FO, XML_PADDING_TOP, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGTOP },
+ { "HeaderBottomBorderDistance", XML_NAMESPACE_FO, XML_PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGBOTTOM },
+ { "HeaderLeftBorderDistance", XML_NAMESPACE_FO, XML_PADDING_LEFT, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGLEFT },
+ { "HeaderRightBorderDistance", XML_NAMESPACE_FO, XML_PADDING_RIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERPADDINGRIGHT },
+ { "HeaderShadowFormat", XML_NAMESPACE_STYLE, XML_SHADOW, XML_TYPE_TEXT_SHADOW, CTF_PM_HEADERFLAG },
+ { "HeaderBackColor", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT | MID_FLAG_MULTI_PROPERTY, CTF_PM_HEADERFLAG },
+ { "HeaderBackTransparent", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, CTF_PM_HEADERFLAG },
+ { "HeaderBackGraphicLocation", XML_NAMESPACE_STYLE, XML_POSITION, XML_TYPE_BUILDIN_CMP_ONLY | MID_FLAG_SPECIAL_ITEM, CTF_PM_HEADERGRAPHICPOSITION },
+ { "HeaderBackGraphicFilter", XML_NAMESPACE_STYLE, XML_FILTER_NAME, XML_TYPE_STRING | MID_FLAG_SPECIAL_ITEM, CTF_PM_HEADERGRAPHICFILTER },
+ { "HeaderBackGraphicURL", XML_NAMESPACE_STYLE, XML_BACKGROUND_IMAGE, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_HEADERGRAPHICURL },
// footer
- { "FooterHeight", XML_NAMESPACE_SVG, sXML_height, XML_TYPE_MEASURE, CTF_PM_FOOTERHEIGHT },
- { "FooterHeight", XML_NAMESPACE_FO, sXML_min_height, XML_TYPE_MEASURE, CTF_PM_FOOTERMINHEIGHT },
- { "FooterIsDynamicHeight", XML_NAMESPACE_STYLE, sXML__empty, XML_TYPE_BOOL, CTF_PM_FOOTERDYNAMIC },
- { "FooterLeftMargin", XML_NAMESPACE_FO, sXML_margin_left, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG },
- { "FooterRightMargin", XML_NAMESPACE_FO, sXML_margin_right, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG },
- { "FooterBodyDistance", XML_NAMESPACE_FO, sXML_margin_top, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG },
- { "FooterTopBorder", XML_NAMESPACE_FO, sXML_border, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERALL },
- { "FooterTopBorder", XML_NAMESPACE_FO, sXML_border_top, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERTOP },
- { "FooterBottomBorder", XML_NAMESPACE_FO, sXML_border_bottom, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERBOTTOM },
- { "FooterLeftBorder", XML_NAMESPACE_FO, sXML_border_left, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERLEFT },
- { "FooterRightBorder", XML_NAMESPACE_FO, sXML_border_right, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERRIGHT },
- { "FooterTopBorder", XML_NAMESPACE_STYLE, sXML_border_line_width, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHALL },
- { "FooterTopBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHTOP },
- { "FooterBottomBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_bottom, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHBOTTOM },
- { "FooterLeftBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_left, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHLEFT },
- { "FooterRightBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_right, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHRIGHT },
- { "FooterTopBorderDistance", XML_NAMESPACE_FO, sXML_padding, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGALL },
- { "FooterTopBorderDistance", XML_NAMESPACE_FO, sXML_padding_top, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGTOP },
- { "FooterBottomBorderDistance", XML_NAMESPACE_FO, sXML_padding_bottom, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGBOTTOM },
- { "FooterLeftBorderDistance", XML_NAMESPACE_FO, sXML_padding_left, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGLEFT },
- { "FooterRightBorderDistance", XML_NAMESPACE_FO, sXML_padding_right, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGRIGHT },
- { "FooterShadowFormat", XML_NAMESPACE_STYLE, sXML_shadow, XML_TYPE_TEXT_SHADOW, CTF_PM_FOOTERFLAG },
- { "FooterBackColor", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_COLORTRANSPARENT | MID_FLAG_MULTI_PROPERTY, CTF_PM_FOOTERFLAG },
- { "FooterBackTransparent", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, CTF_PM_FOOTERFLAG },
- { "FooterBackGraphicLocation", XML_NAMESPACE_STYLE, sXML_position, XML_TYPE_BUILDIN_CMP_ONLY | MID_FLAG_SPECIAL_ITEM, CTF_PM_FOOTERGRAPHICPOSITION },
- { "FooterBackGraphicFilter", XML_NAMESPACE_STYLE, sXML_filter_name, XML_TYPE_STRING | MID_FLAG_SPECIAL_ITEM, CTF_PM_FOOTERGRAPHICFILTER },
- { "FooterBackGraphicURL", XML_NAMESPACE_STYLE, sXML_background_image, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_FOOTERGRAPHICURL },
+ { "FooterHeight", XML_NAMESPACE_SVG, XML_HEIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERHEIGHT },
+ { "FooterHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERMINHEIGHT },
+ { "FooterIsDynamicHeight", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_BOOL, CTF_PM_FOOTERDYNAMIC },
+ { "FooterLeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG },
+ { "FooterRightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG },
+ { "FooterBodyDistance", XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG },
+ { "FooterTopBorder", XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERALL },
+ { "FooterTopBorder", XML_NAMESPACE_FO, XML_BORDER_TOP, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERTOP },
+ { "FooterBottomBorder", XML_NAMESPACE_FO, XML_BORDER_BOTTOM, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERBOTTOM },
+ { "FooterLeftBorder", XML_NAMESPACE_FO, XML_BORDER_LEFT, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERLEFT },
+ { "FooterRightBorder", XML_NAMESPACE_FO, XML_BORDER_RIGHT, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERRIGHT },
+ { "FooterTopBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHALL },
+ { "FooterTopBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHTOP },
+ { "FooterBottomBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHBOTTOM },
+ { "FooterLeftBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHLEFT },
+ { "FooterRightBorder", XML_NAMESPACE_STYLE, XML_BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_PM_FOOTERBORDERWIDTHRIGHT },
+ { "FooterTopBorderDistance", XML_NAMESPACE_FO, XML_PADDING, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGALL },
+ { "FooterTopBorderDistance", XML_NAMESPACE_FO, XML_PADDING_TOP, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGTOP },
+ { "FooterBottomBorderDistance", XML_NAMESPACE_FO, XML_PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGBOTTOM },
+ { "FooterLeftBorderDistance", XML_NAMESPACE_FO, XML_PADDING_LEFT, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGLEFT },
+ { "FooterRightBorderDistance", XML_NAMESPACE_FO, XML_PADDING_RIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERPADDINGRIGHT },
+ { "FooterShadowFormat", XML_NAMESPACE_STYLE, XML_SHADOW, XML_TYPE_TEXT_SHADOW, CTF_PM_FOOTERFLAG },
+ { "FooterBackColor", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT | MID_FLAG_MULTI_PROPERTY, CTF_PM_FOOTERFLAG },
+ { "FooterBackTransparent", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, CTF_PM_FOOTERFLAG },
+ { "FooterBackGraphicLocation", XML_NAMESPACE_STYLE, XML_POSITION, XML_TYPE_BUILDIN_CMP_ONLY | MID_FLAG_SPECIAL_ITEM, CTF_PM_FOOTERGRAPHICPOSITION },
+ { "FooterBackGraphicFilter", XML_NAMESPACE_STYLE, XML_FILTER_NAME, XML_TYPE_STRING | MID_FLAG_SPECIAL_ITEM, CTF_PM_FOOTERGRAPHICFILTER },
+ { "FooterBackGraphicURL", XML_NAMESPACE_STYLE, XML_BACKGROUND_IMAGE, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_FOOTERGRAPHICURL },
{ 0L }
};
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
index 479808cfeeb1..6091dab4b410 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TransGradientStyle.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,12 +83,8 @@
#include"xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _RTL_USTRBUF_HXX_
-#include<rtl/ustrbuf.hxx>
+#include <rtl/ustrbuf.hxx>
#endif
#ifndef _RTL_USTRING_
@@ -157,10 +153,10 @@ XMLTransGradientStyle::~XMLTransGradientStyle()
{
}
-void XMLTransGradientStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+void XMLTransGradientStyle::AddAttribute( sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const ::rtl::OUString& rStrValue )
{
- const OUString aStrName( OUString::createFromAscii( pName ) );
- const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+ const ::rtl::OUString aStrName( GetXMLToken( eName ) );
+ const ::rtl::OUString aStrCDATA( GetXMLToken( XML_CDATA ) );
pAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
}
@@ -193,13 +189,13 @@ sal_Bool XMLTransGradientStyle::ImpExportXML( const ::com::sun::star::uno::Refer
OUStringBuffer aOut;
// Name
- AddAttribute( XML_NAMESPACE_DRAW, sXML_name, rStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName );
// Style
if( !rUnitConverter.convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) )
return sal_False;
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue );
// Center x/y
if( aGradient.Style != awt::GradientStyle_LINEAR &&
@@ -207,11 +203,11 @@ sal_Bool XMLTransGradientStyle::ImpExportXML( const ::com::sun::star::uno::Refer
{
rUnitConverter.convertPercent( aOut, aGradient.XOffset );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_cx, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_CX, aStrValue );
rUnitConverter.convertPercent( aOut, aGradient.YOffset );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_cy, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_CY, aStrValue );
}
@@ -222,34 +218,34 @@ sal_Bool XMLTransGradientStyle::ImpExportXML( const ::com::sun::star::uno::Refer
sal_Int32 aStartValue = (sal_Int32)(((aColor.GetRed() + 1) * 100) / 255);
rUnitConverter.convertPercent( aOut, aStartValue );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_start, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_START, aStrValue );
// Transparency end
aColor.SetColor( aGradient.EndColor );
sal_Int32 aEndValue = (sal_Int32)(((aColor.GetRed() + 1) * 100) / 255);
rUnitConverter.convertPercent( aOut, aEndValue );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_end, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_END, aStrValue );
// Angle
if( aGradient.Style != awt::GradientStyle_RADIAL )
{
rUnitConverter.convertNumber( aOut, sal_Int32( aGradient.Angle ) );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_angle, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_GRADIENT_ANGLE, aStrValue );
}
// Border
rUnitConverter.convertPercent( aOut, aGradient.Border );
aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_border, aStrValue );
+ AddAttribute( XML_NAMESPACE_DRAW, XML_GRADIENT_BORDER, aStrValue );
// Do Write
- OUString sWS( RTL_CONSTASCII_USTRINGPARAM( sXML_WS ) );
+ OUString sWS( GetXMLToken( XML_WS ) );
rHandler->ignorableWhitespace( sWS );
- rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, OUString::createFromAscii(sXML_transparency) ),
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, GetXMLToken(XML_TRANSPARENCY) ),
xAttrList );
- rHandler->endElement( OUString::createFromAscii( sXML_gradient ) );
+ rHandler->endElement( GetXMLToken(XML_GRADIENT) );
rHandler->ignorableWhitespace( sWS );
}
}
diff --git a/xmloff/source/style/VisAreaContext.cxx b/xmloff/source/style/VisAreaContext.cxx
index b07f63524dbd..9aea63f255b2 100644
--- a/xmloff/source/style/VisAreaContext.cxx
+++ b/xmloff/source/style/VisAreaContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VisAreaContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: sab $ $Date: 2001-03-16 14:20:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,8 +71,8 @@
#include "VisAreaContext.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -92,6 +92,7 @@
#endif
using namespace com::sun::star;
+using namespace ::xmloff::token;
//------------------------------------------------------------------
@@ -144,22 +145,22 @@ void XMLVisAreaContext::process( const uno::Reference< xml::sax::XAttributeList>
if (nPrefix == XML_NAMESPACE_OFFICE)
{
- if (aLocalName.compareToAscii(sXML_x) == 0)
+ if (IsXMLToken( aLocalName, XML_X ))
{
SvXMLUnitConverter::convertMeasure(nX, sValue, aMapUnit);
rRect.X = nX;
}
- else if (aLocalName.compareToAscii(sXML_y) == 0)
+ else if (IsXMLToken( aLocalName, XML_Y ))
{
SvXMLUnitConverter::convertMeasure(nY, sValue, aMapUnit);
rRect.Y = nY;
}
- else if (aLocalName.compareToAscii(sXML_width) == 0)
+ else if (IsXMLToken( aLocalName, XML_WIDTH ))
{
SvXMLUnitConverter::convertMeasure(nWidth, sValue, aMapUnit);
rRect.Width = nWidth;
}
- else if (aLocalName.compareToAscii(sXML_height) == 0)
+ else if (IsXMLToken( aLocalName, XML_HEIGHT ))
{
SvXMLUnitConverter::convertMeasure(nHeight, sValue, aMapUnit);
rRect.Height = nHeight;
diff --git a/xmloff/source/style/VisAreaExport.cxx b/xmloff/source/style/VisAreaExport.cxx
index 6301057f7fd6..0ba0f49269a1 100644
--- a/xmloff/source/style/VisAreaExport.cxx
+++ b/xmloff/source/style/VisAreaExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: VisAreaExport.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: cl $ $Date: 2001-02-21 18:05:31 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,8 +78,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -90,6 +90,9 @@
#include <tools/gen.hxx>
#endif
+using namespace ::xmloff::token;
+
+
XMLVisAreaExport::XMLVisAreaExport(SvXMLExport& rExport, const sal_Char *pName,
const Rectangle& aRect, const MapUnit aMapUnit)
{
@@ -98,13 +101,13 @@ XMLVisAreaExport::XMLVisAreaExport(SvXMLExport& rExport, const sal_Char *pName,
// write VisArea Element and its Attributes
rtl::OUStringBuffer sBuffer;
rUnitConv.convertMeasure(sBuffer, aRect.getX(), aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_x, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_X, sBuffer.makeStringAndClear());
rUnitConv.convertMeasure(sBuffer, aRect.getY(), aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_y, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_Y, sBuffer.makeStringAndClear());
rUnitConv.convertMeasure(sBuffer, aRect.getWidth(), aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_width, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_WIDTH, sBuffer.makeStringAndClear());
rUnitConv.convertMeasure(sBuffer, aRect.getHeight(), aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_height, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_HEIGHT, sBuffer.makeStringAndClear());
SvXMLElementExport aVisAreaElem(rExport, XML_NAMESPACE_OFFICE, pName, sal_True, sal_True);
}
@@ -118,13 +121,13 @@ XMLVisAreaExport::XMLVisAreaExport(SvXMLExport& rExport, const sal_Char *pName,
// write VisArea Element and its Attributes
rtl::OUStringBuffer sBuffer;
rUnitConv.convertMeasure(sBuffer, aRect.X, aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_x, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_X, sBuffer.makeStringAndClear());
rUnitConv.convertMeasure(sBuffer, aRect.Y, aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_y, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_Y, sBuffer.makeStringAndClear());
rUnitConv.convertMeasure(sBuffer, aRect.Width, aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_width, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_WIDTH, sBuffer.makeStringAndClear());
rUnitConv.convertMeasure(sBuffer, aRect.Height, aMapUnit);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_height, sBuffer.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_HEIGHT, sBuffer.makeStringAndClear());
SvXMLElementExport aVisAreaElem(rExport, XML_NAMESPACE_OFFICE, pName, sal_True, sal_True);
}
diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx
index c102d2b34607..7ae017ca792a 100644
--- a/xmloff/source/style/XMLBackgroundImageContext.cxx
+++ b/xmloff/source/style/XMLBackgroundImageContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLBackgroundImageContext.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: mib $ $Date: 2001-06-19 15:08:23 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,8 +76,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
@@ -298,8 +298,7 @@ void XMLBackgroundImageContext::ProcessAttrs(
bOK = sal_False;
}
}
- else if( aToken.equalsAsciiL( sXML_center,
- sizeof(sXML_center)-1 ) )
+ else if( IsXMLToken( aToken, XML_CENTER ) )
{
if( bHori )
lcl_xmlbic_MergeVertPos( eNewPos,
diff --git a/xmloff/source/style/XMLBackgroundImageExport.cxx b/xmloff/source/style/XMLBackgroundImageExport.cxx
index 73f7530fc3b3..dd361ba2f2a9 100644
--- a/xmloff/source/style/XMLBackgroundImageExport.cxx
+++ b/xmloff/source/style/XMLBackgroundImageExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLBackgroundImageExport.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: mib $ $Date: 2001-06-19 15:08:23 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,7 +64,10 @@
#endif
#include <xmlnmspe.hxx>
-#include <xmlkywd.hxx>
+
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
+#endif
#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
@@ -80,6 +83,7 @@ using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::style;
+using namespace ::xmloff::token;
XMLBackgroundImageExport::XMLBackgroundImageExport( SvXMLExport& rExp ) :
rExport( rExp )
@@ -107,11 +111,11 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL,
OUString sTempURL( GetExport().AddEmbeddedGraphicObject( sURL ) );
if( sTempURL.getLength() )
{
- GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href, sTempURL );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type,
- sXML_simple );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate,
- sXML_onLoad );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sTempURL );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE,
+ XML_SIMPLE );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE,
+ XML_ONLOAD );
}
OUStringBuffer aOut;
@@ -120,17 +124,17 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL,
case GraphicLocation_LEFT_TOP:
case GraphicLocation_MIDDLE_TOP:
case GraphicLocation_RIGHT_TOP:
- aOut.appendAscii( sXML_top );
+ aOut.append( GetXMLToken(XML_TOP) );
break;
case GraphicLocation_LEFT_MIDDLE:
case GraphicLocation_MIDDLE_MIDDLE:
case GraphicLocation_RIGHT_MIDDLE:
- aOut.appendAscii( sXML_center );
+ aOut.append( GetXMLToken(XML_CENTER) );
break;
case GraphicLocation_LEFT_BOTTOM:
case GraphicLocation_MIDDLE_BOTTOM:
case GraphicLocation_RIGHT_BOTTOM:
- aOut.appendAscii( sXML_bottom );
+ aOut.append( GetXMLToken(XML_BOTTOM) );
break;
}
@@ -143,34 +147,34 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL,
case GraphicLocation_LEFT_TOP:
case GraphicLocation_LEFT_BOTTOM:
case GraphicLocation_LEFT_MIDDLE:
- aOut.appendAscii( sXML_left );
+ aOut.append( GetXMLToken(XML_LEFT) );
break;
case GraphicLocation_MIDDLE_TOP:
case GraphicLocation_MIDDLE_MIDDLE:
case GraphicLocation_MIDDLE_BOTTOM:
- aOut.appendAscii( sXML_center );
+ aOut.append( GetXMLToken(XML_CENTER) );
break;
case GraphicLocation_RIGHT_MIDDLE:
case GraphicLocation_RIGHT_TOP:
case GraphicLocation_RIGHT_BOTTOM:
- aOut.appendAscii( sXML_right );
+ aOut.append( GetXMLToken(XML_RIGHT) );
break;
}
}
if( aOut.getLength() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_position, aOut.makeStringAndClear() );
+ XML_POSITION, aOut.makeStringAndClear() );
if( GraphicLocation_AREA == ePos )
{
- aOut.appendAscii( sXML_background_stretch );
+ aOut.append( GetXMLToken(XML_BACKGROUND_STRETCH) );
}
else if( GraphicLocation_NONE != ePos && GraphicLocation_TILED != ePos )
{
- aOut.appendAscii( sXML_background_no_repeat );
+ aOut.append( GetXMLToken(XML_BACKGROUND_NO_REPEAT) );
}
if( aOut.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_repeat,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REPEAT,
aOut.makeStringAndClear() );
if( pFilter )
@@ -178,7 +182,7 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL,
OUString sFilter;
(*pFilter) >>= sFilter;
if( sFilter.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_filter_name,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FILTER_NAME,
sFilter );
}
}
diff --git a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
index 9c2b568ca7f6..0a339bd41a87 100644
--- a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
+++ b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLBitmapLogicalSizePropertyHandler.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: sab $ $Date: 2001-03-16 14:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,8 +59,6 @@
*
************************************************************************/
-#include "xmlkywd.hxx"
-
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
#endif
diff --git a/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx b/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx
index 7061912e67e9..b941fc1b9e39 100644
--- a/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx
+++ b/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLBitmapRepeatOffsetPropertyHandler.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: cl $ $Date: 2000-12-12 17:16:50 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,7 +59,9 @@
*
************************************************************************/
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
@@ -81,10 +83,15 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::rtl;
+using ::xmloff::token::GetXMLToken;
+using ::xmloff::token::XML_VERTICAL;
+using ::xmloff::token::XML_HORIZONTAL;
+
+
XMLBitmapRepeatOffsetPropertyHandler::XMLBitmapRepeatOffsetPropertyHandler( sal_Bool bX )
: mbX( bX ),
- msVertical( RTL_CONSTASCII_USTRINGPARAM( sXML_vertical ) ),
- msHorizontal( RTL_CONSTASCII_USTRINGPARAM( sXML_horizontal ) )
+ msVertical( GetXMLToken(XML_VERTICAL) ),
+ msHorizontal( GetXMLToken(XML_HORIZONTAL) )
{
}
diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx
index f085e3cb6213..342d6c0964a5 100644
--- a/xmloff/source/style/XMLClipPropertyHandler.cxx
+++ b/xmloff/source/style/XMLClipPropertyHandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLClipPropertyHandler.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:04 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -82,11 +82,15 @@
#ifndef _XMLOFF_XMLKYWD_HXX
#include <xmlkywd.hxx>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
+#endif
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
+using namespace ::xmloff::token;
///////////////////////////////////////////////////////////////////////////////
//
@@ -130,7 +134,7 @@ sal_Bool XMLClipPropertyHandler::importXML( const OUString& rStrImpValue, uno::A
while( aTokenEnum.getNextToken( aToken ) )
{
sal_Int32 nVal = 0;
- if( aToken.compareToAscii( sXML_auto ) != 0 &&
+ if( !IsXMLToken(aToken, XML_AUTO) &&
!rUnitConverter.convertMeasure( nVal, aToken ) )
break;
@@ -160,7 +164,7 @@ sal_Bool XMLClipPropertyHandler::exportXML( OUString& rStrExpValue, const uno::A
if( rValue >>= aCrop )
{
- aOut.appendAscii( sXML_rect );
+ aOut.append( GetXMLToken(XML_RECT) );
aOut.append( (sal_Unicode)'(' );
rUnitConverter.convertMeasure( aOut, aCrop.Top );
aOut.append( (sal_Unicode)' ' );
diff --git a/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx b/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx
index 6a4b0b0658e8..9a4e49a0d55f 100644
--- a/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx
+++ b/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFillBitmapSizePropertyHandler.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: sab $ $Date: 2001-03-16 14:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,6 @@
#include <com/sun/star/uno/Any.hxx>
#endif
-#include "xmlkywd.hxx"
-
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
#endif
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index c7ebffcd94ff..e3494366d7a0 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFontAutoStylePool.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: sab $ $Date: 2001-05-03 12:21:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,8 +72,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
@@ -91,7 +91,7 @@
using namespace ::rtl;
using namespace ::com::sun::star::uno;
-
+using namespace ::xmloff::token;
int XMLFontAutoStylePoolNameCmp_Impl( const OUString& r1,
const OUString& r2 )
@@ -288,7 +288,7 @@ OUString XMLFontAutoStylePool::Add(
void XMLFontAutoStylePool::exportXML()
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_OFFICE,
- sXML_font_decls,
+ XML_FONT_DECLS,
sal_True, sal_True );
Any aAny;
OUString sTmp;
@@ -304,36 +304,36 @@ void XMLFontAutoStylePool::exportXML()
const XMLFontAutoStylePoolEntry_Impl *pEntry = pPool->GetObject( i );
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_name, pEntry->GetName() );
+ XML_NAME, pEntry->GetName() );
aAny <<= pEntry->GetFamilyName();
if( aFamilyNameHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_FO,
- sXML_font_family, sTmp );
+ XML_FONT_FAMILY, sTmp );
const OUString& rStyleName = pEntry->GetStyleName();
if( rStyleName.getLength() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_style_name,
+ XML_FONT_STYLE_NAME,
rStyleName );
aAny <<= (sal_Int16)pEntry->GetFamily();
if( aFamilyHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_family_generic, sTmp );
+ XML_FONT_FAMILY_GENERIC, sTmp );
aAny <<= (sal_Int16)pEntry->GetPitch();
if( aPitchHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_pitch, sTmp );
+ XML_FONT_PITCH, sTmp );
aAny <<= (sal_Int16)pEntry->GetEncoding();
if( aEncHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_charset, sTmp );
+ XML_FONT_CHARSET, sTmp );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_font_decl,
+ XML_FONT_DECL,
sal_True, sal_True );
}
}
diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx
index 6285002a3815..3ba4276163b0 100644
--- a/xmloff/source/style/XMLFontStylesContext.cxx
+++ b/xmloff/source/style/XMLFontStylesContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFontStylesContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,8 +72,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
#include "fonthdl.hxx"
@@ -99,6 +99,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::awt;
using namespace ::xmloff::token;
+
#define XML_STYLE_FAMILY_FONT 1
enum XMLFontStyleAttrTokens
@@ -269,7 +270,7 @@ SvXMLStyleContext *XMLFontStylesContext::CreateStyleChildContext(
{
SvXMLStyleContext *pStyle;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.equalsAsciiL( sXML_font_decl, sizeof(sXML_font_decl)-1 ) )
+ IsXMLToken( rLocalName, XML_FONT_DECL ) )
{
pStyle = new XMLFontStyleContext_Impl( GetImport(), nPrefix,
rLocalName, xAttrList, *this );
diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx
index c113ab1239cd..44a7a2ea56e1 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFootnoteSeparatorExport.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,8 +79,8 @@
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
@@ -175,7 +175,7 @@ void XMLFootnoteSeparatorExport::exportXML(
if (nLineWeight > 0)
{
rExport.GetMM100UnitConverter().convertMeasure(sBuf, nLineWeight);
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_width,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_WIDTH,
sBuf.makeStringAndClear());
}
@@ -183,7 +183,7 @@ void XMLFootnoteSeparatorExport::exportXML(
if (nLineTextDistance > 0)
{
rExport.GetMM100UnitConverter().convertMeasure(sBuf,nLineTextDistance);
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_distance_before_sep,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_DISTANCE_BEFORE_SEP,
sBuf.makeStringAndClear());
}
@@ -191,7 +191,7 @@ void XMLFootnoteSeparatorExport::exportXML(
if (nLineDistance > 0)
{
rExport.GetMM100UnitConverter().convertMeasure(sBuf, nLineDistance);
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_distance_after_sep,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_DISTANCE_AFTER_SEP,
sBuf.makeStringAndClear());
}
@@ -199,20 +199,20 @@ void XMLFootnoteSeparatorExport::exportXML(
if (rExport.GetMM100UnitConverter().convertEnum(
sBuf, eLineAdjust, aXML_HorizontalAdjust_Enum))
{
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_adjustment,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_ADJUSTMENT,
sBuf.makeStringAndClear());
}
// relative line width
SvXMLUnitConverter::convertPercent(sBuf, nLineRelWidth);
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_rel_width,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_REL_WIDTH,
sBuf.makeStringAndClear());
// color
rExport.GetMM100UnitConverter().convertColor(sBuf, nLineColor);
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_color,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_COLOR,
sBuf.makeStringAndClear());
SvXMLElementExport aElem(rExport, XML_NAMESPACE_STYLE,
- sXML_footnote_sep, sal_True, sal_True);
+ XML_FOOTNOTE_SEP, sal_True, sal_True);
}
diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
index fd285443bef0..b4b9bb73dee5 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFootnoteSeparatorImport.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include "xmlimp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -187,7 +187,7 @@ void XMLFootnoteSeparatorImport::StartElement(
if (XML_NAMESPACE_STYLE == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_width, sizeof(sXML_width)-1))
+ if (IsXMLToken( sLocalName, XML_WIDTH ))
{
if (GetImport().GetMM100UnitConverter().convertMeasure(
nTmp, sAttrValue))
@@ -195,35 +195,31 @@ void XMLFootnoteSeparatorImport::StartElement(
nLineWeight = (sal_Int16)nTmp;
}
}
- else if (sLocalName.equalsAsciiL(sXML_distance_before_sep,
- sizeof(sXML_distance_before_sep)-1))
+ else if (IsXMLToken( sLocalName, XML_DISTANCE_BEFORE_SEP ))
{
if (GetImport().GetMM100UnitConverter().convertMeasure(
nTmp, sAttrValue))
nLineTextDistance = nTmp;
}
- else if (sLocalName.equalsAsciiL(sXML_distance_after_sep,
- sizeof(sXML_distance_after_sep)-1))
+ else if (IsXMLToken( sLocalName, XML_DISTANCE_AFTER_SEP ))
{
if (GetImport().GetMM100UnitConverter().convertMeasure(
nTmp, sAttrValue))
nLineDistance = nTmp;
}
- else if (sLocalName.equalsAsciiL(sXML_adjustment,
- sizeof(sXML_adjustment)-1))
+ else if (IsXMLToken( sLocalName, XML_ADJUSTMENT ))
{
sal_uInt16 nTmpU;
if (SvXMLUnitConverter::convertEnum(
nTmpU, sAttrValue, aXML_HorizontalAdjust_Enum))
eLineAdjust = (sal_Int16)nTmpU;
}
- else if (sLocalName.equalsAsciiL(sXML_rel_width,
- sizeof(sXML_rel_width)-1))
+ else if (IsXMLToken( sLocalName, XML_REL_WIDTH ))
{
if (SvXMLUnitConverter::convertPercent(nTmp, sAttrValue))
nLineRelWidth = (sal_uInt8)nTmp;
}
- else if (sLocalName.equalsAsciiL(sXML_color, sizeof(sXML_color)-1))
+ else if (IsXMLToken( sLocalName, XML_COLOR ))
{
Color aColor;
if (SvXMLUnitConverter::convertColor(aColor, sAttrValue))
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index a8db7bee3c85..e2e303b7c32e 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLPageExport.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: sab $ $Date: 2001-04-06 11:06:15 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,8 +70,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
@@ -120,6 +120,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
+using namespace ::xmloff::token;
//______________________________________________________________________________
@@ -193,18 +194,18 @@ sal_Bool XMLPageExport::exportStyle(
else
{
OUString sName( rStyle->getName() );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_name, sName );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, sName );
OUString sPMName;
if( findPageMasterName( sName, sPMName ) )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_page_master_name, sPMName );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_PAGE_MASTER_NAME, sPMName );
aAny = xPropSet->getPropertyValue( sFollowStyle );
OUString sNextName;
aAny >>= sNextName;
if( sName != sNextName && sNextName.getLength() )
{
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_next_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NEXT_STYLE_NAME,
sNextName );
}
// OUString sPageMaster = GetExport().GetAutoStylePool()->Find(
@@ -212,11 +213,11 @@ sal_Bool XMLPageExport::exportStyle(
// xPropSet );
// if( sPageMaster.getLength() )
// GetExport().AddAttribute( XML_NAMESPACE_STYLE,
-// sXML_page_master_name,
+// XML_PAGE_MASTER_NAME,
// sPageMaster );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_master_page, sal_True, sal_True );
+ XML_MASTER_PAGE, sal_True, sal_True );
exportMasterPageContent( xPropSet, sal_False );
}
diff --git a/xmloff/source/style/XMLRectangleMembersHandler.cxx b/xmloff/source/style/XMLRectangleMembersHandler.cxx
index c7860e766105..956cf974d107 100644
--- a/xmloff/source/style/XMLRectangleMembersHandler.cxx
+++ b/xmloff/source/style/XMLRectangleMembersHandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLRectangleMembersHandler.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: cl $ $Date: 2001-05-03 09:22:40 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,8 +59,6 @@
*
************************************************************************/
-#include "xmlkywd.hxx"
-
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
#endif
diff --git a/xmloff/source/style/adjushdl.cxx b/xmloff/source/style/adjushdl.cxx
index fe426b4137db..7f84142f522e 100644
--- a/xmloff/source/style/adjushdl.cxx
+++ b/xmloff/source/style/adjushdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: adjushdl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,8 +67,8 @@
#include <tools/solar.h>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
diff --git a/xmloff/source/style/backhdl.cxx b/xmloff/source/style/backhdl.cxx
index 72c33ad484fe..ffb547d493ac 100644
--- a/xmloff/source/style/backhdl.cxx
+++ b/xmloff/source/style/backhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: backhdl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,8 +67,8 @@
#include <backhdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -91,14 +91,14 @@ using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
-SvXMLEnumMapEntry psXML_BrushHorizontalPos[] =
+SvXMLEnumMapEntry pXML_BrushHorizontalPos[] =
{
{ XML_LEFT, style::GraphicLocation_LEFT_MIDDLE },
{ XML_RIGHT, style::GraphicLocation_RIGHT_MIDDLE },
{ XML_TOKEN_INVALID, 0 }
};
-SvXMLEnumMapEntry psXML_BrushVerticalPos[] =
+SvXMLEnumMapEntry pXML_BrushVerticalPos[] =
{
{ XML_TOP, style::GraphicLocation_MIDDLE_TOP },
{ XML_BOTTOM, style::GraphicLocation_MIDDLE_BOTTOM },
@@ -157,7 +157,7 @@ sal_Bool XMLBackGraphicPositionPropHdl::importXML( const OUString& rStrImpValue,
bRet = sal_False;
}
}
- else if( aToken.compareToAscii( sXML_center ) )
+ else if( IsXMLToken( aToken, XML_CENTER ) )
{
if( bHori )
MergeXMLVertPos( ePos, style::GraphicLocation_MIDDLE_MIDDLE );
@@ -166,7 +166,7 @@ sal_Bool XMLBackGraphicPositionPropHdl::importXML( const OUString& rStrImpValue,
else
ePos = style::GraphicLocation_MIDDLE_MIDDLE;
}
- else if( rUnitConverter.convertEnum( nTmp, aToken, psXML_BrushHorizontalPos ) )
+ else if( rUnitConverter.convertEnum( nTmp, aToken, pXML_BrushHorizontalPos ) )
{
if( bVert )
MergeXMLHoriPos( ePos, (style::GraphicLocation)nTmp );
@@ -177,7 +177,7 @@ sal_Bool XMLBackGraphicPositionPropHdl::importXML( const OUString& rStrImpValue,
bHori = sal_True;
}
- else if( rUnitConverter.convertEnum( nTmp, aToken, psXML_BrushVerticalPos ) )
+ else if( rUnitConverter.convertEnum( nTmp, aToken, pXML_BrushVerticalPos ) )
{
if( bHori )
MergeXMLVertPos( ePos, (style::GraphicLocation)nTmp );
@@ -224,19 +224,19 @@ sal_Bool XMLBackGraphicPositionPropHdl::exportXML( OUString& rStrExpValue, const
case style::GraphicLocation_LEFT_TOP:
case style::GraphicLocation_MIDDLE_TOP:
case style::GraphicLocation_RIGHT_TOP:
- aOut.appendAscii( sXML_top );
+ aOut.append( GetXMLToken(XML_TOP) );
bRet = sal_True;
break;
case style::GraphicLocation_LEFT_MIDDLE:
case style::GraphicLocation_MIDDLE_MIDDLE:
case style::GraphicLocation_RIGHT_MIDDLE:
- aOut.appendAscii( sXML_center );
+ aOut.append( GetXMLToken(XML_CENTER) );
bRet = sal_True;
break;
case style::GraphicLocation_LEFT_BOTTOM:
case style::GraphicLocation_MIDDLE_BOTTOM:
case style::GraphicLocation_RIGHT_BOTTOM:
- aOut.appendAscii( sXML_bottom );
+ aOut.append( GetXMLToken(XML_BOTTOM) );
bRet = sal_True;
break;
}
@@ -250,17 +250,17 @@ sal_Bool XMLBackGraphicPositionPropHdl::exportXML( OUString& rStrExpValue, const
case style::GraphicLocation_LEFT_TOP:
case style::GraphicLocation_LEFT_BOTTOM:
case style::GraphicLocation_LEFT_MIDDLE:
- aOut.appendAscii( sXML_left );
+ aOut.append( GetXMLToken(XML_LEFT) );
break;
case style::GraphicLocation_MIDDLE_TOP:
case style::GraphicLocation_MIDDLE_MIDDLE:
case style::GraphicLocation_MIDDLE_BOTTOM:
- aOut.appendAscii( sXML_center );
+ aOut.append( GetXMLToken(XML_CENTER) );
break;
case style::GraphicLocation_RIGHT_MIDDLE:
case style::GraphicLocation_RIGHT_TOP:
case style::GraphicLocation_RIGHT_BOTTOM:
- aOut.appendAscii( sXML_right );
+ aOut.append( GetXMLToken(XML_RIGHT) );
break;
}
}
diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx
index 366380d99b19..78765aa672ba 100644
--- a/xmloff/source/style/bordrhdl.cxx
+++ b/xmloff/source/style/bordrhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bordrhdl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,8 +64,8 @@
#include <bordrhdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -156,7 +156,7 @@ using namespace ::xmloff::token;
#define SVX_XML_BORDER_WIDTH_MIDDLE 1
#define SVX_XML_BORDER_WIDTH_THICK 2
-SvXMLEnumMapEntry psXML_BorderStyles[] =
+SvXMLEnumMapEntry pXML_BorderStyles[] =
{
{ XML_NONE, SVX_XML_BORDER_STYLE_NONE },
{ XML_HIDDEN, SVX_XML_BORDER_STYLE_NONE },
@@ -171,7 +171,7 @@ SvXMLEnumMapEntry psXML_BorderStyles[] =
{ XML_TOKEN_INVALID, 0 }
};
-SvXMLEnumMapEntry psXML_NamedBorderWidths[] =
+SvXMLEnumMapEntry pXML_NamedBorderWidths[] =
{
{ XML_THIN, SVX_XML_BORDER_WIDTH_THIN },
{ XML_MIDDLE, SVX_XML_BORDER_WIDTH_MIDDLE },
@@ -385,13 +385,13 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue
{
if( !bHasWidth &&
rUnitConverter.convertEnum( nNamedWidth, aToken,
- psXML_NamedBorderWidths ) )
+ pXML_NamedBorderWidths ) )
{
bHasWidth = sal_True;
}
else if( !bHasStyle &&
rUnitConverter.convertEnum( nStyle, aToken,
- psXML_BorderStyles ) )
+ pXML_BorderStyles ) )
{
bHasStyle = sal_True;
}
@@ -483,13 +483,11 @@ sal_Bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue
if( nWidth == 0 )
return sal_False;
- char *pStyle = (0 == nDistance) ? sXML_solid : sXML_double;
-
rUnitConverter.convertMeasure( aOut, nWidth );
aOut.append( sal_Unicode( ' ' ) );
- aOut.appendAscii( pStyle );
+ aOut.append( GetXMLToken((0 == nDistance) ? XML_SOLID : XML_DOUBLE) );
aOut.append( sal_Unicode( ' ' ) );
diff --git a/xmloff/source/style/breakhdl.cxx b/xmloff/source/style/breakhdl.cxx
index 4346a06ddf14..4f18502b3d76 100644
--- a/xmloff/source/style/breakhdl.cxx
+++ b/xmloff/source/style/breakhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: breakhdl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <breakhdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -91,7 +91,7 @@ using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
-SvXMLEnumMapEntry psXML_BreakTypes[] =
+SvXMLEnumMapEntry pXML_BreakTypes[] =
{
{ XML_AUTO, 0 },
{ XML_COLUMN, 1 },
@@ -117,7 +117,7 @@ sal_Bool XMLFmtBreakBeforePropHdl::importXML( const OUString& rStrImpValue, uno:
style::BreakType eBreak = style::BreakType_NONE;
sal_uInt16 nEnum;
- if( ( bRet = rUnitConverter.convertEnum( nEnum, rStrImpValue, psXML_BreakTypes ) ) )
+ if( ( bRet = rUnitConverter.convertEnum( nEnum, rStrImpValue, pXML_BreakTypes ) ) )
{
if( nEnum != 0 )
eBreak = ( nEnum == 1 ) ? style::BreakType_COLUMN_BEFORE : style::BreakType_PAGE_BEFORE;
@@ -158,7 +158,7 @@ sal_Bool XMLFmtBreakBeforePropHdl::exportXML( OUString& rStrExpValue, const uno:
}
OUStringBuffer aOut;
- sal_Bool bOk = rUnitConverter.convertEnum( aOut, nEnum, psXML_BreakTypes );
+ sal_Bool bOk = rUnitConverter.convertEnum( aOut, nEnum, pXML_BreakTypes );
rStrExpValue = aOut.makeStringAndClear();
return sal_True;
@@ -180,7 +180,7 @@ sal_Bool XMLFmtBreakAfterPropHdl::importXML( const OUString& rStrImpValue, uno::
style::BreakType eBreak = style::BreakType_NONE;
sal_uInt16 nEnum;
- if( ( bRet = rUnitConverter.convertEnum( nEnum, rStrImpValue, psXML_BreakTypes ) ) )
+ if( ( bRet = rUnitConverter.convertEnum( nEnum, rStrImpValue, pXML_BreakTypes ) ) )
{
if( nEnum != 0 )
eBreak = ( nEnum == 1 ) ? style::BreakType_COLUMN_AFTER : style::BreakType_PAGE_AFTER;
@@ -221,7 +221,7 @@ sal_Bool XMLFmtBreakAfterPropHdl::exportXML( OUString& rStrExpValue, const uno::
}
OUStringBuffer aOut;
- sal_Bool bOk = rUnitConverter.convertEnum( aOut, nEnum, psXML_BreakTypes );
+ sal_Bool bOk = rUnitConverter.convertEnum( aOut, nEnum, pXML_BreakTypes );
rStrExpValue = aOut.makeStringAndClear();
return sal_True;
diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx
index 5a6b327bcfdc..ca372ae63ef4 100644
--- a/xmloff/source/style/cdouthdl.cxx
+++ b/xmloff/source/style/cdouthdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cdouthdl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <cdouthdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx
index b4cc4244fe30..16c486e9415a 100644
--- a/xmloff/source/style/chrhghdl.cxx
+++ b/xmloff/source/style/chrhghdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: chrhghdl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: bm $ $Date: 2001-05-21 11:07:15 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,10 +64,6 @@
#include <chrhghdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
#endif
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx
index cec236f28779..1df8b8003e5f 100644
--- a/xmloff/source/style/chrlohdl.cxx
+++ b/xmloff/source/style/chrlohdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: chrlohdl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:04 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,8 +64,8 @@
#include <chrlohdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -90,6 +90,7 @@
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
// this is a copy of defines in svx/inc/escpitem.hxx
#define DFLT_ESC_PROP 58
@@ -123,7 +124,7 @@ sal_Bool XMLCharLanguageHdl::importXML( const OUString& rStrImpValue, uno::Any&
rValue >>= aLocale;
- if( rStrImpValue.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_none ) ) != 0 )
+ if( IsXMLToken(rStrImpValue, XML_NONE) )
aLocale.Language = rStrImpValue;
rValue <<= aLocale;
@@ -139,7 +140,7 @@ sal_Bool XMLCharLanguageHdl::exportXML( OUString& rStrExpValue, const uno::Any&
rStrExpValue = aLocale.Language;
if( !rStrExpValue.getLength() )
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+ rStrExpValue = GetXMLToken( XML_NONE );
return sal_True;
}
@@ -171,7 +172,7 @@ sal_Bool XMLCharCountryHdl::importXML( const OUString& rStrImpValue, uno::Any& r
rValue >>= aLocale;
- if( rStrImpValue.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_none ) ) != 0 )
+ if( IsXMLToken( rStrImpValue, XML_NONE ) )
aLocale.Country = rStrImpValue;
rValue <<= aLocale;
@@ -187,7 +188,7 @@ sal_Bool XMLCharCountryHdl::exportXML( OUString& rStrExpValue, const uno::Any& r
rStrExpValue = aLocale.Country;
if( !rStrExpValue.getLength() )
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+ rStrExpValue = GetXMLToken( XML_NONE );
return sal_True;
}
diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx
index 1f540c8ecdc5..65d97a12a40d 100644
--- a/xmloff/source/style/csmaphdl.cxx
+++ b/xmloff/source/style/csmaphdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: csmaphdl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <csmaphdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -151,12 +151,12 @@ sal_Bool XMLCaseMapVariantHdl::importXML( const OUString& rStrImpValue, uno::Any
{
sal_Bool bRet = sal_False;
- if( 0 == rStrImpValue.compareToAscii( sXML_casemap_small_caps ) )
+ if( IsXMLToken( rStrImpValue, XML_CASEMAP_SMALL_CAPS ) )
{
rValue <<= (sal_Int16)style::CaseMap::SMALLCAPS;
bRet = sal_True;
}
- else if( 0 == rStrImpValue.compareToAscii( sXML_casemap_normal ) )
+ else if( IsXMLToken( rStrImpValue, XML_CASEMAP_NORMAL ) )
{
rValue <<= (sal_Int16)style::CaseMap::NONE;
bRet = sal_True;
@@ -175,10 +175,10 @@ sal_Bool XMLCaseMapVariantHdl::exportXML( OUString& rStrExpValue, const uno::Any
switch( nValue )
{
case style::CaseMap::NONE:
- aOut.appendAscii( sXML_casemap_normal );
+ aOut.append( GetXMLToken(XML_CASEMAP_NORMAL) );
break;
case style::CaseMap::SMALLCAPS:
- aOut.appendAscii( sXML_casemap_small_caps );
+ aOut.append( GetXMLToken(XML_CASEMAP_SMALL_CAPS) );
break;
}
}
diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx
index e8a272e592e0..c09f9721a1e1 100644
--- a/xmloff/source/style/escphdl.cxx
+++ b/xmloff/source/style/escphdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: escphdl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2000-10-12 17:11:59 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,8 +64,8 @@
#include <escphdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -86,6 +86,7 @@
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
// this is a copy of defines in svx/inc/escpitem.hxx
#define DFLT_ESC_PROP 58
@@ -113,11 +114,11 @@ sal_Bool XMLEscapementPropHdl::importXML( const OUString& rStrImpValue, uno::Any
if( ! aTokens.getNextToken( aToken ) )
return sal_False;
- if( 0 == aToken.compareToAscii( sXML_escapement_sub ) )
+ if( IsXMLToken( aToken, XML_ESCAPEMENT_SUB ) )
{
nVal = DFLT_ESC_AUTO_SUB;
}
- else if( 0 == aToken.compareToAscii( sXML_escapement_super ) )
+ else if( IsXMLToken( aToken, XML_ESCAPEMENT_SUPER ) )
{
nVal = DFLT_ESC_AUTO_SUPER;
}
@@ -144,11 +145,11 @@ sal_Bool XMLEscapementPropHdl::exportXML( OUString& rStrExpValue, const uno::Any
{
if( nValue == DFLT_ESC_AUTO_SUPER )
{
- aOut.appendAscii( sXML_escapement_super );
+ aOut.append( GetXMLToken(XML_ESCAPEMENT_SUPER) );
}
else if( nValue == DFLT_ESC_AUTO_SUB )
{
- aOut.appendAscii( sXML_escapement_sub );
+ aOut.append( GetXMLToken(XML_ESCAPEMENT_SUB) );
}
else
{
@@ -172,7 +173,7 @@ XMLEscapementHeightPropHdl::~XMLEscapementHeightPropHdl()
sal_Bool XMLEscapementHeightPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
{
- if( !rStrImpValue.compareToAscii( sXML_casemap_small_caps ) )
+ if( IsXMLToken( rStrImpValue, XML_CASEMAP_SMALL_CAPS ) )
return sal_False;
SvXMLTokenEnumerator aTokens( rStrImpValue );
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index 8dcf0d5227be..eee813786007 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fonthdl.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <fonthdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -87,6 +87,10 @@
#include "xmlelement.hxx"
#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
@@ -299,7 +303,7 @@ sal_Bool XMLFontEncodingPropHdl::importXML( const OUString& rStrImpValue, uno::A
{
sal_Bool bRet = sal_True;
- if( rStrImpValue.equalsAsciiL( sXML_x_symbol, sizeof(sXML_x_symbol)-1 ) )
+ if( IsXMLToken( rStrImpValue, XML_X_SYMBOL ) )
rValue <<= (sal_Int16) RTL_TEXTENCODING_SYMBOL;
return bRet;
@@ -315,7 +319,7 @@ sal_Bool XMLFontEncodingPropHdl::exportXML( OUString& rStrExpValue, const uno::A
{
if( (rtl_TextEncoding)nSet == RTL_TEXTENCODING_SYMBOL )
{
- aOut.appendAscii( sXML_x_symbol );
+ aOut.append( GetXMLToken(XML_X_SYMBOL) );
rStrExpValue = aOut.makeStringAndClear();
bRet = sal_True;
}
diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx
index 1c8869233bf4..774a6f6bcb5b 100644
--- a/xmloff/source/style/impastp4.cxx
+++ b/xmloff/source/style/impastp4.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impastp4.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: sab $ $Date: 2001-05-29 15:38:59 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,8 +66,8 @@
#ifndef _XMLOFF_XMLASTPLP_HXX
#include "xmlaustp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
#include "nmspmap.hxx"
@@ -94,6 +94,7 @@
using namespace ::std;
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
//#############################################################################
//
@@ -106,8 +107,8 @@ using namespace ::com::sun::star;
//
SvXMLAutoStylePoolP_Impl::SvXMLAutoStylePoolP_Impl()
-: msCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- msWS( OUString::createFromAscii( sXML_WS ) ),
+: msCDATA( GetXMLToken(XML_CDATA) ),
+ msWS( GetXMLToken(XML_WS) ),
maFamilyList( 5, 5 )
{
mpAttrList = new SvXMLAttributeList();
@@ -397,23 +398,23 @@ void SvXMLAutoStylePoolP_Impl::exportXML(
if( aExpStyles[i].mpProperties )
{
- OUString sName( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_name) ) );
+ OUString sName( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_NAME) ) );
mpAttrList->AddAttribute( sName, msCDATA, aExpStyles[i].mpProperties->GetName() );
if( pFamily->bAsFamily )
{
- sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_family) );
+ sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_FAMILY) );
mpAttrList->AddAttribute( sName, msCDATA, aStrFamilyName );
}
if( aExpStyles[i].mpParent->getLength() )
{
- sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_parent_style_name) );
+ sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_PARENT_STYLE_NAME) );
mpAttrList->AddAttribute( sName, msCDATA, *aExpStyles[i].mpParent );
}
if( pFamily->bAsFamily )
- sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_style) );
+ sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_STYLE) );
else
sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, pFamily->maStrFamilyName );
diff --git a/xmloff/source/style/kernihdl.cxx b/xmloff/source/style/kernihdl.cxx
index 474ae0d60efd..0ff11be09c83 100644
--- a/xmloff/source/style/kernihdl.cxx
+++ b/xmloff/source/style/kernihdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: kernihdl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-04-10 17:29:15 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,8 +73,8 @@
// --
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include <xmlkywd.hxx>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -83,6 +83,7 @@
using namespace ::rtl;
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
///////////////////////////////////////////////////////////////////////////////
//
@@ -99,8 +100,7 @@ sal_Bool XMLKerningPropHdl::importXML( const OUString& rStrImpValue, Any& rValue
sal_Bool bRet = sal_True;
sal_Int32 nKerning = 0;
- if( !rStrImpValue.equalsAsciiL( sXML_kerning_normal,
- sizeof(sXML_kerning_normal)-1 ) )
+ if( ! IsXMLToken( rStrImpValue, XML_KERNING_NORMAL ) )
{
bRet = rUnitConverter.convertMeasure( nKerning, rStrImpValue );
}
@@ -120,7 +120,7 @@ sal_Bool XMLKerningPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue
OUStringBuffer aOut;
if( nValue == 0 )
- aOut.appendAscii( sXML_kerning_normal );
+ aOut.append( GetXMLToken(XML_KERNING_NORMAL) );
else
rUnitConverter.convertMeasure( aOut, nValue );
diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx
index f1e2c2b0c403..7b77617a7ff1 100644
--- a/xmloff/source/style/lspachdl.cxx
+++ b/xmloff/source/style/lspachdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: lspachdl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2001-05-21 06:54:15 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,8 +64,8 @@
#include <lspachdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -93,6 +93,8 @@
using namespace ::rtl;
using namespace ::com::sun::star;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_CASEMAP_NORMAL;
// this is a copy of defines in svx/inc/escpitem.hxx
#define DFLT_ESC_PROP 58
@@ -121,7 +123,7 @@ sal_Bool XMLLineHeightHdl::importXML( const OUString& rStrImpValue, uno::Any& rV
return sal_False;
aLSp.Height = nTemp;
}
- else if( rStrImpValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(sXML_casemap_normal) ) )
+ else if( IsXMLToken( rStrImpValue, XML_CASEMAP_NORMAL) )
{
aLSp.Mode = style::LineSpacingMode::PROP;
aLSp.Height = 100;
diff --git a/xmloff/source/style/opaquhdl.cxx b/xmloff/source/style/opaquhdl.cxx
index 4b4b47647be6..70d9c87633db 100644
--- a/xmloff/source/style/opaquhdl.cxx
+++ b/xmloff/source/style/opaquhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: opaquhdl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,8 +73,8 @@
// --
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include <xmlkywd.hxx>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -83,6 +83,8 @@
using namespace ::rtl;
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
+
///////////////////////////////////////////////////////////////////////////////
//
@@ -98,7 +100,7 @@ sal_Bool XMLOpaquePropHdl::importXML( const OUString& rStrImpValue, Any& rValue,
{
sal_Bool bRet = sal_True;
- sal_Bool bValue = rStrImpValue.compareToAscii( sXML_opaque_foreground );
+ sal_Bool bValue = IsXMLToken( rStrImpValue, XML_OPAQUE_FOREGROUND );
rValue <<= sal_Bool(bValue);
bRet = sal_True;
@@ -113,9 +115,9 @@ sal_Bool XMLOpaquePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue,
if (rValue >>= bValue)
{
if( bValue )
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_opaque_foreground ) );
+ rStrExpValue = GetXMLToken( XML_OPAQUE_FOREGROUND );
else
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_opaque_background ) );
+ rStrExpValue = GetXMLToken( XML_OPAQUE_BACKGROUND );
bRet = sal_True;
}
diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx
index fa2ec5d9c7cb..37e39336926c 100644
--- a/xmloff/source/style/postuhdl.cxx
+++ b/xmloff/source/style/postuhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: postuhdl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <postuhdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx
index 99ee3810f7dd..e182c83a6542 100644
--- a/xmloff/source/style/prhdlfac.cxx
+++ b/xmloff/source/style/prhdlfac.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: prhdlfac.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,10 +77,6 @@
#include "xmltypes.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -315,11 +311,9 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32
pPropHdl = new XMLCrossedOutPropHdl ;
break;
case XML_TYPE_TEXT_BOOLCROSSEDOUT:
- {
- ::rtl::OUString aStrTrueString( RTL_CONSTASCII_USTRINGPARAM( sXML_crossedout_single ) );
- ::rtl::OUString aStrFalseString( RTL_CONSTASCII_USTRINGPARAM( sXML_crossedout_none ) );
- pPropHdl = new XMLNamedBoolPropertyHdl( aStrTrueString, aStrFalseString );
- }
+ pPropHdl = new XMLNamedBoolPropertyHdl(
+ GetXMLToken(XML_CROSSEDOUT_SINGLE),
+ GetXMLToken(XML_CROSSEDOUT_NONE) );
break;
case XML_TYPE_TEXT_ESCAPEMENT:
pPropHdl = new XMLEscapementPropHdl;
@@ -358,10 +352,10 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32
pPropHdl = new XMLUnderlinePropHdl;
break;
case XML_TYPE_TEXT_UNDERLINE_COLOR:
- pPropHdl = new XMLColorTransparentPropHdl( sXML_font_color );
+ pPropHdl = new XMLColorTransparentPropHdl( XML_FONT_COLOR );
break;
case XML_TYPE_TEXT_UNDERLINE_HASCOLOR:
- pPropHdl = new XMLIsTransparentPropHdl( sXML_font_color,
+ pPropHdl = new XMLIsTransparentPropHdl( XML_FONT_COLOR,
sal_False );
break;
case XML_TYPE_TEXT_WEIGHT:
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index fd2ff3893700..7577906fe695 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: prstylei.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: sab $ $Date: 2001-02-28 08:24:41 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,8 +66,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
#include "xmlprcon.hxx"
@@ -106,13 +106,14 @@ using namespace ::com::sun::star::style;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
+using namespace ::xmloff::token;
void XMLPropStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
const OUString& rLocalName,
const OUString& rValue )
{
- if( XML_NAMESPACE_STYLE == nPrefixKey && rLocalName.compareToAscii( sXML_family ) == 0 )
+ if( XML_NAMESPACE_STYLE == nPrefixKey && IsXMLToken( rLocalName, XML_FAMILY ) )
{
DBG_ASSERT( GetFamily() == ((SvXMLStylesContext *)&xStyles)->GetFamily( rValue ), "unexpected style family" );
}
@@ -148,7 +149,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext(
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.compareToAscii( sXML_properties ) == 0 )
+ IsXMLToken( rLocalName, XML_PROPERTIES ) )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
((SvXMLStylesContext *)&xStyles)->GetImportPropertyMapper(
diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx
index 6f6414384969..7d025f6e9bec 100644
--- a/xmloff/source/style/shadwhdl.cxx
+++ b/xmloff/source/style/shadwhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shadwhdl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,12 +81,13 @@
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include <xmlkywd.hxx>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
#endif
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
///////////////////////////////////////////////////////////////////////////////
//
@@ -112,7 +113,7 @@ sal_Bool XMLShadowPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rV
while( aTokenEnum.getNextToken( aToken ) )
{
- if( aToken.compareToAscii( sXML_none ) == 0 )
+ if( IsXMLToken( aToken, XML_NONE ) )
{
aShadow.Location = table::ShadowLocation_NONE;
bRet = sal_True;
@@ -197,7 +198,7 @@ sal_Bool XMLShadowPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV
break;
case table::ShadowLocation_NONE:
default:
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+ rStrExpValue = GetXMLToken(XML_NONE);
return sal_True;
}
diff --git a/xmloff/source/style/shdwdhdl.cxx b/xmloff/source/style/shdwdhdl.cxx
index 5dccfe18436d..f642ad7e1c51 100644
--- a/xmloff/source/style/shdwdhdl.cxx
+++ b/xmloff/source/style/shdwdhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shdwdhdl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,12 +73,13 @@
// --
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include <xmlkywd.hxx>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include <xmltoken.hxx>
#endif
using namespace ::rtl;
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
///////////////////////////////////////////////////////////////////////////////
//
@@ -94,7 +95,7 @@ sal_Bool XMLShadowedPropHdl::importXML( const OUString& rStrImpValue, Any& rValu
{
sal_Bool bRet = sal_False;
- sal_Bool bValue = rStrImpValue.compareToAscii( sXML_none ) != 0;
+ sal_Bool bValue = IsXMLToken( rStrImpValue, XML_NONE );
rValue <<= sal_Bool(bValue);
bRet = sal_True;
@@ -114,7 +115,7 @@ sal_Bool XMLShadowedPropHdl::exportXML( OUString& rStrExpValue, const Any& rValu
}
else
{
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+ rStrExpValue = GetXMLToken( XML_NONE );
}
bRet = sal_True;
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index d5386e926d09..b34d4874a350 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: styleexp.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: sab $ $Date: 2001-02-27 16:38:56 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,8 +73,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLITMAP_HXX
//#include "xmlitmap.hxx"
@@ -141,6 +141,8 @@ using namespace ::com::sun::star::style;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
//using namespace ::com::sun::star::text;
+using namespace ::xmloff::token;
+
using ::com::sun::star::document::XEventsSupplier;
XMLStyleExport::XMLStyleExport(
@@ -171,7 +173,7 @@ void XMLStyleExport::exportStyleContent( const Reference< XStyle >& rStyle )
sal_Bool XMLStyleExport::exportStyle(
const Reference< XStyle >& rStyle,
- const sal_Char *pXMLFamily,
+ const OUString& rXMLFamily,
const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
const OUString* pPrefix )
{
@@ -200,12 +202,11 @@ sal_Bool XMLStyleExport::exportStyle(
sName = *pPrefix;
sName += rStyle->getName();
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_name, sName );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, sName );
// style:family="..."
- if( pXMLFamily )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_family,
- pXMLFamily );
+ if( rXMLFamily.getLength() > 0 )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, rXMLFamily);
// style:parent-style-name="..."
OUString sParentString(rStyle->getParentStyle());
@@ -221,7 +222,7 @@ sal_Bool XMLStyleExport::exportStyle(
sParent = sPoolStyleName;
if( sParent.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_parent_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_PARENT_STYLE_NAME,
sParent );
// style:next-style-name="..." (paragraph styles only)
@@ -232,7 +233,7 @@ sal_Bool XMLStyleExport::exportStyle(
aAny >>= sNextName;
if( sName != sNextName )
{
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_next_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NEXT_STYLE_NAME,
sNextName );
}
}
@@ -242,8 +243,8 @@ sal_Bool XMLStyleExport::exportStyle(
{
aAny = xPropSet->getPropertyValue( sIsAutoUpdate );
if( *(sal_Bool *)aAny.getValue() )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_auto_update,
- sXML_true );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_AUTO_UPDATE,
+ XML_TRUE );
}
// style:list-style-name="..." (SW paragarph styles only)
@@ -259,7 +260,7 @@ sal_Bool XMLStyleExport::exportStyle(
OUString sListName;
aAny >>= sListName;
if( sListName.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_list_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_LIST_STYLE_NAME,
sListName );
}
}
@@ -275,7 +276,7 @@ sal_Bool XMLStyleExport::exportStyle(
{
// <style:style>
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, sXML_style,
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, XML_STYLE,
sal_True, sal_True );
// <style:properties>
::std::vector< XMLPropertyState > xPropStates =
@@ -295,7 +296,7 @@ sal_Bool XMLStyleExport::exportStyle(
sal_Bool XMLStyleExport::exportDefaultStyle(
const Reference< XPropertySet >& xPropSet,
- const sal_Char *pXMLFamily,
+ const OUString& rXMLFamily,
const UniReference < SvXMLExportPropertyMapper >& rPropMapper )
{
Reference< XPropertySetInfo > xPropSetInfo =
@@ -308,12 +309,12 @@ sal_Bool XMLStyleExport::exportDefaultStyle(
{
// style:family="..."
- if( pXMLFamily )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_family,
- pXMLFamily );
+ if( rXMLFamily.getLength() > 0 )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY,
+ rXMLFamily );
// <style:style>
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_default_style,
+ XML_DEFAULT_STYLE,
sal_True, sal_True );
// <style:properties>
//::std::vector< XMLPropertyState > xPropStates =
@@ -332,42 +333,42 @@ sal_Bool XMLStyleExport::exportDefaultStyle(
#if 0
void XMLStyleExport::exportStyleFamily(
const sal_Char *pFamily,
- const sal_Char *pXMLFamily,
+ const OUString& rXMLFamily,
const UniReference < XMLPropertySetMapper >& rPropMapper,
sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
{
const OUString sFamily(OUString::createFromAscii(pFamily ));
UniReference < SvXMLExportPropertyMapper > xExpPropMapper =
new SvXMLExportPropertyMapper( rPropMapper );
- exportStyleFamily( sFamily, pXMLFamily, xExpPropMapper, bUsed, nFamily,
+ exportStyleFamily( sFamily, rXMLFamily, xExpPropMapper, bUsed, nFamily,
pPrefix);
}
void XMLStyleExport::exportStyleFamily(
- const OUString& rFamily, const sal_Char *pXMLFamily,
+ const OUString& rFamily, const OUString& rXMLFamily,
const UniReference < XMLPropertySetMapper >& rPropMapper,
sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
{
UniReference < SvXMLExportPropertyMapper > xExpPropMapper =
new SvXMLExportPropertyMapper( rPropMapper );
- exportStyleFamily( rFamily, pXMLFamily, xExpPropMapper, bUsed, nFamily,
+ exportStyleFamily( rFamily, rXMLFamily, xExpPropMapper, bUsed, nFamily,
pPrefix);
}
#endif
void XMLStyleExport::exportStyleFamily(
const sal_Char *pFamily,
- const sal_Char *pXMLFamily,
+ const OUString& rXMLFamily,
const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
{
const OUString sFamily(OUString::createFromAscii(pFamily ));
- exportStyleFamily( sFamily, pXMLFamily, rPropMapper, bUsed, nFamily,
+ exportStyleFamily( sFamily, rXMLFamily, rPropMapper, bUsed, nFamily,
pPrefix);
}
void XMLStyleExport::exportStyleFamily(
- const OUString& rFamily, const sal_Char *pXMLFamily,
+ const OUString& rFamily, const OUString& rXMLFamily,
const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
{
@@ -413,7 +414,7 @@ void XMLStyleExport::exportStyleFamily(
{
if( !bUsed || xStyle->isInUse() )
{
- BOOL bExported = exportStyle( xStyle, pXMLFamily, rPropMapper,
+ BOOL bExported = exportStyle( xStyle, rXMLFamily, rPropMapper,
pPrefix );
if( bUsed && bFirstStyle && bExported )
{
@@ -488,7 +489,7 @@ void XMLStyleExport::exportStyleFamily(
xStyleCont->getByName( sNextName ) >>= xStyle;
DBG_ASSERT( xStyle.is(), "Style not found for export!" );
- if( xStyle.is() && exportStyle( xStyle, pXMLFamily, rPropMapper, pPrefix ) )
+ if( xStyle.is() && exportStyle( xStyle, rXMLFamily, rPropMapper, pPrefix ) )
pExportedStyles->Insert( new String( sTmp ) );
}
}
diff --git a/xmloff/source/style/undlihdl.cxx b/xmloff/source/style/undlihdl.cxx
index bad7cc11211d..32bfa2bd3374 100644
--- a/xmloff/source/style/undlihdl.cxx
+++ b/xmloff/source/style/undlihdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: undlihdl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <undlihdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
diff --git a/xmloff/source/style/weighhdl.cxx b/xmloff/source/style/weighhdl.cxx
index 58b3cc3c25c0..bcf0b83ce331 100644
--- a/xmloff/source/style/weighhdl.cxx
+++ b/xmloff/source/style/weighhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: weighhdl.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:05 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,8 @@
#include <weighhdl.hxx>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -101,6 +101,7 @@
using namespace ::rtl;
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
struct FontWeightMapper
{
@@ -139,12 +140,12 @@ sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rVa
sal_Bool bRet = sal_False;
sal_uInt16 nWeight = 0;
- if( rStrImpValue.compareToAscii( sXML_weight_normal ) == 0 )
+ if( IsXMLToken( rStrImpValue, XML_WEIGHT_NORMAL ) )
{
nWeight = 400;
bRet = sal_True;
}
- else if( rStrImpValue.compareToAscii( sXML_weight_bold ) == 0 )
+ else if( IsXMLToken( rStrImpValue, XML_WEIGHT_BOLD ) )
{
nWeight = 700;
bRet = sal_True;
@@ -217,9 +218,9 @@ sal_Bool XMLFontWeightPropHdl::exportXML( OUString& rStrExpValue, const Any& rVa
OUStringBuffer aOut;
if( 400 == nWeight )
- aOut.appendAscii( sXML_weight_normal );
+ aOut.append( GetXMLToken(XML_WEIGHT_NORMAL) );
else if( 700 == nWeight )
- aOut.appendAscii( sXML_weight_bold );
+ aOut.append( GetXMLToken(XML_WEIGHT_BOLD) );
else
rUnitConverter.convertNumber( aOut, (sal_Int32)nWeight );
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index c83bbb770064..2d9275bada8b 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlaustp.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: sab $ $Date: 2001-05-29 15:38:59 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,9 +75,6 @@
#ifndef _XMLOFF_ATTRLIST_HXX
#include "attrlist.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
#ifndef _XMLOFF_NMSPMAP_HXX
#include "nmspmap.hxx"
#endif
@@ -105,6 +102,7 @@
using namespace ::std;
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
void SvXMLAutoStylePoolP::exportStyleAttributes(
@@ -178,12 +176,11 @@ void SvXMLAutoStylePoolP::exportStyleAttributes(
{
OUString sAttrName( rNamespaceMap.GetQNameByKey(
aPropMapper->GetEntryNameSpace( nIndex ), aPropMapper->GetEntryXMLName( nIndex ) ) );
- OUString sCDATA( RTL_CONSTASCII_USTRINGPARAM( sXML_CDATA ) );
OUString sValue;
const XMLPropertyHandler* pPropHdl = aPropMapper->GetPropertyHandler( nIndex );
if( pPropHdl && pPropHdl->exportXML( sValue, pProp->maValue, rUnitConverter ) &&
- (sValue.compareToAscii( sXML_all ) != 0) )
- rAttrList.AddAttribute( sAttrName, sCDATA, sValue );
+ ( ! IsXMLToken( sValue, XML_ALL ) ) )
+ rAttrList.AddAttribute( sAttrName, GetXMLToken(XML_CDATA), sValue );
}
break;
}
@@ -202,8 +199,7 @@ void SvXMLAutoStylePoolP::exportStyleContent(
{
if( nFamily == XML_STYLE_FAMILY_PAGE_MASTER )
{
- OUString sType( RTL_CONSTASCII_USTRINGPARAM( sXML_CDATA ) );
- OUString sWS( RTL_CONSTASCII_USTRINGPARAM( sXML_WS ) );
+ OUString sWS( GetXMLToken(XML_WS) );
sal_Int32 nHeaderStartIndex(-1);
sal_Int32 nHeaderEndIndex(-1);
@@ -259,7 +255,7 @@ void SvXMLAutoStylePoolP::exportStyleContent(
uno::Reference< xml::sax::XAttributeList > xEmptyList;
- OUString sNameHeader( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii( sXML_header_style ) ) );
+ OUString sNameHeader( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_HEADER_STYLE) ) );
rHandler->ignorableWhitespace( sWS );
rHandler->startElement( sNameHeader, xEmptyList );
@@ -267,7 +263,7 @@ void SvXMLAutoStylePoolP::exportStyleContent(
rHandler->ignorableWhitespace( sWS );
rHandler->endElement( sNameHeader );
- OUString sNameFooter( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii( sXML_footer_style ) ) );
+ OUString sNameFooter( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_FOOTER_STYLE) ) );
rHandler->ignorableWhitespace( sWS );
rHandler->startElement( sNameFooter, xEmptyList );
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index 90e3e83728f7..3da624080fd9 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlbahdl.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: mib $ $Date: 2001-03-28 09:02:20 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,10 +74,13 @@
#include <com/sun/star/uno/Any.hxx>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
using namespace ::rtl;
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
void lcl_xmloff_setAny( Any& rValue, sal_Int32 nValue, sal_Int8 nBytes )
{
@@ -175,13 +178,13 @@ sal_Bool XMLNumberPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue,
//
XMLNumberNonePropHdl::XMLNumberNonePropHdl( sal_Int8 nB ) :
- sZeroStr( RTL_CONSTASCII_USTRINGPARAM( sXML_no_limit ) ),
+ sZeroStr( GetXMLToken(XML_NO_LIMIT) ),
nBytes( nB )
{
}
-XMLNumberNonePropHdl::XMLNumberNonePropHdl( const sal_Char* sZeroString, sal_Int8 nB ) :
- sZeroStr( OUString::createFromAscii( sZeroString ) ),
+XMLNumberNonePropHdl::XMLNumberNonePropHdl( enum XMLTokenEnum eZeroString, sal_Int8 nB ) :
+ sZeroStr( GetXMLToken( eZeroString ) ),
nBytes( nB )
{
}
@@ -538,9 +541,9 @@ sal_Bool XMLDoublePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue,
//
XMLColorTransparentPropHdl::XMLColorTransparentPropHdl(
- const sal_Char *pTransparent ) :
- sTransparent( OUString::createFromAscii( pTransparent ? pTransparent
- : sXML_transparent ) )
+ enum XMLTokenEnum eTransparent ) :
+ sTransparent( GetXMLToken(
+ eTransparent != XML_TOKEN_INVALID ? eTransparent : XML_TRANSPARENT ) )
{
// Nothing to do
}
@@ -591,9 +594,9 @@ sal_Bool XMLColorTransparentPropHdl::exportXML( OUString& rStrExpValue, const An
//
XMLIsTransparentPropHdl::XMLIsTransparentPropHdl(
- const sal_Char *pTransparent, sal_Bool bTransPropVal ) :
- sTransparent( OUString::createFromAscii( pTransparent ? pTransparent
- : sXML_transparent ) ),
+ enum XMLTokenEnum eTransparent, sal_Bool bTransPropVal ) :
+ sTransparent( GetXMLToken(
+ eTransparent != XML_TOKEN_INVALID ? eTransparent : XML_TRANSPARENT ) ),
bTransPropValue( bTransPropVal )
{
}
diff --git a/xmloff/source/style/xmlbahdl.hxx b/xmloff/source/style/xmlbahdl.hxx
index c6d66f4914d8..f9df9022e190 100644
--- a/xmloff/source/style/xmlbahdl.hxx
+++ b/xmloff/source/style/xmlbahdl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlbahdl.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: mib $ $Date: 2001-03-28 09:02:20 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,11 @@
#include <rtl/ustrbuf.hxx>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
+
/**
PropertyHandler for the XML-data-type: XML_TYPE_NUMBER
*/
@@ -94,7 +99,7 @@ class XMLNumberNonePropHdl : public XMLPropertyHandler
sal_Int8 nBytes;
public:
XMLNumberNonePropHdl( sal_Int8 nB = 4 );
- XMLNumberNonePropHdl( const sal_Char* sZeroString, sal_Int8 nB = 4 );
+ XMLNumberNonePropHdl( enum ::xmloff::token::XMLTokenEnum eZeroString, sal_Int8 nB = 4 );
virtual ~XMLNumberNonePropHdl();
virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
@@ -211,7 +216,7 @@ class XMLColorTransparentPropHdl : public XMLPropertyHandler
const ::rtl::OUString sTransparent;
public:
- XMLColorTransparentPropHdl( const sal_Char *pTransparent=0 );
+ XMLColorTransparentPropHdl( enum ::xmloff::token::XMLTokenEnum eTransparent = xmloff::token::XML_TOKEN_INVALID );
virtual ~XMLColorTransparentPropHdl();
virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
@@ -227,7 +232,7 @@ class XMLIsTransparentPropHdl : public XMLPropertyHandler
sal_Bool bTransPropValue;
public:
- XMLIsTransparentPropHdl( const sal_Char *pTransparent=0,
+ XMLIsTransparentPropHdl( enum ::xmloff::token::XMLTokenEnum eTransparent = xmloff::token::XML_TOKEN_INVALID,
sal_Bool bTransPropValue = sal_True );
virtual ~XMLIsTransparentPropHdl();
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 508476ee5471..ac66038615f1 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexppr.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: sab $ $Date: 2001-06-07 09:43:41 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,8 +93,8 @@
#include "xmlexppr.hxx"
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_ATTRLIST_HXX
@@ -127,6 +127,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
+using namespace ::xmloff::token;
///////////////////////////////////////////////////////////////////////////////
//
@@ -881,13 +882,11 @@ void SvXMLExportPropertyMapper::exportXML(
{
if( (nFlags & XML_EXPORT_FLAG_IGN_WS) != 0 )
{
- OUString sWS( OUString::createFromAscii(sXML_WS) );
- rHandler->ignorableWhitespace( sWS );
+ rHandler->ignorableWhitespace( GetXMLToken(XML_WS) );
}
- OUString sLName( OUString::createFromAscii(sXML_properties) );
OUString sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE,
- sLName );
+ GetXMLToken(XML_PROPERTIES) );
rHandler->startElement( sName, xAttrList );
exportElementItems( rHandler, rUnitConverter, rNamespaceMap,
@@ -989,7 +988,7 @@ void SvXMLExportPropertyMapper::_exportXML(
const ::std::vector< XMLPropertyState > *pProperties,
sal_uInt32 nIdx ) const
{
- OUString sCDATA( OUString::createFromAscii( sXML_CDATA ) );
+ OUString sCDATA( GetXMLToken(XML_CDATA) );
if ( ( maPropMapper->GetEntryFlags( rProperty.mnIndex ) &
MID_FLAG_SPECIAL_ITEM_EXPORT ) != 0 )
@@ -1033,7 +1032,7 @@ void SvXMLExportPropertyMapper::_exportXML(
}
pNewNamespaceMap->Add( sPrefix, sNamespace );
- sName.appendAscii( sXML_xmlns );
+ sName.append( GetXMLToken(XML_XMLNS) );
sName.append( sal_Unicode(':') );
sName.append( sPrefix );
rAttrList.AddAttribute( sName.makeStringAndClear(), sCDATA,
@@ -1088,7 +1087,7 @@ void SvXMLExportPropertyMapper::exportElementItems(
const sal_uInt16 nCount = rIndexArray.Count();
sal_Bool bItemsExported = sal_False;
- OUString sWS( OUString::createFromAscii(sXML_WS) );
+ OUString sWS( GetXMLToken(XML_WS) );
for( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
const sal_uInt16 nElement = rIndexArray.GetObject( nIndex );
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index ba503d7f36d3..5a47124208c0 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlimppr.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: dvo $ $Date: 2001-06-25 17:22:37 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,10 @@
#include "unoatrcn.hxx"
#include "xmlnmspe.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
// STL includes
#include <algorithm>
#include <functional>
@@ -102,6 +106,7 @@ using namespace ::com::sun::star::xml;
using namespace ::com::sun::star::xml::sax;
using namespace ::rtl;
using namespace ::std;
+using namespace ::xmloff::token;
SvXMLImportPropertyMapper::SvXMLImportPropertyMapper(
const UniReference< XMLPropertySetMapper >& rMapper ) :
@@ -258,9 +263,9 @@ void SvXMLImportPropertyMapper::importXML(
xAttrContainer = xNew;
// find map entry and create new property state
- nIndex = maPropMapper->FindEntryIndex( "TextUserDefinedAttributes", XML_NAMESPACE_TEXT, sXML_xmlns );
+ nIndex = maPropMapper->FindEntryIndex( "TextUserDefinedAttributes", XML_NAMESPACE_TEXT, GetXMLToken(XML_XMLNS) );
if( nIndex == -1 )
- nIndex = maPropMapper->FindEntryIndex( "UserDefinedAttributes", XML_NAMESPACE_TEXT, sXML_xmlns );
+ nIndex = maPropMapper->FindEntryIndex( "UserDefinedAttributes", XML_NAMESPACE_TEXT, GetXMLToken(XML_XMLNS) );
Any aAny;
aAny <<= xAttrContainer;
@@ -273,7 +278,7 @@ void SvXMLImportPropertyMapper::importXML(
if( xAttrContainer.is() )
{
AttributeData aData;
- aData.Type = OUString::createFromAscii( sXML_CDATA );
+ aData.Type = GetXMLToken( XML_CDATA );
aData.Value = rValue;
OUStringBuffer sName;
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 26c9ffc160f5..f9567e4f425d 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlnume.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: cl $ $Date: 2001-06-29 12:34:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,8 +76,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
@@ -148,6 +148,7 @@ using namespace ::com::sun::star::style;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
+using namespace ::xmloff::token;
static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance";
static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering";
@@ -328,25 +329,25 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
// text:level
OUStringBuffer sTmp;
sTmp.append( nLevel+1L );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_level, sTmp.makeStringAndClear() );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, sTmp.makeStringAndClear() );
if( sTextStyleName.getLength() > 0 )
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name, sTextStyleName );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, sTextStyleName );
if( sPrefix.getLength() > 0 )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_num_prefix, sPrefix );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX, sPrefix );
if( sSuffix.getLength() > 0 )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_num_suffix, sSuffix );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_SUFFIX, sSuffix );
- const sal_Char *pElem = sXML_list_level_style_number;
+ enum XMLTokenEnum eElem = XML_LIST_LEVEL_STYLE_NUMBER;
if( NumberingType::CHAR_SPECIAL == eType )
{
// <text:list-level-style-bullet>
- pElem = sXML_list_level_style_bullet;
+ eElem = XML_LIST_LEVEL_STYLE_BULLET;
if( cBullet )
{
// text:bullet-char="..."
sTmp.append( cBullet );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_bullet_char,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_BULLET_CHAR,
sTmp.makeStringAndClear() );
}
@@ -355,7 +356,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
{
// <text:list-level-style-image>
- pElem = sXML_list_level_style_image;
+ eElem = XML_LIST_LEVEL_STYLE_IMAGE;
if( sImageURL.getLength() )
@@ -366,11 +367,11 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
OUString sURL( GetExport().AddEmbeddedGraphicObject( sImageURL ) );
if( sURL.getLength() )
{
- GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href, sURL );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show, sXML_embed );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
}
else
@@ -383,35 +384,35 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
{
// <text:list-level-style-number> or <text:outline-level-style>
if( bOutline )
- pElem = sXML_outline_level_style;
+ eElem = XML_OUTLINE_LEVEL_STYLE;
else
- pElem = sXML_list_level_style_number;
+ eElem = XML_LIST_LEVEL_STYLE_NUMBER;
GetExport().GetMM100UnitConverter().convertNumFormat( sTmp, eType );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_num_format,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_FORMAT,
sTmp.makeStringAndClear() );
GetExport().GetMM100UnitConverter().convertNumLetterSync( sTmp, eType );
if( sTmp.getLength() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_num_letter_sync,
+ XML_NUM_LETTER_SYNC,
sTmp.makeStringAndClear() );
if( nStartValue > 1 )
{
sTmp.append( (sal_Int32)nStartValue );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_start_value,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE,
sTmp.makeStringAndClear() );
}
if( nDisplayLevels > 1 && NumberingType::NUMBER_NONE != eType )
{
sTmp.append( (sal_Int32)nDisplayLevels );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_display_levels,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_DISPLAY_LEVELS,
sTmp.makeStringAndClear() );
}
}
{
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, pElem,
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, eElem,
sal_True, sal_True );
nSpaceBefore += nMinLabelWidth;
@@ -420,31 +421,31 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
if( nSpaceBefore > 0 )
{
GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nSpaceBefore );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_space_before,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_SPACE_BEFORE,
sBuffer.makeStringAndClear() );
}
if( nMinLabelWidth != 0 )
{
GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nMinLabelWidth );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_min_label_width,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_MIN_LABEL_WIDTH,
sBuffer.makeStringAndClear() );
}
if( nMinLabelDist > 0 )
{
GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nMinLabelDist );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_min_label_distance,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_MIN_LABEL_DISTANCE,
sBuffer.makeStringAndClear() );
}
if( HoriOrientation::LEFT != eAdjust )
{
- const char *pValue = 0;
+ enum XMLTokenEnum eValue = XML_TOKEN_INVALID;
switch( eAdjust )
{
- case HoriOrientation::RIGHT: pValue = sXML_end; break;
- case HoriOrientation::CENTER: pValue = sXML_center; break;
+ case HoriOrientation::RIGHT: eValue = XML_END; break;
+ case HoriOrientation::CENTER: eValue = XML_CENTER; break;
}
- if( pValue )
- GetExport().AddAttributeASCII( XML_NAMESPACE_FO, sXML_text_align, pValue );
+ if( eValue != XML_TOKEN_INVALID )
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_TEXT_ALIGN, eValue );
}
if( NumberingType::CHAR_SPECIAL == eType )
@@ -460,7 +461,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
if( sStyleName.getLength() )
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_name,
+ XML_FONT_NAME,
sStyleName );
}
else
@@ -474,93 +475,93 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
aAny <<= sBulletFontName;
if( aFamilyNameHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_FO,
- sXML_font_family, sTmp );
+ XML_FONT_FAMILY, sTmp );
if( sBulletFontStyleName.getLength() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_style_name,
+ XML_FONT_STYLE_NAME,
sBulletFontStyleName );
XMLFontFamilyPropHdl aFamilyHdl;
aAny <<= (sal_Int16)eBulletFontFamily;
if( aFamilyHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_family_generic,
+ XML_FONT_FAMILY_GENERIC,
sTmp );
XMLFontPitchPropHdl aPitchHdl;
aAny <<= (sal_Int16)eBulletFontPitch;
if( aPitchHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_pitch, sTmp );
+ XML_FONT_PITCH, sTmp );
XMLFontEncodingPropHdl aEncHdl;
aAny <<= (sal_Int16)eBulletFontEncoding;
if( aEncHdl.exportXML( sTmp, aAny, rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_font_charset, sTmp );
+ XML_FONT_CHARSET, sTmp );
}
}
}
else if( NumberingType::BITMAP == eType )
{
- const char *pValue = 0;
+ enum XMLTokenEnum eValue = XML_TOKEN_INVALID;
switch( eImageVertOrient )
{
case VertOrientation::BOTTOM: // yes, its OK: BOTTOM means that the baseline
// hits the frame at its topmost position
case VertOrientation::LINE_TOP:
case VertOrientation::CHAR_TOP:
- pValue = sXML_top;
+ eValue = XML_TOP;
break;
case VertOrientation::CENTER:
case VertOrientation::LINE_CENTER:
case VertOrientation::CHAR_CENTER:
- pValue = sXML_middle;
+ eValue = XML_MIDDLE;
break;
case VertOrientation::TOP: // yes, its OK: TOP means that the baseline
// hits the frame at its bottommost position
case VertOrientation::LINE_BOTTOM:
case VertOrientation::CHAR_BOTTOM:
- pValue = sXML_bottom;
+ eValue = XML_BOTTOM;
break;
}
- if( pValue )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_vertical_pos, pValue );
+ if( eValue != XML_TOKEN_INVALID )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_VERTICAL_POS, eValue );
- pValue = 0;
+ eValue = XML_TOKEN_INVALID;
switch( eImageVertOrient )
{
case VertOrientation::TOP:
case VertOrientation::CENTER:
case VertOrientation::BOTTOM:
- pValue = sXML_baseline;
+ eValue = XML_BASELINE;
break;
case VertOrientation::LINE_TOP:
case VertOrientation::LINE_CENTER:
case VertOrientation::LINE_BOTTOM:
- pValue = sXML_line;
+ eValue = XML_LINE;
break;
case VertOrientation::CHAR_TOP:
case VertOrientation::CHAR_CENTER:
case VertOrientation::CHAR_BOTTOM:
- pValue = sXML_char;
+ eValue = XML_CHAR;
break;
}
- if( pValue )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_vertical_rel, pValue );
+ if( eValue != XML_TOKEN_INVALID )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_VERTICAL_REL, eValue );
if( nImageWidth > 0 )
{
GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nImageWidth );
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_width,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_WIDTH,
sBuffer.makeStringAndClear() );
}
if( nImageHeight > 0 )
{
GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nImageHeight );
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_height,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_HEIGHT,
sBuffer.makeStringAndClear() );
}
}
@@ -572,7 +573,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
{
const Color aColor( nColor );
SvXMLUnitConverter::convertColor( sBuffer, aColor );
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_color,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_COLOR,
sBuffer.makeStringAndClear() );
}
@@ -580,7 +581,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
if( nBullRelSize )
{
GetExport().GetMM100UnitConverter().convertPercent( sTmp, nBullRelSize );
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_font_size,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_FONT_SIZE,
sTmp.makeStringAndClear() );
}
}
@@ -588,7 +589,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
if( GetExport().GetAttrList().getLength() > 0 )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_properties, sal_True, sal_True );
+ XML_PROPERTIES, sal_True, sal_True );
}
if( NumberingType::BITMAP == eType && sImageURL.getLength() )
{
@@ -628,18 +629,18 @@ void SvxXMLNumRuleExport::Export( const OUString& rName,
// style:name="..."
if( rName.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_name, rName );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, rName );
// text:consecutive-numbering="..."
if( bContNumbering )
- GetExport().AddAttributeASCII( XML_NAMESPACE_TEXT, sXML_consecutive_numbering,
- sXML_true );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_CONSECUTIVE_NUMBERING,
+ XML_TRUE );
// other application specific attributes
AddListStyleAttributes();
OUString sElem = GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT,
- OUString::createFromAscii(sXML_list_style) );
+ GetXMLToken(XML_LIST_STYLE) );
GetExport().GetDocHandler()->ignorableWhitespace( sWS );
GetExport().GetDocHandler()->startElement( sElem, GetExport().GetXAttrList() );
GetExport().ClearAttrList();
@@ -657,7 +658,7 @@ void SvxXMLNumRuleExport::ExportOutline()
GetExport().CheckAttrList();
OUString sElem = GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT,
- OUString::createFromAscii(sXML_outline_style) );
+ GetXMLToken(XML_OUTLINE_STYLE) );
GetExport().GetDocHandler()->ignorableWhitespace( sWS );
GetExport().GetDocHandler()->startElement( sElem, GetExport().GetXAttrList() );
@@ -682,7 +683,7 @@ void SvxXMLNumRuleExport::exportNumberingRule(
// style:name="..."
if( rName.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_name, rName );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, rName );
// text:consecutive-numbering="..."
sal_Bool bContNumbering = sal_False;
@@ -693,14 +694,14 @@ void SvxXMLNumRuleExport::exportNumberingRule(
bContNumbering = *(sal_Bool *)aAny.getValue();
}
if( bContNumbering )
- GetExport().AddAttributeASCII( XML_NAMESPACE_TEXT,
- sXML_consecutive_numbering, sXML_true );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT,
+ XML_CONSECUTIVE_NUMBERING, XML_TRUE );
// other application specific attributes
AddListStyleAttributes();
{
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, sXML_list_style ,
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, XML_LIST_STYLE ,
sal_True, sal_True );
exportLevelStyles( rNumRule );
}
@@ -747,7 +748,7 @@ void SvxXMLNumRuleExport::exportOutline()
if( xNumRule.is() )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_outline_style, sal_True, sal_True );
+ XML_OUTLINE_STYLE, sal_True, sal_True );
exportLevelStyles( xNumRule, sal_True );
}
}
@@ -799,59 +800,3 @@ void SvxXMLNumRuleExport::exportStyles( sal_Bool bUsed,
}
}
}
-
-#if SUPD < 627
-const sal_Char *SvxXMLNumRuleExport::GetNumFormatValue( sal_Int16 eNumType )
-{
- const sal_Char *pFormat = 0;
- switch( eNumType )
- {
- case NumberingType::CHARS_UPPER_LETTER: pFormat = sXML_A; break;
- case NumberingType::CHARS_LOWER_LETTER: pFormat = sXML_a; break;
- case NumberingType::ROMAN_UPPER: pFormat = sXML_I; break;
- case NumberingType::ROMAN_LOWER: pFormat = sXML_i; break;
- case NumberingType::ARABIC: pFormat = sXML_1; break;
- case NumberingType::CHARS_UPPER_LETTER_N: pFormat = sXML_A; break;
- case NumberingType::CHARS_LOWER_LETTER_N: pFormat = sXML_a; break;
- case NumberingType::NUMBER_NONE: pFormat = sXML__empty; break;
-
- case NumberingType::CHAR_SPECIAL:
- case NumberingType::PAGE_DESCRIPTOR:
- case NumberingType::BITMAP:
- DBG_ASSERT( pFormat, "invalid number format" );
- break;
- }
-
- return pFormat;
-}
-
-const sal_Char *SvxXMLNumRuleExport::GetNumLetterSync( sal_Int16 eNumType )
-{
- const sal_Char *pSync = 0;
- switch( eNumType )
- {
- case NumberingType::CHARS_UPPER_LETTER:
- case NumberingType::CHARS_LOWER_LETTER:
- case NumberingType::ROMAN_UPPER:
- case NumberingType::ROMAN_LOWER:
- case NumberingType::ARABIC:
- case NumberingType::NUMBER_NONE:
- // default
- // pSync = sXML_false;
- break;
-
- case NumberingType::CHARS_UPPER_LETTER_N:
- case NumberingType::CHARS_LOWER_LETTER_N:
- pSync = sXML_true;
- break;
-
- case NumberingType::CHAR_SPECIAL:
- case NumberingType::PAGE_DESCRIPTOR:
- case NumberingType::BITMAP:
- DBG_ASSERT( pSync, "invalid number format" );
- break;
- }
-
- return pSync;
-}
-#endif
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index a50211edb7d4..5305c74b9930 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlnumfe.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: nn $ $Date: 2001-06-27 13:02:58 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,7 +77,6 @@
#include "xmlnumfe.hxx"
#include "xmlnmspe.hxx"
-#include "xmlkywd.hxx"
#include "xmluconv.hxx"
#include "attrlist.hxx"
#include "nmspmap.hxx"
@@ -87,12 +86,15 @@
#define _SVSTDARR_USHORTS
#include <svtools/svstdarr.hxx>
-#ifndef __SGI_STL_SET
-#include <set>
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
+#include <set>
+
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
//-------------------------------------------------------------------------
@@ -275,8 +277,8 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
xHandler( rHdl ),
pFormatter( NULL ),
pNamespaceMap( NULL ),
- sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- sWS( OUString::createFromAscii( sXML_WS ) ),
+ sCDATA( GetXMLToken(XML_CDATA) ),
+ sWS( GetXMLToken(XML_WS) ),
pCharClass( NULL ),
pLocaleData( NULL ),
sPrefix( OUString::createFromAscii( "N" ) )
@@ -315,8 +317,8 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( const ::com::sun::star::uno::Reference<
xHandler( rHdl ),
pFormatter( NULL ),
pNamespaceMap( NULL ),
- sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- sWS( OUString::createFromAscii( sXML_WS ) ),
+ sCDATA( GetXMLToken(XML_CDATA) ),
+ sWS( GetXMLToken(XML_WS) ),
pCharClass( NULL ),
pLocaleData( NULL ),
sPrefix( rPrefix )
@@ -378,7 +380,7 @@ void SvXMLNumFmtExport::AddCalendarAttr_Impl( const OUString& rCalendar )
if ( rCalendar.getLength() )
{
OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_calendar ) );
+ GetXMLToken(XML_CALENDAR) );
OUString sAttrValue = rCalendar;
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -389,9 +391,8 @@ void SvXMLNumFmtExport::AddTextualAttr_Impl( sal_Bool bText )
if ( bText ) // non-textual
{
OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_textual ) );
- OUString sAttrValue = OUString::createFromAscii( sXML_true );
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_TEXTUAL) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_TRUE) );
}
}
@@ -400,9 +401,8 @@ void SvXMLNumFmtExport::AddStyleAttr_Impl( sal_Bool bLong )
if ( bLong ) // short is default
{
OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_style ) );
- OUString sAttrValue = OUString::createFromAscii( sXML_long );
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_STYLE) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_LONG) );
}
}
@@ -416,13 +416,13 @@ void SvXMLNumFmtExport::AddLanguageAttr_Impl( sal_Int32 nLang )
OUString sAttrName, sAttrValue;
if (aLangStr.Len())
{
- sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii(sXML_language) );
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, GetXMLToken(XML_LANGUAGE) );
sAttrValue = aLangStr;
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
if (aCountryStr.Len())
{
- sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii(sXML_country) );
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, GetXMLToken(XML_COUNTRY) );
sAttrValue = aCountryStr;
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -450,7 +450,7 @@ void SvXMLNumFmtExport::FinishTextElement_Impl()
if ( sTextContent.getLength() )
{
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_text ) );
+ GetXMLToken(XML_TEXT) );
OUString sContentStr = sTextContent.makeStringAndClear();
xHandler->ignorableWhitespace( sWS );
@@ -465,10 +465,10 @@ void SvXMLNumFmtExport::WriteColorElement_Impl( const Color& rColor )
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
- OUString::createFromAscii( sXML_properties ) );
+ GetXMLToken(XML_PROPERTIES) );
OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_FO,
- OUString::createFromAscii(sXML_color) );
+ GetXMLToken(XML_COLOR) );
OUStringBuffer aColStr( 7 );
SvXMLUnitConverter::convertColor( aColStr, rColor );
OUString sAttrValue = aColStr.makeStringAndClear();
@@ -487,7 +487,7 @@ void SvXMLNumFmtExport::WriteCurrencyElement_Impl( const OUString& rString,
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_currency_symbol ) );
+ GetXMLToken(XML_CURRENCY_SYMBOL) );
if ( rExt.getLength() )
{
@@ -510,7 +510,7 @@ void SvXMLNumFmtExport::WriteBooleanElement_Impl()
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_boolean ) );
+ GetXMLToken(XML_BOOLEAN) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->endElement( sElem );
@@ -521,7 +521,7 @@ void SvXMLNumFmtExport::WriteTextContentElement_Impl()
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_text_content ) );
+ GetXMLToken(XML_TEXT_CONTENT) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->endElement( sElem );
@@ -534,7 +534,7 @@ void SvXMLNumFmtExport::WriteDayElement_Impl( const OUString& rCalendar, sal_Boo
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_day ) );
+ GetXMLToken(XML_DAY) );
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -551,7 +551,7 @@ void SvXMLNumFmtExport::WriteMonthElement_Impl( const OUString& rCalendar, sal_B
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_month ) );
+ GetXMLToken(XML_MONTH) );
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -569,7 +569,7 @@ void SvXMLNumFmtExport::WriteYearElement_Impl( const OUString& rCalendar, sal_Bo
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_year ) );
+ GetXMLToken(XML_YEAR) );
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -586,7 +586,7 @@ void SvXMLNumFmtExport::WriteEraElement_Impl( const OUString& rCalendar, sal_Boo
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_era ) );
+ GetXMLToken(XML_ERA) );
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -603,7 +603,7 @@ void SvXMLNumFmtExport::WriteDayOfWeekElement_Impl( const OUString& rCalendar, s
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_day_of_week ) );
+ GetXMLToken(XML_DAY_OF_WEEK) );
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -620,7 +620,7 @@ void SvXMLNumFmtExport::WriteWeekElement_Impl( const OUString& rCalendar )
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_week_of_year ) );
+ GetXMLToken(XML_WEEK_OF_YEAR) );
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
@@ -634,7 +634,7 @@ void SvXMLNumFmtExport::WriteQuarterElement_Impl( const OUString& rCalendar, sal
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_quarter ) );
+ GetXMLToken(XML_QUARTER) );
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -653,7 +653,7 @@ void SvXMLNumFmtExport::WriteHoursElement_Impl( sal_Bool bLong )
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_hours ) );
+ GetXMLToken(XML_HOURS) );
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -669,7 +669,7 @@ void SvXMLNumFmtExport::WriteMinutesElement_Impl( sal_Bool bLong )
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_minutes ) );
+ GetXMLToken(XML_MINUTES) );
AddStyleAttr_Impl( bLong ); // adds to pAttrList
@@ -685,13 +685,13 @@ void SvXMLNumFmtExport::WriteSecondsElement_Impl( sal_Bool bLong, sal_uInt16 nDe
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_seconds ) );
+ GetXMLToken(XML_SECONDS) );
AddStyleAttr_Impl( bLong ); // adds to pAttrList
if ( nDecimals > 0 )
{
OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_decimal_places ) );
+ GetXMLToken(XML_DECIMAL_PLACES) );
OUString sAttrValue = OUString::valueOf( (sal_Int32) nDecimals );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -708,7 +708,7 @@ void SvXMLNumFmtExport::WriteAMPMElement_Impl()
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_am_pm ) );
+ GetXMLToken(XML_AM_PM) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sElem, xAttrList );
xHandler->endElement( sElem );
@@ -723,14 +723,14 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_number ) );
+ GetXMLToken(XML_NUMBER) );
OUString sAttrName, sAttrValue;
// decimals
if ( nDecimals >= 0 ) // negative = automatic
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_decimal_places ) );
+ GetXMLToken(XML_DECIMAL_PLACES) );
sAttrValue = OUString::valueOf( nDecimals );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -739,7 +739,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
if ( nInteger >= 0 ) // negative = automatic
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_min_integer_digits ) );
+ GetXMLToken(XML_MIN_INTEGER_DIGITS) );
sAttrValue = OUString::valueOf( nInteger );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -748,7 +748,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
if ( rDashStr.getLength() )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_decimal_replacement ) );
+ GetXMLToken(XML_DECIMAL_REPLACEMENT) );
sAttrValue = rDashStr;
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -757,9 +757,8 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
if ( bGrouping )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_grouping ) );
- sAttrValue = OUString::createFromAscii(sXML_true);
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_GROUPING) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_TRUE) );
}
xHandler->ignorableWhitespace( sWS );
@@ -775,14 +774,14 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_scientific_number ) );
+ GetXMLToken(XML_SCIENTIFIC_NUMBER) );
OUString sAttrName, sAttrValue;
// decimals
if ( nDecimals >= 0 ) // negative = automatic
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_decimal_places ) );
+ GetXMLToken(XML_DECIMAL_PLACES) );
sAttrValue = OUString::valueOf( nDecimals );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -791,7 +790,7 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
if ( nInteger >= 0 ) // negative = automatic
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_min_integer_digits ) );
+ GetXMLToken(XML_MIN_INTEGER_DIGITS) );
sAttrValue = OUString::valueOf( nInteger );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -800,16 +799,15 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
if ( bGrouping )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_grouping ) );
- sAttrValue = OUString::createFromAscii(sXML_true);
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_GROUPING) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_TRUE) );
}
// exponent digits
if ( nExp >= 0 )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_min_exponent_digits ) );
+ GetXMLToken(XML_MIN_EXPONENT_DIGITS) );
sAttrValue = OUString::valueOf( nExp );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -827,14 +825,14 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
FinishTextElement_Impl();
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_fraction ) );
+ GetXMLToken(XML_FRACTION) );
OUString sAttrName, sAttrValue;
// integer digits
if ( nInteger >= 0 ) // negative = default (no integer part)
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_min_integer_digits ) );
+ GetXMLToken(XML_MIN_INTEGER_DIGITS) );
sAttrValue = OUString::valueOf( nInteger );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -843,16 +841,15 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
if ( bGrouping )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_grouping ) );
- sAttrValue = OUString::createFromAscii(sXML_true);
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_GROUPING) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_TRUE) );
}
// numerator digits
if ( nNumerator >= 0 )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_min_numerator_digits ) );
+ GetXMLToken(XML_MIN_NUMERATOR_DIGITS) );
sAttrValue = OUString::valueOf( nNumerator );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -861,7 +858,7 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
if ( nDenominator >= 0 )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_min_denominator_digits ) );
+ GetXMLToken(XML_MIN_DENOMINATOR_DIGITS) );
sAttrValue = OUString::valueOf( nDenominator );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -884,7 +881,7 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
// style namespace
OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
- OUString::createFromAscii( sXML_map ) );
+ GetXMLToken(XML_MAP) );
OUString sAttrName, sAttrValue;
OUStringBuffer aCondStr( 20L );
@@ -905,12 +902,12 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
aCondStr.append( aValStr );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
- OUString::createFromAscii( sXML_condition ) );
+ GetXMLToken(XML_CONDITION) );
sAttrValue = aCondStr.makeStringAndClear();
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
- OUString::createFromAscii( sXML_apply_style_name ) );
+ GetXMLToken(XML_APPLY_STYLE_NAME) );
sAttrValue = lcl_CreateStyleName( nKey, nPart, sal_False, sPrefix );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
@@ -1169,26 +1166,26 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
case NUMBERFORMAT_NUMBER:
case NUMBERFORMAT_SCIENTIFIC:
case NUMBERFORMAT_FRACTION:
- sType = OUString::createFromAscii(sXML_number_style);
+ sType = GetXMLToken(XML_NUMBER_STYLE);
break;
case NUMBERFORMAT_PERCENT:
- sType = OUString::createFromAscii(sXML_percentage_style);
+ sType = GetXMLToken(XML_PERCENTAGE_STYLE);
break;
case NUMBERFORMAT_CURRENCY:
- sType = OUString::createFromAscii(sXML_currency_style);
+ sType = GetXMLToken(XML_CURRENCY_STYLE);
break;
case NUMBERFORMAT_DATE:
case NUMBERFORMAT_DATETIME:
- sType = OUString::createFromAscii(sXML_date_style);
+ sType = GetXMLToken(XML_DATE_STYLE);
break;
case NUMBERFORMAT_TIME:
- sType = OUString::createFromAscii(sXML_time_style);
+ sType = GetXMLToken(XML_TIME_STYLE);
break;
case NUMBERFORMAT_TEXT:
- sType = OUString::createFromAscii(sXML_text_style);
+ sType = GetXMLToken(XML_TEXT_STYLE);
break;
case NUMBERFORMAT_LOGICAL:
- sType = OUString::createFromAscii(sXML_boolean_style);
+ sType = GetXMLToken(XML_BOOLEAN_STYLE);
break;
}
if (!sType.getLength())
@@ -1205,10 +1202,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
//
// format name (generated from key) - style namespace
- sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_name) );
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_NAME) );
sAttrValue = lcl_CreateStyleName( nKey, nPart, bDefPart, sPrefix );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
- sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_family)));
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_FAMILY));
sAttrValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_DATA_STYLE_NAME));
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
@@ -1221,7 +1218,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
sAttrValue = rFormat.GetComment();
if ( sAttrValue.getLength() && bUserDef && bDefPart )
{
- sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii(sXML_title) );
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, GetXMLToken(XML_TITLE) );
pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
}
@@ -1243,9 +1240,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// locale data contains other format types at the built-in positions
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_automatic_order ) );
- sAttrValue = OUString::createFromAscii( sXML_true );
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_AUTOMATIC_ORDER) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_TRUE) );
}
// format source (for date and time formats)
@@ -1264,9 +1260,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// locale data contains other format types at the built-in positions
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_format_source ) );
- sAttrValue = OUString::createFromAscii( sXML_language );
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_FORMAT_SOURCE) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_LANGUAGE) );
}
// overflow for time formats as in [hh]:mm
@@ -1275,9 +1270,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
if ( nFmtType == NUMBERFORMAT_TIME && bThousand )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_truncate_on_overflow ) );
- sAttrValue = OUString::createFromAscii( sXML_false );
- pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ GetXMLToken(XML_TRUNCATE_ON_OVERFLOW) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, GetXMLToken(XML_FALSE) );
}
xHandler->ignorableWhitespace( sWS );
@@ -1632,7 +1626,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// for an empty format, write an empty text element
OUString sTextElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
- OUString::createFromAscii( sXML_text ) );
+ GetXMLToken(XML_TEXT) );
xHandler->ignorableWhitespace( sWS );
xHandler->startElement( sTextElem, xAttrList );
xHandler->endElement( sTextElem );
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 35dfd739f220..1c9290c57ad2 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlnumfi.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,7 +71,6 @@
#include "xmlnumfi.hxx"
#include "xmltkmap.hxx"
-#include "xmlkywd.hxx"
#include "xmlnmspe.hxx"
#include "xmlictxt.hxx"
#include "xmlimp.hxx"
@@ -79,6 +78,10 @@
#include "nmspmap.hxx"
#include "families.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
@@ -504,9 +507,9 @@ SvXMLNumFmtMapContext::SvXMLNumFmtMapContext( SvXMLImport& rImport,
sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if ( nPrefix == XML_NAMESPACE_STYLE )
{
- if ( aLocalName.compareToAscii(sXML_condition) == 0 )
+ if ( IsXMLToken( aLocalName, XML_CONDITION) )
sCondition = sValue;
- else if ( aLocalName.compareToAscii(sXML_apply_style_name) == 0 )
+ else if ( IsXMLToken( aLocalName, XML_APPLY_STYLE_NAME) )
sName = sValue;
}
}
@@ -554,7 +557,7 @@ SvXMLNumFmtPropContext::SvXMLNumFmtPropContext( SvXMLImport& rImport,
OUString sValue = xAttrList->getValueByIndex( i );
OUString aLocalName;
sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
- if ( nPrefix == XML_NAMESPACE_FO && aLocalName.compareToAscii(sXML_color) == 0 )
+ if ( nPrefix == XML_NAMESPACE_FO && IsXMLToken( aLocalName, XML_COLOR ) )
bColSet = SvXMLUnitConverter::convertColor( aColor, sValue );
}
}
@@ -1035,7 +1038,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
pStyles( &rStyles ),
nKey(nTempKey)
{
- SetAttribute(XML_NAMESPACE_STYLE, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_name)), rLName);
+ SetAttribute(XML_NAMESPACE_STYLE, GetXMLToken(XML_NAME), rLName);
}
SvXMLNumFormatContext::~SvXMLNumFormatContext()
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index d322592e2f51..da1544646b1f 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlnumi.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: cl $ $Date: 2001-06-29 12:34:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -111,7 +111,10 @@
#include <com/sun/star/io/XOutputStream.hpp>
#endif
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
#include "i18nmap.hxx"
#include "xmluconv.hxx"
#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
@@ -331,12 +334,12 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
bHasColor( sal_False ),
aColor( 0 )
{
- if( rLName.compareToAscii( sXML_list_level_style_number ) == 0 ||
- rLName.compareToAscii( sXML_outline_level_style ) == 0 )
+ if( IsXMLToken( rLName, XML_LIST_LEVEL_STYLE_NUMBER ) ||
+ IsXMLToken( rLName, XML_OUTLINE_LEVEL_STYLE ) )
bNum = sal_True;
- else if( rLName.compareToAscii( sXML_list_level_style_bullet ) == 0 )
+ else if( IsXMLToken( rLName, XML_LIST_LEVEL_STYLE_BULLET ) )
bBullet = sal_True;
- else if( rLName.compareToAscii( sXML_list_level_style_image ) == 0 )
+ else if( IsXMLToken( rLName, XML_LIST_LEVEL_STYLE_IMAGE ) )
bImage = sal_True;
SvXMLTokenMap aTokenMap( aLevelAttrTokenMap );
@@ -420,7 +423,7 @@ SvXMLImportContext *SvxXMLListLevelStyleContext_Impl::CreateChildContext(
{
SvXMLImportContext *pContext;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.compareToAscii( sXML_properties ) == 0 )
+ IsXMLToken( rLocalName, XML_PROPERTIES ) )
{
pContext = new SvxXMLListLevelStyleAttrContext_Impl( GetImport(),
nPrefix,
@@ -738,9 +741,9 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
if( rValue.getLength() )
{
sal_Int16 eAdjust = HoriOrientation::LEFT;
- if( rValue.compareToAscii( sXML_center ) == 0 )
+ if( IsXMLToken( rValue, XML_CENTER ) )
eAdjust = HoriOrientation::CENTER;
- else if( rValue.compareToAscii( sXML_end ) == 0 )
+ else if( IsXMLToken( rValue, XML_END ) )
eAdjust = HoriOrientation::RIGHT;
rListLevel.SetAdjust( eAdjust );
}
@@ -879,14 +882,14 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
sal_Int16 eVertOrient = VertOrientation::LINE_CENTER;
if( sVerticalPos.getLength() )
{
- if( sVerticalPos.compareToAscii( sXML_top ) == 0 )
+ if( IsXMLToken( sVerticalPos, XML_TOP ) )
eVertOrient = VertOrientation::LINE_TOP;
- else if( sVerticalPos.compareToAscii( sXML_bottom ) == 0 )
+ else if( IsXMLToken( sVerticalPos, XML_BOTTOM ) )
eVertOrient = VertOrientation::LINE_BOTTOM;
}
if( sVerticalRel.getLength() )
{
- if( sVerticalRel.compareToAscii( sXML_baseline ) == 0 )
+ if( IsXMLToken( sVerticalRel, XML_BASELINE ) )
{
// TOP and BOTTOM are exchanged for a baseline relation
switch( eVertOrient )
@@ -902,7 +905,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
break;
}
}
- else if( sVerticalRel.compareToAscii( sXML_char ) == 0 )
+ else if( IsXMLToken( sVerticalRel, XML_CHAR ) )
{
switch( eVertOrient )
{
@@ -936,9 +939,9 @@ void SvxXMLListStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
const OUString& rValue )
{
if( XML_NAMESPACE_TEXT == nPrefixKey &&
- rLocalName.compareToAscii( sXML_consecutive_numbering ) == 0 )
+ IsXMLToken( rLocalName, XML_CONSECUTIVE_NUMBERING ) )
{
- bConsecutive = rValue.compareToAscii( sXML_true ) == 0;
+ bConsecutive = IsXMLToken( rValue, XML_TRUE );
}
else
{
@@ -992,10 +995,10 @@ SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext(
if( XML_NAMESPACE_TEXT == nPrefix &&
( bOutline
- ? rLocalName.compareToAscii( sXML_outline_level_style ) == 0
- : ( rLocalName.compareToAscii(sXML_list_level_style_number) == 0 ||
- rLocalName.compareToAscii(sXML_list_level_style_bullet) == 0 ||
- rLocalName.compareToAscii(sXML_list_level_style_image) == 0) ) )
+ ? IsXMLToken( rLocalName, XML_OUTLINE_LEVEL_STYLE )
+ : ( IsXMLToken( rLocalName, XML_LIST_LEVEL_STYLE_NUMBER ) ||
+ IsXMLToken( rLocalName, XML_LIST_LEVEL_STYLE_BULLET ) ||
+ IsXMLToken( rLocalName, XML_LIST_LEVEL_STYLE_IMAGE ) ) ) )
{
SvxXMLListLevelStyleContext_Impl *pLevelStyle =
new SvxXMLListLevelStyleContext_Impl( GetImport(), nPrefix,
@@ -1247,7 +1250,7 @@ sal_Int16 SvxXMLListStyleContext::GetNumType( const OUString& rNumFmt,
case sal_Unicode('i'): eValue = NumberingType::ROMAN_LOWER; break;
case sal_Unicode('I'): eValue = NumberingType::ROMAN_UPPER; break;
}
- if( rLetterSync.compareToAscii( sXML_true ) == 0 )
+ if( IsXMLToken( rLetterSync, XML_TRUE ) )
{
switch(eValue )
{
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 3802e2c5037a..1881eec41ffa 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlprmap.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: sab $ $Date: 2001-03-01 13:15:04 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,15 +91,21 @@
#include <com/sun/star/uno/Any.hxx>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
+
using namespace ::std;
using namespace ::rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
+using ::xmloff::token::GetXMLToken;
XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
const XMLPropertyMapEntry& rMapEntry,
const UniReference< XMLPropertyHandlerFactory >& rFactory ) :
- sXMLAttributeName( OUString::createFromAscii(rMapEntry.msXMLName) ),
+ sXMLAttributeName( GetXMLToken(rMapEntry.meXMLName) ),
sAPIPropertyName( OUString::createFromAscii(rMapEntry.msApiName) ),
nXMLNameSpace( rMapEntry.mnNameSpace ),
nType( rMapEntry.mnType ),
@@ -241,7 +247,7 @@ const sal_Int32 XMLPropertySetMapper::GetEntryIndex(
sal_Int32 XMLPropertySetMapper::FindEntryIndex(
const sal_Char* sApiName,
sal_uInt16 nNameSpace,
- const sal_Char* sXMLName ) const
+ const OUString& sXMLName ) const
{
sal_Int32 nIndex = 0;
sal_Int32 nEntries = GetEntryCount();
@@ -250,7 +256,7 @@ sal_Int32 XMLPropertySetMapper::FindEntryIndex(
{
const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex];
if( rEntry.nXMLNameSpace == nNameSpace &&
- 0 == rEntry.sXMLAttributeName.compareToAscii( sXMLName ) &&
+ rEntry.sXMLAttributeName.equals( sXMLName ) &&
0 == rEntry.sAPIPropertyName.compareToAscii( sApiName ) )
return nIndex;
else
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 388d3892b7b4..9d8132c9fc23 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlstyle.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -112,8 +112,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLITEM_HXX
@@ -227,30 +227,30 @@ void SvXMLStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
// TODO: use a map here
if( XML_NAMESPACE_STYLE == nPrefixKey )
{
- if( rLocalName.compareToAscii( sXML_family ) == 0L )
+ if( IsXMLToken( rLocalName, XML_FAMILY ) )
{
- if( rValue.compareToAscii( sXML_paragraph ) == 0L )
+ if( IsXMLToken( rValue, XML_PARAGRAPH ) )
nFamily = (sal_uInt16)SFX_STYLE_FAMILY_PARA;
- else if( rValue.compareToAscii( sXML_text ) == 0L )
+ else if( IsXMLToken( rValue, XML_TEXT ) )
nFamily = (sal_uInt16)SFX_STYLE_FAMILY_CHAR;
}
- else if( rLocalName.compareToAscii( sXML_name ) == 0L )
+ else if( IsXMLToken( rLocalName, XML_NAME ) )
{
aName = rValue;
}
- else if( rLocalName.compareToAscii( sXML_parent_style_name ) == 0L )
+ else if( IsXMLToken( rLocalName, XML_PARENT_STYLE_NAME ) )
{
aParent = rValue;
}
- else if( rLocalName.compareToAscii( sXML_next_style_name ) == 0L )
+ else if( IsXMLToken( rLocalName, XML_NEXT_STYLE_NAME ) )
{
aFollow = rValue;
}
- else if( rLocalName.compareToAscii( sXML_help_file_name ) == 0L )
+ else if( IsXMLToken( rLocalName, XML_HELP_FILE_NAME ) )
{
aHelpFile = rValue;
}
- else if( rLocalName.compareToAscii( sXML_help_id ) == 0L )
+ else if( IsXMLToken( rLocalName, XML_HELP_ID ) )
{
sal_Int32 nTmp = rValue.toInt32();
nHelpId =
@@ -548,7 +548,7 @@ SvXMLStyleContext *SvXMLStylesContext::CreateStyleChildContext(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( XML_NAMESPACE_STYLE == nPrefix &&
- aLocalName.compareToAscii( sXML_family ) == 0L )
+ IsXMLToken( aLocalName, XML_FAMILY ) )
{
const OUString& rValue = xAttrList->getValueByIndex( i );
nFamily = GetFamily( rValue );
@@ -689,33 +689,32 @@ sal_uInt16 SvXMLStylesContext::GetFamily(
const ::rtl::OUString& rValue ) const
{
sal_uInt16 nFamily = 0U;
- if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_paragraph )))
+ if( IsXMLToken( rValue, XML_PARAGRAPH ) )
{
nFamily = XML_STYLE_FAMILY_TEXT_PARAGRAPH;
}
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_text )))
+ else if( IsXMLToken( rValue, XML_TEXT ) )
{
nFamily = XML_STYLE_FAMILY_TEXT_TEXT;
}
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(sXML_data_style)))
+ else if( IsXMLToken( rValue, XML_DATA_STYLE ) )
{
nFamily = XML_STYLE_FAMILY_DATA_STYLE;
}
- else if ( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(sXML_section) ) )
+ else if ( IsXMLToken( rValue, XML_SECTION ) )
{
nFamily = XML_STYLE_FAMILY_TEXT_SECTION;
}
- else if( 0 == rValue.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_table )))
+ else if( IsXMLToken( rValue, XML_TABLE ) )
{
- if( RTL_CONSTASCII_LENGTH( sXML_table ) == rValue.getLength() )
- nFamily = XML_STYLE_FAMILY_TABLE_TABLE;
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_column )))
- nFamily = XML_STYLE_FAMILY_TABLE_COLUMN;
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_row )))
- nFamily = XML_STYLE_FAMILY_TABLE_ROW;
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_cell )))
- nFamily = XML_STYLE_FAMILY_TABLE_CELL;
+ nFamily = XML_STYLE_FAMILY_TABLE_TABLE;
}
+ else if( IsXMLToken( rValue, XML_TABLE_COLUMN ) )
+ nFamily = XML_STYLE_FAMILY_TABLE_COLUMN;
+ else if( IsXMLToken( rValue, XML_TABLE_ROW ) )
+ nFamily = XML_STYLE_FAMILY_TABLE_ROW;
+ else if( IsXMLToken( rValue, XML_TABLE_CELL ) )
+ nFamily = XML_STYLE_FAMILY_TABLE_CELL;
else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)))
{
nFamily = XML_STYLE_FAMILY_SD_GRAPHICS_ID;
@@ -736,7 +735,7 @@ sal_uInt16 SvXMLStylesContext::GetFamily(
{
nFamily = XML_STYLE_FAMILY_SCH_CHART_ID;
}
- else if ( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(sXML_ruby) ) )
+ else if ( IsXMLToken( rValue, XML_RUBY ) )
{
nFamily = XML_STYLE_FAMILY_TEXT_RUBY;
}
@@ -916,7 +915,7 @@ SvXMLStylesContext::SvXMLStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( XML_NAMESPACE_NONE == nPrefix &&
- aLocalName.compareToAscii( sXML_id ) == 0L )
+ IsXMLToken( aLocalName, XML_ID ) )
{
pImpl->SetId( xAttrList->getValueByIndex( i ) );
}
@@ -937,7 +936,7 @@ SvXMLImportContext *SvXMLStylesContext::CreateChildContext( sal_uInt16 nPrefix,
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_OFFICE == nPrefix &&
- rLocalName.compareToAscii( sXML_use_styles ) == 0L )
+ IsXMLToken( rLocalName, XML_USE_STYLES ) )
{
OUString sHRef;
pContext = new SvXMLUseStylesContext( GetImport(), nPrefix, rLocalName,
@@ -1061,7 +1060,7 @@ SvXMLUseStylesContext::SvXMLUseStylesContext(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( XML_NAMESPACE_XLINK == nPrefix &&
- aLocalName.compareToAscii( sXML_href ) == 0L )
+ IsXMLToken( aLocalName, XML_HREF ) )
{
rHRef = xAttrList->getValueByIndex( i );
// TODO: Hack!
diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx
index 0d1cd26291d5..4665106c9b86 100644
--- a/xmloff/source/style/xmltabe.cxx
+++ b/xmloff/source/style/xmltabe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltabe.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:07 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,8 +78,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLITMAP_HXX
#include "xmlitmap.hxx"
@@ -99,7 +99,7 @@ using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
-SvXMLEnumMapEntry psXML_tabstop_style[] =
+SvXMLEnumMapEntry pXML_tabstop_style[] =
{
{ XML_LEFT, style::TabAlign_LEFT },
{ XML_CENTER, style::TabAlign_CENTER },
@@ -118,15 +118,15 @@ void SvxXMLTabStopExport::exportTabStop( const ::com::sun::star::style::TabStop*
// position attribute
mrUnitConv.convertMeasure( sBuffer, pTabStop->Position );
- AddAttribute( XML_NAMESPACE_STYLE, sXML_position,
+ AddAttribute( XML_NAMESPACE_STYLE, XML_POSITION,
sBuffer.makeStringAndClear() );
// type attribute
if( style::TabAlign_LEFT != pTabStop->Alignment )
{
mrUnitConv.convertEnum( sBuffer, pTabStop->Alignment,
- psXML_tabstop_style );
- AddAttribute( XML_NAMESPACE_STYLE, sXML_type,
+ pXML_tabstop_style );
+ AddAttribute( XML_NAMESPACE_STYLE, XML_TYPE,
sBuffer.makeStringAndClear() );
}
@@ -135,7 +135,7 @@ void SvxXMLTabStopExport::exportTabStop( const ::com::sun::star::style::TabStop*
pTabStop->DecimalChar != 0 )
{
sBuffer.append( pTabStop->DecimalChar );
- AddAttribute( XML_NAMESPACE_STYLE, sXML_char,
+ AddAttribute( XML_NAMESPACE_STYLE, XML_CHAR,
sBuffer.makeStringAndClear() );
}
@@ -143,11 +143,11 @@ void SvxXMLTabStopExport::exportTabStop( const ::com::sun::star::style::TabStop*
if( ' ' != pTabStop->FillChar && 0 != pTabStop->FillChar )
{
sBuffer.append( pTabStop->FillChar );
- AddAttribute( XML_NAMESPACE_STYLE, sXML_leader_char,
+ AddAttribute( XML_NAMESPACE_STYLE, XML_LEADER_CHAR,
sBuffer.makeStringAndClear() );
}
- OUString sElem = GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_tab_stop) );
+ OUString sElem = GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken(XML_TAB_STOP) );
mxHandler->ignorableWhitespace( msWS );
mxHandler->startElement( sElem, mxAttrList );
ClearAttrList();
@@ -179,10 +179,10 @@ void SvxXMLTabStopExport::CheckAttrList()
}
#endif
-void SvxXMLTabStopExport::AddAttribute( sal_uInt16 nPrefixKey, const char *pName,
+void SvxXMLTabStopExport::AddAttribute( sal_uInt16 nPrefixKey, enum XMLTokenEnum eName,
const OUString& rValue )
{
- OUString sName( OUString::createFromAscii( pName ) );
+ OUString sName( GetXMLToken( eName ) );
mpAttrList->AddAttribute( GetQNameByKey( nPrefixKey, sName ),
msCDATA, rValue );
@@ -190,8 +190,8 @@ void SvxXMLTabStopExport::AddAttribute( sal_uInt16 nPrefixKey, const char *pName
SvxXMLTabStopExport::SvxXMLTabStopExport( const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
const SvXMLUnitConverter& rUnitConverter )
-: msCDATA( OUString::createFromAscii( sXML_CDATA ) ),
- msWS( OUString::createFromAscii( sXML_WS ) ),
+: msCDATA( GetXMLToken( XML_CDATA ) ),
+ msWS( GetXMLToken( XML_WS ) ),
mpNamespaceMap( 0 ),
mrUnitConv( rUnitConverter ),
mpAttrList( new SvXMLAttributeList )
@@ -227,7 +227,7 @@ void SvxXMLTabStopExport::Export( const uno::Any& rAny,
// return;
OUString sElem = GetQNameByKey( XML_NAMESPACE_STYLE,
- OUString::createFromAscii(sXML_tab_stops) );
+ GetXMLToken(XML_TAB_STOPS) );
mxHandler->ignorableWhitespace( msWS );
mxHandler->startElement( sElem, mxAttrList );
ClearAttrList();
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
index cc4cc08f64c6..26f8e130a144 100644
--- a/xmloff/source/style/xmltabi.cxx
+++ b/xmloff/source/style/xmltabi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltabi.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,8 +84,8 @@
#include <com/sun/star/style/TabStop.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_I18NMAP_HXX
#include "i18nmap.hxx"
@@ -180,23 +180,23 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
aTabStop.Position = nVal;
break;
case XML_TOK_TABSTOP_TYPE:
- if( rValue.equalsAsciiL( sXML_left, sizeof( sXML_left )-1 ) )
+ if( IsXMLToken( rValue, XML_LEFT ) )
{
aTabStop.Alignment = style::TabAlign_LEFT;
}
- else if( rValue.equalsAsciiL( sXML_right, sizeof( sXML_right )-1 ) )
+ else if( IsXMLToken( rValue, XML_RIGHT ) )
{
aTabStop.Alignment = style::TabAlign_RIGHT;
}
- else if( rValue.equalsAsciiL( sXML_center, sizeof( sXML_center )-1 ) )
+ else if( IsXMLToken( rValue, XML_CENTER ) )
{
aTabStop.Alignment = style::TabAlign_CENTER;
}
- else if( rValue.equalsAsciiL( sXML_char, sizeof( sXML_char )-1 ) )
+ else if( IsXMLToken( rValue, XML_CHAR ) )
{
aTabStop.Alignment = style::TabAlign_DECIMAL;
}
- else if( rValue.equalsAsciiL( sXML_default, sizeof( sXML_default )-1 ) )
+ else if( IsXMLToken( rValue, XML_DEFAULT ) )
{
aTabStop.Alignment = style::TabAlign_DEFAULT;
}
@@ -270,7 +270,7 @@ SvXMLImportContext *SvxXMLTabStopImportContext::CreateChildContext(
{
SvXMLImportContext *pContext = 0;
- if( XML_NAMESPACE_STYLE == nPrefix && rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_tab_stop ) ) )
+ if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_TAB_STOP ) )
{
// create new tabstop import context
SvxXMLTabStopContext_Impl *pTabStopContext =
diff --git a/xmloff/source/text/XMLAutoMarkFileContext.cxx b/xmloff/source/text/XMLAutoMarkFileContext.cxx
index 05e4b5d53f61..abf731404292 100644
--- a/xmloff/source/text/XMLAutoMarkFileContext.cxx
+++ b/xmloff/source/text/XMLAutoMarkFileContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLAutoMarkFileContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 07:33:58 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,8 +79,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
@@ -103,6 +103,9 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::xml::sax::XAttributeList;
using ::com::sun::star::beans::XPropertySet;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_HREF;
+
TYPEINIT1( XMLAutoMarkFileContext, SvXMLImportContext );
@@ -135,7 +138,7 @@ void XMLAutoMarkFileContext::StartElement(
GetKeyByAttrName( xAttrList->getNameByIndex(i), &sLocalName );
if ( ( XML_NAMESPACE_XLINK == nPrefix ) &&
- sLocalName.equalsAsciiL(sXML_href, sizeof(sXML_href)-1 ) )
+ IsXMLToken(sLocalName, XML_HREF) )
{
Any aAny;
aAny <<= GetImport().GetAbsoluteReference( xAttrList->getValueByIndex(i) );
diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx
index 6ce50da026ea..1640e987f3e6 100644
--- a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLAutoTextContainerEventImport.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-03-09 14:53:43 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,8 +87,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLEVENTSIMPORTCONTEXT_HXX
@@ -103,7 +103,8 @@ using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::xml::sax::XAttributeList;
using ::com::sun::star::container::XNameReplace;
-
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_EVENTS;
TYPEINIT1(XMLAutoTextContainerEventImport, SvXMLImportContext);
@@ -128,9 +129,8 @@ SvXMLImportContext* XMLAutoTextContainerEventImport::CreateChildContext(
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList )
{
- if ((XML_NAMESPACE_OFFICE == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_events,
- sizeof(sXML_events)-1))
+ if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
+ IsXMLToken( rLocalName, XML_EVENTS) )
{
return new XMLEventsImportContext(GetImport(), nPrefix, rLocalName,
rEvents);
diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx
index 159ee7b61e14..adce70f2da93 100644
--- a/xmloff/source/text/XMLAutoTextEventExport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLAutoTextEventExport.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-18 15:08:14 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -213,7 +213,7 @@ void XMLAutoTextEventExport::initialize(
sal_uInt32 XMLAutoTextEventExport::exportDoc(
- const sal_Char* pClass)
+ enum XMLTokenEnum eClass)
{
if (hasEvents())
{
diff --git a/xmloff/source/text/XMLAutoTextEventExport.hxx b/xmloff/source/text/XMLAutoTextEventExport.hxx
index 7ac8c241fec7..c02f1e39e0e6 100644
--- a/xmloff/source/text/XMLAutoTextEventExport.hxx
+++ b/xmloff/source/text/XMLAutoTextEventExport.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLAutoTextEventExport.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-03-09 14:53:43 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -125,7 +125,7 @@ protected:
/// export the events off all autotexts
virtual sal_uInt32 exportDoc(
- const sal_Char *pClass = NULL );
+ enum ::xmloff::token::XMLTokenEnum eClass = xmloff::token::XML_TOKEN_INVALID );
/// does the document have any events ?
sal_Bool hasEvents();
diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx
index 1f24a4baa884..5126ce9d847c 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLAutoTextEventImport.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-03-09 14:53:43 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,8 +91,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _TOOLS_DEBUG_HXX
@@ -113,6 +113,8 @@ using ::com::sun::star::xml::sax::XAttributeList;
using ::com::sun::star::document::XEventsSupplier;
using ::com::sun::star::container::XNameReplace;
using ::com::sun::star::lang::XMultiServiceFactory;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_AUTO_TEXT_EVENTS;
const sal_Char sAPI_AutoText[] = "com.sun.star.text.AutoTextContainer";
@@ -162,10 +164,8 @@ SvXMLImportContext* XMLAutoTextEventImport::CreateContext(
const OUString& rLocalName,
const Reference<XAttributeList > & xAttrList )
{
- if ( xEvents.is() &&
- (XML_NAMESPACE_OFFICE == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_auto_text_events,
- sizeof(sXML_auto_text_events)-1) )
+ if ( xEvents.is() && (XML_NAMESPACE_OFFICE == nPrefix) &&
+ IsXMLToken( rLocalName, XML_AUTO_TEXT_EVENTS) )
{
return new XMLAutoTextContainerEventImport(
*this, nPrefix, rLocalName, xEvents);
diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx
index 6d733391844d..df52bbcb7b79 100644
--- a/xmloff/source/text/XMLCalculationSettingsContext.cxx
+++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLCalculationSettingsContext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mtg $ $Date: 2001-03-30 15:00:43 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,11 +77,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
@@ -92,6 +89,7 @@ using namespace ::rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::text;
+using namespace ::xmloff::token;
XMLCalculationSettingsContext::XMLCalculationSettingsContext( SvXMLImport& rImport,
sal_uInt16 nPrefix,
@@ -112,7 +110,7 @@ XMLCalculationSettingsContext::XMLCalculationSettingsContext( SvXMLImport& rImpo
if (nPrefix == XML_NAMESPACE_TABLE)
{
- if (aLocalName.compareToAscii(sXML_null_year) == 0)
+ if ( IsXMLToken( aLocalName, XML_NULL_YEAR ) )
{
sal_Int32 nTemp;
GetImport().GetMM100UnitConverter().convertNumber(nTemp, sValue);
diff --git a/xmloff/source/text/XMLChangeImportContext.cxx b/xmloff/source/text/XMLChangeImportContext.cxx
index 73c21ef40318..0159dbd70320 100644
--- a/xmloff/source/text/XMLChangeImportContext.cxx
+++ b/xmloff/source/text/XMLChangeImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLChangeImportContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-01-19 19:19:50 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,14 +83,16 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::text::XTextRange;
using ::com::sun::star::xml::sax::XAttributeList;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_CHANGE_ID;
TYPEINIT1( XMLChangeImportContext, SvXMLImportContext );
@@ -124,8 +126,7 @@ void XMLChangeImportContext::StartElement(
GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (sLocalName.equalsAsciiL(sXML_change_id,
- sizeof(sXML_change_id)-1)) )
+ IsXMLToken( sLocalName, XML_CHANGE_ID ) )
{
// Id found! Now call RedlineImportHelper
diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx
index 79577ee60925..06437107afb5 100644
--- a/xmloff/source/text/XMLChangeInfoContext.cxx
+++ b/xmloff/source/text/XMLChangeInfoContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLChangeInfoContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-01-24 16:49:51 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLIMP_HXX
@@ -93,12 +93,13 @@
+using namespace ::xmloff::token;
+
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::xml::sax::XAttributeList;
-
TYPEINIT1(XMLChangeInfoContext, SvXMLImportContext);
XMLChangeInfoContext::XMLChangeInfoContext(
@@ -131,13 +132,11 @@ void XMLChangeInfoContext::StartElement(
OUString sValue = xAttrList->getValueByIndex(nAttr);
if (XML_NAMESPACE_OFFICE == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_chg_author,
- sizeof(sXML_chg_author)-1))
+ if ( IsXMLToken( sLocalName, XML_CHG_AUTHOR ) )
{
sAuthor = sValue;
}
- else if (sLocalName.equalsAsciiL(sXML_chg_date_time,
- sizeof(sXML_chg_date_time)-1))
+ else if ( IsXMLToken( sLocalName, XML_CHG_DATE_TIME ) )
{
sDateTime = sValue;
}
@@ -155,8 +154,8 @@ SvXMLImportContext* XMLChangeInfoContext::CreateChildContext(
{
SvXMLImportContext* pContext = NULL;
- if ((XML_NAMESPACE_TEXT == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_p, sizeof(sXML_p)-1))
+ if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
+ IsXMLToken( rLocalName, XML_P ) )
{
pContext = new XMLStringBufferImportContext(GetImport(), nPrefix,
rLocalName, sCommentBuffer);
diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx
index 1475dffd9b29..38490a8e7726 100644
--- a/xmloff/source/text/XMLChangedRegionImportContext.cxx
+++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLChangedRegionImportContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mib $ $Date: 2001-03-09 07:23:23 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,8 +91,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -100,6 +100,7 @@
#endif
+using namespace ::xmloff::token;
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
@@ -134,9 +135,8 @@ void XMLChangedRegionImportContext::StartElement(
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
&sLocalName );
- if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (sLocalName.equalsAsciiL(sXML_id,
- sizeof(sXML_id)-1)) )
+ if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
+ ( IsXMLToken( sLocalName, XML_ID ) ) )
{
sID = xAttrList->getValueByIndex(nAttr);
}
@@ -152,15 +152,14 @@ SvXMLImportContext* XMLChangedRegionImportContext::CreateChildContext(
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (rLocalName.equalsAsciiL(sXML_insertion, sizeof(sXML_insertion)-1)||
- rLocalName.equalsAsciiL(sXML_deletion, sizeof(sXML_deletion)-1) ||
- rLocalName.equalsAsciiL(sXML_format_change,
- sizeof(sXML_format_change)-1) )
+ if ( IsXMLToken( rLocalName, XML_INSERTION ) ||
+ IsXMLToken( rLocalName, XML_DELETION ) ||
+ IsXMLToken( rLocalName, XML_FORMAT_CHANGE ) )
{
// create XMLChangeElementImportContext for all kinds of changes
pContext = new XMLChangeElementImportContext(
GetImport(), nPrefix, rLocalName,
- rLocalName.equalsAsciiL(sXML_deletion, sizeof(sXML_deletion)-1),
+ IsXMLToken( rLocalName, XML_DELETION ),
*this);
}
// else: it may be a text element, see below
diff --git a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx
index e306bdaada26..577daf665e29 100644
--- a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFootnoteBodyImportContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mib $ $Date: 2000-11-17 07:37:42 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,10 +88,6 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#endif
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index 42521658e330..15360a83773a 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFootnoteConfigurationImportContext.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:32 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_FAMILIES_HXX
@@ -365,7 +365,7 @@ void XMLFootnoteConfigurationImportContext::StartElement(
break;
}
case XML_TOK_FTNCONFIG_POSITION:
- bPosition = (0 == sValue.compareToAscii(sXML_document));
+ bPosition = IsXMLToken( sValue, XML_DOCUMENT );
break;
default:
; // ignore
@@ -384,17 +384,15 @@ SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext(
{
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (rLocalName.equalsAsciiL(
- sXML_footnote_continuation_notice_forward,
- sizeof(sXML_footnote_continuation_notice_forward)-1))
+ if ( IsXMLToken( rLocalName,
+ XML_FOOTNOTE_CONTINUATION_NOTICE_FORWARD ) )
{
pContext = new XMLFootnoteConfigHelper(GetImport(),
nPrefix, rLocalName,
*this, sal_False);
}
- else if (rLocalName.equalsAsciiL(
- sXML_footnote_continuation_notice_backward,
- sizeof(sXML_footnote_continuation_notice_backward)-1))
+ else if ( IsXMLToken( rLocalName,
+ XML_FOOTNOTE_CONTINUATION_NOTICE_BACKWARD ) )
{
pContext = new XMLFootnoteConfigHelper(GetImport(),
nPrefix, rLocalName,
diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx
index 54db06ab403f..4fd26314360e 100644
--- a/xmloff/source/text/XMLFootnoteImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLFootnoteImportContext.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:32 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,8 +87,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLFOOTNOTEBODYIMPORTCONTEXT_HXX
@@ -169,7 +169,7 @@ void XMLFootnoteImportContext::StartElement(
if( xFactory.is() )
{
// create endnote or footnote
- sal_Bool bIsEndnote = (0 == GetLocalName().compareToAscii(sXML_endnote));
+ sal_Bool bIsEndnote = IsXMLToken( GetLocalName(), XML_ENDNOTE );
Reference<XInterface> xIfc = xFactory->createInstance(
bIsEndnote ?
OUString(RTL_CONSTASCII_USTRINGPARAM(sAPI_service_endnote)) :
@@ -189,7 +189,7 @@ void XMLFootnoteImportContext::StartElement(
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (0 == sLocalName.compareToAscii(sXML_id)) )
+ IsXMLToken( sLocalName, XML_ID ) )
{
// get ID ...
Reference<XPropertySet> xPropertySet(xTextContent, UNO_QUERY);
@@ -259,7 +259,7 @@ SvXMLImportContext *XMLFootnoteImportContext::CreateChildContext(
&sLocalName );
if ( (nPrefix == XML_NAMESPACE_TEXT) &&
- (0 == sLocalName.compareToAscii(sXML_label)) )
+ IsXMLToken( sLocalName, XML_LABEL ) )
{
xFootnote->setLabel(xAttrList->getValueByIndex(nAttr));
}
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index 098f3d65809b..cfdb77f20749 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexAlphabeticalSourceContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-20 14:16:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -128,6 +128,9 @@ using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE;
+using ::xmloff::token::XML_OUTLINE_LEVEL;
const sal_Char sAPI_MainEntryCharacterStyleName[] = "MainEntryCharacterStyleName";
const sal_Char sAPI_UseAlphabeticalSeparators[] = "UseAlphabeticalSeparators";
@@ -323,13 +326,12 @@ SvXMLImportContext* XMLIndexAlphabeticalSourceContext::CreateChildContext(
const Reference<XAttributeList> & xAttrList )
{
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_alphabetical_index_entry_template,
- sizeof(sXML_alphabetical_index_entry_template)-1)))
+ IsXMLToken( rLocalName, XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE ) )
{
return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
nPrefix, rLocalName,
aLevelNameAlphaMap,
- sXML_outline_level,
+ XML_OUTLINE_LEVEL,
aLevelStylePropNameAlphaMap,
aAllowedTokenTypesAlpha);
}
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index bb8c0ebb03e2..d7875d3ad4c2 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexBibliographyConfigurationContext.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dvo $ $Date: 2001-06-12 17:46:20 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,10 +88,6 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -238,8 +234,8 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext
sal_Bool bSort(sal_True);
// process children here and use default context!
- if ((nPrefix == XML_NAMESPACE_TEXT) &&
- rLocalName.equalsAsciiL(sXML_sort_key, sizeof(sXML_sort_key)-1))
+ if ( ( nPrefix == XML_NAMESPACE_TEXT ) &&
+ IsXMLToken( rLocalName, XML_SORT_KEY ) )
{
sal_Int16 nLength = xAttrList->getLength();
for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
@@ -251,12 +247,11 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext
if (nPrfx == XML_NAMESPACE_TEXT)
{
- if (sLocalName.equalsAsciiL(sXML_key, sizeof(sXML_key)-1))
+ if ( IsXMLToken( sLocalName, XML_KEY ) )
{
sKey = xAttrList->getValueByIndex(nAttr);
}
- else if (sLocalName.equalsAsciiL(sXML_sort_ascending,
- sizeof(sXML_sort_ascending)-1))
+ else if ( IsXMLToken( sLocalName, XML_SORT_ASCENDING ) )
{
sal_Bool bTmp;
if (SvXMLUnitConverter::convertBool(
diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
index 419f06331f09..c1c4452805f6 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexBibliographyEntryContext.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,8 +88,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -185,14 +185,12 @@ void XMLIndexBibliographyEntryContext::StartElement(
&sLocalName );
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_style_name,
- sizeof(sXML_style_name)-1))
+ if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
{
sCharStyleName = xAttrList->getValueByIndex(nAttr);
bCharStyleNameOK = sal_True;
}
- else if (sLocalName.equalsAsciiL(sXML_bibliography_data_field,
- sizeof(sXML_bibliography_data_field)-1))
+ else if ( IsXMLToken( sLocalName, XML_BIBLIOGRAPHY_DATA_FIELD ) )
{
sal_uInt16 nTmp;
if (SvXMLUnitConverter::convertEnum(
diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx
index fd0d37361d62..5d663bf14ad2 100644
--- a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexBibliographySourceContext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dvo $ $Date: 2000-11-14 14:42:50 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -120,6 +120,9 @@
#include <rtl/ustring.hxx>
#endif
+
+using namespace ::xmloff::token;
+
using ::rtl::OUString;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Reference;
@@ -163,14 +166,13 @@ SvXMLImportContext* XMLIndexBibliographySourceContext::CreateChildContext(
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList )
{
- if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_bibliography_entry_template,
- sizeof(sXML_bibliography_entry_template)-1)))
+ if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
+ ( IsXMLToken( rLocalName, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE ) ) )
{
return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
nPrefix, rLocalName,
aLevelNameBibliographyMap,
- sXML_bibliography_type,
+ XML_BIBLIOGRAPHY_TYPE,
aLevelStylePropNameBibliographyMap,
aAllowedTokenTypesBibliography);
}
diff --git a/xmloff/source/text/XMLIndexBodyContext.cxx b/xmloff/source/text/XMLIndexBodyContext.cxx
index f0af07a3932e..4aa2f357642d 100644
--- a/xmloff/source/text/XMLIndexBodyContext.cxx
+++ b/xmloff/source/text/XMLIndexBodyContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexBodyContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-05-31 16:11:06 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,10 +76,6 @@
#include "txtimp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
index 9fe9a8518bae..425b1d6a2b6a 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexChapterInfoEntryContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,8 +88,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -156,14 +156,12 @@ void XMLIndexChapterInfoEntryContext::StartElement(
&sLocalName );
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_style_name,
- sizeof(sXML_style_name)-1))
+ if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
{
sCharStyleName = xAttrList->getValueByIndex(nAttr);
bCharStyleNameOK = sal_True;
}
- else if (sLocalName.equalsAsciiL(sXML_display,
- sizeof(sXML_display)-1))
+ else if ( IsXMLToken( sLocalName, XML_DISPLAY ) )
{
sal_uInt16 nTmp;
if (SvXMLUnitConverter::convertEnum(
diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx
index b01c19fbb392..cb7c470294b5 100644
--- a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexIllustrationSourceContext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dvo $ $Date: 2000-11-14 14:42:50 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -92,8 +92,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -113,7 +113,9 @@ using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList;
-
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE;
+using ::xmloff::token::XML_TOKEN_INVALID;
TYPEINIT1(XMLIndexIllustrationSourceContext, XMLIndexTableSourceContext);
@@ -136,14 +138,13 @@ SvXMLImportContext* XMLIndexIllustrationSourceContext::CreateChildContext(
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList )
{
- if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_illustration_index_entry_template,
- sizeof(sXML_illustration_index_entry_template)-1)))
+ if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
+ ( IsXMLToken( rLocalName, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE ) ) )
{
return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
nPrefix, rLocalName,
aLevelNameTableMap,
- NULL, // no outline-level attr
+ XML_TOKEN_INVALID, // no outline-level attr
aLevelStylePropNameTableMap,
aAllowedTokenTypesTable);
}
diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx
index 7c8a230de5b9..ea2ee28297e9 100644
--- a/xmloff/source/text/XMLIndexMarkExport.cxx
+++ b/xmloff/source/text/XMLIndexMarkExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexMarkExport.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,8 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
@@ -100,6 +100,8 @@
#endif
+using namespace ::xmloff::token;
+
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using ::com::sun::star::beans::XPropertySet;
@@ -125,15 +127,15 @@ XMLIndexMarkExport::XMLIndexMarkExport(
{
}
-const sal_Char* lcl_pTocMarkNames[] =
- { sXML_toc_mark, sXML_toc_mark_start, sXML_toc_mark_end };
-const sal_Char* lcl_pUserIndexMarkName[] =
- { sXML_user_index_mark,
- sXML_user_index_mark_start, sXML_user_index_mark_end };
-const sal_Char* lcl_pAlphaIndexMarkName[] =
- { sXML_alphabetical_index_mark,
- sXML_alphabetical_index_mark_start,
- sXML_alphabetical_index_mark_end };
+const enum XMLTokenEnum lcl_pTocMarkNames[] =
+ { XML_TOC_MARK, XML_TOC_MARK_START, XML_TOC_MARK_END };
+const enum XMLTokenEnum lcl_pUserIndexMarkName[] =
+ { XML_USER_INDEX_MARK,
+ XML_USER_INDEX_MARK_START, XML_USER_INDEX_MARK_END };
+const enum XMLTokenEnum lcl_pAlphaIndexMarkName[] =
+ { XML_ALPHABETICAL_INDEX_MARK,
+ XML_ALPHABETICAL_INDEX_MARK_START,
+ XML_ALPHABETICAL_INDEX_MARK_END };
XMLIndexMarkExport::~XMLIndexMarkExport()
@@ -147,7 +149,7 @@ void XMLIndexMarkExport::ExportIndexMark(
/// index marks have no styles!
if (!bAutoStyles)
{
- const sal_Char** pElementNames = NULL;
+ const enum XMLTokenEnum * pElements = NULL;
sal_Int8 nElementNo = -1;
// get index mark
@@ -171,8 +173,7 @@ void XMLIndexMarkExport::ExportIndexMark(
aAny >>= sTmp;
DBG_ASSERT(sTmp.getLength() > 0,
"collapsed index mark without alternative text");
- rExport.AddAttribute(XML_NAMESPACE_TEXT,
- sXML_string_value, sTmp);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_STRING_VALUE, sTmp);
}
else
{
@@ -183,8 +184,8 @@ void XMLIndexMarkExport::ExportIndexMark(
// generate ID
OUStringBuffer sBuf;
GetID(sBuf, xIndexMarkPropSet);
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_id,
- sBuf.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_ID,
+ sBuf.makeStringAndClear());
}
// distinguish between TOC, user, alphab. index marks by
@@ -196,7 +197,7 @@ void XMLIndexMarkExport::ExportIndexMark(
if (xPropertySetInfo->hasPropertyByName(sUserIndexName))
{
// user index mark
- pElementNames = lcl_pUserIndexMarkName;
+ pElements = lcl_pUserIndexMarkName;
if (nElementNo != 2)
{
ExportUserIndexMarkAttributes(xIndexMarkPropSet);
@@ -205,7 +206,7 @@ void XMLIndexMarkExport::ExportIndexMark(
else if (xPropertySetInfo->hasPropertyByName(sPrimaryKey))
{
// alphabetical index mark
- pElementNames = lcl_pAlphaIndexMarkName;
+ pElements = lcl_pAlphaIndexMarkName;
if (nElementNo != 2)
{
ExportAlphabeticalIndexMarkAttributes(xIndexMarkPropSet);
@@ -214,7 +215,7 @@ void XMLIndexMarkExport::ExportIndexMark(
else
{
// table of content:
- pElementNames = lcl_pTocMarkNames;
+ pElements = lcl_pTocMarkNames;
if (nElementNo != 2)
{
ExportTOCMarkAttributes(xIndexMarkPropSet);
@@ -222,15 +223,15 @@ void XMLIndexMarkExport::ExportIndexMark(
}
// export element
- DBG_ASSERT(pElementNames != NULL, "illegal element array");
+ DBG_ASSERT(pElements != NULL, "illegal element array");
DBG_ASSERT(nElementNo >= 0, "illegal name array index");
DBG_ASSERT(nElementNo <= 2, "illegal name array index");
- if ((pElementNames != NULL) && (nElementNo != -1))
+ if ((pElements != NULL) && (nElementNo != -1))
{
SvXMLElementExport aElem(rExport,
XML_NAMESPACE_TEXT,
- pElementNames[nElementNo],
+ pElements[nElementNo],
sal_False, sal_False);
}
}
@@ -245,7 +246,7 @@ void XMLIndexMarkExport::ExportTOCMarkAttributes(
aAny >>= nLevel;
OUStringBuffer sBuf;
SvXMLUnitConverter::convertNumber(sBuf, (sal_Int32)nLevel);
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_outline_level,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,
sBuf.makeStringAndClear());
}
@@ -259,7 +260,7 @@ void XMLIndexMarkExport::ExportUserIndexMarkAttributes(
aAny >>= sIndexName;
if (sIndexName.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_index_name,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_INDEX_NAME,
sIndexName);
}
@@ -277,7 +278,7 @@ void XMLIndexMarkExport::ExportAlphabeticalIndexMarkAttributes(
aAny >>= sPrimary;
if (sPrimary.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_key1, sPrimary);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_KEY1, sPrimary);
}
OUString sSecondary;
@@ -285,7 +286,7 @@ void XMLIndexMarkExport::ExportAlphabeticalIndexMarkAttributes(
aAny >>= sSecondary;
if (sSecondary.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_key2, sSecondary);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_KEY2, sSecondary);
}
}
diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.cxx b/xmloff/source/text/XMLIndexObjectSourceContext.cxx
index df12491fca16..19613ec79789 100644
--- a/xmloff/source/text/XMLIndexObjectSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexObjectSourceContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexObjectSourceContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2000-11-17 18:54:34 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -121,13 +121,14 @@
#endif
-
-
using ::rtl::OUString;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_OBJECT_INDEX_ENTRY_TEMPLATE;
+using ::xmloff::token::XML_TOKEN_INVALID;
const sal_Char sAPI_CreateFromStarCalc[] = "CreateFromStarCalc";
const sal_Char sAPI_CreateFromStarChart[] = "CreateFromStarChart";
@@ -136,6 +137,7 @@ const sal_Char sAPI_CreateFromStarImage[] = "CreateFromStarImage";
const sal_Char sAPI_CreateFromStarMath[] = "CreateFromStarMath";
const sal_Char sAPI_CreateFromOtherEmbeddedObjects[] = "CreateFromOtherEmbeddedObjects";
+
TYPEINIT1( XMLIndexObjectSourceContext, XMLIndexSourceBaseContext );
XMLIndexObjectSourceContext::XMLIndexObjectSourceContext(
@@ -244,13 +246,12 @@ SvXMLImportContext* XMLIndexObjectSourceContext::CreateChildContext(
const Reference<XAttributeList> & xAttrList )
{
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_object_index_entry_template,
- sizeof(sXML_object_index_entry_template)-1)))
+ (IsXMLToken(rLocalName, XML_OBJECT_INDEX_ENTRY_TEMPLATE)) )
{
return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
nPrefix, rLocalName,
aLevelNameTableMap,
- NULL, // no outline-level attr
+ XML_TOKEN_INVALID, // no outline-level attr
aLevelStylePropNameTableMap,
aAllowedTokenTypesTable);
}
diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
index 4ee8305c2a69..2f4124f8a796 100644
--- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexSimpleEntryContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-01-02 14:41:37 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,8 +88,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -106,7 +106,8 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList;
-
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_STYLE_NAME;
const sal_Char sAPI_TokenType[] = "TokenType";
const sal_Char sAPI_CharacterStyleName[] = "CharacterStyleName";
@@ -144,8 +145,7 @@ void XMLIndexSimpleEntryContext::StartElement(
GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (sLocalName.equalsAsciiL(sXML_style_name,
- sizeof(sXML_style_name)-1)) )
+ IsXMLToken(sLocalName, XML_STYLE_NAME) )
{
sCharStyleName = xAttrList->getValueByIndex(nAttr);
bCharStyleNameOK = sal_True;
diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx
index 3fcd4a0d8f98..a92507757b77 100644
--- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx
+++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexSourceBaseContext.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dvo $ $Date: 2001-06-20 14:16:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -278,7 +278,7 @@ void XMLIndexSourceBaseContext::ProcessAttribute(
switch (eParam)
{
case XML_TOK_INDEXSOURCE_INDEX_SCOPE:
- if (rValue.equalsAsciiL(sXML_chapter, sizeof(sXML_chapter)-1))
+ if ( IsXMLToken( rValue, XML_CHAPTER ) )
{
bChapterIndex = sal_True;
}
@@ -320,16 +320,14 @@ SvXMLImportContext* XMLIndexSourceBaseContext::CreateChildContext(
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (rLocalName.equalsAsciiL(sXML_index_title_template,
- sizeof(sXML_index_title_template)-1))
+ if ( IsXMLToken( rLocalName, XML_INDEX_TITLE_TEMPLATE ) )
{
pContext = new XMLIndexTitleTemplateContext(GetImport(),
rIndexPropertySet,
nPrefix, rLocalName);
}
- else if (bUseLevelFormats &&
- rLocalName.equalsAsciiL(sXML_index_source_styles,
- sizeof(sXML_index_source_styles)-1))
+ else if ( bUseLevelFormats &&
+ IsXMLToken( rLocalName, XML_INDEX_SOURCE_STYLES ) )
{
pContext = new XMLIndexTOCStylesContext(GetImport(),
rIndexPropertySet,
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 13303e3fe0bd..8cfc208312bf 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTOCContext.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -144,6 +144,10 @@
#include "xmlkywd.hxx"
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
#ifndef _XMLOFF_PRSTYLEI_HXX_
#include "prstylei.hxx"
#endif
@@ -390,8 +394,7 @@ void XMLIndexTOCContext::StartElement(
&sLocalName );
if ( XML_NAMESPACE_TEXT == nPrefix)
{
- if ( sLocalName.equalsAsciiL(sXML_style_name,
- sizeof(sXML_style_name)-1) )
+ if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
{
XMLPropStyleContext* pStyle =
GetImport().GetTextImport()->FindSectionStyle(
@@ -401,8 +404,7 @@ void XMLIndexTOCContext::StartElement(
pStyle->FillPropertySet( xTOCPropertySet );
}
}
- else if ( sLocalName.equalsAsciiL(sXML_protected,
- sizeof(sXML_protected)-1) )
+ else if ( IsXMLToken( sLocalName, XML_PROTECTED ) )
{
sal_Bool bTmp;
if ( SvXMLUnitConverter::convertBool(
@@ -453,8 +455,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext(
{
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (rLocalName.equalsAsciiL(sXML_index_body,
- sizeof(sXML_index_body)-1))
+ if ( IsXMLToken( rLocalName, XML_INDEX_BODY ) )
{
pContext = new XMLIndexBodyContext(GetImport(), nPrefix,
rLocalName);
diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
index c6aef875079e..53a801cdb366 100644
--- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTOCSourceContext.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -122,6 +122,7 @@
+using namespace ::xmloff::token;
using ::rtl::OUString;
using ::com::sun::star::beans::XPropertySet;
@@ -135,6 +136,7 @@ const sal_Char sAPI_CreateFromMarks[] = "CreateFromMarks";
const sal_Char sAPI_Level[] = "Level";
const sal_Char sAPI_CreateFromLevelParagraphStyles[] = "CreateFromLevelParagraphStyles";
+
TYPEINIT1( XMLIndexTOCSourceContext, XMLIndexSourceBaseContext );
XMLIndexTOCSourceContext::XMLIndexTOCSourceContext(
@@ -169,7 +171,7 @@ void XMLIndexTOCSourceContext::ProcessAttribute(
switch (eParam)
{
case XML_TOK_INDEXSOURCE_OUTLINE_LEVEL:
- if (rValue.equalsAsciiL(sXML_none, sizeof(sXML_none)-1))
+ if ( IsXMLToken( rValue, XML_NONE ) )
{
bUseOutline = sal_False;
}
@@ -240,13 +242,12 @@ SvXMLImportContext* XMLIndexTOCSourceContext::CreateChildContext(
const Reference<XAttributeList> & xAttrList )
{
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_table_of_content_entry_template,
- sizeof(sXML_table_of_content_entry_template)-1)))
+ IsXMLToken(rLocalName, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE) )
{
return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
nPrefix, rLocalName,
aLevelNameTOCMap,
- sXML_outline_level,
+ XML_OUTLINE_LEVEL,
aLevelStylePropNameTOCMap,
aAllowedTokenTypesTOC);
}
diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
index 2b952b8a13b6..e4138a0a0efe 100644
--- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTOCStylesContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-01-02 14:41:38 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,8 +93,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -113,6 +113,9 @@
#include <rtl/ustring.hxx>
#endif
+
+using namespace ::xmloff::token;
+
using ::rtl::OUString;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Reference;
@@ -121,6 +124,7 @@ using ::com::sun::star::uno::Any;
using ::com::sun::star::container::XIndexReplace;
using ::com::sun::star::xml::sax::XAttributeList;
+
const sal_Char sAPI_LevelParagraphStyles[] = "LevelParagraphStyles";
TYPEINIT1( XMLIndexTOCStylesContext, SvXMLImportContext );
@@ -156,8 +160,7 @@ void XMLIndexTOCStylesContext::StartElement(
GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (sLocalName.equalsAsciiL(sXML_outline_level,
- sizeof(sXML_outline_level)-1)) )
+ (IsXMLToken(sLocalName, XML_OUTLINE_LEVEL)) )
{
sal_Int32 nTmp;
if (SvXMLUnitConverter::convertNumber(
@@ -203,8 +206,7 @@ SvXMLImportContext *XMLIndexTOCStylesContext::CreateChildContext(
{
// check for index-source-style
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_index_source_style,
- sizeof(sXML_index_source_style)-1) )
+ IsXMLToken( rLocalName, XML_INDEX_SOURCE_STYLE ) )
{
// find text:style-name attribute and record in aStyleNames
sal_Int16 nCount = xAttrList->getLength();
@@ -215,8 +217,7 @@ SvXMLImportContext *XMLIndexTOCStylesContext::CreateChildContext(
GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (sLocalName.equalsAsciiL(sXML_style_name,
- sizeof(sXML_style_name)-1)) )
+ IsXMLToken( sLocalName, XML_STYLE_NAME ) )
{
aStyleNames.push_back(xAttrList->getValueByIndex(nAttr));
}
diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
index b1d54a74617e..84bf522d2b72 100644
--- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTabStopEntryContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-01-02 14:41:38 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,8 +88,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -100,6 +100,9 @@
#include <rtl/ustring.hxx>
#endif
+
+using namespace ::xmloff::token;
+
using ::rtl::OUString;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
@@ -107,6 +110,7 @@ using ::com::sun::star::uno::Any;
using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::xml::sax::XAttributeList;
+
TYPEINIT1( XMLIndexTabStopEntryContext, SvXMLImportContext );
XMLIndexTabStopEntryContext::XMLIndexTabStopEntryContext(
@@ -142,16 +146,14 @@ void XMLIndexTabStopEntryContext::StartElement(
OUString sAttr = xAttrList->getValueByIndex(nAttr);
if (XML_NAMESPACE_STYLE == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_type, sizeof(sXML_type)-1))
+ if ( IsXMLToken( sLocalName, XML_TYPE ) )
{
// if it's neither left nor right, value is
// ignored. Since left is default, we only need to
// check for right
- bTabRightAligned = sAttr.equalsAsciiL(sXML_right,
- sizeof(sXML_right)-1);
+ bTabRightAligned = IsXMLToken( sAttr, XML_RIGHT );
}
- else if (sLocalName.equalsAsciiL(sXML_position,
- sizeof(sXML_position)-1))
+ else if ( IsXMLToken( sLocalName, XML_POSITION ) )
{
sal_Int32 nTmp;
if (GetImport().GetMM100UnitConverter().
@@ -161,8 +163,7 @@ void XMLIndexTabStopEntryContext::StartElement(
bTabPositionOK = sal_True;
}
}
- else if (sLocalName.equalsAsciiL(sXML_leader_char,
- sizeof(sXML_leader_char)-1))
+ else if ( IsXMLToken( sLocalName, XML_LEADER_CHAR ) )
{
sLeaderChar = sAttr;
// valid only, if we have a char!
diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx
index 7336a640eabf..c6405cb5e3d2 100644
--- a/xmloff/source/text/XMLIndexTableSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTableSourceContext.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,8 +108,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -124,6 +124,7 @@
#include <rtl/ustring.hxx>
#endif
+
using namespace ::com::sun::star::text;
using namespace ::xmloff::token;
@@ -242,14 +243,13 @@ SvXMLImportContext* XMLIndexTableSourceContext::CreateChildContext(
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList )
{
- if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_table_index_entry_template,
- sizeof(sXML_table_index_entry_template)-1)))
+ if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
+ ( IsXMLToken( rLocalName, XML_TABLE_INDEX_ENTRY_TEMPLATE ) ) )
{
return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
nPrefix, rLocalName,
aLevelNameTableMap,
- NULL, // no outline-level attr
+ XML_TOKEN_INVALID, // no outline-level attr
aLevelStylePropNameTableMap,
aAllowedTokenTypesTable);
}
diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx
index bf25387d649f..c8476deea75b 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTemplateContext.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -164,7 +164,7 @@ XMLIndexTemplateContext::XMLIndexTemplateContext(
sal_uInt16 nPrfx,
const OUString& rLocalName,
const SvXMLEnumMapEntry* pLevelNameMap,
- const sal_Char* pLevelAttrName,
+ enum XMLTokenEnum eLevelAttrName,
const sal_Char** pLevelStylePropMap,
const sal_Bool* pAllowedTokenTypes) :
SvXMLImportContext(rImport, nPrfx, rLocalName),
@@ -173,7 +173,7 @@ XMLIndexTemplateContext::XMLIndexTemplateContext(
nOutlineLevel(1), // all indices have level 1 (0 is for header)
bStyleNameOK(sal_False),
bOutlineLevelOK(sal_False),
- pOutlineLevelAttrName(pLevelAttrName),
+ eOutlineLevelAttrName(eLevelAttrName),
pOutlineLevelNameMap(pLevelNameMap),
pOutlineLevelStylePropMap(pLevelStylePropMap),
pAllowedTokenTypesMap(pAllowedTokenTypes),
@@ -203,8 +203,8 @@ XMLIndexTemplateContext::XMLIndexTemplateContext(
"BibliographyDataField")),
sChapterFormat(RTL_CONSTASCII_USTRINGPARAM("ChapterFormat"))
{
- DBG_ASSERT( ((NULL != pLevelAttrName) && (NULL != pLevelNameMap))
- || ((NULL == pLevelAttrName) && (NULL == pLevelNameMap)),
+ DBG_ASSERT( ((XML_TOKEN_INVALID != eLevelAttrName) && (NULL != pLevelNameMap))
+ || ((XML_TOKEN_INVALID == eLevelAttrName) && (NULL == pLevelNameMap)),
"need both, attribute name and value map, or neither" );
DBG_ASSERT( NULL != pOutlineLevelStylePropMap, "need property name map" );
DBG_ASSERT( NULL != pAllowedTokenTypes, "need allowed tokens map" );
@@ -242,17 +242,16 @@ void XMLIndexTemplateContext::StartElement(
&sLocalName );
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_style_name,
- sizeof(sXML_style_name)-1))
+ if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
{
// style name
sStyleName = xAttrList->getValueByIndex(nAttr);
bStyleNameOK = sal_True;
}
- else if (NULL != pOutlineLevelAttrName)
+ else if (eOutlineLevelAttrName != XML_TOKEN_INVALID)
{
// we have an attr name! Then see if we have the attr, too.
- if (0 == sLocalName.compareToAscii(pOutlineLevelAttrName))
+ if (IsXMLToken(sLocalName, eOutlineLevelAttrName))
{
// outline level
sal_uInt16 nTmp;
diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx b/xmloff/source/text/XMLIndexTemplateContext.hxx
index 3e174d4749e0..9cda0688c509 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.hxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTemplateContext.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-02-06 10:41:54 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,10 @@
#include "xmlictxt.hxx"
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
#include <vector>
#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
@@ -124,7 +128,7 @@ class XMLIndexTemplateContext : public SvXMLImportContext
::rtl::OUString sStyleName;
const SvXMLEnumMapEntry* pOutlineLevelNameMap;
- const sal_Char* pOutlineLevelAttrName;
+ enum ::xmloff::token::XMLTokenEnum eOutlineLevelAttrName;
const sal_Char** pOutlineLevelStylePropMap;
const sal_Bool* pAllowedTokenTypesMap;
@@ -172,7 +176,7 @@ public:
sal_uInt16 nPrfx,
const ::rtl::OUString& rLocalName,
const SvXMLEnumMapEntry* aLevelNameMap,
- const sal_Char* pLevelAttrName,
+ enum ::xmloff::token::XMLTokenEnum eLevelAttrName,
const sal_Char** aLevelStylePropNameMap,
const sal_Bool* aAllowedTokenTypes);
diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
index a303e84e2b56..b745b7d56d40 100644
--- a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexTitleTemplateContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-01-02 14:41:38 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,8 +79,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
@@ -90,6 +90,8 @@ using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::xml::sax::XAttributeList;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_STYLE_NAME;
const sal_Char sAPI_Title[] = "Title";
@@ -130,8 +132,7 @@ void XMLIndexTitleTemplateContext::StartElement(
GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (sLocalName.equalsAsciiL(sXML_style_name,
- sizeof(sXML_style_name)-1)) )
+ (IsXMLToken(sLocalName, XML_STYLE_NAME)) )
{
sStyleName = xAttrList->getValueByIndex(nAttr);
bStyleNameOK = sal_True;
diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx
index 4034fd173af1..647664e1253d 100644
--- a/xmloff/source/text/XMLIndexUserSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLIndexUserSourceContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -120,11 +120,15 @@
#include <rtl/ustring.hxx>
#endif
+
using ::rtl::OUString;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_USER_INDEX_ENTRY_TEMPLATE;
+using ::xmloff::token::XML_OUTLINE_LEVEL;
const sal_Char sAPI_CreateFromEmbeddedObjects[] = "CreateFromEmbeddedObjects";
@@ -270,13 +274,12 @@ SvXMLImportContext* XMLIndexUserSourceContext::CreateChildContext(
const Reference<XAttributeList> & xAttrList )
{
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (rLocalName.equalsAsciiL(sXML_user_index_entry_template,
- sizeof(sXML_user_index_entry_template)-1)))
+ (IsXMLToken(rLocalName, XML_USER_INDEX_ENTRY_TEMPLATE)) )
{
return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
nPrefix, rLocalName,
aLevelNameTOCMap,
- sXML_outline_level,
+ XML_OUTLINE_LEVEL,
aLevelStylePropNameTOCMap,
aAllowedTokenTypesUser);
}
diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx
index 71c9220d570d..69cdde7d75a3 100644
--- a/xmloff/source/text/XMLLineNumberingExport.cxx
+++ b/xmloff/source/text/XMLLineNumberingExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLLineNumberingExport.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,14 +87,15 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNUME_HXX
#include "xmlnume.hxx"
#endif
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
@@ -104,6 +105,7 @@ using ::rtl::OUStringBuffer;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::text::XLineNumberingProperties;
+
XMLLineNumberingExport::XMLLineNumberingExport(SvXMLExport& rExp) :
rExport(rExp),
sCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")),
@@ -151,40 +153,39 @@ void XMLLineNumberingExport::Export()
aAny >>= sTmp;
if (sTmp.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_style_name,sTmp);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME, sTmp);
}
// enable
aAny = xLineNumbering->getPropertyValue(sIsOn);
if (! *(sal_Bool*)aAny.getValue())
{
- rExport.AddAttributeASCII(XML_NAMESPACE_TEXT,
- sXML_number_lines, sXML_false);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT,
+ XML_NUMBER_LINES, XML_FALSE);
}
// count empty lines
aAny = xLineNumbering->getPropertyValue(sCountEmptyLines);
if (! *(sal_Bool*)aAny.getValue())
{
- rExport.AddAttributeASCII(XML_NAMESPACE_TEXT,
- sXML_count_empty_lines, sXML_false);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT,
+ XML_COUNT_EMPTY_LINES, XML_FALSE);
}
// count in frames
aAny = xLineNumbering->getPropertyValue(sCountLinesInFrames);
if (*(sal_Bool*)aAny.getValue())
{
- rExport.AddAttributeASCII(XML_NAMESPACE_TEXT,
- sXML_count_in_floating_frames,
- sXML_true);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT,
+ XML_COUNT_IN_FLOATING_FRAMES, XML_TRUE);
}
// restart numbering
aAny = xLineNumbering->getPropertyValue(sRestartAtEachPage);
if (*(sal_Bool*)aAny.getValue())
{
- rExport.AddAttributeASCII(XML_NAMESPACE_TEXT,
- sXML_restart_on_page, sXML_true);
+ rExport.AddAttribute(XML_NAMESPACE_TEXT,
+ XML_RESTART_ON_PAGE, XML_TRUE);
}
// Distance
@@ -195,7 +196,7 @@ void XMLLineNumberingExport::Export()
{
OUStringBuffer sBuf;
rExport.GetMM100UnitConverter().convertMeasure(sBuf, nLength);
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_offset,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_OFFSET,
sBuf.makeStringAndClear());
}
@@ -205,13 +206,13 @@ void XMLLineNumberingExport::Export()
sal_Int16 nFormat;
aAny >>= nFormat;
rExport.GetMM100UnitConverter().convertNumFormat( sNumPosBuf, nFormat );
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_num_format,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_FORMAT,
sNumPosBuf.makeStringAndClear());
rExport.GetMM100UnitConverter().convertNumLetterSync( sNumPosBuf, nFormat );
if( sNumPosBuf.getLength() )
{
rExport.AddAttribute(XML_NAMESPACE_STYLE,
- sXML_num_letter_sync,
+ XML_NUM_LETTER_SYNC,
sNumPosBuf.makeStringAndClear() );
}
@@ -222,7 +223,7 @@ void XMLLineNumberingExport::Export()
if (SvXMLUnitConverter::convertEnum(sNumPosBuf, nPosition,
aLineNumberPositionMap))
{
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_number_position,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_NUMBER_POSITION,
sNumPosBuf.makeStringAndClear());
}
@@ -233,11 +234,11 @@ void XMLLineNumberingExport::Export()
OUStringBuffer sBuf;
SvXMLUnitConverter::convertNumber(sBuf,
(sal_Int32)nLineInterval);
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_increment,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_INCREMENT,
sBuf.makeStringAndClear());
SvXMLElementExport aConfigElem(rExport, XML_NAMESPACE_TEXT,
- sXML_linenumbering_configuration,
+ XML_LINENUMBERING_CONFIGURATION,
sal_True, sal_True);
// line separator
@@ -254,11 +255,11 @@ void XMLLineNumberingExport::Export()
OUStringBuffer sBuf;
SvXMLUnitConverter::convertNumber(sBuf,
(sal_Int32)nLineDistance);
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_increment,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_INCREMENT,
sBuf.makeStringAndClear());
SvXMLElementExport aSeparatorElem(rExport, XML_NAMESPACE_TEXT,
- sXML_linenumbering_separator,
+ XML_LINENUMBERING_SEPARATOR,
sal_True, sal_False);
rExport.GetDocHandler()->characters(sSeparator);
}
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx
index 10dbe5007d8a..7aa7b04f25a7 100644
--- a/xmloff/source/text/XMLLineNumberingImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLLineNumberingImportContext.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:32 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -98,8 +98,8 @@
#include "nmspmap.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNUMI_HXX
@@ -127,8 +127,8 @@ XMLLineNumberingImportContext::XMLLineNumberingImportContext(
const Reference<XAttributeList> & xAttrList) :
SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_LINENUMBERINGCONFIG),
sStyleName(),
- sNumFormat(RTL_CONSTASCII_USTRINGPARAM(sXML_1)),
- sNumLetterSync(RTL_CONSTASCII_USTRINGPARAM(sXML_false)),
+ sNumFormat(GetXMLToken(XML_1)),
+ sNumLetterSync(GetXMLToken(XML_FALSE)),
sSeparator(),
nOffset(-1),
nNumberPosition(style::LineNumberPosition::LEFT),
@@ -364,8 +364,7 @@ SvXMLImportContext* XMLLineNumberingImportContext::CreateChildContext(
const Reference<XAttributeList> & xAttrList )
{
if ( (nPrefix == XML_NAMESPACE_TEXT) &&
- rLocalName.equalsAsciiL(sXML_linenumbering_separator,
- sizeof(sXML_linenumbering_separator)-1) )
+ IsXMLToken(rLocalName, XML_LINENUMBERING_SEPARATOR) )
{
return new XMLLineNumberingSeparatorImportContext(GetImport(),
nPrefix, rLocalName,
diff --git a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx
index 4de76d8a7868..f159f6f02d35 100644
--- a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLLineNumberingSeparatorImportContext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dvo $ $Date: 2000-12-11 19:14:26 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,8 +79,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -93,6 +93,8 @@ using namespace ::com::sun::star::uno;
using ::com::sun::star::xml::sax::XAttributeList;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_INCREMENT;
TYPEINIT1( XMLLineNumberingSeparatorImportContext, SvXMLImportContext );
@@ -121,7 +123,7 @@ void XMLLineNumberingSeparatorImportContext::StartElement(
GetKeyByAttrName( xAttrList->getNameByIndex(i), &sLocalName );
if ( (nPrefix == XML_NAMESPACE_TEXT) &&
- sLocalName.equalsAsciiL(sXML_increment, sizeof(sXML_increment)-1))
+ IsXMLToken(sLocalName, XML_INCREMENT) )
{
sal_Int32 nTmp;
if (SvXMLUnitConverter::convertNumber(
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index 2a61902c92fb..ed601ac2a3e4 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLRedlineExport.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: dvo $ $Date: 2001-05-02 16:19:18 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,8 +107,8 @@
#include <com/sun/star/util/DateTime.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
@@ -125,6 +125,7 @@
using namespace ::com::sun::star;
+using namespace ::xmloff::token;
using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::beans::XPropertySet;
@@ -145,11 +146,11 @@ using ::std::list;
XMLRedlineExport::XMLRedlineExport(SvXMLExport& rExp) :
sDelete(RTL_CONSTASCII_USTRINGPARAM("Delete")),
- sDeletion(RTL_CONSTASCII_USTRINGPARAM(sXML_deletion)),
+ sDeletion(GetXMLToken(XML_DELETION)),
sFormat(RTL_CONSTASCII_USTRINGPARAM("Format")),
- sFormatChange(RTL_CONSTASCII_USTRINGPARAM(sXML_format_change)),
+ sFormatChange(GetXMLToken(XML_FORMAT_CHANGE)),
sInsert(RTL_CONSTASCII_USTRINGPARAM("Insert")),
- sInsertion(RTL_CONSTASCII_USTRINGPARAM(sXML_insertion)),
+ sInsertion(GetXMLToken(XML_INSERTION)),
sIsCollapsed(RTL_CONSTASCII_USTRINGPARAM("IsCollapsed")),
sIsStart(RTL_CONSTASCII_USTRINGPARAM("IsStart")),
sRedlineAuthor(RTL_CONSTASCII_USTRINGPARAM("RedlineAuthor")),
@@ -235,7 +236,7 @@ void XMLRedlineExport::ExportChangesList(
{
// changes container element
SvXMLElementExport aChanges(rExport, XML_NAMESPACE_TEXT,
- sXML_tracked_changes,
+ XML_TRACKED_CHANGES,
sal_True, sal_True);
// iterate over changes list
@@ -297,7 +298,7 @@ void XMLRedlineExport::ExportChangesListElements()
{
OUStringBuffer aBuffer;
SvXMLUnitConverter::encodeBase64( aBuffer, aKey );
- rExport.AddAttribute( XML_NAMESPACE_TEXT, sXML_protection_key,
+ rExport.AddAttribute( XML_NAMESPACE_TEXT, XML_PROTECTION_KEY,
aBuffer.makeStringAndClear() );
}
@@ -312,14 +313,14 @@ void XMLRedlineExport::ExportChangesListElements()
// export only if we have changes, but tracking is not enabled
if ( !bEnabled != !aEnumAccess->hasElements() )
{
- rExport.AddAttributeASCII(
- XML_NAMESPACE_TEXT, sXML_track_changes,
- bEnabled ? sXML_true : sXML_false );
+ rExport.AddAttribute(
+ XML_NAMESPACE_TEXT, XML_TRACK_CHANGES,
+ bEnabled ? XML_TRUE : XML_FALSE );
}
// changes container element
SvXMLElementExport aChanges(rExport, XML_NAMESPACE_TEXT,
- sXML_tracked_changes,
+ XML_TRACKED_CHANGES,
sal_True, sal_True);
// get enumeration and iterate over elements
@@ -411,30 +412,30 @@ void XMLRedlineExport::ExportChangeInline(
const Reference<XPropertySet> & rPropSet)
{
// determine element name (depending on collapsed, start/end)
- sal_Char* pElement = NULL;
+ enum XMLTokenEnum eElement = XML_TOKEN_INVALID;
Any aAny = rPropSet->getPropertyValue(sIsCollapsed);
sal_Bool bCollapsed = *(sal_Bool *)aAny.getValue();
sal_Bool bStart = sal_True; // ignored if bCollapsed = sal_True
if (bCollapsed)
{
- pElement = sXML_change;
+ eElement = XML_CHANGE;
}
else
{
aAny = rPropSet->getPropertyValue(sIsStart);
bStart = *(sal_Bool *)aAny.getValue();
- pElement = bStart ? sXML_change_start : sXML_change_end;
+ eElement = bStart ? XML_CHANGE_START : XML_CHANGE_END;
}
- if (NULL != pElement)
+ if (XML_TOKEN_INVALID != eElement)
{
// we always need the ID
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_change_id,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_CHANGE_ID,
GetRedlineID(rPropSet));
// export the element (no whitespace because we're in the text body)
SvXMLElementExport aChangeElem(rExport, XML_NAMESPACE_TEXT,
- pElement, sal_False, sal_False);
+ eElement, sal_False, sal_False);
}
}
@@ -443,9 +444,9 @@ void XMLRedlineExport::ExportChangedRegion(
const Reference<XPropertySet> & rPropSet)
{
// export changed-region element (with change-ID)
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_id, GetRedlineID(rPropSet) );
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_ID, GetRedlineID(rPropSet) );
SvXMLElementExport aChangedRegion(rExport, XML_NAMESPACE_TEXT,
- sXML_changed_region, sal_True, sal_True);
+ XML_CHANGED_REGION, sal_True, sal_True);
// scope for (first) change element
{
@@ -485,7 +486,7 @@ void XMLRedlineExport::ExportChangedRegion(
// delete an insertion. This assumption is asserted in
// ExportChangeInfo(Sequence<PropertyValue>&).
SvXMLElementExport aSecondChangeElem(
- rExport, XML_NAMESPACE_TEXT, sXML_insertion,
+ rExport, XML_NAMESPACE_TEXT, XML_INSERTION,
sal_True, sal_True);
ExportChangeInfo(aSuccessorData);
@@ -539,7 +540,7 @@ void XMLRedlineExport::ExportChangeInfo(
aAny >>= sTmp;
if (sTmp.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_chg_author, sTmp);
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_AUTHOR, sTmp);
}
aAny = rPropSet->getPropertyValue(sRedlineDateTime);
@@ -547,11 +548,11 @@ void XMLRedlineExport::ExportChangeInfo(
aAny >>= aDateTime;
OUStringBuffer sBuf;
rExport.GetMM100UnitConverter().convertDateTime(sBuf, aDateTime);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_chg_date_time,
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME,
sBuf.makeStringAndClear());
SvXMLElementExport aChangeInfo(rExport, XML_NAMESPACE_OFFICE,
- sXML_change_info, sal_True, sal_True);
+ XML_CHANGE_INFO, sal_True, sal_True);
// comment as <text:p> sequence
aAny = rPropSet->getPropertyValue(sRedlineComment);
@@ -565,7 +566,7 @@ void XMLRedlineExport::ExportChangeInfo(
while (aEnumerator.getNextToken(aSubString))
{
SvXMLElementExport aParagraph(
- rExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False);
+ rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
rExport.GetDocHandler()->characters(aSubString);
}
}
@@ -585,7 +586,7 @@ void XMLRedlineExport::ExportChangeInfo(
rVal.Value >>= sTmp;
if (sTmp.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_chg_author,
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_AUTHOR,
sTmp);
}
}
@@ -595,7 +596,7 @@ void XMLRedlineExport::ExportChangeInfo(
rVal.Value >>= sTmp;
if (sTmp.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_chg_comment,
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_COMMENT,
sTmp);
}
}
@@ -605,7 +606,7 @@ void XMLRedlineExport::ExportChangeInfo(
rVal.Value >>= aDateTime;
OUStringBuffer sBuf;
rExport.GetMM100UnitConverter().convertDateTime(sBuf, aDateTime);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, sXML_chg_date_time,
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME,
sBuf.makeStringAndClear());
}
else if (rVal.Name.equals(sRedlineType))
@@ -621,7 +622,7 @@ void XMLRedlineExport::ExportChangeInfo(
// finally write element
SvXMLElementExport aChangeInfo(rExport, XML_NAMESPACE_OFFICE,
- sXML_change_info, sal_True, sal_True);
+ XML_CHANGE_INFO, sal_True, sal_True);
}
void XMLRedlineExport::ExportStartOrEndRedline(
@@ -647,14 +648,14 @@ void XMLRedlineExport::ExportStartOrEndRedline(
OUStringBuffer sBuffer(sChangePrefix);
sBuffer.append(sId);
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_change_id,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_CHANGE_ID,
sBuffer.makeStringAndClear());
// export the element
// (whitespace because we're not inside paragraphs)
SvXMLElementExport aChangeElem(
rExport, XML_NAMESPACE_TEXT,
- bStart ? sXML_change_start : sXML_change_end,
+ bStart ? XML_CHANGE_START : XML_CHANGE_END,
sal_True, sal_True);
// and break out of loop, in case a second RedlineIdentifier Value
diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx
index 95a1b3612b35..74abfaa24bec 100644
--- a/xmloff/source/text/XMLSectionExport.hxx
+++ b/xmloff/source/text/XMLSectionExport.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLSectionExport.hxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: dvo $ $Date: 2001-06-12 17:46:20 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,6 +74,9 @@
#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
class SvXMLExport;
class XMLTextParagraphExport;
@@ -395,7 +398,7 @@ protected:
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet> & rPropSet,
const ::rtl::OUString& sPropertyName,
- const sal_Char* pAttributeName,
+ enum ::xmloff::token::XMLTokenEnum eAttributeName,
sal_Bool bDefault,
sal_Bool bInvert = sal_False);
};
diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
index ae7a4735e223..7c3a91ada22c 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLSectionFootnoteConfigExport.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: dvo $ $Date: 2001-04-17 12:01:21 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -95,8 +95,8 @@
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNUME_HXX
@@ -118,6 +118,8 @@
#include <vector>
+using namespace ::xmloff::token;
+
using ::std::vector;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
@@ -217,7 +219,7 @@ void XMLSectionFootnoteConfigExport::exportXML(
// restart number is stored as 0.., but interpreted as 1..
SvXMLUnitConverter::convertNumber(sBuf,
(sal_Int32)(nNumRestartAt+1));
- rExport.AddAttribute(XML_NAMESPACE_TEXT, sXML_start_value,
+ rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_START_VALUE,
sBuf.makeStringAndClear());
}
@@ -226,19 +228,19 @@ void XMLSectionFootnoteConfigExport::exportXML(
// prefix and suffix
if (sNumPrefix.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_num_prefix,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_PREFIX,
sNumPrefix);
}
if (sNumSuffix.getLength() > 0)
{
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_num_suffix,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_SUFFIX,
sNumSuffix);
}
// number type: num format
rExport.GetMM100UnitConverter().convertNumFormat( sBuf,
nNumberingType );
- rExport.AddAttribute(XML_NAMESPACE_STYLE, sXML_num_format,
+ rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_FORMAT,
sBuf.makeStringAndClear());
// and letter sync, if applicable
@@ -247,15 +249,15 @@ void XMLSectionFootnoteConfigExport::exportXML(
if (sBuf.getLength())
{
rExport.AddAttribute(XML_NAMESPACE_STYLE,
- sXML_num_letter_sync,
+ XML_NUM_LETTER_SYNC,
sBuf.makeStringAndClear());
}
}
// and finally, the element
SvXMLElementExport rElem(rExport, XML_NAMESPACE_TEXT,
- (bEndnote ? sXML_endnotes_configuration :
- sXML_footnotes_configuration ),
+ (bEndnote ? XML_ENDNOTES_CONFIGURATION :
+ XML_FOOTNOTES_CONFIGURATION ),
sal_True, sal_True);
}
}
diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
index 48f5a1fa06d0..2924e90561f9 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLSectionFootnoteConfigImport.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-04-17 12:01:21 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -82,8 +82,8 @@
#include "xmlimp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -120,7 +120,10 @@
#include <vector>
+
+using namespace ::xmloff::token;
using namespace ::com::sun::star::style;
+
using ::rtl::OUString;
using ::std::vector;
using ::com::sun::star::uno::Any;
@@ -173,8 +176,7 @@ void XMLSectionFootnoteConfigImport::StartElement(
if (XML_NAMESPACE_TEXT == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_start_value,
- sizeof(sXML_start_value)-1))
+ if (IsXMLToken(sLocalName, XML_START_VALUE))
{
sal_Int32 nTmp;
if (SvXMLUnitConverter::convertNumber(nTmp, sAttrValue))
@@ -186,26 +188,22 @@ void XMLSectionFootnoteConfigImport::StartElement(
}
else if (XML_NAMESPACE_STYLE == nPrefix)
{
- if (sLocalName.equalsAsciiL(sXML_num_prefix,
- sizeof(sXML_num_prefix)-1))
+ if (IsXMLToken(sLocalName, XML_NUM_PREFIX))
{
sNumPrefix = sAttrValue;
bNumOwn = sal_True;
}
- else if (sLocalName.equalsAsciiL(sXML_num_suffix,
- sizeof(sXML_num_suffix)-1))
+ else if (IsXMLToken(sLocalName, XML_NUM_SUFFIX))
{
sNumSuffix = sAttrValue;
bNumOwn = sal_True;
}
- else if (sLocalName.equalsAsciiL(sXML_num_format,
- sizeof(sXML_num_format)-1))
+ else if (IsXMLToken(sLocalName, XML_NUM_FORMAT))
{
sNumFormat = sAttrValue;
bNumOwn = sal_True;
}
- else if (sLocalName.equalsAsciiL(sXML_num_letter_sync,
- sizeof(sXML_num_letter_sync)-1))
+ else if (IsXMLToken(sLocalName, XML_NUM_LETTER_SYNC))
{
sNumLetterSync = sAttrValue;
bNumOwn = sal_True;
@@ -215,9 +213,7 @@ void XMLSectionFootnoteConfigImport::StartElement(
// OK, now we have all values and can fill the XMLPropertyState vector
Any aAny;
- sal_Bool bEndnote = GetLocalName().equalsAsciiL(
- sXML_endnotes_configuration,
- sizeof(sXML_endnotes_configuration)-1 );
+ sal_Bool bEndnote = IsXMLToken(GetLocalName(), XML_ENDNOTES_CONFIGURATION);
aAny.setValue( &bNumOwn, ::getBooleanCppuType() );
sal_Int32 nIndex = rMapper->FindEntryIndex( bEndnote ?
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index 3743cbcdfa0a..297272ef3342 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLSectionImportContext.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:32 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,8 +91,8 @@
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
@@ -216,8 +216,7 @@ void XMLSectionImportContext::StartElement(
ProcessAttributes(xAttrList);
// process index headers:
- sal_Bool bIsIndexHeader = GetLocalName().equalsAsciiL(
- sXML_index_title, sizeof(sXML_index_title)-1);
+ sal_Bool bIsIndexHeader = IsXMLToken( GetLocalName(), XML_INDEX_TITLE );
if (bIsIndexHeader)
{
bValid = sal_True;
@@ -273,9 +272,8 @@ void XMLSectionImportContext::StartElement(
}
// password (only for regular sections)
- if (bSequenceOK &&
- GetLocalName().equalsAsciiL(sXML_section,
- sizeof(sXML_section)-1))
+ if ( bSequenceOK &&
+ IsXMLToken(GetLocalName(), XML_SECTION) )
{
Any aAny;
aAny <<= aSequence;
@@ -355,13 +353,12 @@ void XMLSectionImportContext::ProcessAttributes(
bCondOK = sal_True;
break;
case XML_TOK_SECTION_DISPLAY:
- if (sAttr.equalsAsciiL(sXML_true, sizeof(sXML_true)-1))
+ if (IsXMLToken(sAttr, XML_TRUE))
{
bIsVisible = sal_True;
}
- else if ( sAttr.equalsAsciiL(sXML_none, sizeof(sXML_none)-1) ||
- sAttr.equalsAsciiL(sXML_condition,
- sizeof(sXML_condition)-1) )
+ else if ( IsXMLToken(sAttr, XML_NONE) ||
+ IsXMLToken(sAttr, XML_CONDITION) )
{
bIsVisible = sal_False;
}
@@ -414,17 +411,15 @@ SvXMLImportContext* XMLSectionImportContext::CreateChildContext(
SvXMLImportContext* pContext = NULL;
// section-source (-dde) elements
- if ((XML_NAMESPACE_TEXT == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_section_source,
- sizeof(sXML_section_source)-1))
+ if ( (XML_NAMESPACE_TEXT == nPrefix) &&
+ IsXMLToken(rLocalName, XML_SECTION_SOURCE) )
{
pContext = new XMLSectionSourceImportContext(GetImport(),
nPrefix, rLocalName,
xSectionPropertySet);
}
- else if ((XML_NAMESPACE_OFFICE == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_dde_source,
- sizeof(sXML_dde_source)-1))
+ else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
+ IsXMLToken(rLocalName, XML_DDE_SOURCE) )
{
pContext = new XMLSectionSourceDDEImportContext(GetImport(),
nPrefix, rLocalName,
diff --git a/xmloff/source/text/XMLStringBufferImportContext.cxx b/xmloff/source/text/XMLStringBufferImportContext.cxx
index 09d69d6be7b3..d7aaeadea52f 100644
--- a/xmloff/source/text/XMLStringBufferImportContext.cxx
+++ b/xmloff/source/text/XMLStringBufferImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLStringBufferImportContext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: dvo $ $Date: 2001-01-24 16:49:52 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,18 +63,22 @@
#include "XMLStringBufferImportContext.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
+
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::xml::sax::XAttributeList;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_P;
+
TYPEINIT1(XMLStringBufferImportContext, SvXMLImportContext);
@@ -111,7 +115,7 @@ void XMLStringBufferImportContext::EndElement()
{
// add return for paragraph elements
if ( (XML_NAMESPACE_TEXT == GetPrefix()) &&
- (GetLocalName().equalsAsciiL(sXML_p, sizeof(sXML_p)-1)) )
+ (IsXMLToken(GetLocalName(), XML_P)) )
{
rTextBuffer.append(sal_Unicode(0x0a));
}
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index c61c898ea148..53c903df58ab 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextColumnsContext.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: dvo $ $Date: 2001-06-21 17:03:04 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -90,8 +90,8 @@
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLTEXTCOLUMNSCONTEXT_HXX
#include "XMLTextColumnsContext.hxx"
@@ -359,15 +359,13 @@ XMLTextColumnsContext::XMLTextColumnsContext(
const OUString& rValue = xAttrList->getValueByIndex( i );
if( XML_NAMESPACE_FO == nPrefix )
{
- if( aLocalName.equalsAsciiL( sXML_column_count,
- sizeof(sXML_column_count)-1 ) &&
+ if( IsXMLToken( aLocalName, XML_COLUMN_COUNT ) &&
GetImport().GetMM100UnitConverter().
convertNumber( nVal, rValue, 0, SHRT_MAX ) )
{
nCount = (sal_Int16)nVal;
}
- else if( aLocalName.equalsAsciiL( sXML_column_gap,
- sizeof(sXML_column_gap)-1 ) )
+ else if( IsXMLToken( aLocalName, XML_COLUMN_GAP ) )
{
bAutomatic = GetImport().GetMM100UnitConverter().
convertMeasure( nAutomaticDistance, rValue );
@@ -405,7 +403,7 @@ SvXMLImportContext *XMLTextColumnsContext::CreateChildContext(
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.equalsAsciiL( sXML_column, sizeof(sXML_column)-1 ) )
+ IsXMLToken( rLocalName, XML_COLUMN ) )
{
XMLTextColumnContext_Impl *pColumn =
new XMLTextColumnContext_Impl( GetImport(), nPrefix, rLocalName,
@@ -421,8 +419,7 @@ SvXMLImportContext *XMLTextColumnsContext::CreateChildContext(
pContext = pColumn;
}
else if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.equalsAsciiL( sXML_column_sep,
- sizeof(sXML_column_sep)-1 ) )
+ IsXMLToken( rLocalName, XML_COLUMN_SEP ) )
{
pColumnSep =
new XMLTextColumnSepContext_Impl( GetImport(), nPrefix, rLocalName,
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
index 3eb10305ae44..0f6e27e7a23e 100644
--- a/xmloff/source/text/XMLTextColumnsExport.cxx
+++ b/xmloff/source/text/XMLTextColumnsExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextColumnsExport.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-05-15 12:37:49 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -82,8 +82,8 @@
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -104,6 +104,7 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::rtl;
+using namespace ::xmloff::token;
XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) :
@@ -129,7 +130,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
OUStringBuffer sValue;
GetExport().GetMM100UnitConverter().convertNumber( sValue, nCount );
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_column_count,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_COLUMN_COUNT,
sValue.makeStringAndClear() );
// handle 'automatic' columns
@@ -146,12 +147,12 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
GetExport().GetMM100UnitConverter().convertMeasure(
aBuffer, nDistance );
GetExport().AddAttribute( XML_NAMESPACE_FO,
- sXML_column_gap,
+ XML_COLUMN_GAP,
aBuffer.makeStringAndClear() );
}
}
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, sXML_columns,
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, XML_COLUMNS,
sal_True, sal_True );
if( xPropSet.is() )
@@ -165,7 +166,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
aAny >>= nWidth;
GetExport().GetMM100UnitConverter().convertMeasure( sValue,
nWidth );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_width,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_WIDTH,
sValue.makeStringAndClear() );
// style:color
@@ -174,7 +175,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
aAny >>= nColor;
GetExport().GetMM100UnitConverter().convertColor( sValue,
nColor );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_color,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_COLOR,
sValue.makeStringAndClear() );
// style:height
@@ -183,7 +184,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
aAny >>= nHeight;
GetExport().GetMM100UnitConverter().convertPercent( sValue,
nHeight );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_height,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_HEIGHT,
sValue.makeStringAndClear() );
// style:vertical-align
@@ -191,21 +192,21 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
VerticalAlignment eVertAlign;
aAny >>= eVertAlign;
- sal_Char *pStr = 0;
+ enum XMLTokenEnum eStr = XML_TOKEN_INVALID;
switch( eVertAlign )
{
-// case VerticalAlignment_TOP: pStr = sXML_top;
- case VerticalAlignment_MIDDLE: pStr = sXML_middle; break;
- case VerticalAlignment_BOTTOM: pStr = sXML_bottom; break;
+// case VerticalAlignment_TOP: eStr = XML_TOP;
+ case VerticalAlignment_MIDDLE: eStr = XML_MIDDLE; break;
+ case VerticalAlignment_BOTTOM: eStr = XML_BOTTOM; break;
}
- if( pStr )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE,
- sXML_vertical_align, pStr );
+ if( eStr != XML_TOKEN_INVALID)
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ XML_VERTICAL_ALIGN, eStr );
// style:column-sep
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_column_sep,
+ XML_COLUMN_SEP,
sal_True, sal_True );
}
}
@@ -216,23 +217,23 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
GetExport().GetMM100UnitConverter().convertNumber( sValue,
pColumns->Width );
sValue.append( (sal_Unicode)'*' );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_rel_width,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_WIDTH,
sValue.makeStringAndClear() );
// fo:margin-left
GetExport().GetMM100UnitConverter().convertMeasure( sValue,
pColumns->LeftMargin );
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_margin_left,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_MARGIN_LEFT,
sValue.makeStringAndClear() );
// fo:margin-right
GetExport().GetMM100UnitConverter().convertMeasure( sValue,
pColumns->RightMargin );
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_margin_right,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_MARGIN_RIGHT,
sValue.makeStringAndClear() );
// style:column
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, sXML_column,
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, XML_COLUMN,
sal_True, sal_True );
pColumns++;
}
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 914169b1900e..6eedeacf45a7 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextFrameContext.cxx,v $
*
- * $Revision: 1.45 $
+ * $Revision: 1.46 $
*
- * last change: $Author: mib $ $Date: 2001-06-28 13:21:55 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -154,6 +154,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::document;
+using namespace ::xmloff::token;
using ::com::sun::star::document::XEventsSupplier;
class XMLTextFrameDescContext_Impl : public SvXMLImportContext
@@ -233,12 +234,12 @@ XMLTextFrameParam_Impl::XMLTextFrameParam_Impl( SvXMLImport& rImport, sal_uInt16
OUString aLocalName;
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
- if ( XML_NAMESPACE_DRAW == nPrefix && aLocalName.equalsAsciiL( sXML_value, sizeof(sXML_value) -1 ) )
+ if ( XML_NAMESPACE_DRAW == nPrefix && IsXMLToken(aLocalName, XML_VALUE) )
{
sValue = rValue;
bFoundValue=sal_True;
}
- else if ( XML_NAMESPACE_OFFICE == nPrefix && aLocalName.equalsAsciiL( sXML_name, sizeof( sXML_name) -1 ) )
+ else if ( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken(aLocalName, XML_NAME) )
sName = rValue;
}
if (sName.getLength() && bFoundValue )
@@ -321,7 +322,7 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
rValue);
break;
case XML_TOK_TEXT_CONTOUR_AUTO:
- bAuto = rValue.equalsAsciiL( sXML_true, sizeof(sXML_true)-1 );
+ bAuto = IsXMLToken(rValue, XML_TRUE);
break;
}
}
@@ -752,7 +753,7 @@ XMLTextFrameContext::XMLTextFrameContext(
}
break;
case XML_TOK_TEXT_FRAME_REL_WIDTH:
- if( rValue.equalsAsciiL( sXML_scale, sizeof(sXML_scale)-1 ) )
+ if( IsXMLToken(rValue, XML_SCALE) )
{
bSyncWidth = sal_True;
}
@@ -780,12 +781,11 @@ XMLTextFrameContext::XMLTextFrameContext(
}
break;
case XML_TOK_TEXT_FRAME_REL_HEIGHT:
- if( rValue.equalsAsciiL( sXML_scale, sizeof(sXML_scale)-1 ) )
+ if( IsXMLToken( rValue, XML_SCALE ) )
{
bSyncHeight = sal_True;
}
- else if( rValue.equalsAsciiL( sXML_scale_min,
- sizeof(sXML_scale_min)-1 ) )
+ else if( IsXMLToken( rValue, XML_SCALE_MIN ) )
{
bSyncHeight = sal_True;
bMinHeight = sal_True;
@@ -854,10 +854,7 @@ XMLTextFrameContext::XMLTextFrameContext(
sArchive = rValue;
break;
case XML_TOK_TEXT_FRAME_MAY_SCRIPT:
- if ( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( sXML_true ) ) )
- bMayScript = sal_True;
- else
- bMayScript = sal_False;
+ bMayScript = IsXMLToken( rValue, XML_TRUE );
break;
case XML_TOK_TEXT_FRAME_MIME_TYPE:
sMimeType = rValue;
@@ -925,7 +922,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_SVG == nPrefix &&
- rLocalName.equalsAsciiL( sXML_desc, sizeof(sXML_desc)-1 ) )
+ IsXMLToken( rLocalName, XML_DESC ) )
{
pContext = new XMLTextFrameDescContext_Impl( GetImport(),
nPrefix, rLocalName,
@@ -934,7 +931,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
else if( XML_NAMESPACE_DRAW == nPrefix )
{
if ( (nType == XML_TEXT_FRAME_APPLET || nType == XML_TEXT_FRAME_PLUGIN) &&
- rLocalName.equalsAsciiL ( sXML_param, sizeof (sXML_param) -1 ) )
+ IsXMLToken( rLocalName, XML_PARAM ) )
{
pContext = new XMLTextFrameParam_Impl( GetImport(),
nPrefix, rLocalName,
@@ -942,18 +939,15 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
}
else if( xPropSet.is() )
{
- if( rLocalName.equalsAsciiL( sXML_contour_polygon,
- sizeof(sXML_contour_polygon)-1 ) )
+ if( IsXMLToken( rLocalName, XML_CONTOUR_POLYGON ) )
pContext = new XMLTextFrameContourContext_Impl( GetImport(),
nPrefix, rLocalName,
xAttrList, xPropSet, sal_False );
- else if( rLocalName.equalsAsciiL( sXML_contour_path,
- sizeof(sXML_contour_path)-1 ) )
+ else if( IsXMLToken( rLocalName, XML_CONTOUR_PATH ) )
pContext = new XMLTextFrameContourContext_Impl( GetImport(),
nPrefix, rLocalName,
xAttrList, xPropSet, sal_True );
- else if ( rLocalName.equalsAsciiL( sXML_image_map,
- sizeof(sXML_image_map)-1) &&
+ else if ( IsXMLToken( rLocalName, XML_IMAGE_MAP ) &&
( nType == XML_TEXT_FRAME_TEXTBOX ||
nType == XML_TEXT_FRAME_GRAPHIC ||
nType == XML_TEXT_FRAME_OBJECT_OLE ) )
@@ -963,7 +957,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
}
else if( (XML_NAMESPACE_OFFICE == nPrefix) )
{
- if( rLocalName.equalsAsciiL(sXML_events, sizeof(sXML_events)-1) )
+ if( IsXMLToken( rLocalName, XML_EVENTS ) )
{
// do we still have the frame object?
if (xPropSet.is())
@@ -1005,10 +999,10 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
}
if( !pContext &&
( XML_TEXT_FRAME_OBJECT == nType &&
- (XML_NAMESPACE_OFFICE == nPrefix &&
- rLocalName.equalsAsciiL(sXML_document, sizeof(sXML_document)-1)) ||
- (XML_NAMESPACE_MATH == nPrefix &&
- rLocalName.equalsAsciiL(sXML_math, sizeof(sXML_math)-1)) ) )
+ (XML_NAMESPACE_OFFICE == nPrefix &&
+ IsXMLToken( rLocalName, XML_DOCUMENT )) ||
+ (XML_NAMESPACE_MATH == nPrefix &&
+ IsXMLToken(rLocalName, XML_MATH) ) ) )
{
if( !xPropSet.is() )
{
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index 5b96cd26b8b2..ceb6edf3a0e6 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextFrameHyperlinkContext.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 07:38:11 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,8 +68,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
@@ -86,6 +86,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::beans;
+using namespace ::xmloff::token;
TYPEINIT1( XMLTextFrameHyperlinkContext, SvXMLImportContext );
@@ -145,10 +146,10 @@ XMLTextFrameHyperlinkContext::XMLTextFrameHyperlinkContext(
if( sShow.getLength() && !sTargetFrameName.getLength() )
{
- if( sShow.equalsAsciiL( sXML_new, sizeof(sXML_new)-1 ) )
+ if( IsXMLToken( sShow, XML_NEW ) )
sTargetFrameName =
OUString( RTL_CONSTASCII_USTRINGPARAM("_blank" ) );
- else if( sShow.equalsAsciiL( sXML_replace, sizeof(sXML_replace)-1 ) )
+ else if( IsXMLToken( sShow, XML_REPLACE ) )
sTargetFrameName =
OUString( RTL_CONSTASCII_USTRINGPARAM("_self" ) );
}
@@ -171,13 +172,13 @@ SvXMLImportContext *XMLTextFrameHyperlinkContext::CreateChildContext(
XMLTextFrameContext *pTextFrameContext = 0;
if( XML_NAMESPACE_DRAW == nPrefix &&
- rLocalName.equalsAsciiL( sXML_text_box, sizeof(sXML_text_box)-1 ) )
+ IsXMLToken( rLocalName, XML_TEXT_BOX ) )
pTextFrameContext = new XMLTextFrameContext( GetImport(), nPrefix,
rLocalName, xAttrList,
eAnchorType,
XML_TEXT_FRAME_TEXTBOX);
else if( XML_NAMESPACE_DRAW == nPrefix &&
- rLocalName.equalsAsciiL( sXML_image, sizeof(sXML_image)-1 ) )
+ IsXMLToken( rLocalName, XML_IMAGE ) )
pTextFrameContext = new XMLTextFrameContext( GetImport(), nPrefix,
rLocalName, xAttrList,
eAnchorType,
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 3032fd2d45ec..510508351c3b 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextHeaderFooterContext.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mib $ $Date: 2001-03-09 07:23:23 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,9 +71,6 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
#ifndef _XMLOFF_TEXTHEADERFOOTERCONTEXT_HXX_
#include "XMLTextHeaderFooterContext.hxx"
#endif
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 966fd7ebd859..adbabb05d111 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextListBlockContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2000-10-23 10:17:35 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,8 +88,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLTEXTLISTITEMCONTEXT_HXX
@@ -105,6 +105,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::beans;
+using namespace ::xmloff::token;
TYPEINIT1( XMLTextListBlockContext, SvXMLImportContext );
@@ -156,7 +157,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
switch( rTokenMap.Get( nPrefix, aLocalName ) )
{
case XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING:
- bRestartNumbering = rValue.compareToAscii( sXML_true ) != 0;
+ bRestartNumbering = !IsXMLToken(rValue, XML_TRUE);
break;
case XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME:
sStyleName = rValue;
diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx
index 48782c6af650..3be12541e839 100644
--- a/xmloff/source/text/XMLTextListItemContext.cxx
+++ b/xmloff/source/text/XMLTextListItemContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextListItemContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2000-09-25 06:57:28 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,8 +72,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_TXTPARAI_HXX
#include "txtparai.hxx"
@@ -93,6 +93,7 @@
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
TYPEINIT1( XMLTextListItemContext, SvXMLImportContext );
@@ -117,7 +118,7 @@ XMLTextListItemContext::XMLTextListItemContext(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( !bIsHeader && XML_NAMESPACE_TEXT == nPrefix &&
- aLocalName.compareToAscii( sXML_start_value ) == 0 )
+ IsXMLToken( aLocalName, XML_START_VALUE ) )
{
sal_Int32 nTmp = rValue.toInt32();
if( nTmp >= 0 && nTmp <= SHRT_MAX )
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 54b89c9e94c8..444254d6114e 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextMarkImportContext.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,8 +75,8 @@
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLIMP_HXX
@@ -290,7 +290,7 @@ sal_Bool XMLTextMarkImportContext::FindName(
&sLocalName );
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (0 == sLocalName.compareToAscii(sXML_name)) )
+ IsXMLToken(sLocalName, XML_NAME) )
{
sName = xAttrList->getValueByIndex(nAttr);
bNameOK = sal_True;
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 2b87b85e743a..5c097ae51805 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextMasterPageContext.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: cl $ $Date: 2001-01-16 22:19:14 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,8 +74,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_TEXTMASTERPAGECONTEXT_HXX_
#include "XMLTextMasterPageContext.hxx"
@@ -101,6 +101,7 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
//using namespace ::com::sun::star::text;
+using namespace ::xmloff::token;
Reference < XStyle > XMLTextMasterPageContext::Create()
{
@@ -148,17 +149,15 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
if( XML_NAMESPACE_STYLE == nPrefix )
{
- if( aLocalName.equalsAsciiL( sXML_name, sizeof( sXML_name )-1 ) )
+ if( IsXMLToken( aLocalName, XML_NAME ) )
{
sName = xAttrList->getValueByIndex( i );
}
- else if( aLocalName.equalsAsciiL( sXML_next_style_name,
- sizeof( sXML_next_style_name )-1 ) )
+ else if( IsXMLToken( aLocalName, XML_NEXT_STYLE_NAME ) )
{
sFollow = xAttrList->getValueByIndex( i );
}
- else if( aLocalName.equalsAsciiL( sXML_page_master_name,
- sizeof( sXML_page_master_name )-1 ) )
+ else if( IsXMLToken( aLocalName, XML_PAGE_MASTER_NAME ) )
{
sPageMasterName = xAttrList->getValueByIndex( i );
}
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
index 7c2524feeee9..7a860c749062 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextMasterPageExport.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-03-09 14:13:18 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,8 +66,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
@@ -92,6 +92,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::beans;
+using namespace ::xmloff::token;
XMLTextMasterPageExport::XMLTextMasterPageExport( SvXMLExport& rExp ) :
XMLPageExport( rExp ),
@@ -182,20 +183,20 @@ void XMLTextMasterPageExport::exportMasterPageContent(
if( xHeaderText.is() )
{
if( !bHeader )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE,
- sXML_display, sXML_false );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ XML_DISPLAY, XML_FALSE );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_header, sal_True, sal_True );
+ XML_HEADER, sal_True, sal_True );
exportHeaderFooterContent( xHeaderText, sal_False );
}
if( xHeaderTextLeft.is() && xHeaderTextLeft != xHeaderText )
{
if( !bHeaderLeft )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE,
- sXML_display, sXML_false );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ XML_DISPLAY, XML_FALSE );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_header_left, sal_True, sal_True );
+ XML_HEADER_LEFT, sal_True, sal_True );
exportHeaderFooterContent( xHeaderTextLeft, sal_False );
}
@@ -212,20 +213,20 @@ void XMLTextMasterPageExport::exportMasterPageContent(
if( xFooterText.is() )
{
if( !bFooter )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE,
- sXML_display, sXML_false );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ XML_DISPLAY, XML_FALSE );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_footer, sal_True, sal_True );
+ XML_FOOTER, sal_True, sal_True );
exportHeaderFooterContent( xFooterText, sal_False );
}
if( xFooterTextLeft.is() && xFooterTextLeft != xFooterText )
{
if( !bFooterLeft )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE,
- sXML_display, sXML_false );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ XML_DISPLAY, XML_FALSE );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- sXML_footer_left, sal_True, sal_True );
+ XML_FOOTER_LEFT, sal_True, sal_True );
exportHeaderFooterContent( xFooterTextLeft, sal_False );
}
}
diff --git a/xmloff/source/text/XMLTextMasterStylesContext.cxx b/xmloff/source/text/XMLTextMasterStylesContext.cxx
index 85c63b7626d1..677c6ad15d20 100644
--- a/xmloff/source/text/XMLTextMasterStylesContext.cxx
+++ b/xmloff/source/text/XMLTextMasterStylesContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextMasterStylesContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2000-10-18 11:18:30 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,8 +70,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
#include "nmspmap.hxx"
@@ -88,6 +88,9 @@ using namespace ::rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax;
+using ::xmloff::token::IsXMLToken;
+using ::xmloff::token::XML_MASTER_PAGE;
+
// ------------------------------------------------------------------------
TYPEINIT1( XMLTextMasterStylesContext, SvXMLStylesContext );
@@ -117,7 +120,7 @@ SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleChildContext(
SvXMLStyleContext *pContext = 0;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.equalsAsciiL( sXML_master_page, sizeof(sXML_master_page)-1 ) &&
+ IsXMLToken( rLocalName, XML_MASTER_PAGE ) &&
InsertStyleFamily( XML_STYLE_FAMILY_MASTER_PAGE ) )
pContext = new XMLTextMasterPageContext(
GetImport(), nPrefix, rLocalName,
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index 2d229869012f..fa0e14c3e19a 100644
--- a/xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextShapeStyleContext.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2001-02-06 14:00:16 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,8 +68,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX
#include "XMLTextPropertySetContext.hxx"
@@ -103,6 +103,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::beans;
+using namespace ::xmloff::token;
class XMLTextShapePropertySetContext_Impl : public XMLShapePropertySetContext
{
@@ -186,10 +187,9 @@ void XMLTextShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
const OUString& rValue )
{
if( XML_NAMESPACE_STYLE == nPrefixKey &&
- rLocalName.equalsAsciiL( sXML_auto_update,
- sizeof(sXML_auto_update)-1 ) )
+ IsXMLToken( rLocalName, XML_AUTO_UPDATE ) )
{
- if( rValue.equalsAsciiL( sXML_true, sizeof(sXML_true)-1 ) )
+ if( IsXMLToken( rValue, XML_TRUE ) )
bAutoUpdate = sal_True;
}
else
@@ -224,7 +224,7 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext(
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.compareToAscii( sXML_properties ) == 0 )
+ IsXMLToken( rLocalName, XML_PROPERTIES ) )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
GetStyles()->GetImportPropertyMapper( GetFamily() );
@@ -236,7 +236,7 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext(
}
}
else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
- rLocalName.equalsAsciiL( sXML_events, sizeof(sXML_events)-1 ) )
+ IsXMLToken( rLocalName, XML_EVENTS ) )
{
// create and remember events import context
// (for delayed processing of events)
diff --git a/xmloff/source/text/XMLTrackedChangesImportContext.cxx b/xmloff/source/text/XMLTrackedChangesImportContext.cxx
index e2a415cb467d..38eaa8b86cc9 100644
--- a/xmloff/source/text/XMLTrackedChangesImportContext.cxx
+++ b/xmloff/source/text/XMLTrackedChangesImportContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTrackedChangesImportContext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-05-02 16:19:18 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,8 +91,8 @@
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
@@ -100,6 +100,7 @@ using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::xml::sax::XAttributeList;
+using namespace ::xmloff::token;
@@ -133,8 +134,7 @@ void XMLTrackedChangesImportContext::StartElement(
if ( XML_NAMESPACE_TEXT == nPrefix )
{
- if ( sLocalName.equalsAsciiL( sXML_track_changes,
- sizeof(sXML_track_changes)-1 ) )
+ if ( IsXMLToken( sLocalName, XML_TRACK_CHANGES ) )
{
sal_Bool bTmp;
if( SvXMLUnitConverter::convertBool(
@@ -143,9 +143,7 @@ void XMLTrackedChangesImportContext::StartElement(
bTrackChanges = bTmp;
}
}
- else if ( sLocalName.equalsAsciiL( sXML_protection_key,
- sizeof(sXML_protection_key)-1 ) )
- {
+ else if ( IsXMLToken( sLocalName, XML_PROTECTION_KEY ) ) {
Sequence<sal_Int8> aSequence;
SvXMLUnitConverter::decodeBase64(
aSequence, xAttrList->getValueByIndex(i));
@@ -171,8 +169,7 @@ SvXMLImportContext* XMLTrackedChangesImportContext::CreateChildContext(
SvXMLImportContext* pContext = NULL;
if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- rLocalName.equalsAsciiL(sXML_changed_region,
- sizeof(sXML_changed_region)-1) )
+ IsXMLToken( rLocalName, XML_CHANGED_REGION ) )
{
pContext = new XMLChangedRegionImportContext(GetImport(),
nPrefix, rLocalName);
diff --git a/xmloff/source/text/txtdrope.cxx b/xmloff/source/text/txtdrope.cxx
index dd69b96bddb8..b7cd1bdc7ae8 100644
--- a/xmloff/source/text/txtdrope.cxx
+++ b/xmloff/source/text/txtdrope.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtdrope.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:06 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,8 +71,8 @@
#include <com/sun/star/style/DropCapFormat.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_NMSPMAP_HXX
#include "nmspmap.hxx"
@@ -92,6 +92,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::uno;
using namespace ::rtl;
+using namespace ::xmloff::token;
OUString XMLTextDropCapExport::GetQNameByKey( sal_uInt16 nKey,
const OUString& rLocalName ) const
@@ -116,19 +117,17 @@ void XMLTextDropCapExport::CheckAttrList()
#endif
void XMLTextDropCapExport::AddAttribute( sal_uInt16 nPrefixKey,
- const sal_Char *pName,
- const OUString& rValue )
+ enum XMLTokenEnum eName,
+ const OUString& rValue )
{
- OUString sName( OUString::createFromAscii( pName ) );
-
- pAttrList->AddAttribute( GetQNameByKey( nPrefixKey, sName ),
+ pAttrList->AddAttribute( GetQNameByKey( nPrefixKey, GetXMLToken(eName) ),
sCDATA, rValue );
}
XMLTextDropCapExport::XMLTextDropCapExport(
const Reference< xml::sax::XDocumentHandler > & rHandler,
const SvXMLUnitConverter& rUnitConverter ) :
- sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
+ sCDATA( GetXMLToken( XML_CDATA ) ),
pNamespaceMap( 0 ),
rUnitConv( rUnitConverter ),
pAttrList( new SvXMLAttributeList )
@@ -158,13 +157,13 @@ void XMLTextDropCapExport::exportXML( const Any& rAny,
{
// style:lines
rUnitConv.convertNumber( sBuffer, (sal_Int32)aFormat.Lines );
- AddAttribute( XML_NAMESPACE_STYLE, sXML_lines,
+ AddAttribute( XML_NAMESPACE_STYLE, XML_LINES,
sBuffer.makeStringAndClear() );
// style:length
if( bWholeWord )
{
- sValue = OUString::createFromAscii(sXML_word);
+ sValue = GetXMLToken(XML_WORD);
}
else if( aFormat.Count > 1 )
{
@@ -172,24 +171,24 @@ void XMLTextDropCapExport::exportXML( const Any& rAny,
sValue = sBuffer.makeStringAndClear();
}
if( sValue.getLength() )
- AddAttribute( XML_NAMESPACE_STYLE, sXML_length, sValue );
+ AddAttribute( XML_NAMESPACE_STYLE, XML_LENGTH, sValue );
// style:distance
if( aFormat.Distance > 0 )
{
rUnitConv.convertMeasure( sBuffer, aFormat.Distance );
- AddAttribute( XML_NAMESPACE_STYLE, sXML_distance,
+ AddAttribute( XML_NAMESPACE_STYLE, XML_DISTANCE,
sBuffer.makeStringAndClear() );
}
// style:style-name
if( rStyleName.getLength() )
- AddAttribute( XML_NAMESPACE_STYLE, sXML_style_name,
+ AddAttribute( XML_NAMESPACE_STYLE, XML_STYLE_NAME,
rStyleName );
}
OUString sElem = GetQNameByKey( XML_NAMESPACE_STYLE,
- OUString::createFromAscii(sXML_drop_cap) );
+ GetXMLToken(XML_DROP_CAP) );
xHandler->startElement( sElem, xAttrList );
ClearAttrList();
xHandler->endElement( sElem );
diff --git a/xmloff/source/text/txtdrope.hxx b/xmloff/source/text/txtdrope.hxx
index 225b3d99855c..6e0de91ca47b 100644
--- a/xmloff/source/text/txtdrope.hxx
+++ b/xmloff/source/text/txtdrope.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtdrope.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:06 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,10 @@
#include "attrlist.hxx"
#endif
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
+#endif
+
class SvXMLNamespaceMap;
class SvXMLUnitConverter;
namespace com { namespace sun { namespace star { namespace uno {
@@ -104,7 +108,8 @@ protected:
void CheckAttrList();
#endif
void ClearAttrList();
- void AddAttribute( sal_uInt16 nPrefixKey, const sal_Char *pName,
+ void AddAttribute( sal_uInt16 nPrefixKey,
+ enum ::xmloff::token::XMLTokenEnum eName,
const ::rtl::OUString& rValue );
::rtl::OUString GetQNameByKey( sal_uInt16 nKey,
const ::rtl::OUString& rLocalName ) const;
diff --git a/xmloff/source/text/txtdropi.cxx b/xmloff/source/text/txtdropi.cxx
index b72ed16f0b2c..c95bafa685fa 100644
--- a/xmloff/source/text/txtdropi.cxx
+++ b/xmloff/source/text/txtdropi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtdropi.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 17:13:32 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,8 +80,8 @@
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
using namespace ::rtl;
@@ -139,7 +139,7 @@ void XMLTextDropCapImportContext::ProcessAttrs(
break;
case XML_TOK_DROP_LENGTH:
- if( rValue.compareToAscii( sXML_word ) == 0 )
+ if( IsXMLToken( rValue, XML_WORD ) )
{
bWholeWord = sal_True;
}
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 9eabde20d397..77f62eafe95b 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtflde.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 07:52:52 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,8 +76,8 @@
#include "xmlnumfe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLEMENT_HXX
@@ -1025,9 +1025,9 @@ void XMLTextFieldExport::ExportField(const Reference<XTextField> & rTextField )
{
// export <text:span> element
GetExport().AddAttribute( XML_NAMESPACE_TEXT,
- sXML_style_name, sStyle );
+ XML_STYLE_NAME, sStyle );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_span, sal_False, sal_False);
+ XML_SPAN, sal_False, sal_False);
ExportFieldHelper( rTextField, xPropSet, xRangePropSet, nToken );
}
else
@@ -1060,36 +1060,36 @@ void XMLTextFieldExport::ExportFieldHelper(
switch (nToken) {
case FIELD_ID_AUTHOR:
// author field: fixed, field (sub-)type
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet), sal_True);
ExportElement(MapAuthorFieldName(rPropSet), sPresentation);
break;
case FIELD_ID_SENDER:
// sender field: fixed, field (sub-)type
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet), sal_True);
ExportElement(MapSenderFieldName(rPropSet), sPresentation);
break;
case FIELD_ID_PLACEHOLDER:
// placeholder field: type, name, description
- ProcessString(sXML_placeholder_type,
+ ProcessString(XML_PLACEHOLDER_TYPE,
MapPlaceholderType(
GetInt16Property(sPropertyPlaceholderType, rPropSet)));
- ProcessString(sXML_description,
+ ProcessString(XML_DESCRIPTION,
GetStringProperty(sPropertyHint,rPropSet), sal_True);
- ExportElement(sXML_placeholder, sPresentation);
+ ExportElement(XML_PLACEHOLDER, sPresentation);
break;
case FIELD_ID_VARIABLE_SET:
{
// variable set field: name, visible, format&value
- ProcessString(sXML_name,
+ ProcessString(XML_NAME,
GetStringProperty(sPropertyVariableName, rPropSet));
ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
sal_False);
- ProcessString(sXML_formula,
+ ProcessString(XML_FORMULA,
GetStringProperty(sPropertyContent, rPropSet),
sPresentation);
ProcessValueAndType(IsStringField(nToken, rPropSet),
@@ -1098,13 +1098,13 @@ void XMLTextFieldExport::ExportFieldHelper(
sPresentation,
GetDoubleProperty(sPropertyValue, rPropSet),
sal_True, sal_True, sal_True);
- ExportElement(sXML_variable_set, sPresentation);
+ ExportElement(XML_VARIABLE_SET, sPresentation);
break;
}
case FIELD_ID_VARIABLE_GET:
{
// variable get field: name, format&value
- ProcessString(sXML_name,
+ ProcessString(XML_NAME,
GetStringProperty(sPropertyContent, rPropSet));
sal_Bool bCmd = GetBoolProperty(sPropertyIsShowFormula, rPropSet);
ProcessDisplay(sal_True, bCmd);
@@ -1113,18 +1113,18 @@ void XMLTextFieldExport::ExportFieldHelper(
GetIntProperty(sPropertyNumberFormat, rPropSet),
sEmpty, sEmpty, 0.0, // values not used
sal_False, !bCmd, !bCmd);
- ExportElement(sXML_variable_get, sPresentation);
+ ExportElement(XML_VARIABLE_GET, sPresentation);
break;
}
case FIELD_ID_VARIABLE_INPUT:
// variable input field: name, description, format&value
- ProcessString(sXML_name,
+ ProcessString(XML_NAME,
GetStringProperty(sPropertyVariableName, rPropSet));
- ProcessString(sXML_description,
+ ProcessString(XML_DESCRIPTION,
GetStringProperty(sPropertyHint , rPropSet));
ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet),
sal_False);
- ProcessString(sXML_formula,
+ ProcessString(XML_FORMULA,
GetStringProperty(sPropertyContent, rPropSet),
sPresentation);
ProcessValueAndType(IsStringField(nToken, rPropSet),
@@ -1133,7 +1133,7 @@ void XMLTextFieldExport::ExportFieldHelper(
sPresentation,
GetDoubleProperty(sPropertyValue, rPropSet),
sal_True, sal_True, sal_True);
- ExportElement(sXML_variable_input, sPresentation);
+ ExportElement(XML_VARIABLE_INPUT, sPresentation);
break;
case FIELD_ID_USER_GET:
@@ -1148,23 +1148,23 @@ void XMLTextFieldExport::ExportFieldHelper(
sal_False, sal_False, !bCmd);
// name from FieldMaster
- ProcessString(sXML_name,
+ ProcessString(XML_NAME,
GetStringProperty(sPropertyName,
GetMasterPropertySet(rTextField)));
- ExportElement(sXML_user_field_get, sPresentation);
+ ExportElement(XML_USER_FIELD_GET, sPresentation);
break;
}
case FIELD_ID_USER_INPUT:
// user input field: name (from FieldMaster), description
-// ProcessString(sXML_name,
+// ProcessString(XML_NAME,
// GetStringProperty(sPropertyName,
// GetMasterPropertySet(rTextField)));
- ProcessString(sXML_name,
+ ProcessString(XML_NAME,
GetStringProperty(sPropertyContent, rPropSet));
- ProcessString(sXML_description,
+ ProcessString(XML_DESCRIPTION,
GetStringProperty(sPropertyHint, rPropSet));
- ExportElement(sXML_user_field_input, sPresentation);
+ ExportElement(XML_USER_FIELD_INPUT, sPresentation);
break;
case FIELD_ID_SEQUENCE:
@@ -1172,17 +1172,17 @@ void XMLTextFieldExport::ExportFieldHelper(
// sequence field: name, formula, seq-format
OUString sName = GetStringProperty(sPropertyVariableName, rPropSet);
// TODO: use reference name only if actually beeing referenced.
- ProcessString(sXML_ref_name,
+ ProcessString(XML_REF_NAME,
MakeSequenceRefName(
GetInt16Property(sPropertySequenceValue, rPropSet),
sName));
- ProcessString(sXML_name, sName);
- ProcessString(sXML_formula,
+ ProcessString(XML_NAME, sName);
+ ProcessString(XML_FORMULA,
GetStringProperty(sPropertyContent, rPropSet),
sPresentation);
ProcessNumberingType(GetInt16Property(sPropertyNumberingType,
rPropSet));
- ExportElement(sXML_sequence, sPresentation);
+ ExportElement(XML_SEQUENCE, sPresentation);
break;
}
@@ -1190,7 +1190,7 @@ void XMLTextFieldExport::ExportFieldHelper(
{
// formula field: formula, format&value
sal_Bool bCmd = GetBoolProperty(sPropertyIsShowFormula, rPropSet);
- ProcessString(sXML_formula,
+ ProcessString(XML_FORMULA,
GetStringProperty(sPropertyContent, rPropSet),
sPresentation);
ProcessDisplay(sal_True, bCmd);
@@ -1200,15 +1200,15 @@ void XMLTextFieldExport::ExportFieldHelper(
sPresentation,
GetDoubleProperty(sPropertyValue, rPropSet),
!bCmd, !bCmd, !bCmd);
- ExportElement(sXML_expression, sPresentation);
+ ExportElement(XML_EXPRESSION, sPresentation);
break;
}
case FIELD_ID_TEXT_INPUT:
// text input field: description and string-value
- ProcessString(sXML_description,
+ ProcessString(XML_DESCRIPTION,
GetStringProperty(sPropertyHint, rPropSet));
- ExportElement(sXML_text_input, sPresentation);
+ ExportElement(XML_TEXT_INPUT, sPresentation);
break;
case FIELD_ID_TIME:
@@ -1223,7 +1223,7 @@ void XMLTextFieldExport::ExportFieldHelper(
if (xPropSetInfo->hasPropertyByName(sPropertyDateTimeValue))
{
// no value -> current time
- ProcessDateTime(sXML_time_value,
+ ProcessDateTime(XML_TIME_VALUE,
GetDateTimeProperty(sPropertyDateTimeValue,
rPropSet),
sal_False );
@@ -1231,24 +1231,24 @@ void XMLTextFieldExport::ExportFieldHelper(
if (xPropSetInfo->hasPropertyByName(sPropertyDateTime))
{
// no value -> current time
- ProcessDateTime(sXML_time_value,
+ ProcessDateTime(XML_TIME_VALUE,
GetDateTimeProperty(sPropertyDateTime,rPropSet),
sal_False );
}
if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
{
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet),
sal_False);
}
if (xPropSetInfo->hasPropertyByName(sPropertyAdjust))
{
// adjust value given as integer in minutes
- ProcessDateTime(sXML_time_adjust,
+ ProcessDateTime(XML_TIME_ADJUST,
GetIntProperty(sPropertyAdjust, rPropSet),
sal_False, sal_True, sal_True);
}
- ExportElement(sXML_time, sPresentation);
+ ExportElement(XML_TIME, sPresentation);
break;
case FIELD_ID_DATE:
@@ -1263,7 +1263,7 @@ void XMLTextFieldExport::ExportFieldHelper(
if (xPropSetInfo->hasPropertyByName(sPropertyDateTimeValue))
{
// no value -> current date
- ProcessDateTime(sXML_date_value,
+ ProcessDateTime(XML_DATE_VALUE,
GetDateTimeProperty(sPropertyDateTimeValue,
rPropSet),
sal_True);
@@ -1271,24 +1271,24 @@ void XMLTextFieldExport::ExportFieldHelper(
// TODO: remove double-handling after SRC614
else if (xPropSetInfo->hasPropertyByName(sPropertyDateTime))
{
- ProcessDateTime(sXML_date_value,
+ ProcessDateTime(XML_DATE_VALUE,
GetDateTimeProperty(sPropertyDateTime,rPropSet),
sal_True );
}
if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
{
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet),
sal_False);
}
if (xPropSetInfo->hasPropertyByName(sPropertyAdjust))
{
// adjust value given as number of days
- ProcessDateTime(sXML_date_adjust,
+ ProcessDateTime(XML_DATE_ADJUST,
GetIntProperty(sPropertyAdjust, rPropSet),
sal_True, sal_True, sal_True);
}
- ExportElement(sXML_date, sPresentation);
+ ExportElement(XML_DATE, sPresentation);
break;
case FIELD_ID_PAGENUMBER:
@@ -1305,80 +1305,80 @@ void XMLTextFieldExport::ExportFieldHelper(
if (xPropSetInfo->hasPropertyByName(sPropertySubType))
{
// property SubType used in MapPageNumebrName
- ProcessString(sXML_select_page,
+ ProcessString(XML_SELECT_PAGE,
MapPageNumberName(rPropSet, nAdjust));
}
- ProcessInteger(sXML_page_adjust, nAdjust, 0);
+ ProcessInteger(XML_PAGE_ADJUST, nAdjust, 0);
}
- ExportElement(sXML_page_number, sPresentation);
+ ExportElement(XML_PAGE_NUMBER, sPresentation);
break;
case FIELD_ID_PAGESTRING:
{
- ProcessString(sXML_string_value,
+ ProcessString(XML_STRING_VALUE,
GetStringProperty(sPropertyUserText, rPropSet),
sPresentation);
sal_Int32 nDummy = 0; // MapPageNumberName need int
- ProcessString(sXML_select_page, MapPageNumberName(rPropSet, nDummy));
- ExportElement(sXML_page_continuation_string, sPresentation);
+ ProcessString(XML_SELECT_PAGE, MapPageNumberName(rPropSet, nDummy));
+ ExportElement(XML_PAGE_CONTINUATION_STRING, sPresentation);
break;
}
case FIELD_ID_DATABASE_NAME:
- ProcessString(sXML_database_name,
+ ProcessString(XML_DATABASE_NAME,
GetStringProperty(sPropertyDataBaseName, rPropSet));
- ProcessString(sXML_table_name,
+ ProcessString(XML_TABLE_NAME,
GetStringProperty(sPropertyDataTableName, rPropSet));
- ExportElement(sXML_database_name, sPresentation);
+ ExportElement(XML_DATABASE_NAME, sPresentation);
break;
case FIELD_ID_DATABASE_NUMBER:
- ProcessString(sXML_database_name,
+ ProcessString(XML_DATABASE_NAME,
GetStringProperty(sPropertyDataBaseName, rPropSet));
- ProcessString(sXML_table_name,
+ ProcessString(XML_TABLE_NAME,
GetStringProperty(sPropertyDataTableName, rPropSet));
ProcessNumberingType(
GetInt16Property(sPropertyNumberingType,rPropSet));
- ProcessInteger(sXML_value,
+ ProcessInteger(XML_VALUE,
GetIntProperty(sPropertySetNumber, rPropSet));
- ExportElement(sXML_database_row_number, sPresentation);
+ ExportElement(XML_DATABASE_ROW_NUMBER, sPresentation);
break;
case FIELD_ID_DATABASE_NEXT:
- ProcessString(sXML_database_name,
+ ProcessString(XML_DATABASE_NAME,
GetStringProperty(sPropertyDataBaseName, rPropSet));
- ProcessString(sXML_table_name,
+ ProcessString(XML_TABLE_NAME,
GetStringProperty(sPropertyDataTableName, rPropSet));
- ProcessString(sXML_condition,
+ ProcessString(XML_CONDITION,
GetStringProperty(sPropertyCondition, rPropSet));
DBG_ASSERT(sPresentation.equals(sEmpty),
"Unexpected presentation for database next field");
- ExportElement(sXML_database_next);
+ ExportElement(XML_DATABASE_NEXT);
break;
case FIELD_ID_DATABASE_SELECT:
- ProcessString(sXML_database_name,
+ ProcessString(XML_DATABASE_NAME,
GetStringProperty(sPropertyDataBaseName, rPropSet));
- ProcessString(sXML_table_name,
+ ProcessString(XML_TABLE_NAME,
GetStringProperty(sPropertyDataTableName, rPropSet));
- ProcessString(sXML_condition,
+ ProcessString(XML_CONDITION,
GetStringProperty(sPropertyCondition, rPropSet));
- ProcessInteger(sXML_row_number,
+ ProcessInteger(XML_ROW_NUMBER,
GetIntProperty(sPropertySetNumber, rPropSet));
DBG_ASSERT(sPresentation.equals(sEmpty),
"Unexpected presentation for database select field");
- ExportElement(sXML_database_select);
+ ExportElement(XML_DATABASE_SELECT);
break;
case FIELD_ID_DATABASE_DISPLAY:
{
// get database, table and column name from field master
Reference<XPropertySet> & xMaster = GetMasterPropertySet(rTextField);
- ProcessString(sXML_database_name,
+ ProcessString(XML_DATABASE_NAME,
GetStringProperty(sPropertyDataBaseName, xMaster));
- ProcessString(sXML_table_name,
+ ProcessString(XML_TABLE_NAME,
GetStringProperty(sPropertyDataTableName, xMaster));
- ProcessString(sXML_column_name,
+ ProcessString(XML_COLUMN_NAME,
GetStringProperty(sPropertyDataColumnName, xMaster));
// export number format if available (happens only for numbers!)
if (!GetBoolProperty(sPropertyIsDataBaseFormat, rPropSet))
@@ -1388,12 +1388,12 @@ void XMLTextFieldExport::ExportFieldHelper(
sEmpty, sEmpty, 0.0, // not used
sal_False, sal_False, sal_True);
}
- ExportElement(sXML_database_display, sPresentation);
+ ExportElement(XML_DATABASE_DISPLAY, sPresentation);
break;
}
case FIELD_ID_DOCINFO_REVISION:
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet), sal_False);
ExportElement(MapDocInfoFieldName(nToken), sPresentation);
break;
@@ -1410,7 +1410,7 @@ void XMLTextFieldExport::ExportFieldHelper(
sEmpty, sEmpty, 0.0,
sal_False, sal_False, sal_True);
// todo: export date/time value, but values not available -> core bug
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet), sal_False);
ExportElement(MapDocInfoFieldName(nToken), sPresentation);
break;
@@ -1424,7 +1424,7 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DOCINFO_SAVE_AUTHOR:
if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
{
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet), sal_False);
}
ExportElement(MapDocInfoFieldName(nToken), sPresentation);
@@ -1439,12 +1439,12 @@ void XMLTextFieldExport::ExportFieldHelper(
GetExport().GetModel(), UNO_QUERY);
Reference<XDocumentInfo> xDocInfo =xDocInfoSupplier->getDocumentInfo();
Any aAny;
- ProcessString(sXML_name,
+ ProcessString(XML_NAME,
xDocInfo->getUserFieldName(nToken -
FIELD_ID_DOCINFO_INFORMATION0));
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet), sal_False);
- ExportElement(sXML_user_defined, sPresentation);
+ ExportElement(XML_USER_DEFINED, sPresentation);
break;
}
@@ -1466,106 +1466,106 @@ void XMLTextFieldExport::ExportFieldHelper(
break;
case FIELD_ID_CONDITIONAL_TEXT:
- ProcessString(sXML_condition,
+ ProcessString(XML_CONDITION,
GetStringProperty(sPropertyCondition, rPropSet));
- ProcessString(sXML_string_value_if_true,
+ ProcessString(XML_STRING_VALUE_IF_TRUE,
GetStringProperty(sPropertyTrueContent, rPropSet));
- ProcessString(sXML_string_value_if_false,
+ ProcessString(XML_STRING_VALUE_IF_FALSE,
GetStringProperty(sPropertyFalseContent, rPropSet));
- ProcessBoolean(sXML_current_value,
+ ProcessBoolean(XML_CURRENT_VALUE,
GetBoolProperty(sPropertyIsConditionTrue, rPropSet),
sal_False);
- ExportElement(sXML_conditional_text, sPresentation);
+ ExportElement(XML_CONDITIONAL_TEXT, sPresentation);
break;
case FIELD_ID_HIDDEN_TEXT:
- ProcessString(sXML_condition,
+ ProcessString(XML_CONDITION,
GetStringProperty(sPropertyCondition, rPropSet));
- ProcessString(sXML_string_value,
+ ProcessString(XML_STRING_VALUE,
GetStringProperty(sPropertyContent, rPropSet));
- ProcessBoolean(sXML_is_hidden,
+ ProcessBoolean(XML_IS_HIDDEN,
GetBoolProperty(sPropertyIsHidden, rPropSet),
sal_False);
- ExportElement(sXML_hidden_text, sPresentation);
+ ExportElement(XML_HIDDEN_TEXT, sPresentation);
break;
case FIELD_ID_HIDDEN_PARAGRAPH:
- ProcessString(sXML_condition,
+ ProcessString(XML_CONDITION,
GetStringProperty(sPropertyCondition, rPropSet));
- ProcessBoolean(sXML_is_hidden,
+ ProcessBoolean(XML_IS_HIDDEN,
GetBoolProperty(sPropertyIsHidden, rPropSet),
sal_False);
DBG_ASSERT(sPresentation.equals(sEmpty),
"Unexpected presentation for hidden paragraph field");
- ExportElement(sXML_hidden_paragraph);
+ ExportElement(XML_HIDDEN_PARAGRAPH);
break;
case FIELD_ID_TEMPLATE_NAME:
- ProcessString(sXML_display,
+ ProcessString(XML_DISPLAY,
MapTemplateDisplayFormat(
GetInt16Property(sPropertyFileFormat, rPropSet)));
- ExportElement(sXML_template_name, sPresentation);
+ ExportElement(XML_TEMPLATE_NAME, sPresentation);
break;
case FIELD_ID_CHAPTER:
- ProcessString(sXML_display,
+ ProcessString(XML_DISPLAY,
MapChapterDisplayFormat(
GetInt16Property(sPropertyChapterFormat, rPropSet)));
// API numbers 0..9, we number 1..10
- ProcessInteger(sXML_outline_level,
+ ProcessInteger(XML_OUTLINE_LEVEL,
GetInt8Property(sPropertyLevel, rPropSet) + 1);
- ExportElement(sXML_chapter, sPresentation);
+ ExportElement(XML_CHAPTER, sPresentation);
break;
case FIELD_ID_FILE_NAME:
// all properties are optional
if (xPropSetInfo->hasPropertyByName(sPropertyFileFormat))
{
- ProcessString(sXML_display,
+ ProcessString(XML_DISPLAY,
MapFilenameDisplayFormat(
GetInt16Property(sPropertyFileFormat, rPropSet)));
}
if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
{
- ProcessBoolean(sXML_fixed,
+ ProcessBoolean(XML_FIXED,
GetBoolProperty(sPropertyIsFixed, rPropSet),
sal_False);
}
- ExportElement(sXML_file_name, sPresentation);
+ ExportElement(XML_FILE_NAME, sPresentation);
break;
case FIELD_ID_REFPAGE_SET:
- ProcessBoolean(sXML_active,
+ ProcessBoolean(XML_ACTIVE,
GetBoolProperty(sPropertyOn, rPropSet), sal_True);
- ProcessInteger(sXML_page_adjust,
+ ProcessInteger(XML_PAGE_ADJUST,
GetInt16Property(sPropertyOffset, rPropSet), 0);
DBG_ASSERT(sPresentation.equals(sEmpty),
"Unexpected presentation page variable field");
- ExportElement(sXML_page_variable_set);
+ ExportElement(XML_PAGE_VARIABLE_SET);
break;
case FIELD_ID_REFPAGE_GET:
ProcessNumberingType(
GetInt16Property(sPropertyNumberingType, rPropSet));
- ExportElement(sXML_page_variable_get, sPresentation);
+ ExportElement(XML_PAGE_VARIABLE_GET, sPresentation);
break;
case FIELD_ID_MACRO:
- ProcessString(sXML_name, GetStringProperty(sPropertyMacro, rPropSet));
- ProcessString(sXML_description,
+ ProcessString(XML_NAME, GetStringProperty(sPropertyMacro, rPropSet));
+ ProcessString(XML_DESCRIPTION,
GetStringProperty(sPropertyHint, rPropSet),
sPresentation);
- ExportElement(sXML_execute_macro, sPresentation);
+ ExportElement(XML_EXECUTE_MACRO, sPresentation);
break;
case FIELD_ID_REF_SEQUENCE:
// reference to sequence: format, name, find value (and element)
// was: if (nSeqNumber != -1) ...
- ProcessString(sXML_reference_format,
+ ProcessString(XML_REFERENCE_FORMAT,
MapReferenceType(GetInt16Property(
sPropertyReferenceFieldPart, rPropSet)),
- sXML_template);
- ProcessString(sXML_ref_name,
+ XML_TEMPLATE);
+ ProcessString(XML_REF_NAME,
MakeSequenceRefName(
GetInt16Property(sPropertySequenceNumber, rPropSet),
GetStringProperty(sPropertySourceName, rPropSet) ) );
@@ -1578,11 +1578,11 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_REF_REFERENCE:
case FIELD_ID_REF_BOOKMARK:
// reference to bookmarks, references: format, name (and element)
- ProcessString(sXML_reference_format,
+ ProcessString(XML_REFERENCE_FORMAT,
MapReferenceType(GetInt16Property(
sPropertyReferenceFieldPart, rPropSet)),
- sXML_template);
- ProcessString(sXML_ref_name,
+ XML_TEMPLATE);
+ ProcessString(XML_REF_NAME,
GetStringProperty(sPropertySourceName, rPropSet));
ExportElement(
MapReferenceSource(GetInt16Property(
@@ -1593,11 +1593,11 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_REF_FOOTNOTE:
case FIELD_ID_REF_ENDNOTE:
// reference to end-/footnote: format, generate name, (and element)
- ProcessString(sXML_reference_format,
+ ProcessString(XML_REFERENCE_FORMAT,
MapReferenceType(GetInt16Property(
sPropertyReferenceFieldPart, rPropSet)),
- sXML_template);
- ProcessString(sXML_ref_name,
+ XML_TEMPLATE);
+ ProcessString(XML_REF_NAME,
MakeFootnoteRefName(GetInt16Property(
sPropertySequenceNumber, rPropSet)));
ExportElement(
@@ -1608,28 +1608,28 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DDE:
// name from field master
- ProcessString(sXML_connection_name,
+ ProcessString(XML_CONNECTION_NAME,
GetStringProperty(sPropertyName,
GetMasterPropertySet(rTextField)));
- ExportElement(sXML_dde_connection, sPresentation);
+ ExportElement(XML_DDE_CONNECTION, sPresentation);
break;
case FIELD_ID_SHEET_NAME:
// name of spreadsheet (Calc only)
- ExportElement(sXML_sheet_name, sPresentation);
+ ExportElement(XML_SHEET_NAME, sPresentation);
break;
case FIELD_ID_URL:
{
// this field is a special case because it gets mapped onto a
// hyperlink, rather than one of the regular text field.
- ProcessString(sXML_href, GetExport().GetRelativeReference(GetStringProperty(sPropertyURL, rPropSet)),
+ ProcessString(XML_HREF, GetExport().GetRelativeReference(GetStringProperty(sPropertyURL, rPropSet)),
sal_True, XML_NAMESPACE_XLINK);
- ProcessString(sXML_target_frame_name,
+ ProcessString(XML_TARGET_FRAME_NAME,
GetStringProperty(sPropertyTargetFrame,rPropSet),
sal_True, XML_NAMESPACE_OFFICE);
- SvXMLElementExport aUrlField(rExport, XML_NAMESPACE_TEXT, sXML_a,
+ SvXMLElementExport aUrlField(rExport, XML_NAMESPACE_TEXT, XML_A,
sal_False, sal_False);
GetExport().GetDocHandler()->characters(sPresentation);
break;
@@ -1638,26 +1638,26 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_BIBLIOGRAPHY:
{
ProcessBibliographyData(rPropSet);
- ExportElement(sXML_bibliography_mark, sPresentation);
+ ExportElement(XML_BIBLIOGRAPHY_MARK, sPresentation);
break;
}
case FIELD_ID_SCRIPT:
- ProcessString(sXML_language,
+ ProcessString(XML_LANGUAGE,
GetStringProperty(sPropertyScriptType, rPropSet),
sal_True, XML_NAMESPACE_SCRIPT);
DBG_ASSERT(sPresentation.equals(sEmpty),
"Unexpected presentation for script field");
if (GetBoolProperty(sPropertyURLContent, rPropSet))
{
- ProcessString(sXML_href,
+ ProcessString(XML_HREF,
GetExport().GetRelativeReference(GetStringProperty(sPropertyContent, rPropSet)),
sal_False, XML_NAMESPACE_XLINK);
- ExportElement(sXML_script);
+ ExportElement(XML_SCRIPT);
}
else
{
- ExportElement(sXML_script,
+ ExportElement(XML_SCRIPT,
GetStringProperty(sPropertyContent, rPropSet));
}
break;
@@ -1665,12 +1665,12 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_ANNOTATION:
{
// author
- ProcessString(sXML_author,
+ ProcessString(XML_AUTHOR,
GetStringProperty(sPropertyAuthor, rPropSet),
sal_True, XML_NAMESPACE_OFFICE);
// date time
- ProcessDate(sXML_create_date,
+ ProcessDate(XML_CREATE_DATE,
GetDateProperty(sPropertyDate, rPropSet),
XML_NAMESPACE_OFFICE);
@@ -1680,7 +1680,7 @@ void XMLTextFieldExport::ExportFieldHelper(
// annotation element + content
SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_OFFICE,
- sXML_annotation, sal_False, sal_True);
+ XML_ANNOTATION, sal_False, sal_True);
ProcessParagraphSequence(GetStringProperty(sPropertyContent,rPropSet));
break;
}
@@ -1689,18 +1689,18 @@ void XMLTextFieldExport::ExportFieldHelper(
{
// get style name for current style + combine letters and export a span
const XMLPropertyState *aStates[] = { pCombinedCharactersPropertyState, 0 };
- ProcessString(sXML_style_name,
+ ProcessString(XML_STYLE_NAME,
GetExport().GetTextParagraphExport()->Find(
XML_STYLE_FAMILY_TEXT_TEXT, rRangePropSet,
sEmpty, aStates) );
- ExportElement(sXML_span, sPresentation);
+ ExportElement(XML_SPAN, sPresentation);
break;
}
case FIELD_ID_MEASURE:
{
- ProcessString(sXML_kind, MapMeasureKind(GetInt16Property(sPropertyMeasureKind, rPropSet)));
- ExportElement( sXML_measure, sPresentation );
+ ProcessString(XML_KIND, MapMeasureKind(GetInt16Property(sPropertyMeasureKind, rPropSet)));
+ ExportElement( XML_MEASURE, sPresentation );
break;
}
@@ -1840,7 +1840,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
{
SvXMLElementExport aElem( GetExport(),
XML_NAMESPACE_TEXT,
- sXML_variable_decls,
+ XML_VARIABLE_DECLS,
sal_True, sal_True );
for (vector<OUString>::iterator aVarIter = aVarName.begin();
@@ -1888,8 +1888,8 @@ void XMLTextFieldExport::ExportFieldDeclarations(
sal_False, sal_True, sal_False);
}
- ProcessString(sXML_name, sVarName);
- ExportElement(sXML_variable_decl, sal_True);
+ ProcessString(XML_NAME, sVarName);
+ ExportElement(XML_VARIABLE_DECL, sal_True);
}
}
// else: no declarations element
@@ -1899,7 +1899,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
{
SvXMLElementExport aElem( GetExport(),
XML_NAMESPACE_TEXT,
- sXML_sequence_decls,
+ XML_SEQUENCE_DECLS,
sal_True, sal_True );
for (vector<OUString>::iterator aSeqIter = aSeqName.begin();
@@ -1923,15 +1923,15 @@ void XMLTextFieldExport::ExportFieldDeclarations(
sPropertyChapterNumberingLevel, xPropSet);
DBG_ASSERT(nLevel >= 0, "illegal outline level");
DBG_ASSERT(nLevel < 127, "possible illegal outline level");
- ProcessInteger(sXML_display_outline_level, nLevel);
+ ProcessInteger(XML_DISPLAY_OUTLINE_LEVEL, nLevel);
// separation character
if (nLevel > 0) {
- ProcessString(sXML_separation_character, GetStringProperty(
+ ProcessString(XML_SEPARATION_CHARACTER, GetStringProperty(
sPropertyNumberingSeparator, xPropSet));
}
- ProcessString(sXML_name, sVarName);
- ExportElement(sXML_sequence_decl, sal_True);
+ ProcessString(XML_NAME, sVarName);
+ ExportElement(XML_SEQUENCE_DECL, sal_True);
}
}
// else: no declarations element
@@ -1941,7 +1941,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
{
SvXMLElementExport aElem( GetExport(),
XML_NAMESPACE_TEXT,
- sXML_user_field_decls,
+ XML_USER_FIELD_DECLS,
sal_True, sal_True );
for (vector<OUString>::iterator aUserIter = aUserName.begin();
@@ -1974,12 +1974,12 @@ void XMLTextFieldExport::ExportFieldDeclarations(
else
{
// string: write regardless of default
- ProcessString(sXML_value_type, sXML_string);
- ProcessString(sXML_string_value,
+ ProcessString(XML_VALUE_TYPE, XML_STRING);
+ ProcessString(XML_STRING_VALUE,
GetStringProperty(sPropertyContent, xPropSet));
}
- ProcessString(sXML_name, sVarName);
- ExportElement(sXML_user_field_decl, sal_True);
+ ProcessString(XML_NAME, sVarName);
+ ExportElement(XML_USER_FIELD_DECL, sal_True);
}
}
// else: no declarations element
@@ -1989,7 +1989,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
{
SvXMLElementExport aElem( GetExport(),
XML_NAMESPACE_TEXT,
- sXML_dde_connection_decls,
+ XML_DDE_CONNECTION_DECLS,
sal_True, sal_True );
for (vector<OUString>::iterator aDdeIter = aDdeName.begin();
@@ -2008,20 +2008,20 @@ void XMLTextFieldExport::ExportFieldDeclarations(
if (GetDependentFieldPropertySet(xPropSet, xDummy))
{
- ProcessString(sXML_name,
+ ProcessString(XML_NAME,
GetStringProperty(sPropertyName, xPropSet));
// export elements; can't use ProcessString because
// elements are in office namespace
- ProcessString(sXML_dde_application,
+ ProcessString(XML_DDE_APPLICATION,
GetStringProperty(sPropertyDDECommandType,
xPropSet),
sal_False, XML_NAMESPACE_OFFICE);
- ProcessString(sXML_dde_topic,
+ ProcessString(XML_DDE_TOPIC,
GetStringProperty(sPropertyDDECommandFile,
xPropSet),
sal_False, XML_NAMESPACE_OFFICE);
- ProcessString(sXML_dde_item,
+ ProcessString(XML_DDE_ITEM,
GetStringProperty(sPropertyDDECommandElement,
xPropSet),
sal_False, XML_NAMESPACE_OFFICE);
@@ -2029,12 +2029,12 @@ void XMLTextFieldExport::ExportFieldDeclarations(
sPropertyIsAutomaticUpdate, xPropSet);
if (bIsAutomaticUpdate)
{
- GetExport().AddAttributeASCII(XML_NAMESPACE_OFFICE,
- sXML_automatic_update,
- sXML_true);
+ GetExport().AddAttribute(XML_NAMESPACE_OFFICE,
+ XML_AUTOMATIC_UPDATE,
+ XML_TRUE);
}
- ExportElement(sXML_dde_connection_decl, sal_True);
+ ExportElement(XML_DDE_CONNECTION_DECL, sal_True);
}
// else: no dependent field -> no export of field declaration
}
@@ -2053,36 +2053,32 @@ void XMLTextFieldExport::SetExportOnlyUsedFieldDeclarations(
pUsedMasters = new map<Reference<XText>, set<OUString> > ;
}
-void XMLTextFieldExport::ExportElement(const sal_Char* pElementName,
+void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
sal_Bool bAddSpace)
{
- // can't call ExportElement(sal_Char*, const OUString&) with empty
+ // can't call ExportElement(eElementName, const OUString&) with empty
// string because xmlprinter only uses empty tags if no content
// (not even empty content) was written.
- DBG_ASSERT(NULL != pElementName, "invalid element name!");
- if (NULL != pElementName)
+ DBG_ASSERT(XML_TOKEN_INVALID != eElementName, "invalid element name!");
+ if (XML_TOKEN_INVALID != eElementName)
{
// Element
- SvXMLElementExport aElem( GetExport(),
- XML_NAMESPACE_TEXT,
- pElementName,
- bAddSpace, bAddSpace );
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ eElementName, bAddSpace, bAddSpace );
} // else: ignore
}
-void XMLTextFieldExport::ExportElement(const sal_Char* pElementName,
+void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
const OUString& sContent,
sal_Bool bAddSpace)
{
- DBG_ASSERT(NULL != pElementName, "invalid element name!");
- if (NULL != pElementName)
+ DBG_ASSERT(eElementName != XML_TOKEN_INVALID, "invalid element name!");
+ if (eElementName != XML_TOKEN_INVALID)
{
// Element
- SvXMLElementExport aElem( GetExport(),
- XML_NAMESPACE_TEXT,
- pElementName,
- bAddSpace, bAddSpace );
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ eElementName, bAddSpace, bAddSpace );
// export content
GetExport().GetDocHandler()->characters(sContent);
} else {
@@ -2144,7 +2140,7 @@ void XMLTextFieldExport::ProcessValueAndType(
if( sDataStyleName.getLength() > 0 )
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_data_style_name,
+ XML_DATA_STYLE_NAME,
sDataStyleName );
} // else: ignore (no valid number format)
} // else: ignore (no number format)
@@ -2159,43 +2155,39 @@ void XMLTextFieldExport::ProcessDisplay(sal_Bool bIsVisible,
sal_Bool bIsCommand,
sal_Bool bValueDefault)
{
- sal_Char* pValue;
+ enum XMLTokenEnum eValue;
if (bIsVisible)
{
- pValue = bIsCommand ? sXML_formula : sXML_value;
+ eValue = bIsCommand ? XML_FORMULA : XML_VALUE;
}
else
{
- pValue = sXML_none;
+ eValue = XML_NONE;
}
// omit attribute if default
- if (!bValueDefault || (pValue != sXML_value))
+ if (!bValueDefault || (eValue != XML_VALUE))
{
- GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
- sXML_display,
- pValue);
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_DISPLAY, eValue);
}
}
/// export boolean property
-void XMLTextFieldExport::ProcessBoolean(const sal_Char* pXmlName,
+void XMLTextFieldExport::ProcessBoolean(enum XMLTokenEnum eName,
sal_Bool bBool, sal_Bool bDefault)
{
- DBG_ASSERT(NULL!=pXmlName, "invalid element name");
- if (NULL == pXmlName) {
+ DBG_ASSERT( eName != XML_TOKEN_INVALID, "invalid element token");
+ if ( XML_TOKEN_INVALID == eName )
return;
- }
// write attribute (if different than default)
// negate to force 0/1 values (and make sal_Bool comparable)
if ((!bBool) != (!bDefault)) {
- GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
- pXmlName,
- (bBool ? sXML_true : sXML_false) );
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, eName,
+ (bBool ? XML_TRUE : XML_FALSE) );
}
}
@@ -2203,72 +2195,65 @@ void XMLTextFieldExport::ProcessBoolean(const sal_Char* pXmlName,
/// export string attribute
-void XMLTextFieldExport::ProcessString(const sal_Char* pXmlName,
+void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
const OUString& sValue,
sal_Bool bOmitEmpty,
sal_uInt16 nPrefix)
{
- DBG_ASSERT(NULL!=pXmlName, "invalid element name");
- if (NULL == pXmlName) {
+ DBG_ASSERT( eName != XML_TOKEN_INVALID, "invalid element token");
+ if ( XML_TOKEN_INVALID == eName )
return;
- }
// check for empty string, if applicable
- if (bOmitEmpty && (sValue.getLength()==0)) {
+ if ( bOmitEmpty && (sValue.getLength()==0) )
return;
- }
// write attribute
- GetExport().AddAttribute(nPrefix, pXmlName, sValue);
+ GetExport().AddAttribute(nPrefix, eName, sValue);
}
/// export a string attribute
-void XMLTextFieldExport::ProcessString(const sal_Char* pXmlName,
+void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
const ::rtl::OUString& sValue,
const ::rtl::OUString& sDefault,
sal_uInt16 nPrefix)
{
if (sValue != sDefault)
{
- ProcessString(pXmlName, sValue, sal_False, nPrefix);
+ ProcessString(eName, sValue, sal_False, nPrefix);
}
}
/// export string attribute
void XMLTextFieldExport::ProcessString(
- const sal_Char* pXmlName,
- const sal_Char* pValue,
+ enum XMLTokenEnum eName,
+ enum XMLTokenEnum eValue,
sal_Bool bOmitEmpty,
sal_uInt16 nPrefix)
{
- DBG_ASSERT(NULL != pXmlName, "invalid element name");
- DBG_ASSERT(NULL != pValue, "invalid value name");
- if ((NULL == pXmlName) || (NULL == pValue)) {
+ DBG_ASSERT( eName != XML_TOKEN_INVALID, "invalid element token" );
+ DBG_ASSERT( bOmitEmpty || (eValue != XML_TOKEN_INVALID),
+ "invalid value token" );
+ if ( XML_TOKEN_INVALID == eName )
return;
- }
// check for empty string, if applicable
- if (bOmitEmpty && (0 == pValue[0])) {
+ if (bOmitEmpty && (eValue == XML_TOKEN_INVALID))
return;
- }
- GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT, pXmlName, pValue);
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, eName, eValue);
}
/// export a string attribute
void XMLTextFieldExport::ProcessString(
- const sal_Char* pXmlName,
- const sal_Char* pValue,
- const sal_Char* pDefault,
+ enum XMLTokenEnum eName,
+ enum XMLTokenEnum eValue,
+ enum XMLTokenEnum eDefault,
sal_uInt16 nPrefix)
{
- // save comparisons if pointers are equals. This will happen
- // frequently, as almost every code in here uses sXML_* constants.
- if ((pValue != pDefault) && (0 != strcmp(pValue, pDefault)))
- {
- ProcessString(pXmlName, pValue, sal_False, nPrefix);
- }
+ if ( eValue != eDefault )
+ ProcessString( eName, eValue, sal_False, nPrefix);
}
@@ -2283,33 +2268,29 @@ void XMLTextFieldExport::ProcessParagraphSequence(
while (aEnumerator.getNextToken(aSubString))
{
SvXMLElementExport aParagraph(
- GetExport(), XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False);
+ GetExport(), XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
GetExport().GetDocHandler()->characters(aSubString);
}
}
// export an integer attribute
-void XMLTextFieldExport::ProcessInteger(const sal_Char* pXmlName,
+void XMLTextFieldExport::ProcessInteger(enum XMLTokenEnum eName,
sal_Int32 nNum)
{
- DBG_ASSERT(NULL != pXmlName, "invalid element name");
-
- if (NULL == pXmlName) {
+ DBG_ASSERT( eName != XML_TOKEN_INVALID, "invalid element token");
+ if ( XML_TOKEN_INVALID == eName )
return;
- }
- GetExport().AddAttribute(XML_NAMESPACE_TEXT, pXmlName,
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, eName,
OUString::valueOf(nNum));
}
/// export an integer attribute, omit if default
-void XMLTextFieldExport::ProcessInteger(const sal_Char* pXmlName,
+void XMLTextFieldExport::ProcessInteger(enum XMLTokenEnum eName,
sal_Int32 nNum, sal_Int32 nDefault)
{
if (nNum != nDefault)
- {
- ProcessInteger(pXmlName, nNum);
- }
+ ProcessInteger(eName, nNum);
}
@@ -2324,8 +2305,7 @@ void XMLTextFieldExport::ProcessNumberingType(sal_Int16 nNumberingType)
// number type: num format
GetExport().GetMM100UnitConverter().convertNumFormat( sTmp,
nNumberingType );
- GetExport().AddAttribute(XML_NAMESPACE_STYLE,
- sXML_num_format,
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_FORMAT,
sTmp.makeStringAndClear() );
// and letter sync, if applicable
GetExport().GetMM100UnitConverter().convertNumLetterSync( sTmp,
@@ -2333,9 +2313,8 @@ void XMLTextFieldExport::ProcessNumberingType(sal_Int16 nNumberingType)
if (sTmp.getLength())
{
- GetExport().AddAttribute(XML_NAMESPACE_STYLE,
- sXML_num_letter_sync,
- sTmp.makeStringAndClear() );
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC,
+ sTmp.makeStringAndClear() );
}
}
// else: like page descriptor => ignore
@@ -2343,7 +2322,7 @@ void XMLTextFieldExport::ProcessNumberingType(sal_Int16 nNumberingType)
/// export a date, time, or duration
-void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
+void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName,
double dValue,
sal_Bool bIsDate,
sal_Bool bIsDuration,
@@ -2372,11 +2351,11 @@ void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
}
// output attribute
- ProcessString(sXMLName, aBuffer.makeStringAndClear(), sal_True, nPrefix);
+ ProcessString(eName, aBuffer.makeStringAndClear(), sal_True, nPrefix);
}
/// export a date or time
-void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
+void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName,
const DateTime& rTime,
sal_Bool bIsDate,
sal_uInt16 nPrefix)
@@ -2398,12 +2377,12 @@ void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
rExport.GetMM100UnitConverter().convertDateTime(aBuffer, aDateTime);
// output attribute
- ProcessString(sXMLName, aBuffer.makeStringAndClear(), sal_True, nPrefix);
+ ProcessString(eName, aBuffer.makeStringAndClear(), sal_True, nPrefix);
}
/// export date according to ISO 8601
void XMLTextFieldExport::ProcessDate(
- const sal_Char* sXMLName,
+ enum XMLTokenEnum eName,
const ::com::sun::star::util::Date& rDate,
sal_uInt16 nPrefix)
{
@@ -2412,12 +2391,12 @@ void XMLTextFieldExport::ProcessDate(
aDateTime.Day = rDate.Day;
aDateTime.Month = rDate.Month;
aDateTime.Year = rDate.Year;
- ProcessDateTime(sXMLName, aDateTime, sal_True, nPrefix);
+ ProcessDateTime(eName, aDateTime, sal_True, nPrefix);
}
/// export a date, time, or duration
-void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
+void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName,
sal_Int32 nMinutes,
sal_Bool bIsDate,
sal_Bool bIsDuration,
@@ -2427,7 +2406,7 @@ void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
// handle bOmitDurationIfZero here, because we can precisely compare ints
if (!(bIsDuration && bOmitDurationIfZero && (nMinutes==0)))
{
- ProcessDateTime(sXMLName, (double)nMinutes / (double)(24*60),
+ ProcessDateTime(eName, (double)nMinutes / (double)(24*60),
bIsDate, bIsDuration, bOmitDurationIfZero, nPrefix);
}
}
@@ -2485,7 +2464,7 @@ void XMLTextFieldExport::ProcessBibliographyData(
aBibliographyDataTypeMap))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
- sXML_bibiliographic_type,
+ XML_BIBILIOGRAPHIC_TYPE,
sBuf.makeStringAndClear());
}
// else: ignore this argument
@@ -2570,54 +2549,55 @@ sal_Bool XMLTextFieldExport::GetDependentFieldPropertySet(
/// map placeholder type
-const sal_Char* XMLTextFieldExport::MapPlaceholderType(sal_uInt16 nType)
+enum XMLTokenEnum XMLTextFieldExport::MapPlaceholderType(sal_uInt16 nType)
{
- sal_Char* pTypeString = sXML_text;
+ enum XMLTokenEnum eType = XML_TEXT;
- switch (nType) {
- case PlaceholderType::TEXT:
- pTypeString = sXML_text;
- break;
+ switch (nType)
+ {
+ case PlaceholderType::TEXT:
+ eType = XML_TEXT;
+ break;
- case PlaceholderType::TABLE:
- pTypeString = sXML_table;
- break;
+ case PlaceholderType::TABLE:
+ eType = XML_TABLE;
+ break;
- case PlaceholderType::TEXTFRAME:
- pTypeString = sXML_text_box;
- break;
+ case PlaceholderType::TEXTFRAME:
+ eType = XML_TEXT_BOX;
+ break;
- case PlaceholderType::GRAPHIC:
- pTypeString = sXML_image;
- break;
+ case PlaceholderType::GRAPHIC:
+ eType = XML_IMAGE;
+ break;
- case PlaceholderType::OBJECT:
- pTypeString = sXML_object;
- break;
+ case PlaceholderType::OBJECT:
+ eType = XML_OBJECT;
+ break;
- default:
- // unkown placeholder: sXML_text
- DBG_ERROR("unkown placeholder type");
+ default:
+ // unkown placeholder: XML_TEXT
+ DBG_ERROR("unkown placeholder type");
}
- return pTypeString;
+ return eType;
}
/// element name for author fields
-const sal_Char* XMLTextFieldExport::MapAuthorFieldName(
+enum XMLTokenEnum XMLTextFieldExport::MapAuthorFieldName(
const Reference<XPropertySet> & xPropSet)
{
// Initalen oder voller Name?
return GetBoolProperty(sPropertyFullName, xPropSet)
- ? sXML_author_name : sXML_author_initials;
+ ? XML_AUTHOR_NAME : XML_AUTHOR_INITIALS;
}
-const sal_Char* XMLTextFieldExport::MapPageNumberName(
+enum XMLTokenEnum XMLTextFieldExport::MapPageNumberName(
const Reference<XPropertySet> & xPropSet,
sal_Int32& nOffset)
{
- sal_Char* pName = NULL;
+ enum XMLTokenEnum eName = XML_TOKEN_INVALID;
PageNumberType ePage;
Any aAny = xPropSet->getPropertyValue(sPropertySubType);
ePage = *(PageNumberType*)aAny.getValue();
@@ -2625,512 +2605,512 @@ const sal_Char* XMLTextFieldExport::MapPageNumberName(
switch (ePage)
{
case PageNumberType_PREV:
- pName = sXML_previous;
+ eName = XML_PREVIOUS;
nOffset += 1;
break;
case PageNumberType_CURRENT:
- pName = sXML_current;
+ eName = XML_CURRENT;
break;
case PageNumberType_NEXT:
- pName = sXML_next;
+ eName = XML_NEXT;
nOffset -= 1;
break;
default:
DBG_ERROR("unknown page number type");
- pName = NULL;
+ eName = XML_TOKEN_INVALID;
break;
}
- return pName;
+ return eName;
}
/// map TemplateDisplayFormat to XML
-const sal_Char* XMLTextFieldExport::MapTemplateDisplayFormat(sal_Int16 nFormat)
+enum XMLTokenEnum XMLTextFieldExport::MapTemplateDisplayFormat(sal_Int16 nFormat)
{
- sal_Char* pName = NULL;
+ enum XMLTokenEnum eName = XML_TOKEN_INVALID;
switch (nFormat)
{
case TemplateDisplayFormat::FULL:
- pName = sXML_full;
+ eName = XML_FULL;
break;
case TemplateDisplayFormat::PATH:
- pName = sXML_path;
+ eName = XML_PATH;
break;
case TemplateDisplayFormat::NAME:
- pName = sXML_name;
+ eName = XML_NAME;
break;
case TemplateDisplayFormat::NAME_AND_EXT:
- pName = sXML_name_and_extension;
+ eName = XML_NAME_AND_EXTENSION;
break;
case TemplateDisplayFormat::AREA:
- pName = sXML_area;
+ eName = XML_AREA;
break;
case TemplateDisplayFormat::TITLE:
- pName = sXML_title;
+ eName = XML_TITLE;
break;
default:
DBG_ERROR("unknown template display format");
- pName = NULL;
+ eName = XML_TOKEN_INVALID;
break;
}
- return pName;
+ return eName;
}
/// map count/statistics field token to XML name
-const sal_Char* XMLTextFieldExport::MapCountFieldName(sal_Int16 nToken)
+enum XMLTokenEnum XMLTextFieldExport::MapCountFieldName(sal_Int16 nToken)
{
- const sal_Char* pElementName = NULL;
+ enum XMLTokenEnum eElement = XML_TOKEN_INVALID;
switch (nToken)
{
case FIELD_ID_COUNT_PAGES:
- pElementName = sXML_page_count;
+ eElement = XML_PAGE_COUNT;
break;
case FIELD_ID_COUNT_PARAGRAPHS:
- pElementName = sXML_paragraph_count;
+ eElement = XML_PARAGRAPH_COUNT;
break;
case FIELD_ID_COUNT_WORDS:
- pElementName = sXML_word_count;
+ eElement = XML_WORD_COUNT;
break;
case FIELD_ID_COUNT_CHARACTERS:
- pElementName = sXML_character_count;
+ eElement = XML_CHARACTER_COUNT;
break;
case FIELD_ID_COUNT_TABLES:
- pElementName = sXML_table_count;
+ eElement = XML_TABLE_COUNT;
break;
case FIELD_ID_COUNT_GRAPHICS:
- pElementName = sXML_image_count;
+ eElement = XML_IMAGE_COUNT;
break;
case FIELD_ID_COUNT_OBJECTS:
- pElementName = sXML_object_count;
+ eElement = XML_OBJECT_COUNT;
break;
default:
DBG_ERROR("no count field token");
- pElementName = NULL;
+ eElement = XML_TOKEN_INVALID;
break;
}
- return pElementName;
+ return eElement;
}
/// map ChapterDisplayFormat to XML string
-const sal_Char* XMLTextFieldExport::MapChapterDisplayFormat(sal_Int16 nFormat)
+enum XMLTokenEnum XMLTextFieldExport::MapChapterDisplayFormat(sal_Int16 nFormat)
{
- const sal_Char* pName = NULL;
+ enum XMLTokenEnum eName = XML_TOKEN_INVALID;
switch (nFormat)
{
case ChapterFormat::NAME:
- pName = sXML_name;
+ eName = XML_NAME;
break;
case ChapterFormat::NUMBER:
- pName = sXML_number;
+ eName = XML_NUMBER;
break;
case ChapterFormat::NAME_NUMBER:
- pName = sXML_number_and_name;
+ eName = XML_NUMBER_AND_NAME;
break;
case ChapterFormat::NO_PREFIX_SUFFIX:
- pName = sXML_plain_number_and_name;
+ eName = XML_PLAIN_NUMBER_AND_NAME;
break;
case ChapterFormat::DIGIT:
- pName = sXML_plain_number;
+ eName = XML_PLAIN_NUMBER;
break;
default:
DBG_ERROR("unkown chapter display format");
- pName = NULL;
+ eName = XML_TOKEN_INVALID;
break;
}
- return pName;
+ return eName;
}
/// map FilenameDisplayFormat to XML attribute names
-const sal_Char* XMLTextFieldExport::MapFilenameDisplayFormat(sal_Int16 nFormat)
+enum XMLTokenEnum XMLTextFieldExport::MapFilenameDisplayFormat(sal_Int16 nFormat)
{
- sal_Char* pName = NULL;
+ enum XMLTokenEnum eName = XML_TOKEN_INVALID;
switch (nFormat)
{
case FilenameDisplayFormat::FULL:
- pName = sXML_full;
+ eName = XML_FULL;
break;
case FilenameDisplayFormat::PATH:
- pName = sXML_path;
+ eName = XML_PATH;
break;
case FilenameDisplayFormat::NAME:
- pName = sXML_name;
+ eName = XML_NAME;
break;
case FilenameDisplayFormat::NAME_AND_EXT:
- pName = sXML_name_and_extension;
+ eName = XML_NAME_AND_EXTENSION;
break;
default:
DBG_ERROR("unknown filename display format");
}
- return pName;
+ return eName;
}
/// map ReferenceFieldPart to XML string
-const sal_Char* XMLTextFieldExport::MapReferenceType(sal_Int16 nType)
+enum XMLTokenEnum XMLTextFieldExport::MapReferenceType(sal_Int16 nType)
{
- sal_Char* pElementName = NULL;
+ enum XMLTokenEnum eElement = XML_TOKEN_INVALID;
switch (nType)
{
case ReferenceFieldPart::PAGE:
- pElementName = sXML_page;
+ eElement = XML_PAGE;
break;
case ReferenceFieldPart::CHAPTER:
- pElementName = sXML_chapter;
+ eElement = XML_CHAPTER;
break;
case ReferenceFieldPart::TEXT:
- pElementName = sXML_text;
+ eElement = XML_TEXT;
break;
case ReferenceFieldPart::UP_DOWN:
- pElementName = sXML_direction;
+ eElement = XML_DIRECTION;
break;
case ReferenceFieldPart::CATEGORY_AND_NUMBER:
- pElementName = sXML_category_and_value;
+ eElement = XML_CATEGORY_AND_VALUE;
break;
case ReferenceFieldPart::ONLY_CAPTION:
- pElementName = sXML_caption;
+ eElement = XML_CAPTION;
break;
case ReferenceFieldPart::ONLY_SEQUENCE_NUMBER:
- pElementName = sXML_value;
+ eElement = XML_VALUE;
break;
case ReferenceFieldPart::PAGE_DESC:
// small hack: this value never gets written, because
- // sXML_template is default
- pElementName = sXML_template;
+ // XML_TEMPLATE is default
+ eElement = XML_TEMPLATE;
break;
default:
DBG_ERROR("unknown reference type");
- pElementName = sXML_template;
+ eElement = XML_TEMPLATE;
break;
}
- return pElementName;
+ return eElement;
}
/// map ReferenceFieldPart to XML string
-const sal_Char* XMLTextFieldExport::MapReferenceSource(sal_Int16 nType)
+enum XMLTokenEnum XMLTextFieldExport::MapReferenceSource(sal_Int16 nType)
{
- sal_Char* pElementName = NULL;
+ enum XMLTokenEnum eElement = XML_TOKEN_INVALID;
switch (nType)
{
case ReferenceFieldSource::REFERENCE_MARK:
- pElementName = sXML_reference_ref;
+ eElement = XML_REFERENCE_REF;
break;
case ReferenceFieldSource::SEQUENCE_FIELD:
- pElementName = sXML_sequence_ref;
+ eElement = XML_SEQUENCE_REF;
break;
case ReferenceFieldSource::BOOKMARK:
- pElementName = sXML_bookmark_ref;
+ eElement = XML_BOOKMARK_REF;
break;
case ReferenceFieldSource::FOOTNOTE:
- pElementName = sXML_footnote_ref;
+ eElement = XML_FOOTNOTE_REF;
break;
case ReferenceFieldSource::ENDNOTE:
- pElementName = sXML_endnote_ref;
+ eElement = XML_ENDNOTE_REF;
break;
default:
DBG_ERROR("unkown reference source");
break;
}
- return pElementName;
+ return eElement;
}
/// element name for sender fields
-const sal_Char* XMLTextFieldExport::MapSenderFieldName(
+enum XMLTokenEnum XMLTextFieldExport::MapSenderFieldName(
const Reference<XPropertySet> & xPropSet)
{
- sal_Char* pElementName = NULL;
+ enum XMLTokenEnum eName = XML_TOKEN_INVALID;
// sub-field type
switch (GetInt16Property(sPropertyFieldSubType, xPropSet))
{
case UserDataPart::COMPANY :
- pElementName = sXML_sender_company;
+ eName = XML_SENDER_COMPANY;
break;
case UserDataPart::FIRSTNAME :
- pElementName = sXML_sender_firstname;
+ eName = XML_SENDER_FIRSTNAME;
break;
case UserDataPart::NAME :
- pElementName = sXML_sender_lastname;
+ eName = XML_SENDER_LASTNAME;
break;
case UserDataPart::SHORTCUT :
- pElementName = sXML_sender_initials;
+ eName = XML_SENDER_INITIALS;
break;
case UserDataPart::STREET :
- pElementName = sXML_sender_street;
+ eName = XML_SENDER_STREET;
break;
case UserDataPart::COUNTRY :
- pElementName = sXML_sender_country;
+ eName = XML_SENDER_COUNTRY;
break;
case UserDataPart::ZIP :
- pElementName = sXML_sender_postal_code;
+ eName = XML_SENDER_POSTAL_CODE;
break;
case UserDataPart::CITY :
- pElementName = sXML_sender_city;
+ eName = XML_SENDER_CITY;
break;
case UserDataPart::TITLE :
- pElementName = sXML_sender_title;
+ eName = XML_SENDER_TITLE;
break;
case UserDataPart::POSITION :
- pElementName = sXML_sender_position;
+ eName = XML_SENDER_POSITION;
break;
case UserDataPart::PHONE_PRIVATE :
- pElementName = sXML_sender_phone_private;
+ eName = XML_SENDER_PHONE_PRIVATE;
break;
case UserDataPart::PHONE_COMPANY :
- pElementName = sXML_sender_phone_work;
+ eName = XML_SENDER_PHONE_WORK;
break;
case UserDataPart::FAX :
- pElementName = sXML_sender_fax;
+ eName = XML_SENDER_FAX;
break;
case UserDataPart::EMAIL :
- pElementName = sXML_sender_email;
+ eName = XML_SENDER_EMAIL;
break;
case UserDataPart::STATE :
- pElementName = sXML_sender_state_or_province;
+ eName = XML_SENDER_STATE_OR_PROVINCE;
break;
default:
DBG_WARNING("unknown sender type");
- pElementName = NULL;
+ eName = XML_TOKEN_INVALID;
break;
}
- return pElementName;
+ return eName;
}
-const sal_Char* XMLTextFieldExport::MapDocInfoFieldName(
+enum XMLTokenEnum XMLTextFieldExport::MapDocInfoFieldName(
enum FieldIdEnum nToken)
{
- sal_Char* pElementName = NULL;
+ enum XMLTokenEnum eElement = XML_TOKEN_INVALID;
switch (nToken)
{
case FIELD_ID_DOCINFO_CREATION_AUTHOR:
- pElementName = sXML_initial_creator;
+ eElement = XML_INITIAL_CREATOR;
break;
case FIELD_ID_DOCINFO_CREATION_DATE:
- pElementName = sXML_creation_date;
+ eElement = XML_CREATION_DATE;
break;
case FIELD_ID_DOCINFO_CREATION_TIME:
- pElementName = sXML_creation_time;
+ eElement = XML_CREATION_TIME;
break;
case FIELD_ID_DOCINFO_DESCRIPTION:
- pElementName = sXML_description;
+ eElement = XML_DESCRIPTION;
break;
case FIELD_ID_DOCINFO_INFORMATION0:
- pElementName = sXML_user_info_0;
+ eElement = XML_USER_INFO_0;
break;
case FIELD_ID_DOCINFO_INFORMATION1:
- pElementName = sXML_user_info_1;
+ eElement = XML_USER_INFO_1;
break;
case FIELD_ID_DOCINFO_INFORMATION2:
- pElementName = sXML_user_info_2;
+ eElement = XML_USER_INFO_2;
break;
case FIELD_ID_DOCINFO_INFORMATION3:
- pElementName = sXML_user_info_3;
+ eElement = XML_USER_INFO_3;
break;
case FIELD_ID_DOCINFO_PRINT_TIME:
- pElementName = sXML_print_time;
+ eElement = XML_PRINT_TIME;
break;
case FIELD_ID_DOCINFO_PRINT_DATE:
- pElementName = sXML_print_date;
+ eElement = XML_PRINT_DATE;
break;
case FIELD_ID_DOCINFO_PRINT_AUTHOR:
- pElementName = sXML_printed_by;
+ eElement = XML_PRINTED_BY;
break;
case FIELD_ID_DOCINFO_TITLE:
- pElementName = sXML_title;
+ eElement = XML_TITLE;
break;
case FIELD_ID_DOCINFO_SUBJECT:
- pElementName = sXML_subject;
+ eElement = XML_SUBJECT;
break;
case FIELD_ID_DOCINFO_KEYWORDS:
- pElementName = sXML_keywords;
+ eElement = XML_KEYWORDS;
break;
case FIELD_ID_DOCINFO_REVISION:
- pElementName = sXML_editing_cycles;
+ eElement = XML_EDITING_CYCLES;
break;
case FIELD_ID_DOCINFO_EDIT_DURATION:
- pElementName = sXML_editing_duration;
+ eElement = XML_EDITING_DURATION;
break;
case FIELD_ID_DOCINFO_SAVE_TIME:
- pElementName = sXML_modification_time;
+ eElement = XML_MODIFICATION_TIME;
break;
case FIELD_ID_DOCINFO_SAVE_DATE:
- pElementName = sXML_modification_date;
+ eElement = XML_MODIFICATION_DATE;
break;
case FIELD_ID_DOCINFO_SAVE_AUTHOR:
- pElementName = sXML_creator;
+ eElement = XML_CREATOR;
break;
default:
DBG_WARNING("unknown docinfo field type!");
- pElementName = NULL;
+ eElement = XML_TOKEN_INVALID;
break;
}
- return pElementName;
+ return eElement;
}
-const sal_Char* XMLTextFieldExport::MapBibliographyFieldName(OUString sName)
+enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(OUString sName)
{
- sal_Char* pName = NULL;
+ enum XMLTokenEnum eName = XML_TOKEN_INVALID;
if (sName.equalsAsciiL("Identifier", sizeof("Identifier")-1))
{
- pName = sXML_identifier;
+ eName = XML_IDENTIFIER;
}
else if (sName.equalsAsciiL("BibiliographicType",
sizeof("BibiliographicType")-1))
{
- pName = sXML_bibiliographic_type;
+ eName = XML_BIBILIOGRAPHIC_TYPE;
}
else if (sName.equalsAsciiL("Address", sizeof("Address")-1))
{
- pName = sXML_address;
+ eName = XML_ADDRESS;
}
else if (sName.equalsAsciiL("Annote", sizeof("Annote")-1))
{
- pName = sXML_annote;
+ eName = XML_ANNOTE;
}
else if (sName.equalsAsciiL("Author", sizeof("Author")-1))
{
- pName = sXML_author;
+ eName = XML_AUTHOR;
}
else if (sName.equalsAsciiL("Booktitle", sizeof("Booktitle")-1))
{
- pName = sXML_booktitle;
+ eName = XML_BOOKTITLE;
}
else if (sName.equalsAsciiL("Chapter", sizeof("Chapter")-1))
{
- pName = sXML_chapter;
+ eName = XML_CHAPTER;
}
else if (sName.equalsAsciiL("Edition", sizeof("Edition")-1))
{
- pName = sXML_edition;
+ eName = XML_EDITION;
}
else if (sName.equalsAsciiL("Editor", sizeof("Editor")-1))
{
- pName = sXML_editor;
+ eName = XML_EDITOR;
}
else if (sName.equalsAsciiL("Howpublished", sizeof("Howpublished")-1))
{
- pName = sXML_howpublished;
+ eName = XML_HOWPUBLISHED;
}
else if (sName.equalsAsciiL("Institution", sizeof("Institution")-1))
{
- pName = sXML_institution;
+ eName = XML_INSTITUTION;
}
else if (sName.equalsAsciiL("Journal", sizeof("Journal")-1))
{
- pName = sXML_journal;
+ eName = XML_JOURNAL;
}
else if (sName.equalsAsciiL("Month", sizeof("Month")-1))
{
- pName = sXML_month;
+ eName = XML_MONTH;
}
else if (sName.equalsAsciiL("Note", sizeof("Note")-1))
{
- pName = sXML_note;
+ eName = XML_NOTE;
}
else if (sName.equalsAsciiL("Number", sizeof("Number")-1))
{
- pName = sXML_number;
+ eName = XML_NUMBER;
}
else if (sName.equalsAsciiL("Organizations", sizeof("Organizations")-1))
{
- pName = sXML_organizations;
+ eName = XML_ORGANIZATIONS;
}
else if (sName.equalsAsciiL("Pages", sizeof("Pages")-1))
{
- pName = sXML_pages;
+ eName = XML_PAGES;
}
else if (sName.equalsAsciiL("Publisher", sizeof("Publisher")-1))
{
- pName = sXML_publisher;
+ eName = XML_PUBLISHER;
}
else if (sName.equalsAsciiL("School", sizeof("School")-1))
{
- pName = sXML_school;
+ eName = XML_SCHOOL;
}
else if (sName.equalsAsciiL("Series", sizeof("Series")-1))
{
- pName = sXML_series;
+ eName = XML_SERIES;
}
else if (sName.equalsAsciiL("Title", sizeof("Title")-1))
{
- pName = sXML_title;
+ eName = XML_TITLE;
}
else if (sName.equalsAsciiL("Report_Type", sizeof("Report_Type")-1))
{
- pName = sXML_report_type;
+ eName = XML_REPORT_TYPE;
}
else if (sName.equalsAsciiL("Volume", sizeof("Volume")-1))
{
- pName = sXML_volume;
+ eName = XML_VOLUME;
}
else if (sName.equalsAsciiL("Year", sizeof("Year")-1))
{
- pName = sXML_year;
+ eName = XML_YEAR;
}
else if (sName.equalsAsciiL("URL", sizeof("URL")-1))
{
- pName = sXML_url;
+ eName = XML_URL;
}
else if (sName.equalsAsciiL("Custom1", sizeof("Custom1")-1))
{
- pName = sXML_custom1;
+ eName = XML_CUSTOM1;
}
else if (sName.equalsAsciiL("Custom2", sizeof("Custom2")-1))
{
- pName = sXML_custom2;
+ eName = XML_CUSTOM2;
}
else if (sName.equalsAsciiL("Custom3", sizeof("Custom3")-1))
{
- pName = sXML_custom3;
+ eName = XML_CUSTOM3;
}
else if (sName.equalsAsciiL("Custom4", sizeof("Custom4")-1))
{
- pName = sXML_custom4;
+ eName = XML_CUSTOM4;
}
else if (sName.equalsAsciiL("Custom5", sizeof("Custom5")-1))
{
- pName = sXML_custom5;
+ eName = XML_CUSTOM5;
}
else if (sName.equalsAsciiL("ISBN", sizeof("ISBN")-1))
{
- pName = sXML_isbn;
+ eName = XML_ISBN;
}
else
{
DBG_ERROR("Unknown bibliography info data");
- pName = NULL;
+ eName = XML_TOKEN_INVALID;
}
- return pName;
+ return eName;
}
-const sal_Char* XMLTextFieldExport::MapMeasureKind(sal_Int16 nKind)
+enum XMLTokenEnum XMLTextFieldExport::MapMeasureKind(sal_Int16 nKind)
{
switch( nKind )
{
case 0:
- return sXML_value;
+ return XML_VALUE;
case 1:
- return sXML_unit;
+ return XML_UNIT;
}
- return sXML_gap;
+ return XML_GAP;
}
OUString XMLTextFieldExport::MakeFootnoteRefName(
diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx
index ca19833243a5..20bd61632eb9 100644
--- a/xmloff/source/text/txtftne.cxx
+++ b/xmloff/source/text/txtftne.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtftne.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: dvo $ $Date: 2001-04-26 13:17:32 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -113,8 +113,8 @@
#include <com/sun/star/text/FootnoteNumbering.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -147,6 +147,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::text;
+using namespace ::xmloff::token;
void XMLTextParagraphExport::exportTextFootnote(
@@ -181,10 +182,10 @@ void XMLTextParagraphExport::exportTextFootnote(
OUString sStyle = FindTextStyle( rPropSet );
if( sStyle.getLength() )
{
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
sStyle );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_span, sal_False, sal_False );
+ XML_SPAN, sal_False, sal_False );
exportTextFootnoteHelper(xFootnote, xText, sText,
bAutoStyles, bIsEndnote, bProgress );
}
@@ -219,33 +220,33 @@ void XMLTextParagraphExport::exportTextFootnoteHelper(
OUStringBuffer aBuf;
aBuf.appendAscii("ftn");
aBuf.append(nNumber);
- GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_id,
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_ID,
aBuf.makeStringAndClear());
SvXMLElementExport aNote(GetExport(), XML_NAMESPACE_TEXT,
- (bIsEndnote ? sXML_endnote : sXML_footnote),
+ (bIsEndnote ? XML_ENDNOTE : XML_FOOTNOTE),
sal_False, sal_False);
{
// handle label vs. automatic numbering
OUString sLabel = rFootnote->getLabel();
if (sLabel.getLength()>0)
{
- GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_label,
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_LABEL,
sLabel);
}
// else: automatic numbering -> no attribute
SvXMLElementExport aCite(GetExport(), XML_NAMESPACE_TEXT,
- (bIsEndnote ? sXML_endnote_citation :
- sXML_footnote_citation),
+ (bIsEndnote ? XML_ENDNOTE_CITATION :
+ XML_FOOTNOTE_CITATION),
sal_False, sal_False);
GetExport().GetDocHandler()->characters(sText);
}
{
SvXMLElementExport aBody(GetExport(), XML_NAMESPACE_TEXT,
- (bIsEndnote ? sXML_endnote_body :
- sXML_footnote_body),
+ (bIsEndnote ? XML_ENDNOTE_BODY :
+ XML_FOOTNOTE_BODY),
sal_False, sal_False);
exportText(rText, bAutoStyles, bProgress, sal_True );
}
@@ -276,17 +277,17 @@ void lcl_exportString(
const Reference<XPropertySet> & rPropSet,
const OUString& sProperty,
sal_uInt16 nPrefix,
- const sal_Char* pElementName,
+ enum XMLTokenEnum eElement,
sal_Bool bOmitIfEmpty = sal_True)
{
- DBG_ASSERT(NULL != pElementName, "need element name");
+ DBG_ASSERT( eElement != XML_TOKEN_INVALID, "need element token");
Any aAny = rPropSet->getPropertyValue(sProperty);
OUString sTmp;
aAny >>= sTmp;
if (!bOmitIfEmpty || (sTmp.getLength() > 0))
{
- rExport.AddAttribute(nPrefix, pElementName, sTmp);
+ rExport.AddAttribute(nPrefix, eElement, sTmp);
}
}
@@ -296,28 +297,28 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
{
// default/paragraph style
lcl_exportString( GetExport(), rFootnoteConfig, sParaStyleName,
- XML_NAMESPACE_TEXT, sXML_default_style_name, sal_True);
+ XML_NAMESPACE_TEXT, XML_DEFAULT_STYLE_NAME, sal_True);
// citation style
lcl_exportString( GetExport(), rFootnoteConfig, sCharStyleName,
- XML_NAMESPACE_TEXT, sXML_citation_style_name, sal_True);
+ XML_NAMESPACE_TEXT, XML_CITATION_STYLE_NAME, sal_True);
// citation body style
lcl_exportString( GetExport(), rFootnoteConfig, sAnchorCharStyleName,
- XML_NAMESPACE_TEXT, sXML_citation_body_style_name,
+ XML_NAMESPACE_TEXT, XML_CITATION_BODY_STYLE_NAME,
sal_True);
// page style
lcl_exportString( GetExport(), rFootnoteConfig, sPageStyleName,
- XML_NAMESPACE_TEXT, sXML_master_page_name, sal_True);
+ XML_NAMESPACE_TEXT, XML_MASTER_PAGE_NAME, sal_True);
// prefix
lcl_exportString( GetExport(), rFootnoteConfig, sPrefix,
- XML_NAMESPACE_STYLE, sXML_num_prefix, sal_True);
+ XML_NAMESPACE_STYLE, XML_NUM_PREFIX, sal_True);
// suffix
lcl_exportString( GetExport(), rFootnoteConfig, sSuffix,
- XML_NAMESPACE_STYLE, sXML_num_suffix, sal_True);
+ XML_NAMESPACE_STYLE, XML_NUM_SUFFIX, sal_True);
@@ -329,14 +330,13 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
sal_Int16 nNumbering;
aAny >>= nNumbering;
GetExport().GetMM100UnitConverter().convertNumFormat( sBuffer, nNumbering);
- GetExport().AddAttribute(XML_NAMESPACE_STYLE, sXML_num_format,
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_FORMAT,
sBuffer.makeStringAndClear() );
GetExport().GetMM100UnitConverter().convertNumLetterSync( sBuffer, nNumbering);
if (sBuffer.getLength() )
{
- GetExport().AddAttribute(XML_NAMESPACE_STYLE,
- sXML_num_letter_sync,
- sBuffer.makeStringAndClear());
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC,
+ sBuffer.makeStringAndClear());
}
// StartAt / start-value
@@ -344,7 +344,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
sal_Int16 nOffset;
aAny >>= nOffset;
SvXMLUnitConverter::convertNumber(sBuffer, (sal_Int32)nOffset);
- GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_start_value,
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_START_VALUE,
sBuffer.makeStringAndClear());
// some properties are for footnotes only
@@ -353,40 +353,36 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
// footnotes position
aAny = rFootnoteConfig->getPropertyValue(
sPositionEndOfDoc);
- GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
- sXML_footnotes_position,
- ( (*(sal_Bool *)aAny.getValue()) ?
- sXML_document : sXML_page ) );
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_FOOTNOTES_POSITION,
+ ( (*(sal_Bool *)aAny.getValue()) ?
+ XML_DOCUMENT : XML_PAGE ) );
aAny = rFootnoteConfig->getPropertyValue(sFootnoteCounting);
sal_Int16 nTmp;
aAny >>= nTmp;
- sal_Char* pElement;
+ enum XMLTokenEnum eElement;
switch (nTmp)
{
case FootnoteNumbering::PER_PAGE:
- pElement = sXML_page;
+ eElement = XML_PAGE;
break;
case FootnoteNumbering::PER_CHAPTER:
- pElement = sXML_chapter;
+ eElement = XML_CHAPTER;
break;
case FootnoteNumbering::PER_DOCUMENT:
default:
- pElement = sXML_document;
+ eElement = XML_DOCUMENT;
break;
}
- GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
- sXML_start_numbering_at,
- pElement);
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT,
+ XML_START_NUMBERING_AT, eElement);
}
// element
- SvXMLElementExport aFootnoteConfigElement(GetExport(),
- XML_NAMESPACE_TEXT,
- ( bIsEndnote ?
- sXML_endnotes_configuration :
- sXML_footnotes_configuration ),
- sal_True, sal_True);
+ SvXMLElementExport aFootnoteConfigElement(
+ GetExport(), XML_NAMESPACE_TEXT,
+ ( bIsEndnote ? XML_ENDNOTES_CONFIGURATION:XML_FOOTNOTES_CONFIGURATION),
+ sal_True, sal_True);
// two element for footnote content
if (!bIsEndnote)
@@ -400,7 +396,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
if (sTmp.getLength() > 0)
{
SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT,
- sXML_footnote_continuation_notice_forward,
+ XML_FOOTNOTE_CONTINUATION_NOTICE_FORWARD,
sal_True, sal_False);
GetExport().GetDocHandler()->characters(sTmp);
}
@@ -412,7 +408,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
if (sTmp.getLength() > 0)
{
SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT,
- sXML_footnote_continuation_notice_backward,
+ XML_FOOTNOTE_CONTINUATION_NOTICE_BACKWARD,
sal_True, sal_False);
GetExport().GetDocHandler()->characters(sTmp);
}
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index ebd272a15bc1..e836c3fa5884 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtimp.cxx,v $
*
- * $Revision: 1.78 $
+ * $Revision: 1.79 $
*
- * last change: $Author: mib $ $Date: 2001-06-28 13:19:19 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -122,8 +122,8 @@
#include <com/sun/star/container/XNamed.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
@@ -1507,7 +1507,7 @@ sal_Bool XMLTextImportHelper::HasDrawNameAttribute(
sal_uInt16 nPrefix =
rNamespaceMap.GetKeyByAttrName( rAttrName, &aLocalName );
if( XML_NAMESPACE_DRAW == nPrefix &&
- aLocalName.equalsAsciiL( sXML_name, sizeof( sXML_name ) - 1 ) )
+ IsXMLToken( aLocalName, XML_NAME ) )
{
return xAttrList->getValueByIndex(i).getLength() != 0;
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index dde2d1dcae20..b4755222b9c0 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtparae.cxx,v $
*
- * $Revision: 1.85 $
+ * $Revision: 1.86 $
*
- * last change: $Author: mib $ $Date: 2001-06-27 07:38:11 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -261,6 +261,8 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::frame;
+using namespace ::xmloff::token;
+
typedef OUString *OUStringPtr;
SV_DECL_PTRARR_DEL( OUStrings_Impl, OUStringPtr, 20, 10 )
@@ -569,22 +571,21 @@ void XMLTextParagraphExport::exportListChange(
if( sTmp.getLength() )
sName = sTmp;
}
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
sName );
}
if( bContinue && rNextInfo.IsOrdered() )
- GetExport().AddAttributeASCII( XML_NAMESPACE_TEXT,
- sXML_continue_numbering,
- sXML_true );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT,
+ XML_CONTINUE_NUMBERING, XML_TRUE );
- const sal_Char *pLName =
- rNextInfo.IsOrdered() ? sXML_ordered_list
- : sXML_unordered_list;
+ enum XMLTokenEnum eLName =
+ rNextInfo.IsOrdered() ? XML_ORDERED_LIST
+ : XML_UNORDERED_LIST;
OUString *pElem = new OUString(
GetExport().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_TEXT,
- OUString::createFromAscii(pLName) ) );
+ GetXMLToken(eLName) ) );
GetExport().GetDocHandler()->ignorableWhitespace(
GetExport().sWS );
GetExport().GetDocHandler()->startElement(
@@ -601,15 +602,15 @@ void XMLTextParagraphExport::exportListChange(
{
OUStringBuffer aBuffer;
aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_start_value,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE,
aBuffer.makeStringAndClear() );
}
- pLName = (rNextInfo.IsNumbered() || i+1 < nNextLevel)
- ? sXML_list_item
- : sXML_list_header;
+ eLName = (rNextInfo.IsNumbered() || i+1 < nNextLevel)
+ ? XML_LIST_ITEM
+ : XML_LIST_HEADER;
pElem = new OUString( GetExport().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_TEXT,
- OUString::createFromAscii(pLName) ) );
+ GetXMLToken(eLName) ) );
GetExport().GetDocHandler()->ignorableWhitespace( GetExport().sWS );
GetExport().GetDocHandler()->startElement(
*pElem, GetExport().GetXAttrList() );
@@ -641,12 +642,12 @@ void XMLTextParagraphExport::exportListChange(
{
OUStringBuffer aBuffer;
aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_start_value,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE,
aBuffer.makeStringAndClear() );
}
pElem = new OUString( GetExport().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_TEXT,
- OUString::createFromAscii(sXML_list_item) ) );
+ GetXMLToken(XML_LIST_ITEM) ) );
GetExport().GetDocHandler()->ignorableWhitespace( GetExport().sWS );
GetExport().GetDocHandler()->startElement( *pElem,
GetExport().GetXAttrList() );
@@ -772,7 +773,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
xParaPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
- OUString sFamily( RTL_CONSTASCII_USTRINGPARAM(sXML_paragraph) );
+ OUString sFamily( GetXMLToken(XML_PARAGRAPH) );
OUString sPrefix( 'P' );
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, sFamily,
xParaPropMapper, sPrefix );
@@ -780,7 +781,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT );
xTextPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
- sFamily = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_text) );
+ sFamily = OUString( GetXMLToken(XML_TEXT) );
sPrefix = OUString( 'T' );
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_TEXT, sFamily,
xTextPropMapper, sPrefix );
@@ -796,14 +797,14 @@ XMLTextParagraphExport::XMLTextParagraphExport(
xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION );
xSectionPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
- sFamily = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_section ) );
+ sFamily = OUString( GetXMLToken( XML_SECTION ) );
sPrefix = OUString( RTL_CONSTASCII_USTRINGPARAM( "Sect" ) );
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_SECTION, sFamily,
xSectionPropMapper, sPrefix );
xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY );
xRubyPropMapper = new SvXMLExportPropertyMapper( xPropMapper );
- sFamily = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_ruby ) );
+ sFamily = OUString( GetXMLToken( XML_RUBY ) );
sPrefix = OUString( RTL_CONSTASCII_USTRINGPARAM( "Ru" ) );
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_RUBY, sFamily,
xRubyPropMapper, sPrefix );
@@ -824,7 +825,8 @@ XMLTextParagraphExport::XMLTextParagraphExport(
sal_Bool bTmp = sal_True;
aAny.setValue(&bTmp, ::getBooleanCppuType());
sal_Int32 nIndex = xTextPropMapper->getPropertySetMapper()->FindEntryIndex(
- "", XML_NAMESPACE_STYLE, sXML_text_combine);
+ "", XML_NAMESPACE_STYLE,
+ GetXMLToken(XML_TEXT_COMBINE));
pFieldExport = new XMLTextFieldExport( rExp, new XMLPropertyState( nIndex, aAny ) );
}
@@ -1412,7 +1414,7 @@ void XMLTextParagraphExport::exportParagraph(
OUString sAutoStyle( sStyle );
sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_PARAGRAPH, xPropSet, sStyle );
if( sAutoStyle.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
sAutoStyle );
if( rPropSetHelper.hasProperty( PARA_CONDITIONAL_STYLE_NAME ) )
@@ -1426,7 +1428,7 @@ void XMLTextParagraphExport::exportParagraph(
sCondStyle );
if( sCondStyle.getLength() )
GetExport().AddAttribute( XML_NAMESPACE_TEXT,
- sXML_cond_style_name,
+ XML_COND_STYLE_NAME,
sCondStyle );
}
}
@@ -1439,7 +1441,7 @@ void XMLTextParagraphExport::exportParagraph(
{
OUStringBuffer sTmp;
sTmp.append( (sal_Int32)nOutlineLevel+1L );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_level,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL,
sTmp.makeStringAndClear() );
}
}
@@ -1470,9 +1472,9 @@ void XMLTextParagraphExport::exportParagraph(
}
else
{
- const sal_Char *pElem =
- -1 == nOutlineLevel ? sXML_p : sXML_h;
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, pElem,
+ enum XMLTokenEnum eElem =
+ -1 == nOutlineLevel ? XML_P : XML_H;
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, eElem,
sal_True, sal_False );
if( xContentEnum.is() )
exportTextContentEnumeration( xContentEnum, bAutoStyles, xSection,
@@ -1484,10 +1486,10 @@ void XMLTextParagraphExport::exportParagraph(
// bookmarks, reference marks (and TOC marks) are the same except for the
// element names. We use the same method for export and it an array with
// the proper element names
-static const sal_Char* lcl_XmlReferenceElements[] = {
- sXML_reference_mark, sXML_reference_mark_start, sXML_reference_mark_end };
-static const sal_Char* lcl_XmlBookmarkElements[] = {
- sXML_bookmark, sXML_bookmark_start, sXML_bookmark_end };
+static const enum XMLTokenEnum lcl_XmlReferenceElements[] = {
+ XML_REFERENCE_MARK, XML_REFERENCE_MARK_START, XML_REFERENCE_MARK_END };
+static const enum XMLTokenEnum lcl_XmlBookmarkElements[] = {
+ XML_BOOKMARK, XML_BOOKMARK_START, XML_BOOKMARK_END };
void XMLTextParagraphExport::exportTextRangeEnumeration(
@@ -1639,7 +1641,7 @@ void XMLTextParagraphExport::exportTextField(
void XMLTextParagraphExport::exportTextMark(
const Reference<XPropertySet> & rPropSet,
const OUString sProperty,
- const sal_Char* pElements[],
+ const enum XMLTokenEnum pElements[],
sal_Bool bAutoStyles)
{
// mib said: "Hau wech!"
@@ -1660,7 +1662,7 @@ void XMLTextParagraphExport::exportTextMark(
// name element
Reference<XNamed> xName(xRefMark, UNO_QUERY);
- GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_name,
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME,
xName->getName());
// start, end, or point-reference?
@@ -1717,7 +1719,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
{
OUString sName( xNamed->getName() );
if( sName.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_name,
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_NAME,
xNamed->getName() );
}
@@ -1733,7 +1735,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
OUString sTmp;
aAnchorTypeHdl.exportXML( sTmp, aAny,
GetExport().GetMM100UnitConverter() );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_anchor_type, sTmp );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_TYPE, sTmp );
}
// text:anchor-page-number
@@ -1744,7 +1746,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
aAny >>= nPage;
GetExport().GetMM100UnitConverter().convertNumber( sValue,
(sal_Int32)nPage );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_anchor_page_number,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_PAGE_NUMBER,
sValue.makeStringAndClear() );
}
@@ -1760,7 +1762,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
Any aAny = rPropSet->getPropertyValue( sHoriOrientPosition );
aAny >>= nPos;
GetExport().GetMM100UnitConverter().convertMeasure( sValue, nPos );
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_x,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_X,
sValue.makeStringAndClear() );
}
}
@@ -1779,7 +1781,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
Any aAny = rPropSet->getPropertyValue( sVertOrientPosition );
aAny >>= nPos;
GetExport().GetMM100UnitConverter().convertMeasure( sValue, nPos );
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_y,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_Y,
sValue.makeStringAndClear() );
}
if( bShape )
@@ -1796,7 +1798,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
aAny = rPropSet->getPropertyValue( sWidth );
aAny >>= nWidth;
GetExport().GetMM100UnitConverter().convertMeasure( sValue, nWidth );
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_width,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH,
sValue.makeStringAndClear() );
}
sal_Bool bSyncWidth = sal_False;
@@ -1805,8 +1807,8 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
aAny = rPropSet->getPropertyValue( sIsSyncWidthToHeight );
bSyncWidth = *(sal_Bool *)aAny.getValue();
if( bSyncWidth )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_rel_width,
- sXML_scale );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_WIDTH,
+ XML_SCALE );
}
if( !bSyncWidth && xPropSetInfo->hasPropertyByName( sRelativeWidth ) )
{
@@ -1819,7 +1821,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
{
GetExport().GetMM100UnitConverter().convertPercent( sValue,
nRelWidth );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_rel_width,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_WIDTH,
sValue.makeStringAndClear() );
}
}
@@ -1851,16 +1853,16 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
GetExport().GetMM100UnitConverter().convertMeasure( sValue,
nHeight );
if( SizeType::MIN == nSizeType && 0==nRelHeight && !bSyncHeight )
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_min_height,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_MIN_HEIGHT,
sValue.makeStringAndClear() );
else
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_height,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT,
sValue.makeStringAndClear() );
}
if( bSyncHeight )
{
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_rel_height,
- SizeType::MIN == nSizeType ? sXML_scale_min : sXML_scale );
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_HEIGHT,
+ SizeType::MIN == nSizeType ? XML_SCALE_MIN : XML_SCALE );
}
else if( nRelHeight > 0 )
@@ -1868,10 +1870,10 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
GetExport().GetMM100UnitConverter().convertPercent( sValue,
nRelHeight );
if( SizeType::MIN == nSizeType )
- GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_min_height,
+ GetExport().AddAttribute( XML_NAMESPACE_FO, XML_MIN_HEIGHT,
sValue.makeStringAndClear() );
else
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_rel_height,
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_HEIGHT,
sValue.makeStringAndClear() );
}
@@ -1885,7 +1887,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
{
GetExport().GetMM100UnitConverter().convertNumber( sValue,
nZIndex );
- GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_zindex,
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_ZINDEX,
sValue.makeStringAndClear() );
}
}
@@ -1912,7 +1914,7 @@ void XMLTextParagraphExport::_exportTextFrame(
OUString sAutoStyle( sStyle );
sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_FRAME, rPropSet, sStyle );
if( sAutoStyle.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME,
sAutoStyle );
addTextFrameAttributes( rPropSet, sal_False );
@@ -1923,12 +1925,12 @@ void XMLTextParagraphExport::_exportTextFrame(
aAny = rPropSet->getPropertyValue( sChainNextName );
if( (aAny >>= sNext) && sNext.getLength() > 0 )
GetExport().AddAttribute( XML_NAMESPACE_DRAW,
- sXML_chain_next_name,
+ XML_CHAIN_NEXT_NAME,
sNext );
}
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_DRAW,
- sXML_text_box, sal_False, sal_True );
+ XML_TEXT_BOX, sal_False, sal_True );
// frame bound frames
exportFramesBoundToFrame( xTxtFrame, bProgress );
@@ -1972,11 +1974,11 @@ void XMLTextParagraphExport::exportTextFrame(
pRangePropSet &&
lcl_txtpara_isBoundAsChar( xPropSet, xPropSetInfo ) &&
addTextStyleAttribute( *pRangePropSet ),
- XML_NAMESPACE_TEXT, sXML_span, sal_False, sal_False );
+ XML_NAMESPACE_TEXT, XML_SPAN, sal_False, sal_False );
{
SvXMLElementExport aElem( GetExport(),
addHyperlinkAttributes( xPropSet, xPropState,xPropSetInfo ),
- XML_NAMESPACE_DRAW, sXML_a, sal_False, sal_False );
+ XML_NAMESPACE_DRAW, XML_A, sal_False, sal_False );
_exportTextFrame( xPropSet, xPropSetInfo, bProgress );
}
}
@@ -2030,7 +2032,7 @@ void XMLTextParagraphExport::exportContour(
GetExport().GetMM100UnitConverter().convertMeasurePx(aStringBuffer, aSize.Width);
else
GetExport().GetMM100UnitConverter().convertMeasure(aStringBuffer, aSize.Width);
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_width,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH,
aStringBuffer.makeStringAndClear() );
// svg: height
@@ -2038,17 +2040,17 @@ void XMLTextParagraphExport::exportContour(
GetExport().GetMM100UnitConverter().convertMeasurePx(aStringBuffer, aSize.Height);
else
GetExport().GetMM100UnitConverter().convertMeasure(aStringBuffer, aSize.Height);
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_height,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT,
aStringBuffer.makeStringAndClear() );
// svg:viewbox
SdXMLImExViewBox aViewBox(0, 0, aSize.Width, aSize.Height);
- GetExport().AddAttribute(XML_NAMESPACE_SVG, sXML_viewBox,
+ GetExport().AddAttribute(XML_NAMESPACE_SVG, XML_VIEWBOX,
aViewBox.GetExportString(GetExport().GetMM100UnitConverter()));
sal_Int32 nOuterCnt( aSourcePolyPolygon.getLength() );
- const sal_Char *pElem = 0;
+ enum XMLTokenEnum eElem = XML_TOKEN_INVALID;
if( 1L == nOuterCnt )
{
// simple polygon shape, can be written as svg:points sequence
@@ -2059,9 +2061,9 @@ void XMLTextParagraphExport::exportContour(
aSize, GetExport().GetMM100UnitConverter() );
// write point array
- GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_points,
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_POINTS,
aPoints.GetExportString());
- pElem = sXML_contour_polygon;
+ eElem = XML_CONTOUR_POLYGON;
}
else
{
@@ -2085,9 +2087,9 @@ void XMLTextParagraphExport::exportContour(
}
// write point array
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_d,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_D,
aSvgDElement.GetExportString());
- pElem = sXML_contour_path;
+ eElem = XML_CONTOUR_PATH;
}
}
@@ -2095,13 +2097,12 @@ void XMLTextParagraphExport::exportContour(
{
aAny = rPropSet->getPropertyValue( sIsAutomaticContour );
if( *(sal_Bool *)aAny.getValue() )
- GetExport().AddAttributeASCII( XML_NAMESPACE_DRAW,
- sXML_recreate_on_edit,
- sXML_true );
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW,
+ XML_RECREATE_ON_EDIT, XML_TRUE );
}
// write object now
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_DRAW, pElem,
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_DRAW, eElem,
sal_True, sal_True );
}
@@ -2120,7 +2121,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
OUString sAutoStyle( sStyle );
sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_FRAME, rPropSet, sStyle );
if( sAutoStyle.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME,
sAutoStyle );
addTextFrameAttributes( rPropSet, sal_False );
@@ -2134,13 +2135,11 @@ void XMLTextParagraphExport::_exportTextGraphic(
// If there still is no url, then then graphic is empty
if( sURL.getLength() )
{
- GetExport().AddAttribute(XML_NAMESPACE_XLINK, sXML_href, sURL );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type,
- sXML_simple );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show,
- sXML_embed );
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate,
- sXML_onLoad );
+ GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sURL );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE,
+ XML_ONLOAD );
}
// draw:filter-name
@@ -2148,7 +2147,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
aAny = rPropSet->getPropertyValue( sGraphicFilter );
aAny >>= sGrfFilter;
if( sGrfFilter.getLength() )
- GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_filter_name,
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_FILTER_NAME,
sGrfFilter );
// svg:transform
@@ -2157,17 +2156,17 @@ void XMLTextParagraphExport::_exportTextGraphic(
aAny >>= nVal;
if( nVal != 0 )
{
- OUStringBuffer sRet( sizeof(sXML_rotate)+4 );
- sRet.appendAscii(sXML_rotate);
+ OUStringBuffer sRet( GetXMLToken(XML_ROTATE).getLength()+4 );
+ sRet.append( GetXMLToken(XML_ROTATE));
sRet.append( (sal_Unicode)'(' );
GetExport().GetMM100UnitConverter().convertNumber( sRet, (sal_Int32)nVal );
sRet.append( (sal_Unicode)')' );
- GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_transform,
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_TRANSFORM,
sRet.makeStringAndClear() );
}
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_DRAW,
- sXML_image, sal_False, sal_True );
+ XML_IMAGE, sal_False, sal_True );
// optional office:binary-data
GetExport().AddEmbeddedGraphicObjectAsBase64( sOrigURL );
@@ -2185,7 +2184,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
if( sAltText.getLength() )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
- sXML_desc, sal_True, sal_False );
+ XML_DESC, sal_True, sal_False );
GetExport().GetDocHandler()->characters( sAltText );
}
*/
@@ -2222,11 +2221,11 @@ void XMLTextParagraphExport::exportTextGraphic(
pRangePropSet &&
lcl_txtpara_isBoundAsChar( xPropSet, xPropSetInfo ) &&
addTextStyleAttribute( *pRangePropSet ),
- XML_NAMESPACE_TEXT, sXML_span, sal_False, sal_False );
+ XML_NAMESPACE_TEXT, XML_SPAN, sal_False, sal_False );
{
SvXMLElementExport aElem( GetExport(),
addHyperlinkAttributes( xPropSet, xPropState,xPropSetInfo ),
- XML_NAMESPACE_DRAW, sXML_a, sal_False, sal_False );
+ XML_NAMESPACE_DRAW, XML_A, sal_False, sal_False );
_exportTextGraphic( xPropSet, xPropSetInfo );
}
}
@@ -2255,7 +2254,7 @@ void XMLTextParagraphExport::exportShape(
lcl_txtpara_isBoundAsChar( xPropSet,
xPropSet->getPropertySetInfo() ) &&
addTextStyleAttribute( *pRangePropSet ),
- XML_NAMESPACE_TEXT, sXML_span, sal_False, sal_False );
+ XML_NAMESPACE_TEXT, XML_SPAN, sal_False, sal_False );
sal_Int32 nFeatures = addTextFrameAttributes( xPropSet, sal_True );
GetExport().GetShapeExport()->exportShape( xShape, nFeatures );
}
@@ -2298,7 +2297,7 @@ void XMLTextParagraphExport::exportAlternativeText(
if( sAltText.getLength() )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
- sXML_desc, sal_True, sal_False );
+ XML_DESC, sal_True, sal_False );
GetExport().GetDocHandler()->characters( sAltText );
}
}
@@ -2327,11 +2326,11 @@ void XMLTextParagraphExport::exportTextEmbedded(
pRangePropSet &&
lcl_txtpara_isBoundAsChar( xPropSet, xPropSetInfo ) &&
addTextStyleAttribute( *pRangePropSet ),
- XML_NAMESPACE_TEXT, sXML_span, sal_False, sal_False );
+ XML_NAMESPACE_TEXT, XML_SPAN, sal_False, sal_False );
{
SvXMLElementExport aElem( GetExport(),
addHyperlinkAttributes( xPropSet, xPropState,xPropSetInfo ),
- XML_NAMESPACE_DRAW, sXML_a, sal_False, sal_False );
+ XML_NAMESPACE_DRAW, XML_A, sal_False, sal_False );
_exportTextEmbedded( xPropSet, xPropSetInfo );
}
}
@@ -2353,10 +2352,10 @@ void XMLTextParagraphExport::_exportTextRange(
OUString sText = rTextRange->getString();
if( sStyle.getLength() )
{
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
sStyle );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_span, sal_False, sal_False );
+ XML_SPAN, sal_False, sal_False );
exportText( sText, rPrevCharIsSpace );
}
else
@@ -2438,36 +2437,33 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
if( bExport )
{
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type,
- sXML_simple );
- GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference( sHRef ) );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference( sHRef ) );
if( sName.getLength() > 0 )
- GetExport().AddAttribute( XML_NAMESPACE_OFFICE, sXML_name, sName );
+ GetExport().AddAttribute( XML_NAMESPACE_OFFICE, XML_NAME, sName );
if( sTargetFrame.getLength() )
{
GetExport().AddAttribute( XML_NAMESPACE_OFFICE,
- sXML_target_frame_name, sTargetFrame );
- const sal_Char *pStr =
+ XML_TARGET_FRAME_NAME, sTargetFrame );
+ enum XMLTokenEnum eTok =
sTargetFrame.equalsAsciiL( "_blank", sizeof("_blank")-1 )
- ? sXML_new : sXML_replace;
- GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK,
- sXML_show, pStr );
+ ? XML_NEW : XML_REPLACE;
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, eTok );
}
if( bServerMap )
- GetExport().AddAttributeASCII( XML_NAMESPACE_OFFICE,
- sXML_server_map,
- sXML_true );
+ GetExport().AddAttribute( XML_NAMESPACE_OFFICE,
+ XML_SERVER_MAP, XML_TRUE );
if( sUStyleName.getLength() )
GetExport().AddAttribute( XML_NAMESPACE_TEXT,
- sXML_style_name, sUStyleName );
+ XML_STYLE_NAME, sUStyleName );
if( sVStyleName.getLength() )
GetExport().AddAttribute( XML_NAMESPACE_TEXT,
- sXML_visited_style_name, sVStyleName );
+ XML_VISITED_STYLE_NAME, sVStyleName );
}
return bExport;
@@ -2481,7 +2477,7 @@ sal_Bool XMLTextParagraphExport::addTextStyleAttribute(
if( sStyle.getLength() )
{
GetExport().AddAttribute( XML_NAMESPACE_TEXT,
- sXML_style_name, sStyle );
+ XML_STYLE_NAME, sStyle );
bRet = sal_True;
}
@@ -2510,7 +2506,7 @@ void XMLTextParagraphExport::exportTextRange(
{
addHyperlinkAttributes( xPropSet, xPropState, xPropSetInfo );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_a, sal_False, sal_False );
+ XML_A, sal_False, sal_False );
// export events (if supported)
OUString sHyperLinkEvents(RTL_CONSTASCII_USTRINGPARAM(
@@ -2598,12 +2594,12 @@ void XMLTextParagraphExport::exportText( const OUString& rText,
{
OUStringBuffer sTmp;
sTmp.append( (sal_Int32)nSpaceChars );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_c,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_C,
sTmp.makeStringAndClear() );
}
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_s, sal_False, sal_False );
+ XML_S, sal_False, sal_False );
nSpaceChars = 0;
}
@@ -2617,14 +2613,14 @@ void XMLTextParagraphExport::exportText( const OUString& rText,
case 0x0009: // Tab
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_tab_stop, sal_False,
+ XML_TAB_STOP, sal_False,
sal_False );
}
break;
case 0x000A: // LF
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- sXML_line_break, sal_False,
+ XML_LINE_BREAK, sal_False,
sal_False );
}
break;
@@ -2661,11 +2657,11 @@ void XMLTextParagraphExport::exportText( const OUString& rText,
{
OUStringBuffer sTmp;
sTmp.append( (sal_Int32)nSpaceChars );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_c,
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_C,
sTmp.makeStringAndClear() );
}
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, sXML_s,
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, XML_S,
sal_False, sal_False );
}
}
@@ -2689,11 +2685,11 @@ void XMLTextParagraphExport::exportTextDeclarations()
aAny >>= sUrl;
if (sUrl.getLength() > 0)
{
- GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href,
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF,
GetExport().GetRelativeReference(sUrl) );
SvXMLElementExport aAutoMarkElement(
GetExport(), XML_NAMESPACE_TEXT,
- sXML_alphabetical_index_auto_mark_file,
+ XML_ALPHABETICAL_INDEX_AUTO_MARK_FILE,
sal_True, sal_True );
}
}
@@ -2791,10 +2787,10 @@ void XMLTextParagraphExport::exportRuby(
else
{
// prepare element names
- OUString sRuby(RTL_CONSTASCII_USTRINGPARAM(sXML_ruby));
+ OUString sRuby(GetXMLToken(XML_RUBY));
OUString sTextRuby(GetExport().GetNamespaceMap().
GetQNameByKey(XML_NAMESPACE_TEXT, sRuby));
- OUString sRubyBase(RTL_CONSTASCII_USTRINGPARAM(sXML_ruby_base));
+ OUString sRubyBase(GetXMLToken(XML_RUBY_BASE));
OUString sTextRubyBase(GetExport().GetNamespaceMap().
GetQNameByKey(XML_NAMESPACE_TEXT, sRubyBase));
@@ -2820,7 +2816,7 @@ void XMLTextParagraphExport::exportRuby(
sEmpty );
DBG_ASSERT(sStyleName.getLength() > 0, "I can't find the style!");
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
- sXML_style_name, sStyleName);
+ XML_STYLE_NAME, sStyleName);
// export <text:ruby> and <text:ruby-base> start elements
GetExport().GetDocHandler()->startElement(
@@ -2847,11 +2843,11 @@ void XMLTextParagraphExport::exportRuby(
{
if (sOpenRubyCharStyle.getLength() > 0)
GetExport().AddAttribute(
- XML_NAMESPACE_TEXT, sXML_style_name,
+ XML_NAMESPACE_TEXT, XML_STYLE_NAME,
sOpenRubyCharStyle);
SvXMLElementExport aRuby(
- GetExport(), XML_NAMESPACE_TEXT, sXML_ruby_text,
+ GetExport(), XML_NAMESPACE_TEXT, XML_RUBY_TEXT,
sal_False, sal_False);
GetExport().GetDocHandler()->characters(sOpenRubyText);
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 48ba341f4809..a42ec1ad5ffb 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtparai.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: dvo $ $Date: 2001-06-22 16:35:55 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,9 +103,6 @@
#ifndef _XMLOFF_XMLIMP_HXX
#include "xmlimp.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
#ifndef _XMLOFF_XMLTOKEN_HXX
#include "xmltoken.hxx"
#endif
@@ -428,7 +425,7 @@ XMLImpCharContext_Impl::XMLImpCharContext_Impl(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( XML_NAMESPACE_TEXT == nPrefix &&
- aLocalName.compareToAscii( sXML_c ) == 0 )
+ IsXMLToken( aLocalName, XML_C ) )
{
sal_Int32 nTmp = xAttrList->getValueByIndex(i).toInt32();
if( nTmp > 0L )
@@ -444,14 +441,14 @@ XMLImpCharContext_Impl::XMLImpCharContext_Impl(
if( 1U == nCount )
{
- OUString sBuff( c );
+ OUString sBuff( &c, 1 );
GetImport().GetTextImport()->InsertString( sBuff );
}
else
{
OUStringBuffer sBuff( nCount );
while( nCount-- )
- sBuff.append( c );
+ sBuff.append( &c, 1 );
GetImport().GetTextImport()->InsertString( sBuff.makeStringAndClear() );
}
@@ -484,7 +481,7 @@ public:
XMLStartReferenceContext_Impl (
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
XMLHints_Impl& rHnts,
const Reference<xml::sax::XAttributeList> & xAttrList);
};
@@ -494,7 +491,7 @@ TYPEINIT1( XMLStartReferenceContext_Impl, SvXMLImportContext );
XMLStartReferenceContext_Impl::XMLStartReferenceContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
XMLHints_Impl& rHints,
const Reference<xml::sax::XAttributeList> & xAttrList) :
SvXMLImportContext(rImport, nPrefix, rLocalName)
@@ -527,7 +524,7 @@ public:
XMLEndReferenceContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
XMLHints_Impl& rHnts,
const Reference<xml::sax::XAttributeList> & xAttrList);
};
@@ -537,7 +534,7 @@ TYPEINIT1( XMLEndReferenceContext_Impl, SvXMLImportContext );
XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
XMLHints_Impl& rHints,
const Reference<xml::sax::XAttributeList> & xAttrList) :
SvXMLImportContext(rImport, nPrefix, rLocalName)
@@ -698,10 +695,10 @@ XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl(
if( sShow.getLength() && !pHint->GetTargetFrameName().getLength() )
{
- if( sShow.equalsAsciiL( sXML_new, sizeof(sXML_new)-1 ) )
+ if( IsXMLToken( sShow, XML_NEW ) )
pHint->SetTargetFrameName(
OUString( RTL_CONSTASCII_USTRINGPARAM("_blank" ) ) );
- else if( sShow.equalsAsciiL( sXML_replace, sizeof(sXML_replace)-1 ) )
+ else if( IsXMLToken( sShow, XML_REPLACE ) )
pHint->SetTargetFrameName(
OUString( RTL_CONSTASCII_USTRINGPARAM("_self" ) ) );
}
@@ -720,7 +717,7 @@ SvXMLImportContext *XMLImpHyperlinkContext_Impl::CreateChildContext(
const Reference< xml::sax::XAttributeList > & xAttrList )
{
if ( (nPrefix == XML_NAMESPACE_OFFICE) &&
- (rLocalName.equalsAsciiL(sXML_events, sizeof(sXML_events)-1)))
+ IsXMLToken(rLocalName, XML_EVENTS) )
{
XMLEventsImportContext* pCtxt = new XMLEventsImportContext(
GetImport(), nPrefix, rLocalName);
@@ -854,8 +851,7 @@ XMLImpRubyTextContext_Impl::XMLImpRubyTextContext_Impl(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( XML_NAMESPACE_TEXT == nPrefix &&
- aLocalName.equalsAsciiL( sXML_style_name,
- sizeof(sXML_style_name)-1 ) )
+ IsXMLToken( aLocalName, XML_STYLE_NAME ) )
{
pHint->SetTextStyleName( rValue );
break;
@@ -926,8 +922,7 @@ XMLImpRubyContext_Impl::XMLImpRubyContext_Impl(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( XML_NAMESPACE_TEXT == nPrefix &&
- aLocalName.equalsAsciiL( sXML_style_name,
- sizeof(sXML_style_name)-1 ) )
+ IsXMLToken( aLocalName, XML_STYLE_NAME ) )
{
pHint->SetStyleName( rValue );
break;
@@ -950,15 +945,13 @@ SvXMLImportContext *XMLImpRubyContext_Impl::CreateChildContext(
SvXMLImportContext *pContext;
if( XML_NAMESPACE_TEXT == nPrefix )
{
- if( rLocalName.equalsAsciiL( sXML_ruby_base,
- sizeof(sXML_ruby_base)-1 ) )
+ if( IsXMLToken( rLocalName, XML_RUBY_BASE ) )
pContext = new XMLImpRubyBaseContext_Impl( GetImport(), nPrefix,
rLocalName,
xAttrList,
rHints,
rIgnoreLeadingSpace );
- else if( rLocalName.equalsAsciiL( sXML_ruby_text,
- sizeof(sXML_ruby_text)-1 ) )
+ else if( IsXMLToken( rLocalName, XML_RUBY_TEXT ) )
pContext = new XMLImpRubyTextContext_Impl( GetImport(), nPrefix,
rLocalName,
xAttrList,
@@ -995,7 +988,7 @@ public:
XMLIndexMarkImportContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
enum XMLTextPElemTokens nTok,
XMLHints_Impl& rHnts);
@@ -1033,7 +1026,7 @@ TYPEINIT1( XMLIndexMarkImportContext_Impl, SvXMLImportContext );
XMLIndexMarkImportContext_Impl::XMLIndexMarkImportContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
enum XMLTextPElemTokens eTok,
XMLHints_Impl& rHnts) :
SvXMLImportContext(rImport, nPrefix, rLocalName),
@@ -1162,8 +1155,7 @@ void XMLIndexMarkImportContext_Impl::ProcessAttribute(
case XML_TOK_TEXT_USER_INDEX_MARK:
case XML_TOK_TEXT_ALPHA_INDEX_MARK:
if ( (XML_NAMESPACE_TEXT == nNamespace) &&
- sLocalName.equalsAsciiL(sXML_string_value,
- sizeof(sXML_string_value)-1))
+ IsXMLToken( sLocalName, XML_STRING_VALUE ) )
{
Any aAny;
aAny <<= sValue;
@@ -1179,7 +1171,7 @@ void XMLIndexMarkImportContext_Impl::ProcessAttribute(
case XML_TOK_TEXT_USER_INDEX_MARK_END:
case XML_TOK_TEXT_ALPHA_INDEX_MARK_END:
if ( (XML_NAMESPACE_TEXT == nNamespace) &&
- sLocalName.equalsAsciiL(sXML_id, sizeof(sXML_id)-1) )
+ IsXMLToken( sLocalName, XML_ID ) )
{
sID = sValue;
}
@@ -1280,7 +1272,7 @@ public:
XMLTOCMarkImportContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
enum XMLTextPElemTokens nTok,
XMLHints_Impl& rHnts);
@@ -1297,7 +1289,7 @@ TYPEINIT1( XMLTOCMarkImportContext_Impl, XMLIndexMarkImportContext_Impl );
XMLTOCMarkImportContext_Impl::XMLTOCMarkImportContext_Impl(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const String& rLocalName,
+ SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
enum XMLTextPElemTokens nTok, XMLHints_Impl& rHnts) :
XMLIndexMarkImportContext_Impl(rImport, nPrefix, rLocalName,
nTok, rHnts),
@@ -1314,8 +1306,7 @@ void XMLTOCMarkImportContext_Impl::ProcessAttribute(
DBG_ASSERT(rPropSet.is(), "need PropertySet");
if ((XML_NAMESPACE_TEXT == nNamespace) &&
- sLocalName.equalsAsciiL(sXML_outline_level,
- sizeof(sXML_outline_level)-1))
+ IsXMLToken( sLocalName, XML_OUTLINE_LEVEL ) )
{
// ouline level: set Level property
sal_Int32 nTmp;
@@ -1348,7 +1339,7 @@ public:
XMLUserIndexMarkImportContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
enum XMLTextPElemTokens nTok,
XMLHints_Impl& rHnts);
@@ -1364,7 +1355,7 @@ protected:
TYPEINIT1( XMLUserIndexMarkImportContext_Impl, XMLIndexMarkImportContext_Impl);
XMLUserIndexMarkImportContext_Impl::XMLUserIndexMarkImportContext_Impl(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const String& rLocalName,
+ SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
enum XMLTextPElemTokens nTok, XMLHints_Impl& rHnts) :
XMLIndexMarkImportContext_Impl(rImport, nPrefix, rLocalName,
nTok, rHnts),
@@ -1426,7 +1417,7 @@ public:
XMLAlphaIndexMarkImportContext_Impl(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
- const String& rLocalName,
+ const OUString& rLocalName,
enum XMLTextPElemTokens nTok,
XMLHints_Impl& rHnts);
@@ -1443,7 +1434,7 @@ TYPEINIT1( XMLAlphaIndexMarkImportContext_Impl,
XMLIndexMarkImportContext_Impl );
XMLAlphaIndexMarkImportContext_Impl::XMLAlphaIndexMarkImportContext_Impl(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const String& rLocalName,
+ SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
enum XMLTextPElemTokens nTok, XMLHints_Impl& rHnts) :
XMLIndexMarkImportContext_Impl(rImport, nPrefix, rLocalName,
nTok, rHnts),
@@ -1458,13 +1449,13 @@ void XMLAlphaIndexMarkImportContext_Impl::ProcessAttribute(
{
if (XML_NAMESPACE_TEXT == nNamespace)
{
- if (sLocalName.equalsAsciiL(sXML_key1, sizeof(sXML_key1)-1))
+ if ( IsXMLToken( sLocalName, XML_KEY1 ) )
{
Any aAny;
aAny <<= sValue;
rPropSet->setPropertyValue(sPrimaryKey, aAny);
}
- else if (sLocalName.equalsAsciiL(sXML_key2, sizeof(sXML_key2)-1))
+ else if ( IsXMLToken( sLocalName, XML_KEY2 ) )
{
Any aAny;
aAny <<= sValue;
@@ -1520,7 +1511,7 @@ XMLImpSpanContext_Impl::XMLImpSpanContext_Impl(
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
&aLocalName );
if( XML_NAMESPACE_TEXT == nPrefix &&
- aLocalName.compareToAscii( sXML_style_name ) == 0 )
+ IsXMLToken( aLocalName, XML_STYLE_NAME ) )
aStyleName = xAttrList->getValueByIndex( i );
}
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 5570e27720b7..1eea29fc5eb5 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtprhdl.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: mib $ $Date: 2001-06-20 12:01:47 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,8 +114,8 @@
#ifndef _XMLOFF_XMLUCONV_HXX
#include "xmluconv.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_XMLANCHORTYPEPROPHDL_HXX
#include "XMLAnchorTypePropHdl.hxx"
@@ -390,11 +390,9 @@ sal_Bool XMLOpaquePropHdl_Impl::importXML(
{
sal_Bool bRet = sal_True;
sal_Bool bVal = sal_False;
- if( rStrImpValue.equalsAsciiL(
- CONSTASCII_USTRINGPARAM_CMP( sXML_foreground ) ) )
+ if( IsXMLToken( rStrImpValue, XML_FOREGROUND ) )
bVal = sal_True;
- else if( !rStrImpValue.equalsAsciiL(
- CONSTASCII_USTRINGPARAM_CMP( sXML_background ) ) )
+ else if( !IsXMLToken( rStrImpValue, XML_BACKGROUND ) )
bRet = sal_False;
if( bRet )
@@ -409,9 +407,9 @@ sal_Bool XMLOpaquePropHdl_Impl::exportXML(
const SvXMLUnitConverter& rUnitConverter ) const
{
if( *(sal_Bool *)rValue.getValue() )
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_foreground) );
+ rStrExpValue = GetXMLToken( XML_FOREGROUND );
else
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_background) );
+ rStrExpValue = GetXMLToken( XML_BACKGROUND );
return sal_True;
}
@@ -444,11 +442,9 @@ sal_Bool XMLContourModePropHdl_Impl::importXML(
{
sal_Bool bRet = sal_True;
sal_Bool bVal = sal_False;
- if( rStrImpValue.equalsAsciiL(
- CONSTASCII_USTRINGPARAM_CMP( sXML_outside ) ) )
+ if( IsXMLToken( rStrImpValue, XML_OUTSIDE ) )
bVal = sal_True;
- else if( !rStrImpValue.equalsAsciiL(
- CONSTASCII_USTRINGPARAM_CMP( sXML_full ) ) )
+ else if( ! IsXMLToken( rStrImpValue, XML_FULL ) )
bRet = sal_False;
if( bRet )
@@ -463,9 +459,9 @@ sal_Bool XMLContourModePropHdl_Impl::exportXML(
const SvXMLUnitConverter& rUnitConverter ) const
{
if( *(sal_Bool *)rValue.getValue() )
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_outside) );
+ rStrExpValue = GetXMLToken( XML_OUTSIDE );
else
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_full) );
+ rStrExpValue = GetXMLToken( XML_FULL );
return sal_True;
}
@@ -499,7 +495,7 @@ sal_Bool XMLParagraphOnlyPropHdl_Impl::importXML(
sal_Bool bRet = sal_True;
sal_Bool bVal = sal_False;
- if( !rStrImpValue.compareToAscii( sXML_no_limit ) == 0 )
+ if( ! IsXMLToken( rStrImpValue, XML_NO_LIMIT ) )
{
sal_Int32 nValue = 0;
bRet = rUnitConverter.convertNumber( nValue, rStrImpValue );
@@ -518,9 +514,9 @@ sal_Bool XMLParagraphOnlyPropHdl_Impl::exportXML(
const SvXMLUnitConverter& rUnitConverter ) const
{
if( *(sal_Bool *)rValue.getValue() )
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM("1") );
+ rStrExpValue = GetXMLToken( XML_1 );
else
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_no_limit) );
+ rStrExpValue = GetXMLToken( XML_NO_LIMIT );
return sal_True;
}
@@ -599,8 +595,8 @@ class XMLFrameProtectPropHdl_Impl : public XMLPropertyHandler
{
const OUString sVal;
public:
- XMLFrameProtectPropHdl_Impl( const sal_Char *pVal ) :
- sVal( OUString::createFromAscii(pVal) ) {}
+ XMLFrameProtectPropHdl_Impl( enum XMLTokenEnum eVal ) :
+ sVal( GetXMLToken(eVal) ) {}
virtual ~XMLFrameProtectPropHdl_Impl ();
virtual sal_Bool importXML(
@@ -620,7 +616,7 @@ sal_Bool XMLFrameProtectPropHdl_Impl::importXML(
{
sal_Bool bRet = sal_True;
sal_Bool bVal = sal_False;
- if( !rStrImpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP( sXML_none ) ) )
+ if( ! IsXMLToken( rStrImpValue, XML_NONE ) )
{
bRet = sal_False;
SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
@@ -650,7 +646,7 @@ sal_Bool XMLFrameProtectPropHdl_Impl::exportXML(
if( *(sal_Bool *)rValue.getValue() )
{
if( !rStrExpValue.getLength() ||
- rStrExpValue.equalsAsciiL(CONSTASCII_USTRINGPARAM_CMP(sXML_none)) )
+ IsXMLToken( rStrExpValue, XML_NONE ) )
{
rStrExpValue = sVal;
}
@@ -666,7 +662,7 @@ sal_Bool XMLFrameProtectPropHdl_Impl::exportXML(
}
else if( !rStrExpValue.getLength() )
{
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_none) );
+ rStrExpValue = GetXMLToken( XML_NONE );
}
return sal_True;
@@ -856,8 +852,8 @@ class XMLGrfMirrorPropHdl_Impl : public XMLPropertyHandler
sal_Bool bHori;
public:
- XMLGrfMirrorPropHdl_Impl( const sal_Char *pVal, sal_Bool bH ) :
- sVal( OUString::createFromAscii(pVal) ),
+ XMLGrfMirrorPropHdl_Impl( enum XMLTokenEnum eVal, sal_Bool bH ) :
+ sVal( GetXMLToken( eVal ) ),
bHori( bH ) {}
virtual ~XMLGrfMirrorPropHdl_Impl ();
@@ -878,7 +874,7 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::importXML(
{
sal_Bool bRet = sal_True;
sal_Bool bVal = sal_False;
- if( !rStrImpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP( sXML_none ) ) )
+ if( ! IsXMLToken( rStrImpValue, XML_NONE ) )
{
bRet = sal_False;
SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
@@ -887,8 +883,7 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::importXML(
{
bRet = sal_True;
if( aToken == sVal ||
- (bHori && aToken.equalsAsciiL(
- CONSTASCII_USTRINGPARAM_CMP( sXML_horizontal ) ) ) )
+ (bHori && IsXMLToken( aToken, XML_HORIZONTAL ) ) )
{
bVal = sal_True;
break;
@@ -910,15 +905,15 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::exportXML(
if( *(sal_Bool *)rValue.getValue() )
{
if( !rStrExpValue.getLength() ||
- rStrExpValue.equalsAsciiL(CONSTASCII_USTRINGPARAM_CMP(sXML_none)) )
+ IsXMLToken( rStrExpValue, XML_NONE ) )
{
rStrExpValue = sVal;
}
else if( bHori &&
- ( rStrExpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP(sXML_horizontal_on_left_pages)) ||
- rStrExpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP(sXML_horizontal_on_right_pages)) ) )
+ ( IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_LEFT_PAGES ) ||
+ IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_RIGHT_PAGES ) ))
{
- rStrExpValue = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_horizontal) );
+ rStrExpValue = GetXMLToken( XML_HORIZONTAL );
}
else
{
@@ -932,7 +927,7 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::exportXML(
}
else if( !rStrExpValue.getLength() )
{
- rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_none) );
+ rStrExpValue = GetXMLToken( XML_NONE );
}
return sal_True;
@@ -983,14 +978,12 @@ sal_Bool XMLTextEmphasizePropHdl_Impl::importXML(
SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
while( aTokenEnum.getNextToken( aToken ) )
{
- if( !bHasPos &&
- aToken.equalsAsciiL( sXML_above, sizeof(sXML_above)-1 ) )
+ if( !bHasPos && IsXMLToken( aToken, XML_ABOVE ) )
{
bBelow = sal_False;
bHasPos = sal_True;
}
- else if( !bHasPos &&
- aToken.equalsAsciiL( sXML_below, sizeof(sXML_below)-1 ) )
+ else if( !bHasPos && IsXMLToken( aToken, XML_BELOW ) )
{
bBelow = sal_True;
bHasPos = sal_True;
@@ -1041,9 +1034,9 @@ sal_Bool XMLTextEmphasizePropHdl_Impl::exportXML(
{
if( nType != 0 )
{
- const sal_Char *pPos = bBelow ? sXML_below : sXML_above;
+ enum XMLTokenEnum ePos = bBelow ? XML_BELOW : XML_ABOVE;
aOut.append( (sal_Unicode)' ' );
- aOut.appendAscii( pPos );
+ aOut.append( GetXMLToken(ePos) );
}
rStrExpValue = aOut.makeStringAndClear();
}
@@ -1164,8 +1157,8 @@ class XMLTextSyncWidthHeightPropHdl_Impl : public XMLPropertyHandler
const OUString sValue;
public:
- XMLTextSyncWidthHeightPropHdl_Impl( const sal_Char *pValue ) :
- sValue( OUString::createFromAscii(pValue) ) {}
+ XMLTextSyncWidthHeightPropHdl_Impl( enum XMLTokenEnum eValue ) :
+ sValue( GetXMLToken(eValue) ) {}
virtual ~XMLTextSyncWidthHeightPropHdl_Impl();
virtual sal_Bool importXML(
@@ -1305,13 +1298,13 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
pHdl = new XMLOpaquePropHdl_Impl;
break;
case XML_TYPE_TEXT_PROTECT_CONTENT:
- pHdl = new XMLFrameProtectPropHdl_Impl( sXML_content );
+ pHdl = new XMLFrameProtectPropHdl_Impl( XML_CONTENT );
break;
case XML_TYPE_TEXT_PROTECT_SIZE:
- pHdl = new XMLFrameProtectPropHdl_Impl( sXML_size );
+ pHdl = new XMLFrameProtectPropHdl_Impl( XML_SIZE );
break;
case XML_TYPE_TEXT_PROTECT_POSITION:
- pHdl = new XMLFrameProtectPropHdl_Impl( sXML_position );
+ pHdl = new XMLFrameProtectPropHdl_Impl( XML_POSITION );
break;
case XML_TYPE_TEXT_ANCHOR_TYPE:
pHdl = new XMLAnchorTypePropHdl;
@@ -1350,13 +1343,13 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
pHdl = new XMLConstantsPropertyHandler( pXML_VertRelAsChar_Enum, XML_TOKEN_INVALID );
break;
case XML_TYPE_TEXT_MIRROR_VERTICAL:
- pHdl = new XMLGrfMirrorPropHdl_Impl( sXML_vertical, sal_False );
+ pHdl = new XMLGrfMirrorPropHdl_Impl( XML_VERTICAL, sal_False );
break;
case XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT:
- pHdl = new XMLGrfMirrorPropHdl_Impl( sXML_horizontal_on_left_pages, sal_True );
+ pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_LEFT_PAGES, sal_True );
break;
case XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT:
- pHdl = new XMLGrfMirrorPropHdl_Impl( sXML_horizontal_on_right_pages, sal_True );
+ pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_RIGHT_PAGES, sal_True );
break;
case XML_TYPE_TEXT_CLIP:
pHdl = new XMLClipPropertyHandler;
@@ -1365,41 +1358,36 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
pHdl = new XMLTextEmphasizePropHdl_Impl;
break;
case XML_TYPE_TEXT_COMBINE:
- pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_lines ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) ) );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_LINES ),
+ GetXMLToken( XML_NONE ) );
break;
case XML_TYPE_TEXT_COMBINE_CHARACTERS:
- pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_letters ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) ) );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_LETTERS ),
+ GetXMLToken( XML_NONE ) );
break;
case XML_TYPE_TEXT_COMBINECHAR:
pHdl = new XMLTextCombineCharPropHdl_Impl;
break;
case XML_TYPE_TEXT_AUTOSPACE:
- pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_ideograph_alpha ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) ) );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_IDEOGRAPH_ALPHA ),
+ GetXMLToken( XML_NONE ) );
break;
case XML_TYPE_TEXT_PUNCTUATION_WRAP:
- pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_hanging ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_simple ) ) );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_HANGING ),
+ GetXMLToken( XML_SIMPLE ) );
break;
case XML_TYPE_TEXT_LINE_BREAK:
- pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_strict ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_normal ) ) );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_STRICT ),
+ GetXMLToken( XML_NORMAL ) );
break;
case XML_TYPE_TEXT_REL_WIDTH_HEIGHT:
pHdl = new XMLTextRelWidthHeightPropHdl_Impl;
break;
case XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT:
- pHdl = new XMLTextSyncWidthHeightPropHdl_Impl( sXML_scale );
+ pHdl = new XMLTextSyncWidthHeightPropHdl_Impl( XML_SCALE );
break;
case XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN:
- pHdl = new XMLTextSyncWidthHeightPropHdl_Impl( sXML_scale_min );
+ pHdl = new XMLTextSyncWidthHeightPropHdl_Impl( XML_SCALE_MIN );
break;
case XML_TYPE_TEXT_RUBY_ADJUST:
pHdl = new XMLConstantsPropertyHandler( pXML_RubyAdjust_Enum, XML_TOKEN_INVALID );
@@ -1411,9 +1399,8 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
pHdl = new XMLTextRotationAnglePropHdl_Impl;
break;
case XML_TYPE_TEXT_ROTATION_SCALE:
- pHdl = new XMLNamedBoolPropertyHdl(
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_fixed ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_line_height ) ) );
+ pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_FIXED ),
+ GetXMLToken( XML_LINE_HEIGHT ) );
break;
case XML_TYPE_TEXT_VERTICAL_ALIGN:
pHdl = new XMLConstantsPropertyHandler( pXML_VerticalAlign_Enum, XML_TOKEN_INVALID );
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index c38a965f2694..f806a3cf8ca4 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtprmap.cxx,v $
*
- * $Revision: 1.53 $
+ * $Revision: 1.54 $
*
- * last change: $Author: mib $ $Date: 2001-06-26 09:51:04 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,8 +66,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_TXTPRHDL_HXX
#include "txtprhdl.hxx"
@@ -78,142 +78,143 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::xmloff::token;
#define M_E( a, p, l, t, c ) \
- { a, XML_NAMESPACE_##p, sXML_##l, t, c }
+ { a, XML_NAMESPACE_##p, XML_##l, t, c }
#define M_ED( a, p, l, t, c ) \
- { a, XML_NAMESPACE_##p, sXML_##l, (t) | MID_FLAG_DEFAULT_ITEM_EXPORT, c }
+ { a, XML_NAMESPACE_##p, XML_##l, (t) | MID_FLAG_DEFAULT_ITEM_EXPORT, c }
XMLPropertyMapEntry aXMLParaPropMap[] =
{
// RES_LR_SPACE
- M_E( "ParaLeftMargin", FO, margin_left, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN ),
- M_E( "ParaLeftMarginRelative", FO, margin_left, XML_TYPE_PERCENT16, CTF_PARALEFTMARGIN_REL ),
- M_E( "ParaRightMargin", FO, margin_right, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN ),
- M_E( "ParaRightMarginRelative", FO, margin_right, XML_TYPE_PERCENT16, CTF_PARARIGHTMARGIN_REL ),
+ M_E( "ParaLeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN ),
+ M_E( "ParaLeftMarginRelative", FO, MARGIN_LEFT, XML_TYPE_PERCENT16, CTF_PARALEFTMARGIN_REL ),
+ M_E( "ParaRightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN ),
+ M_E( "ParaRightMarginRelative", FO, MARGIN_RIGHT, XML_TYPE_PERCENT16, CTF_PARARIGHTMARGIN_REL ),
// RES_UL_SPACE
- M_E( "ParaTopMargin", FO, margin_top, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARATOPMARGIN ),
- M_E( "ParaTopMarginRelative", FO, margin_top, XML_TYPE_PERCENT16, CTF_PARATOPMARGIN_REL ),
- M_E( "ParaBottomMargin", FO, margin_bottom, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN ),
- M_E( "ParaBottomMarginRelative",FO, margin_bottom, XML_TYPE_PERCENT16, CTF_PARABOTTOMMARGIN_REL ),
+ M_E( "ParaTopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARATOPMARGIN ),
+ M_E( "ParaTopMarginRelative", FO, MARGIN_TOP, XML_TYPE_PERCENT16, CTF_PARATOPMARGIN_REL ),
+ M_E( "ParaBottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN ),
+ M_E( "ParaBottomMarginRelative",FO, MARGIN_BOTTOM, XML_TYPE_PERCENT16, CTF_PARABOTTOMMARGIN_REL ),
// RES_CHRATR_CASEMAP
- M_E( "CharCaseMap", FO, font_variant, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
- M_E( "CharCaseMap", FO, text_transform, XML_TYPE_TEXT_CASEMAP, 0 ),
+ M_E( "CharCaseMap", FO, FONT_VARIANT, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
+ M_E( "CharCaseMap", FO, TEXT_TRANSFORM, XML_TYPE_TEXT_CASEMAP, 0 ),
// RES_CHRATR_COLOR
- M_ED( "CharColor", FO, color, XML_TYPE_COLORAUTO|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharColor", STYLE, use_window_font_color, XML_TYPE_ISAUTOCOLOR|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharColor", FO, COLOR, XML_TYPE_COLORAUTO|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharColor", STYLE, USE_WINDOW_FONT_COLOR, XML_TYPE_ISAUTOCOLOR|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_CONTOUR
- M_E( "CharContoured", STYLE, text_outline, XML_TYPE_BOOL, 0 ),
+ M_E( "CharContoured", STYLE, TEXT_OUTLINE, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_CROSSEDOUT
- M_E( "CharStrikeout", STYLE, text_crossing_out, XML_TYPE_TEXT_CROSSEDOUT, 0),
+ M_E( "CharStrikeout", STYLE, TEXT_CROSSING_OUT, XML_TYPE_TEXT_CROSSEDOUT, 0),
// RES_CHRATR_ESCAPEMENT
- M_E( "CharEscapement", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "CharEscapementHeight", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "CharEscapement", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "CharEscapementHeight", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
// RES_CHRATR_FONT
- M_ED( "CharFontName", STYLE, font_name, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME ),
+ M_ED( "CharFontName", STYLE, FONT_NAME, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME ),
#ifdef CONV_STAR_FONTS
- M_ED( "CharFontName", FO, font_family, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME ),
+ M_ED( "CharFontName", FO, FONT_FAMILY, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME ),
#else
- M_ED( "CharFontName", FO, font_family, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME ),
+ M_ED( "CharFontName", FO, FONT_FAMILY, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME ),
#endif
- M_ED( "CharFontStyleName",STYLE, font_style_name, XML_TYPE_STRING, CTF_FONTSTYLENAME ),
- M_ED( "CharFontFamily", STYLE, font_family_generic,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY ),
- M_ED( "CharFontPitch", STYLE, font_pitch, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH ),
- M_ED( "CharFontCharSet", STYLE, font_charset, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET ),
+ M_ED( "CharFontStyleName",STYLE, FONT_STYLE_NAME, XML_TYPE_STRING, CTF_FONTSTYLENAME ),
+ M_ED( "CharFontFamily", STYLE, FONT_FAMILY_GENERIC,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY ),
+ M_ED( "CharFontPitch", STYLE, FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH ),
+ M_ED( "CharFontCharSet", STYLE, FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET ),
// RES_CHRATR_FONTSIZE
- M_ED( "CharHeight", FO, font_size, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
- M_ED( "CharPropHeight",FO, font_size, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
- M_ED( "CharDiffHeight",STYLE,font_size_rel, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF ),
+ M_ED( "CharHeight", FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
+ M_ED( "CharPropHeight",FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
+ M_ED( "CharDiffHeight",STYLE,FONT_SIZE_REL, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF ),
// RES_CHRATR_KERNING
- M_E( "CharKerning", FO, letter_spacing, XML_TYPE_TEXT_KERNING, 0 ),
+ M_E( "CharKerning", FO, LETTER_SPACING, XML_TYPE_TEXT_KERNING, 0 ),
// RES_CHRATR_LANGUAGE
- M_ED( "CharLocale", FO, language, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharLocale", FO, country, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocale", FO, LANGUAGE, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocale", FO, COUNTRY, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_POSTURE
- M_E( "CharPosture", FO, font_style, XML_TYPE_TEXT_POSTURE, 0 ),
+ M_E( "CharPosture", FO, FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 ),
// RES_CHRATR_PROPORTIONALFONTSIZE
// TODO: not used?
// RES_CHRATR_SHADOWED
- M_E( "CharShadowed", FO, text_shadow, XML_TYPE_TEXT_SHADOWED, 0 ),
+ M_E( "CharShadowed", FO, TEXT_SHADOW, XML_TYPE_TEXT_SHADOWED, 0 ),
// RES_CHRATR_UNDERLINE
- M_E( "CharUnderline", STYLE, text_underline, XML_TYPE_TEXT_UNDERLINE, CTF_UNDERLINE ),
- M_E( "CharUnderlineColor", STYLE, text_underline_color, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, CTF_UNDERLINE_COLOR ),
- M_E( "CharUnderlineHasColor", STYLE, text_underline_color, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, CTF_UNDERLINE_HASCOLOR ),
+ M_E( "CharUnderline", STYLE, TEXT_UNDERLINE, XML_TYPE_TEXT_UNDERLINE, CTF_UNDERLINE ),
+ M_E( "CharUnderlineColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, CTF_UNDERLINE_COLOR ),
+ M_E( "CharUnderlineHasColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, CTF_UNDERLINE_HASCOLOR ),
// RES_CHRATR_WEIGHT
- M_E( "CharWeight", FO, font_weight, XML_TYPE_TEXT_WEIGHT, 0 ),
+ M_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_WORDLINEMODE
- M_E( "CharWordMode", FO, score_spaces, XML_TYPE_NBOOL, 0 ),
+ M_E( "CharWordMode", FO, SCORE_SPACES, XML_TYPE_NBOOL, 0 ),
// RES_CHRATR_AUTOKERN
- M_E( "CharAutoKerning", STYLE, letter_kerning, XML_TYPE_BOOL, 0 ),
+ M_E( "CharAutoKerning", STYLE, LETTER_KERNING, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_BLINK
- M_E( "CharFlash", STYLE, text_blinking, XML_TYPE_BOOL, 0 ),
+ M_E( "CharFlash", STYLE, TEXT_BLINKING, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_NOHYPHEN
// TODO: not used?
// RES_CHRATR_NOLINEBREAK
// TODO: not used?
// RES_CHRATR_BACKGROUND
- M_E( "CharBackColor", STYLE, text_background_color, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "CharBackTransparent", STYLE, text_background_color, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- M_E( "CharBackColor", FO, text_background_color, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
+ M_E( "CharBackColor", STYLE, TEXT_BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "CharBackTransparent", STYLE, TEXT_BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ M_E( "CharBackColor", FO, TEXT_BACKGROUND_COLOR, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
// RES_CHRATR_CJK_FONT
- M_ED( "CharFontNameAsian", STYLE, font_name_asian, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CJK ),
+ M_ED( "CharFontNameAsian", STYLE, FONT_NAME_ASIAN, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CJK ),
#ifdef CONV_STAR_FONTS
- M_ED( "CharFontNameAsian", STYLE, font_family_asian, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CJK ),
+ M_ED( "CharFontNameAsian", STYLE, FONT_FAMILY_ASIAN, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CJK ),
#else
- M_ED( "CharFontNameAsian", STYLE, font_family_asian, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CJK ),
+ M_ED( "CharFontNameAsian", STYLE, FONT_FAMILY_ASIAN, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CJK ),
#endif
- M_ED( "CharFontStyleNameAsian",STYLE, font_style_name_asian, XML_TYPE_STRING, CTF_FONTSTYLENAME_CJK ),
- M_ED( "CharFontFamilyAsian", STYLE, font_family_generic_asian,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CJK ),
- M_ED( "CharFontPitchAsian", STYLE, font_pitch_asian, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CJK ),
- M_ED( "CharFontCharSetAsian", STYLE, font_charset_asian, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CJK ),
+ M_ED( "CharFontStyleNameAsian",STYLE, FONT_STYLE_NAME_ASIAN, XML_TYPE_STRING, CTF_FONTSTYLENAME_CJK ),
+ M_ED( "CharFontFamilyAsian", STYLE, FONT_FAMILY_GENERIC_ASIAN,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CJK ),
+ M_ED( "CharFontPitchAsian", STYLE, FONT_PITCH_ASIAN, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CJK ),
+ M_ED( "CharFontCharSetAsian", STYLE, FONT_CHARSET_ASIAN, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CJK ),
// RES_CHRATR_CJK_FONTSIZE
- M_ED( "CharHeightAsian", STYLE, font_size_asian, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CJK ),
- M_ED( "CharPropHeightAsian",STYLE, font_size_asian, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CJK ),
- M_ED( "CharDiffHeightAsian",STYLE,font_size_rel_asian, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CJK ),
+ M_ED( "CharHeightAsian", STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CJK ),
+ M_ED( "CharPropHeightAsian",STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CJK ),
+ M_ED( "CharDiffHeightAsian",STYLE,FONT_SIZE_REL_ASIAN, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CJK ),
// RES_CHRATR_CJK_LANGUAGE
- M_ED( "CharLocaleAsian", STYLE, language_asian, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharLocaleAsian", STYLE, country_asian, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleAsian", STYLE, LANGUAGE_ASIAN, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleAsian", STYLE, COUNTRY_ASIAN, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_CJK_POSTURE
- M_E( "CharPostureAsian", STYLE, font_style_asian, XML_TYPE_TEXT_POSTURE, 0 ),
+ M_E( "CharPostureAsian", STYLE, FONT_STYLE_ASIAN, XML_TYPE_TEXT_POSTURE, 0 ),
// RES_CHRATR_CJK_WEIGHT
- M_E( "CharWeightAsian", STYLE, font_weight_asian, XML_TYPE_TEXT_WEIGHT, 0 ),
+ M_E( "CharWeightAsian", STYLE, FONT_WEIGHT_ASIAN, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_CTL_FONT
- M_ED( "CharFontNameComplex", STYLE, font_name_complex, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CTL ),
+ M_ED( "CharFontNameComplex", STYLE, FONT_NAME_COMPLEX, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CTL ),
#ifdef CONV_STAR_FONTS
- M_ED( "CharFontNameComplex", STYLE, font_family_complex, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CTL ),
+ M_ED( "CharFontNameComplex", STYLE, FONT_FAMILY_COMPLEX, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CTL ),
#else
- M_ED( "CharFontNameComplex", STYLE, font_family_complex, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CTL ),
+ M_ED( "CharFontNameComplex", STYLE, FONT_FAMILY_COMPLEX, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CTL ),
#endif
- M_ED( "CharFontStyleNameComplex",STYLE, font_style_name_complex, XML_TYPE_STRING, CTF_FONTSTYLENAME_CTL ),
- M_ED( "CharFontFamilyComplex", STYLE, font_family_generic_complex,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CTL ),
- M_ED( "CharFontPitchComplex", STYLE, font_pitch_complex, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CTL ),
- M_ED( "CharFontCharSetComplex", STYLE, font_charset_complex, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CTL ),
+ M_ED( "CharFontStyleNameComplex",STYLE, FONT_STYLE_NAME_COMPLEX, XML_TYPE_STRING, CTF_FONTSTYLENAME_CTL ),
+ M_ED( "CharFontFamilyComplex", STYLE, FONT_FAMILY_GENERIC_COMPLEX,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CTL ),
+ M_ED( "CharFontPitchComplex", STYLE, FONT_PITCH_COMPLEX, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CTL ),
+ M_ED( "CharFontCharSetComplex", STYLE, FONT_CHARSET_COMPLEX, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CTL ),
// RES_CHRATR_CTL_FONTSIZE
- M_ED( "CharHeightComplex", STYLE, font_size_complex, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CTL ),
- M_ED( "CharPropHeightComplex",STYLE, font_size_complex, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CTL ),
- M_ED( "CharDiffHeightComplex",STYLE,font_size_rel_complex, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CTL ),
+ M_ED( "CharHeightComplex", STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CTL ),
+ M_ED( "CharPropHeightComplex",STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CTL ),
+ M_ED( "CharDiffHeightComplex",STYLE,FONT_SIZE_REL_COMPLEX, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CTL ),
// RES_CHRATR_CTL_LANGUAGE
- M_ED( "CharLocaleComplex", STYLE, language_complex, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharLocaleComplex", STYLE, country_complex, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleComplex", STYLE, LANGUAGE_COMPLEX, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleComplex", STYLE, COUNTRY_COMPLEX, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_CTL_POSTURE
- M_E( "CharPostureComplex", STYLE, font_style_complex, XML_TYPE_TEXT_POSTURE, 0 ),
+ M_E( "CharPostureComplex", STYLE, FONT_STYLE_COMPLEX, XML_TYPE_TEXT_POSTURE, 0 ),
// RES_CHRATR_CTL_WEIGHT
- M_E( "CharWeightComplex", STYLE, font_weight_complex, XML_TYPE_TEXT_WEIGHT, 0 ),
+ M_E( "CharWeightComplex", STYLE, FONT_WEIGHT_COMPLEX, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_ROTATE
- M_E( "CharRotation", STYLE, text_rotation_angle, XML_TYPE_TEXT_ROTATION_ANGLE, 0 ),
- M_E( "CharRotationIsFitToLine", STYLE, text_rotation_scale, XML_TYPE_TEXT_ROTATION_SCALE, 0 ),
+ M_E( "CharRotation", STYLE, TEXT_ROTATION_ANGLE, XML_TYPE_TEXT_ROTATION_ANGLE, 0 ),
+ M_E( "CharRotationIsFitToLine", STYLE, TEXT_ROTATION_SCALE, XML_TYPE_TEXT_ROTATION_SCALE, 0 ),
// RES_CHRATR_EMPHASIS_MARK
- M_E( "CharEmphasis", STYLE, text_emphasize, XML_TYPE_TEXT_EMPHASIZE, 0 ),
+ M_E( "CharEmphasis", STYLE, TEXT_EMPHASIZE, XML_TYPE_TEXT_EMPHASIZE, 0 ),
// RES_CHRATR_TWO_LINES
- M_E( "CharCombineIsOn", STYLE, text_combine, XML_TYPE_TEXT_COMBINE, 0 ),
- M_E( "CharCombinePrefix", STYLE, text_combine_start_char, XML_TYPE_TEXT_COMBINECHAR, 0 ),
- M_E( "CharCombineSuffix", STYLE, text_combine_end_char, XML_TYPE_TEXT_COMBINECHAR, 0 ),
+ M_E( "CharCombineIsOn", STYLE, TEXT_COMBINE, XML_TYPE_TEXT_COMBINE, 0 ),
+ M_E( "CharCombinePrefix", STYLE, TEXT_COMBINE_START_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
+ M_E( "CharCombineSuffix", STYLE, TEXT_COMBINE_END_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
// RES_CHRATR_SCALEW
- M_E( "CharScaleWidth", STYLE, text_scale, XML_TYPE_PERCENT16, 0 ),
+ M_E( "CharScaleWidth", STYLE, TEXT_SCALE, XML_TYPE_PERCENT16, 0 ),
//RES_CHRATR_RELIEF
- M_E( "CharRelief", STYLE, font_relief, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
+ M_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
// RES_TXTATR_INETFMT
// TODO
// RES_TXTATR_REFMARK
@@ -236,35 +237,35 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
// TODO
// RES_PARATR_LINESPACING
- M_E( "ParaLineSpacing", FO, line_height, XML_TYPE_LINE_SPACE_FIXED, 0 ),
- M_E( "ParaLineSpacing", STYLE, line_height_at_least, XML_TYPE_LINE_SPACE_MINIMUM, 0 ),
- M_E( "ParaLineSpacing", STYLE, line_spacing, XML_TYPE_LINE_SPACE_DISTANCE, 0 ),
+ M_E( "ParaLineSpacing", FO, LINE_HEIGHT, XML_TYPE_LINE_SPACE_FIXED, 0 ),
+ M_E( "ParaLineSpacing", STYLE, LINE_HEIGHT_AT_LEAST, XML_TYPE_LINE_SPACE_MINIMUM, 0 ),
+ M_E( "ParaLineSpacing", STYLE, LINE_SPACING, XML_TYPE_LINE_SPACE_DISTANCE, 0 ),
// RES_PARATR_ADJUST
- M_E( "ParaAdjust", FO, text_align, XML_TYPE_TEXT_ADJUST, 0 ),
- M_E( "ParaLastLineAdjust", FO, text_align_last, XML_TYPE_TEXT_ADJUSTLAST, 0 ),
- M_E( "ParaExpandSingleWord",STYLE, justify_single_word,XML_TYPE_BOOL, 0 ),
+ M_E( "ParaAdjust", FO, TEXT_ALIGN, XML_TYPE_TEXT_ADJUST, 0 ),
+ M_E( "ParaLastLineAdjust", FO, TEXT_ALIGN_LAST, XML_TYPE_TEXT_ADJUSTLAST, 0 ),
+ M_E( "ParaExpandSingleWord",STYLE, JUSTIFY_SINGLE_WORD,XML_TYPE_BOOL, 0 ),
// RES_PARATR_SPLIT
- M_E( "ParaSplit", STYLE, break_inside, XML_TYPE_TEXT_SPLIT, 0 ),
+ M_E( "ParaSplit", STYLE, BREAK_INSIDE, XML_TYPE_TEXT_SPLIT, 0 ),
// RES_PARATR_ORPHANS
- M_E( "ParaOrphans", FO, orphans, XML_TYPE_NUMBER8, 0 ),
+ M_E( "ParaOrphans", FO, ORPHANS, XML_TYPE_NUMBER8, 0 ),
// RES_PARATR_WIDOWS
- M_E( "ParaWidows", FO, widows, XML_TYPE_NUMBER8, 0 ),
+ M_E( "ParaWidows", FO, WIDOWS, XML_TYPE_NUMBER8, 0 ),
// RES_PARATR_TABSTOP
- M_ED( "ParaTabStops", STYLE, tab_stops, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_TABSTOP, CTF_TABSTOP ), // this is not realy a string!
+ M_ED( "ParaTabStops", STYLE, TAB_STOPS, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_TABSTOP, CTF_TABSTOP ), // this is not realy a string!
// RES_PARATR_HYPHENZONE
- M_E( "ParaIsHyphenation", FO, hyphenate, XML_TYPE_BOOL, 0 ),
- M_E( "ParaHyphenationMaxLeadingChars", FO, hyphenation_remain_char_count, XML_TYPE_NUMBER16, 0 ),
- M_E( "ParaHyphenationMaxTrailingChars",FO, hyphenation_push_char_count, XML_TYPE_NUMBER16, 0 ),
- M_E( "ParaHyphenationMaxHyphens", FO, hyphenation_ladder_count, XML_TYPE_NUMBER16_NONE, 0 ),
+ M_E( "ParaIsHyphenation", FO, HYPHENATE, XML_TYPE_BOOL, 0 ),
+ M_E( "ParaHyphenationMaxLeadingChars", FO, HYPHENATION_REMAIN_CHAR_COUNT, XML_TYPE_NUMBER16, 0 ),
+ M_E( "ParaHyphenationMaxTrailingChars",FO, HYPHENATION_PUSH_CHAR_COUNT, XML_TYPE_NUMBER16, 0 ),
+ M_E( "ParaHyphenationMaxHyphens", FO, HYPHENATION_LADDER_COUNT, XML_TYPE_NUMBER16_NONE, 0 ),
// RES_PARATR_DROP
- M_E( "DropCapWholeWord", STYLE, length, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_DROPCAPWHOLEWORD ),
- M_E( "DropCapCharStyleName", STYLE, style_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_DROPCAPCHARSTYLE ),
- M_E( "DropCapFormat", STYLE, drop_cap, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_DROPCAP, CTF_DROPCAPFORMAT ),
+ M_E( "DropCapWholeWord", STYLE, LENGTH, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_DROPCAPWHOLEWORD ),
+ M_E( "DropCapCharStyleName", STYLE, STYLE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_DROPCAPCHARSTYLE ),
+ M_E( "DropCapFormat", STYLE, DROP_CAP, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_DROPCAP, CTF_DROPCAPFORMAT ),
// RES_PARATR_REGISTER
- M_E( "ParaRegisterModeActive", STYLE, register_true, XML_TYPE_BOOL, 0 ),
+ M_E( "ParaRegisterModeActive", STYLE, REGISTER_TRUE, XML_TYPE_BOOL, 0 ),
// RES_PARATR_NUMRULE
- M_E( "NumberingStyleName", STYLE, list_style_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_NUMBERINGSTYLENAME ),
- M_E( "IsNumbering", TEXT, enable_numbering, XML_TYPE_BOOL, 0 ),
+ M_E( "NumberingStyleName", STYLE, LIST_STYLE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_NUMBERINGSTYLENAME ),
+ M_E( "IsNumbering", TEXT, ENABLE_NUMBERING, XML_TYPE_BOOL, 0 ),
// RES_FILL_ORDER
// not required
@@ -274,15 +275,15 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
// not required
// RES_LR_SPACE
- M_E( "ParaFirstLineIndent", FO, text_indent, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAFIRSTLINE ),
- M_E( "ParaFirstLineIndentRelative", FO, text_indent, XML_TYPE_PERCENT, CTF_PARAFIRSTLINE_REL ),
- M_E( "ParaIsAutoFirstLineIndent", STYLE, auto_text_indent, XML_TYPE_BOOL, 0 ),
+ M_E( "ParaFirstLineIndent", FO, TEXT_INDENT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAFIRSTLINE ),
+ M_E( "ParaFirstLineIndentRelative", FO, TEXT_INDENT, XML_TYPE_PERCENT, CTF_PARAFIRSTLINE_REL ),
+ M_E( "ParaIsAutoFirstLineIndent", STYLE, AUTO_TEXT_INDENT, XML_TYPE_BOOL, 0 ),
// RES_PAGEDESC
- M_E( "PageDescName", STYLE, master_page_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_PAGEDESCNAME ),
- M_E( "PageNumberOffset", STYLE, page_number, XML_TYPE_NUMBER16, 0 ),
+ M_E( "PageDescName", STYLE, MASTER_PAGE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_PAGEDESCNAME ),
+ M_E( "PageNumberOffset", STYLE, PAGE_NUMBER, XML_TYPE_NUMBER16, 0 ),
// RES_BREAK : TODO: does this work?
- M_E( "BreakType", FO, break_before, XML_TYPE_TEXT_BREAKBEFORE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "BreakType", FO, break_after, XML_TYPE_TEXT_BREAKAFTER, 0 ),
+ M_E( "BreakType", FO, BREAK_BEFORE, XML_TYPE_TEXT_BREAKBEFORE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "BreakType", FO, BREAK_AFTER, XML_TYPE_TEXT_BREAKAFTER, 0 ),
// RES_CNTNT
// not required
// RES_HEADER
@@ -304,37 +305,37 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
// RES_ANCHOR
// not required
// RES_BACKGROUND
- M_E( "ParaBackColor", FO, background_color, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "ParaBackTransparent", FO, background_color, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- M_E( "ParaBackGraphicLocation", STYLE, position, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
- M_E( "ParaBackGraphicFilter",STYLE, filter_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
- M_E( "ParaBackGraphicURL", STYLE, background_image, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
+ M_E( "ParaBackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "ParaBackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ M_E( "ParaBackGraphicLocation", STYLE, POSITION, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
+ M_E( "ParaBackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
+ M_E( "ParaBackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
// RES_BOX
- M_E( "LeftBorder", STYLE, border_line_width, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
- M_E( "LeftBorder", STYLE, border_line_width_left, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
- M_E( "RightBorder", STYLE, border_line_width_right, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
- M_E( "TopBorder", STYLE, border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
- M_E( "BottomBorder", STYLE, border_line_width_bottom, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
-
- M_E( "LeftBorderDistance", FO, padding, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_ALLBORDERDISTANCE ), // need special import filtering
- M_E( "LeftBorderDistance", FO, padding_left, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_LEFTBORDERDISTANCE ),
- M_E( "RightBorderDistance", FO, padding_right, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_RIGHTBORDERDISTANCE ),
- M_E( "TopBorderDistance", FO, padding_top, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_TOPBORDERDISTANCE ),
- M_E( "BottomBorderDistance",FO, padding_bottom, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_BOTTOMBORDERDISTANCE ),
-
- M_E( "LeftBorder", FO, border, XML_TYPE_BORDER, CTF_ALLBORDER ),
- M_E( "LeftBorder", FO, border_left, XML_TYPE_BORDER, CTF_LEFTBORDER ),
- M_E( "RightBorder", FO, border_right, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
- M_E( "TopBorder", FO, border_top, XML_TYPE_BORDER, CTF_TOPBORDER ),
- M_E( "BottomBorder", FO, border_bottom, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
+ M_E( "LeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
+ M_E( "LeftBorder", STYLE, BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
+ M_E( "RightBorder", STYLE, BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
+ M_E( "TopBorder", STYLE, BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
+ M_E( "BottomBorder", STYLE, BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
+
+ M_E( "LeftBorderDistance", FO, PADDING, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_ALLBORDERDISTANCE ), // need special import filtering
+ M_E( "LeftBorderDistance", FO, PADDING_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_LEFTBORDERDISTANCE ),
+ M_E( "RightBorderDistance", FO, PADDING_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_RIGHTBORDERDISTANCE ),
+ M_E( "TopBorderDistance", FO, PADDING_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_TOPBORDERDISTANCE ),
+ M_E( "BottomBorderDistance",FO, PADDING_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_BOTTOMBORDERDISTANCE ),
+
+ M_E( "LeftBorder", FO, BORDER, XML_TYPE_BORDER, CTF_ALLBORDER ),
+ M_E( "LeftBorder", FO, BORDER_LEFT, XML_TYPE_BORDER, CTF_LEFTBORDER ),
+ M_E( "RightBorder", FO, BORDER_RIGHT, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
+ M_E( "TopBorder", FO, BORDER_TOP, XML_TYPE_BORDER, CTF_TOPBORDER ),
+ M_E( "BottomBorder", FO, BORDER_BOTTOM, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
// RES_SHADOW
- M_E( "ParaShadowFormat", STYLE, shadow, XML_TYPE_TEXT_SHADOW, 0 ),
+ M_E( "ParaShadowFormat", STYLE, SHADOW, XML_TYPE_TEXT_SHADOW, 0 ),
// RES_FRMMACRO
// not required
// RES_COL
// not required
// RES_KEEP
- M_E( "ParaKeepTogether", FO, keep_with_next, XML_TYPE_BOOL, 0 ),
+ M_E( "ParaKeepTogether", FO, KEEP_WITH_NEXT, XML_TYPE_BOOL, 0 ),
// RES_URL
// not required
// RES_EDIT_IN_READONLY
@@ -345,146 +346,146 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
// not required
// RES_LINENUMBER
- M_E( "ParaLineNumberCount", TEXT, number_lines, XML_TYPE_BOOL, 0 ),
- M_E( "ParaLineNumberStartValue", TEXT, line_number, XML_TYPE_NUMBER, 0 ),
+ M_E( "ParaLineNumberCount", TEXT, NUMBER_LINES, XML_TYPE_BOOL, 0 ),
+ M_E( "ParaLineNumberStartValue", TEXT, LINE_NUMBER, XML_TYPE_NUMBER, 0 ),
// RES_FTN_AT_TXTEND
// not required
// RES_END_AT_TXTEND
// not required
// RES_UNKNOWNATR_CONTAINER
- M_E( "UserDefinedAttributes", TEXT, xmlns, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
- M_ED( "ParaIsCharacterDistance", STYLE, text_autospace, XML_TYPE_TEXT_AUTOSPACE, 0 ),
- M_ED( "ParaIsHangingPunctuation", STYLE, punctuation_wrap, XML_TYPE_TEXT_PUNCTUATION_WRAP, 0 ),
- M_ED( "ParaIsForbiddenRules", STYLE, line_break, XML_TYPE_TEXT_LINE_BREAK, 0 ),
- M_E( "TabStopDistance", STYLE, tab_stop_distance, XML_TYPE_MEASURE, 0 ),
+ M_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+ M_ED( "ParaIsCharacterDistance", STYLE, TEXT_AUTOSPACE, XML_TYPE_TEXT_AUTOSPACE, 0 ),
+ M_ED( "ParaIsHangingPunctuation", STYLE, PUNCTUATION_WRAP, XML_TYPE_TEXT_PUNCTUATION_WRAP, 0 ),
+ M_ED( "ParaIsForbiddenRules", STYLE, LINE_BREAK, XML_TYPE_TEXT_LINE_BREAK, 0 ),
+ M_E( "TabStopDistance", STYLE, TAB_STOP_DISTANCE, XML_TYPE_MEASURE, 0 ),
// RES_PARATR_VERTALIGN
- M_E( "ParaVertAlignment", STYLE, vertical_align, XML_TYPE_TEXT_VERTICAL_ALIGN, 0 ),
- { 0, 0, 0, 0 }
+ M_E( "ParaVertAlignment", STYLE, VERTICAL_ALIGN, XML_TYPE_TEXT_VERTICAL_ALIGN, 0 ),
+ { 0, 0, XML_TOKEN_INVALID, 0 }
};
XMLPropertyMapEntry aXMLTextPropMap[] =
{
// RES_CHRATR_CASEMAP
- M_E( "CharCaseMap", FO, font_variant, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
- M_E( "CharCaseMap", FO, text_transform, XML_TYPE_TEXT_CASEMAP, 0 ),
+ M_E( "CharCaseMap", FO, FONT_VARIANT, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
+ M_E( "CharCaseMap", FO, TEXT_TRANSFORM, XML_TYPE_TEXT_CASEMAP, 0 ),
// RES_CHRATR_COLOR
- M_ED( "CharColor", FO, color, XML_TYPE_COLORAUTO|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharColor", STYLE, use_window_font_color, XML_TYPE_ISAUTOCOLOR|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharColor", FO, COLOR, XML_TYPE_COLORAUTO|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharColor", STYLE, USE_WINDOW_FONT_COLOR, XML_TYPE_ISAUTOCOLOR|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_CONTOUR
- M_E( "CharContoured", STYLE, text_outline, XML_TYPE_BOOL, 0 ),
+ M_E( "CharContoured", STYLE, TEXT_OUTLINE, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_CROSSEDOUT
- M_E( "CharStrikeout", STYLE, text_crossing_out, XML_TYPE_TEXT_CROSSEDOUT, 0),
+ M_E( "CharStrikeout", STYLE, TEXT_CROSSING_OUT, XML_TYPE_TEXT_CROSSEDOUT, 0),
// RES_CHRATR_ESCAPEMENT
- M_E( "CharEscapement", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "CharEscapementHeight", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "CharEscapement", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "CharEscapementHeight", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
// RES_CHRATR_FONT
- M_ED( "CharFontName", STYLE, font_name, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME ),
+ M_ED( "CharFontName", STYLE, FONT_NAME, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME ),
#ifdef CONV_STAR_FONTS
- M_ED( "CharFontName", FO, font_family, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME ),
+ M_ED( "CharFontName", FO, FONT_FAMILY, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME ),
#else
- M_ED( "CharFontName", FO, font_family, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME ),
+ M_ED( "CharFontName", FO, FONT_FAMILY, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME ),
#endif
- M_ED( "CharFontStyleName",STYLE, font_style_name, XML_TYPE_STRING, CTF_FONTSTYLENAME ),
- M_ED( "CharFontFamily", STYLE, font_family_generic,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY ),
- M_ED( "CharFontPitch", STYLE, font_pitch, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH ),
- M_ED( "CharFontCharSet", STYLE, font_charset, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET ),
+ M_ED( "CharFontStyleName",STYLE, FONT_STYLE_NAME, XML_TYPE_STRING, CTF_FONTSTYLENAME ),
+ M_ED( "CharFontFamily", STYLE, FONT_FAMILY_GENERIC,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY ),
+ M_ED( "CharFontPitch", STYLE, FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH ),
+ M_ED( "CharFontCharSet", STYLE, FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET ),
// RES_CHRATR_FONTSIZE
- M_ED( "CharHeight", FO, font_size, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
- M_ED( "CharPropHeight",FO, font_size, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
- M_ED( "CharDiffHeight",STYLE,font_size_rel, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF ),
+ M_ED( "CharHeight", FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
+ M_ED( "CharPropHeight",FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
+ M_ED( "CharDiffHeight",STYLE,FONT_SIZE_REL, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF ),
// RES_CHRATR_KERNING
- M_E( "CharKerning", FO, letter_spacing, XML_TYPE_TEXT_KERNING, 0 ),
+ M_E( "CharKerning", FO, LETTER_SPACING, XML_TYPE_TEXT_KERNING, 0 ),
// RES_CHRATR_LANGUAGE
- M_ED( "CharLocale", FO, language, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharLocale", FO, country, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocale", FO, LANGUAGE, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocale", FO, COUNTRY, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_POSTURE
- M_E( "CharPosture", FO, font_style, XML_TYPE_TEXT_POSTURE, 0 ),
+ M_E( "CharPosture", FO, FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 ),
// RES_CHRATR_PROPORTIONALFONTSIZE
// TODO: not used?
// RES_CHRATR_SHADOWED
- M_E( "CharShadowed", FO, text_shadow, XML_TYPE_TEXT_SHADOWED, 0 ),
+ M_E( "CharShadowed", FO, TEXT_SHADOW, XML_TYPE_TEXT_SHADOWED, 0 ),
// BIS HIER GEPRUEFT!
// RES_CHRATR_UNDERLINE
- M_E( "CharUnderline", STYLE, text_underline, XML_TYPE_TEXT_UNDERLINE, CTF_UNDERLINE ),
- M_E( "CharUnderlineColor", STYLE, text_underline_color, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, CTF_UNDERLINE_COLOR ),
- M_E( "CharUnderlineHasColor", STYLE, text_underline_color, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, CTF_UNDERLINE_HASCOLOR ),
+ M_E( "CharUnderline", STYLE, TEXT_UNDERLINE, XML_TYPE_TEXT_UNDERLINE, CTF_UNDERLINE ),
+ M_E( "CharUnderlineColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, CTF_UNDERLINE_COLOR ),
+ M_E( "CharUnderlineHasColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, CTF_UNDERLINE_HASCOLOR ),
// RES_CHRATR_WEIGHT
- M_E( "CharWeight", FO, font_weight, XML_TYPE_TEXT_WEIGHT, 0 ),
+ M_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_WORDLINEMODE
- M_E( "CharWordMode", FO, score_spaces, XML_TYPE_NBOOL, 0 ),
+ M_E( "CharWordMode", FO, SCORE_SPACES, XML_TYPE_NBOOL, 0 ),
// RES_CHRATR_AUTOKERN
- M_E( "CharAutoKerning", STYLE, letter_kerning, XML_TYPE_BOOL, 0 ),
+ M_E( "CharAutoKerning", STYLE, LETTER_KERNING, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_BLINK
- M_E( "CharFlash", STYLE, text_blinking, XML_TYPE_BOOL, 0 ),
+ M_E( "CharFlash", STYLE, TEXT_BLINKING, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_NOHYPHEN
// TODO: not used?
// RES_CHRATR_NOLINEBREAK
// TODO: not used?
// RES_CHRATR_BACKGROUND
- M_E( "CharBackColor", STYLE, text_background_color, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "CharBackTransparent", STYLE, text_background_color, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- M_E( "CharBackColor", FO, text_background_color, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
+ M_E( "CharBackColor", STYLE, TEXT_BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "CharBackTransparent", STYLE, TEXT_BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ M_E( "CharBackColor", FO, TEXT_BACKGROUND_COLOR, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
// RES_CHRATR_CJK_FONT
- M_ED( "CharFontNameAsian", STYLE, font_name_asian, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CJK ),
+ M_ED( "CharFontNameAsian", STYLE, FONT_NAME_ASIAN, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CJK ),
#ifdef CONV_STAR_FONTS
- M_ED( "CharFontNameAsian", STYLE, font_family_asian, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CJK ),
+ M_ED( "CharFontNameAsian", STYLE, FONT_FAMILY_ASIAN, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CJK ),
#else
- M_ED( "CharFontNameAsian", STYLE, font_family_asian, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CJK ),
+ M_ED( "CharFontNameAsian", STYLE, FONT_FAMILY_ASIAN, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CJK ),
#endif
- M_ED( "CharFontStyleNameAsian",STYLE, font_style_name_asian, XML_TYPE_STRING, CTF_FONTSTYLENAME_CJK ),
- M_ED( "CharFontFamilyAsian", STYLE, font_family_generic_asian,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CJK ),
- M_ED( "CharFontPitchAsian", STYLE, font_pitch_asian, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CJK ),
- M_ED( "CharFontCharSetAsian", STYLE, font_charset_asian, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CJK ),
+ M_ED( "CharFontStyleNameAsian",STYLE, FONT_STYLE_NAME_ASIAN, XML_TYPE_STRING, CTF_FONTSTYLENAME_CJK ),
+ M_ED( "CharFontFamilyAsian", STYLE, FONT_FAMILY_GENERIC_ASIAN,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CJK ),
+ M_ED( "CharFontPitchAsian", STYLE, FONT_PITCH_ASIAN, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CJK ),
+ M_ED( "CharFontCharSetAsian", STYLE, FONT_CHARSET_ASIAN, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CJK ),
// RES_CHRATR_CJK_FONTSIZE
- M_ED( "CharHeightAsian", STYLE, font_size_asian, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CJK ),
- M_ED( "CharPropHeightAsian",STYLE, font_size_asian, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CJK ),
- M_ED( "CharDiffHeightAsian",STYLE,font_size_rel_asian, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CJK ),
+ M_ED( "CharHeightAsian", STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CJK ),
+ M_ED( "CharPropHeightAsian",STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CJK ),
+ M_ED( "CharDiffHeightAsian",STYLE,FONT_SIZE_REL_ASIAN, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CJK ),
// RES_CHRATR_CJK_LANGUAGE
- M_ED( "CharLocaleAsian", STYLE, language_asian, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharLocaleAsian", STYLE, country_asian, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleAsian", STYLE, LANGUAGE_ASIAN, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleAsian", STYLE, COUNTRY_ASIAN, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_CJK_POSTURE
- M_E( "CharPostureAsian", STYLE, font_style_asian, XML_TYPE_TEXT_POSTURE, 0 ),
+ M_E( "CharPostureAsian", STYLE, FONT_STYLE_ASIAN, XML_TYPE_TEXT_POSTURE, 0 ),
// RES_CHRATR_CJK_WEIGHT
- M_E( "CharWeightAsian", STYLE, font_weight_asian, XML_TYPE_TEXT_WEIGHT, 0 ),
+ M_E( "CharWeightAsian", STYLE, FONT_WEIGHT_ASIAN, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_CTL_FONT
- M_ED( "CharFontNameComplex", STYLE, font_name_complex, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CTL ),
+ M_ED( "CharFontNameComplex", STYLE, FONT_NAME_COMPLEX, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CTL ),
#ifdef CONV_STAR_FONTS
- M_ED( "CharFontNameComplex", STYLE, font_family_complex, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CTL ),
+ M_ED( "CharFontNameComplex", STYLE, FONT_FAMILY_COMPLEX, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CTL ),
#else
- M_ED( "CharFontNameComplex", STYLE, font_family_complex, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CTL ),
+ M_ED( "CharFontNameComplex", STYLE, FONT_FAMILY_COMPLEX, XML_TYPE_TEXT_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CTL ),
#endif
- M_ED( "CharFontStyleNameComplex",STYLE, font_style_name_complex, XML_TYPE_STRING, CTF_FONTSTYLENAME_CTL ),
- M_ED( "CharFontFamilyComplex", STYLE, font_family_generic_complex,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CTL ),
- M_ED( "CharFontPitchComplex", STYLE, font_pitch_complex, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CTL ),
- M_ED( "CharFontCharSetComplex", STYLE, font_charset_complex, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CTL ),
+ M_ED( "CharFontStyleNameComplex",STYLE, FONT_STYLE_NAME_COMPLEX, XML_TYPE_STRING, CTF_FONTSTYLENAME_CTL ),
+ M_ED( "CharFontFamilyComplex", STYLE, FONT_FAMILY_GENERIC_COMPLEX,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CTL ),
+ M_ED( "CharFontPitchComplex", STYLE, FONT_PITCH_COMPLEX, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CTL ),
+ M_ED( "CharFontCharSetComplex", STYLE, FONT_CHARSET_COMPLEX, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CTL ),
// RES_CHRATR_CTL_FONTSIZE
- M_ED( "CharHeightComplex", STYLE, font_size_complex, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CTL ),
- M_ED( "CharPropHeightComplex",STYLE, font_size_complex, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CTL ),
- M_ED( "CharDiffHeightComplex",STYLE,font_size_rel_complex, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CTL ),
+ M_ED( "CharHeightComplex", STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CTL ),
+ M_ED( "CharPropHeightComplex",STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CTL ),
+ M_ED( "CharDiffHeightComplex",STYLE,FONT_SIZE_REL_COMPLEX, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CTL ),
// RES_CHRATR_CTL_LANGUAGE
- M_ED( "CharLocaleComplex", STYLE, language_complex, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
- M_ED( "CharLocaleComplex", STYLE, country_complex, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleComplex", STYLE, LANGUAGE_COMPLEX, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_ED( "CharLocaleComplex", STYLE, COUNTRY_COMPLEX, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_CTL_POSTURE
- M_E( "CharPostureComplex", STYLE, font_style_complex, XML_TYPE_TEXT_POSTURE, 0 ),
+ M_E( "CharPostureComplex", STYLE, FONT_STYLE_COMPLEX, XML_TYPE_TEXT_POSTURE, 0 ),
// RES_CHRATR_CTL_WEIGHT
- M_E( "CharWeightComplex", STYLE, font_weight_complex, XML_TYPE_TEXT_WEIGHT, 0 ),
+ M_E( "CharWeightComplex", STYLE, FONT_WEIGHT_COMPLEX, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_ROTATE
- M_E( "CharRotation", STYLE, text_rotation_angle, XML_TYPE_TEXT_ROTATION_ANGLE, 0 ),
- M_E( "CharRotationIsFitToLine", STYLE, text_rotation_scale, XML_TYPE_TEXT_ROTATION_SCALE, 0 ),
+ M_E( "CharRotation", STYLE, TEXT_ROTATION_ANGLE, XML_TYPE_TEXT_ROTATION_ANGLE, 0 ),
+ M_E( "CharRotationIsFitToLine", STYLE, TEXT_ROTATION_SCALE, XML_TYPE_TEXT_ROTATION_SCALE, 0 ),
// RES_CHRATR_EMPHASIS_MARK
- M_E( "CharEmphasis", STYLE, text_emphasize, XML_TYPE_TEXT_EMPHASIZE, 0 ),
+ M_E( "CharEmphasis", STYLE, TEXT_EMPHASIZE, XML_TYPE_TEXT_EMPHASIZE, 0 ),
// RES_CHRATR_TWO_LINES
- M_E( "CharCombineIsOn", STYLE, text_combine, XML_TYPE_TEXT_COMBINE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "CharCombinePrefix", STYLE, text_combine_start_char, XML_TYPE_TEXT_COMBINECHAR, 0 ),
- M_E( "CharCombineSuffix", STYLE, text_combine_end_char, XML_TYPE_TEXT_COMBINECHAR, 0 ),
+ M_E( "CharCombineIsOn", STYLE, TEXT_COMBINE, XML_TYPE_TEXT_COMBINE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "CharCombinePrefix", STYLE, TEXT_COMBINE_START_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
+ M_E( "CharCombineSuffix", STYLE, TEXT_COMBINE_END_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
// RES_CHRATR_SCALEW
- M_E( "CharScaleWidth", STYLE, text_scale, XML_TYPE_PERCENT16, 0 ),
+ M_E( "CharScaleWidth", STYLE, TEXT_SCALE, XML_TYPE_PERCENT16, 0 ),
// combined characters field, does not correspond to a property
- M_E( "", STYLE, text_combine, XML_TYPE_TEXT_COMBINE_CHARACTERS|MID_FLAG_NO_PROPERTY, CTF_COMBINED_CHARACTERS_FIELD ),
+ M_E( "", STYLE, TEXT_COMBINE, XML_TYPE_TEXT_COMBINE_CHARACTERS|MID_FLAG_NO_PROPERTY, CTF_COMBINED_CHARACTERS_FIELD ),
//RES_CHRATR_RELIEF
- M_E( "CharRelief", STYLE, font_relief, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
+ M_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
// RES_TXTATR_INETFMT
// TODO
@@ -507,12 +508,12 @@ XMLPropertyMapEntry aXMLTextPropMap[] =
// RES_TXTATR_HARDBLANK
// TODO
// RES_UNKNOWNATR_CONTAINER
- M_E( "UserDefinedAttributes", TEXT, xmlns, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
- M_ED( "ParaIsCharacterDistance", STYLE, text_autospace, XML_TYPE_TEXT_AUTOSPACE, 0 ),
- M_ED( "ParaIsHangingPunctuation", STYLE, punctuation_wrap, XML_TYPE_TEXT_PUNCTUATION_WRAP, 0 ),
- M_ED( "ParaIsForbiddenRules", STYLE, line_break, XML_TYPE_TEXT_LINE_BREAK, 0 ),
- M_E( "TabStopDistance", STYLE, tab_stop_distance, XML_TYPE_MEASURE, 0 ),
- { 0, 0, 0, 0 }
+ M_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+ M_ED( "ParaIsCharacterDistance", STYLE, TEXT_AUTOSPACE, XML_TYPE_TEXT_AUTOSPACE, 0 ),
+ M_ED( "ParaIsHangingPunctuation", STYLE, PUNCTUATION_WRAP, XML_TYPE_TEXT_PUNCTUATION_WRAP, 0 ),
+ M_ED( "ParaIsForbiddenRules", STYLE, LINE_BREAK, XML_TYPE_TEXT_LINE_BREAK, 0 ),
+ M_E( "TabStopDistance", STYLE, TAB_STOP_DISTANCE, XML_TYPE_MEASURE, 0 ),
+ { 0, 0, XML_TOKEN_INVALID, 0 }
};
XMLPropertyMapEntry aXMLFramePropMap[] =
@@ -520,34 +521,34 @@ XMLPropertyMapEntry aXMLFramePropMap[] =
// RES_FILL_ORDER
// TODO: not required???
// RES_FRM_SIZE
- M_ED( "Width", SVG, width, XML_TYPE_MEASURE, 0 ),
- M_ED( "RelativeWidth", STYLE, rel_width, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, 0 ),
-// M_ED( "RelativeWidth", STYLE, rel_width, XML_TYPE_TEXT_REL_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, 0 ),
-// M_ED( "IsSyncWidthToHeight",STYLE, rel_width, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, 0 ),
-
- M_ED( "Height", SVG, height, XML_TYPE_MEASURE, CTF_FRAMEHEIGHT_ABS ),
- M_ED( "Height", FO, min_height, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_MIN_ABS ),
- M_ED( "RelativeHeight", FO, min_height, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEHEIGHT_MIN_REL ),
- M_ED( "RelativeHeight", STYLE, rel_height, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEHEIGHT_REL ),
-// M_ED( "RelativeHeight", STYLE, rel_height, XML_TYPE_TEXT_REL_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_REL ),
-// M_ED( "IsSyncHeightToWidth",STYLE, rel_height, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_SYNCHEIGHT ),
-// M_ED( "IsSyncHeightToWidth",STYLE, rel_height, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN, CTF_SYNCHEIGHT_MIN ),
- M_ED( "SizeType", FO, text_box, XML_TYPE_NUMBER16|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SIZETYPE ),
+ M_ED( "Width", SVG, WIDTH, XML_TYPE_MEASURE, 0 ),
+ M_ED( "RelativeWidth", STYLE, REL_WIDTH, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, 0 ),
+// M_ED( "RelativeWidth", STYLE, REL_WIDTH, XML_TYPE_TEXT_REL_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, 0 ),
+// M_ED( "IsSyncWidthToHeight",STYLE, REL_WIDTH, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, 0 ),
+
+ M_ED( "Height", SVG, HEIGHT, XML_TYPE_MEASURE, CTF_FRAMEHEIGHT_ABS ),
+ M_ED( "Height", FO, MIN_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_MIN_ABS ),
+ M_ED( "RelativeHeight", FO, MIN_HEIGHT, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEHEIGHT_MIN_REL ),
+ M_ED( "RelativeHeight", STYLE, REL_HEIGHT, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEHEIGHT_REL ),
+// M_ED( "RelativeHeight", STYLE, REL_HEIGHT, XML_TYPE_TEXT_REL_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_REL ),
+// M_ED( "IsSyncHeightToWidth",STYLE, REL_HEIGHT, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_SYNCHEIGHT ),
+// M_ED( "IsSyncHeightToWidth",STYLE, REL_HEIGHT, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN, CTF_SYNCHEIGHT_MIN ),
+ M_ED( "SizeType", FO, TEXT_BOX, XML_TYPE_NUMBER16|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SIZETYPE ),
// RES_PAPER_BIN
// not required
// RES_ANCHOR
// moved to here because it is not used for automatic styles
- M_ED( "AnchorType", TEXT, anchor_type, XML_TYPE_TEXT_ANCHOR_TYPE, CTF_ANCHORTYPE ),
+ M_ED( "AnchorType", TEXT, ANCHOR_TYPE, XML_TYPE_TEXT_ANCHOR_TYPE, CTF_ANCHORTYPE ),
// AnchorPage number is not required for styles!
- M_ED( "HoriOrientPosition", SVG, x, XML_TYPE_MEASURE, 0 ),
- M_ED( "VertOrientPosition", SVG, y, XML_TYPE_MEASURE, 0 ),
+ M_ED( "HoriOrientPosition", SVG, X, XML_TYPE_MEASURE, 0 ),
+ M_ED( "VertOrientPosition", SVG, Y, XML_TYPE_MEASURE, 0 ),
// ***** The map for automatic styles starts here *****
// RES_LR_SPACE
- M_E( "LeftMargin", FO, margin_left, XML_TYPE_MEASURE, 0),
- M_E( "RightMargin", FO, margin_right, XML_TYPE_MEASURE, 0 ),
+ M_E( "LeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE, 0),
+ M_E( "RightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE, 0 ),
// RES_UL_SPACE
- M_E( "TopMargin", FO, margin_top, XML_TYPE_MEASURE, 0 ),
- M_E( "BottomMargin", FO, margin_bottom, XML_TYPE_MEASURE, 0 ),
+ M_E( "TopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE, 0 ),
+ M_E( "BottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE, 0 ),
// RES_PAGEDESC
// not required
// RES_BREAK
@@ -559,69 +560,69 @@ XMLPropertyMapEntry aXMLFramePropMap[] =
// RES_FOOTER
// not required
// RES_PRINT
- M_E( "Print", STYLE, print_content, XML_TYPE_BOOL, 0 ),
+ M_E( "Print", STYLE, PRINT_CONTENT, XML_TYPE_BOOL, 0 ),
// RES_OPAQUE
- M_ED( "Opaque", STYLE, run_through, XML_TYPE_TEXT_OPAQUE, 0 ),
+ M_ED( "Opaque", STYLE, RUN_THROUGH, XML_TYPE_TEXT_OPAQUE, 0 ),
// RES_PROTECT
- M_E( "ContentProtected", STYLE, protect, XML_TYPE_TEXT_PROTECT_CONTENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "SizeProtected", STYLE, protect, XML_TYPE_TEXT_PROTECT_SIZE|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "PositionProtected", STYLE, protect, XML_TYPE_TEXT_PROTECT_POSITION|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "ContentProtected", STYLE, PROTECT, XML_TYPE_TEXT_PROTECT_CONTENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "SizeProtected", STYLE, PROTECT, XML_TYPE_TEXT_PROTECT_SIZE|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "PositionProtected", STYLE, PROTECT, XML_TYPE_TEXT_PROTECT_POSITION|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
// RES_SURROUND
- M_ED( "TextWrap", STYLE, wrap, XML_TYPE_TEXT_WRAP, CTF_WRAP ),
- M_ED( "SurroundAnchorOnly", STYLE, number_wrapped_paragraphs, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ),
- M_E( "SurroundContour", STYLE, wrap_contour, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ),
- M_E( "ContourOutside", STYLE, wrap_contour_mode, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ),
+ M_ED( "TextWrap", STYLE, WRAP, XML_TYPE_TEXT_WRAP, CTF_WRAP ),
+ M_ED( "SurroundAnchorOnly", STYLE, NUMBER_WRAPPED_PARAGRAPHS, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ),
+ M_E( "SurroundContour", STYLE, WRAP_CONTOUR, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ),
+ M_E( "ContourOutside", STYLE, WRAP_CONTOUR_MODE, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ),
// RES_VERT_ORIENT
- M_ED( "VertOrient", STYLE, vertical_pos, XML_TYPE_TEXT_VERTICAL_POS, CTF_VERTICALPOS ),
- M_ED( "VertOrient", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ),
- M_ED( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL, CTF_VERTICALREL ),
- M_ED( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_PAGE ),
- M_ED( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_FRAME ),
+ M_ED( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS, CTF_VERTICALPOS ),
+ M_ED( "VertOrient", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ),
+ M_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_VERTICALREL ),
+ M_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_PAGE ),
+ M_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_FRAME ),
// RES_HORI_ORIENT
- M_ED( "HoriOrient", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_HORIZONTALPOS ),
- M_ED( "PageToggle", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_HORIZONTALMIRROR ),
- M_ED( "HoriOrient", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALPOS_MIRRORED ),
- M_ED( "HoriOrientRelation", STYLE, horizontal_rel, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_HORIZONTALREL ),
- M_ED( "HoriOrientRelation", STYLE, horizontal_rel, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALREL_FRAME ),
+ M_ED( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_HORIZONTALPOS ),
+ M_ED( "PageToggle", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_HORIZONTALMIRROR ),
+ M_ED( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALPOS_MIRRORED ),
+ M_ED( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_HORIZONTALREL ),
+ M_ED( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALREL_FRAME ),
// RES_ANCHOR
// see above
// RES_BACKGROUND
- M_ED( "BackColor", FO, background_color, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_ED( "BackTransparent", FO, background_color, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "BackGraphicLocation", STYLE, position, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
- M_E( "BackGraphicFilter",STYLE, filter_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
- M_E( "BackGraphicURL", STYLE, background_image, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
+ M_ED( "BackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_ED( "BackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "BackGraphicLocation", STYLE, POSITION, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
+ M_E( "BackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
+ M_E( "BackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
// RES_BOX
- M_ED( "LeftBorder", STYLE, border_line_width, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
- M_ED( "LeftBorder", STYLE, border_line_width_left, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
- M_ED( "RightBorder", STYLE, border_line_width_right, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
- M_ED( "TopBorder", STYLE, border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
- M_ED( "BottomBorder", STYLE, border_line_width_bottom, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
-
- M_ED( "LeftBorderDistance", FO, padding, XML_TYPE_MEASURE, CTF_ALLBORDERDISTANCE ), // need special import filtering
- M_ED( "LeftBorderDistance", FO, padding_left, XML_TYPE_MEASURE, CTF_LEFTBORDERDISTANCE ),
- M_ED( "RightBorderDistance", FO, padding_right, XML_TYPE_MEASURE, CTF_RIGHTBORDERDISTANCE ),
- M_ED( "TopBorderDistance", FO, padding_top, XML_TYPE_MEASURE, CTF_TOPBORDERDISTANCE ),
- M_ED( "BottomBorderDistance",FO, padding_bottom, XML_TYPE_MEASURE, CTF_BOTTOMBORDERDISTANCE ),
+ M_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
+ M_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
+ M_ED( "RightBorder", STYLE, BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
+ M_ED( "TopBorder", STYLE, BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
+ M_ED( "BottomBorder", STYLE, BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
+
+ M_ED( "LeftBorderDistance", FO, PADDING, XML_TYPE_MEASURE, CTF_ALLBORDERDISTANCE ), // need special import filtering
+ M_ED( "LeftBorderDistance", FO, PADDING_LEFT, XML_TYPE_MEASURE, CTF_LEFTBORDERDISTANCE ),
+ M_ED( "RightBorderDistance", FO, PADDING_RIGHT, XML_TYPE_MEASURE, CTF_RIGHTBORDERDISTANCE ),
+ M_ED( "TopBorderDistance", FO, PADDING_TOP, XML_TYPE_MEASURE, CTF_TOPBORDERDISTANCE ),
+ M_ED( "BottomBorderDistance",FO, PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_BOTTOMBORDERDISTANCE ),
// There is an additional property for controls!
- M_ED( "LeftBorder", FO, border, XML_TYPE_BORDER|MID_FLAG_MULTI_PROPERTY, CTF_ALLBORDER ),
- M_ED( "LeftBorder", FO, border_left, XML_TYPE_BORDER, CTF_LEFTBORDER ),
- M_ED( "RightBorder", FO, border_right, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
- M_ED( "TopBorder", FO, border_top, XML_TYPE_BORDER, CTF_TOPBORDER ),
- M_ED( "BottomBorder", FO, border_bottom, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
+ M_ED( "LeftBorder", FO, BORDER, XML_TYPE_BORDER|MID_FLAG_MULTI_PROPERTY, CTF_ALLBORDER ),
+ M_ED( "LeftBorder", FO, BORDER_LEFT, XML_TYPE_BORDER, CTF_LEFTBORDER ),
+ M_ED( "RightBorder", FO, BORDER_RIGHT, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
+ M_ED( "TopBorder", FO, BORDER_TOP, XML_TYPE_BORDER, CTF_TOPBORDER ),
+ M_ED( "BottomBorder", FO, BORDER_BOTTOM, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
// RES_SHADOW
- M_E( "ShadowFormat", STYLE, shadow, XML_TYPE_TEXT_SHADOW, 0 ),
+ M_E( "ShadowFormat", STYLE, SHADOW, XML_TYPE_TEXT_SHADOW, 0 ),
// RES_FRMMACRO
// TODO
// RES_COL
- M_E( "TextColumns", STYLE, columns, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_TEXTCOLUMNS ),
+ M_E( "TextColumns", STYLE, COLUMNS, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_TEXTCOLUMNS ),
// RES_KEEP
// not required
// RES_URL
// not required (exprted as draw:a element)
// RES_EDIT_IN_READONLY
- M_ED( "EditInReadonly", STYLE, editable, XML_TYPE_BOOL, 0 ),
+ M_ED( "EditInReadonly", STYLE, EDITABLE, XML_TYPE_BOOL, 0 ),
// RES_LAYOUT_SPLIT
// not required
// RES_CHAIN
@@ -637,118 +638,118 @@ XMLPropertyMapEntry aXMLFramePropMap[] =
// RES_UNKNOWNATR_CONTAINER
// M_E_SE( TEXT, xmlns, RES_UNKNOWNATR_CONTAINER, 0 ),
// RES_GRFATR_MIRRORGRF (vertical MUST be processed after horizontal!)
- M_E( "HoriMirroredOnEvenPages", STYLE, mirror, XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "HoriMirroredOnOddPages", STYLE, mirror, XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "VertMirrored", STYLE, mirror, XML_TYPE_TEXT_MIRROR_VERTICAL|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "HoriMirroredOnEvenPages", STYLE, MIRROR, XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "HoriMirroredOnOddPages", STYLE, MIRROR, XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "VertMirrored", STYLE, MIRROR, XML_TYPE_TEXT_MIRROR_VERTICAL|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
// RES_GRFATR_CROPGRF
- M_E( "GraphicCrop", FO, clip, XML_TYPE_TEXT_CLIP, 0 ),
+ M_E( "GraphicCrop", FO, CLIP, XML_TYPE_TEXT_CLIP, 0 ),
// RES_GRFATR_ROTATION
// not required (exported as svg:transform attribute)
// RES_GRFATR_LUMINANCE
- { "AdjustLuminance", XML_NAMESPACE_DRAW, sXML_luminance, XML_TYPE_PERCENT16, 0 }, // signed?
+ { "AdjustLuminance", XML_NAMESPACE_DRAW, XML_LUMINANCE, XML_TYPE_PERCENT16, 0 }, // signed?
// RES_GRFATR_CONTRAST
- { "AdjustContrast", XML_NAMESPACE_DRAW, sXML_contrast, XML_TYPE_PERCENT16, 0 }, // signed?
+ { "AdjustContrast", XML_NAMESPACE_DRAW, XML_CONTRAST, XML_TYPE_PERCENT16, 0 }, // signed?
// RES_GRFATR_CHANNELR
- { "AdjustRed", XML_NAMESPACE_DRAW, sXML_red, XML_TYPE_PERCENT16, 0 }, // signed?
+ { "AdjustRed", XML_NAMESPACE_DRAW, XML_RED, XML_TYPE_PERCENT16, 0 }, // signed?
// RES_GRFATR_CHANNELG
- { "AdjustGreen", XML_NAMESPACE_DRAW, sXML_green, XML_TYPE_PERCENT16, 0 }, // signed?
+ { "AdjustGreen", XML_NAMESPACE_DRAW, XML_GREEN, XML_TYPE_PERCENT16, 0 }, // signed?
// RES_GRFATR_CHANNELB
- { "AdjustBlue", XML_NAMESPACE_DRAW, sXML_blue, XML_TYPE_PERCENT16, 0 }, // signed?
+ { "AdjustBlue", XML_NAMESPACE_DRAW, XML_BLUE, XML_TYPE_PERCENT16, 0 }, // signed?
// RES_GRFATR_GAMMA
- { "Gamma", XML_NAMESPACE_DRAW, sXML_gamma, XML_TYPE_DOUBLE, 0 }, // signed?
+ { "Gamma", XML_NAMESPACE_DRAW, XML_GAMMA, XML_TYPE_DOUBLE, 0 }, // signed?
// RES_GRFATR_INVERT
- { "GraphicIsInverted", XML_NAMESPACE_DRAW, sXML_color_inversion, XML_TYPE_BOOL, 0 },
+ { "GraphicIsInverted", XML_NAMESPACE_DRAW, XML_COLOR_INVERSION, XML_TYPE_BOOL, 0 },
// RES_GRFATR_TRANSPARENCY
- { "Transparency", XML_NAMESPACE_DRAW, sXML_transparency, XML_TYPE_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 },
+ { "Transparency", XML_NAMESPACE_DRAW, XML_TRANSPARENCY, XML_TYPE_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 },
// RES_GRFATR_DRAWMODE
- { "GraphicColorMode", XML_NAMESPACE_DRAW, sXML_color_mode, XML_TYPE_COLOR_MODE, 0 },
+ { "GraphicColorMode", XML_NAMESPACE_DRAW, XML_COLOR_MODE, XML_TYPE_COLOR_MODE, 0 },
// special entries for floating frames
- M_E( "", DRAW, frame_display_scrollbar, XML_TYPE_BOOL|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_SCROLLBAR ),
- M_E( "", DRAW, frame_display_border, XML_TYPE_BOOL|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_BORDER ),
- M_E( "", DRAW, frame_margin_horizontal, XML_TYPE_MEASURE_PX|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_HORI ),
- M_E( "", DRAW, frame_margin_vertical, XML_TYPE_MEASURE_PX|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_VERT ),
- M_E( "", DRAW, visible_area_left, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_LEFT ),
- M_E( "", DRAW, visible_area_top, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_TOP ),
- M_E( "", DRAW, visible_area_width, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_WIDTH ),
- M_E( "", DRAW, visible_area_height, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_HEIGHT ),
- M_E( "", DRAW, draw_aspect, XML_TYPE_TEXT_DRAW_ASPECT|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_DRAW_ASPECT ),
- M_E( "UserDefinedAttributes", TEXT, xmlns, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
-
- { 0, 0, 0, 0 }
+ M_E( "", DRAW, FRAME_DISPLAY_SCROLLBAR, XML_TYPE_BOOL|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_SCROLLBAR ),
+ M_E( "", DRAW, FRAME_DISPLAY_BORDER, XML_TYPE_BOOL|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_BORDER ),
+ M_E( "", DRAW, FRAME_MARGIN_HORIZONTAL, XML_TYPE_MEASURE_PX|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_HORI ),
+ M_E( "", DRAW, FRAME_MARGIN_VERTICAL, XML_TYPE_MEASURE_PX|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_VERT ),
+ M_E( "", DRAW, VISIBLE_AREA_LEFT, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_LEFT ),
+ M_E( "", DRAW, VISIBLE_AREA_TOP, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_TOP ),
+ M_E( "", DRAW, VISIBLE_AREA_WIDTH, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_WIDTH ),
+ M_E( "", DRAW, VISIBLE_AREA_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_HEIGHT ),
+ M_E( "", DRAW, DRAW_ASPECT, XML_TYPE_TEXT_DRAW_ASPECT|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_DRAW_ASPECT ),
+ M_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+
+ { 0, 0, XML_TOKEN_INVALID, 0 }
};
XMLPropertyMapEntry aXMLShapePropMap[] =
{
// RES_LR_SPACE
- M_E( "LeftMargin", FO, margin_left, XML_TYPE_MEASURE, 0),
- M_E( "RightMargin", FO, margin_right, XML_TYPE_MEASURE, 0 ),
+ M_E( "LeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE, 0),
+ M_E( "RightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE, 0 ),
// RES_UL_SPACE
- M_E( "TopMargin", FO, margin_top, XML_TYPE_MEASURE, 0 ),
- M_E( "BottomMargin", FO, margin_bottom, XML_TYPE_MEASURE, 0 ),
+ M_E( "TopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE, 0 ),
+ M_E( "BottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE, 0 ),
// RES_OPAQUE
- M_ED( "Opaque", STYLE, run_through, XML_TYPE_TEXT_OPAQUE, 0 ),
+ M_ED( "Opaque", STYLE, RUN_THROUGH, XML_TYPE_TEXT_OPAQUE, 0 ),
// RES_SURROUND
- M_E( "TextWrap", STYLE, wrap, XML_TYPE_TEXT_WRAP, CTF_WRAP ),
- M_E( "SurroundAnchorOnly", STYLE, number_wrapped_paragraphs, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ),
- M_E( "SurroundContour", STYLE, wrap_contour, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ),
- M_E( "ContourOutside", STYLE, wrap_contour_mode, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ),
+ M_E( "TextWrap", STYLE, WRAP, XML_TYPE_TEXT_WRAP, CTF_WRAP ),
+ M_E( "SurroundAnchorOnly", STYLE, NUMBER_WRAPPED_PARAGRAPHS, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ),
+ M_E( "SurroundContour", STYLE, WRAP_CONTOUR, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ),
+ M_E( "ContourOutside", STYLE, WRAP_CONTOUR_MODE, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ),
// RES_VERT_ORIENT
- M_E( "VertOrient", STYLE, vertical_pos, XML_TYPE_TEXT_VERTICAL_POS, CTF_VERTICALPOS ),
- M_E( "VertOrient", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ),
- M_E( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL, CTF_VERTICALREL ),
- M_E( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_PAGE ),
- M_E( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_FRAME ),
+ M_E( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS, CTF_VERTICALPOS ),
+ M_E( "VertOrient", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ),
+ M_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_VERTICALREL ),
+ M_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_PAGE ),
+ M_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_FRAME ),
// RES_HORI_ORIENT
- M_E( "HoriOrient", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_HORIZONTALPOS ),
- M_E( "PageToggle", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_HORIZONTALMIRROR ),
- M_E( "HoriOrient", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALPOS_MIRRORED ),
- M_E( "HoriOrientRelation", STYLE, horizontal_rel, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_HORIZONTALREL ),
- M_E( "HoriOrientRelation", STYLE, horizontal_rel, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALREL_FRAME ),
- M_E( "UserDefinedAttributes", TEXT, xmlns, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
- { 0, 0, 0, 0 }
+ M_E( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_HORIZONTALPOS ),
+ M_E( "PageToggle", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_HORIZONTALMIRROR ),
+ M_E( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALPOS_MIRRORED ),
+ M_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_HORIZONTALREL ),
+ M_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALREL_FRAME ),
+ M_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+ { 0, 0, XML_TOKEN_INVALID, 0 }
};
XMLPropertyMapEntry aXMLSectionPropMap[] =
{
// RES_COL
- M_E( "TextColumns", STYLE, columns, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_TEXTCOLUMNS ),
+ M_E( "TextColumns", STYLE, COLUMNS, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_TEXTCOLUMNS ),
// RES_BACKGROUND
- M_E( "BackColor", FO, background_color, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
- M_E( "BackTransparent", FO, background_color, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- M_E( "BackGraphicLocation", STYLE, position, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
- M_E( "BackGraphicFilter",STYLE, filter_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
- M_E( "BackGraphicURL", STYLE, background_image, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
+ M_E( "BackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "BackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ M_E( "BackGraphicLocation", STYLE, POSITION, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
+ M_E( "BackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
+ M_E( "BackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
// move protect-flag into section element
-// M_E( "IsProtected", STYLE, protect, XML_TYPE_BOOL, 0 ),
+// M_E( "IsProtected", STYLE, PROTECT, XML_TYPE_BOOL, 0 ),
// section footnote settings
- M_E( "FootnoteIsOwnNumbering", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_NUM_OWN ),
- M_E( "FootnoteIsRestartNumbering", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_NUM_RESTART ),
- M_E( "FootnoteRestartNumberingAt", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_FOOTNOTE_NUM_RESTART_AT ),
- M_E( "FootnoteNumberingType", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_FOOTNOTE_NUM_TYPE ),
- M_E( "FootnoteNumberingPrefix", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_FOOTNOTE_NUM_PREFIX ),
- M_E( "FootnoteNumberingSuffix", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_FOOTNOTE_NUM_SUFFIX ),
- M_E( "FootnoteIsCollectAtTextEnd", TEXT, footnotes_configuration, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_END ),
+ M_E( "FootnoteIsOwnNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_NUM_OWN ),
+ M_E( "FootnoteIsRestartNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_NUM_RESTART ),
+ M_E( "FootnoteRestartNumberingAt", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_FOOTNOTE_NUM_RESTART_AT ),
+ M_E( "FootnoteNumberingType", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_FOOTNOTE_NUM_TYPE ),
+ M_E( "FootnoteNumberingPrefix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_FOOTNOTE_NUM_PREFIX ),
+ M_E( "FootnoteNumberingSuffix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_FOOTNOTE_NUM_SUFFIX ),
+ M_E( "FootnoteIsCollectAtTextEnd", TEXT, FOOTNOTES_CONFIGURATION, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_END ),
// section footnote settings
- M_E( "EndnoteIsOwnNumbering", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_NUM_OWN ),
- M_E( "EndnoteIsRestartNumbering", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_NUM_RESTART ),
- M_E( "EndnoteRestartNumberingAt", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_ENDNOTE_NUM_RESTART_AT ),
- M_E( "EndnoteNumberingType", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_ENDNOTE_NUM_TYPE ),
- M_E( "EndnoteNumberingPrefix", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_PREFIX ),
- M_E( "EndnoteNumberingSuffix", TEXT, _empty, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_SUFFIX ),
- M_E( "EndnoteIsCollectAtTextEnd", TEXT, endnotes_configuration, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_END ),
-
- { 0, 0, 0, 0 }
+ M_E( "EndnoteIsOwnNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_NUM_OWN ),
+ M_E( "EndnoteIsRestartNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_NUM_RESTART ),
+ M_E( "EndnoteRestartNumberingAt", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_ENDNOTE_NUM_RESTART_AT ),
+ M_E( "EndnoteNumberingType", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_ENDNOTE_NUM_TYPE ),
+ M_E( "EndnoteNumberingPrefix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_PREFIX ),
+ M_E( "EndnoteNumberingSuffix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_SUFFIX ),
+ M_E( "EndnoteIsCollectAtTextEnd", TEXT, ENDNOTES_CONFIGURATION, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_END ),
+
+ { 0, 0, XML_TOKEN_INVALID, 0 }
};
XMLPropertyMapEntry aXMLRubyPropMap[] =
{
- M_E( "RubyAdjust", STYLE, ruby_align, XML_TYPE_TEXT_RUBY_ADJUST, 0 ),
- M_E( "RubyIsAbove", STYLE, ruby_position, XML_TYPE_TEXT_RUBY_POSITION, 0 ),
- { 0, 0, 0, 0 }
+ M_E( "RubyAdjust", STYLE, RUBY_ALIGN, XML_TYPE_TEXT_RUBY_ADJUST, 0 ),
+ M_E( "RubyIsAbove", STYLE, RUBY_POSITION, XML_TYPE_TEXT_RUBY_POSITION, 0 ),
+ { 0, 0, XML_TOKEN_INVALID, 0 }
};
XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
@@ -767,7 +768,7 @@ XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
break;
case TEXT_PROP_MAP_AUTO_FRAME:
pMap = &(aXMLFramePropMap[10]);
- DBG_ASSERT( pMap->msXMLName == sXML_margin_left, "frame map changed" );
+ DBG_ASSERT( pMap->meXMLName == XML_MARGIN_LEFT, "frame map changed" );
break;
case TEXT_PROP_MAP_SHAPE:
pMap = aXMLShapePropMap;
@@ -780,7 +781,7 @@ XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
break;
case TEXT_PROP_MAP_SHAPE_PARA:
pMap = &aXMLParaPropMap[8];
- DBG_ASSERT( pMap->msXMLName == sXML_font_variant,
+ DBG_ASSERT( pMap->meXMLName == XML_FONT_VARIANT,
"paragraph map changed" );
break;
}
diff --git a/xmloff/source/text/txtsecte.cxx b/xmloff/source/text/txtsecte.cxx
index 4bd5ac229089..594773e2a664 100644
--- a/xmloff/source/text/txtsecte.cxx
+++ b/xmloff/source/text/txtsecte.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtsecte.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: dvo $ $Date: 2001-05-14 13:03:17 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -122,10 +122,6 @@
#include <com/sun/star/text/XDocumentIndex.hpp>
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
-#endif
-
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx
index f1601a9fecec..e76fd562b14b 100644
--- a/xmloff/source/text/txtstyle.cxx
+++ b/xmloff/source/text/txtstyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtstyle.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: mib $ $Date: 2001-04-10 12:35:52 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,8 +77,8 @@
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
@@ -119,6 +119,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::style;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
+using namespace ::xmloff::token;
void XMLTextParagraphExport::exportStyleAttributes(
const ::com::sun::star::uno::Reference<
@@ -133,34 +134,33 @@ void XMLTextParagraphExport::exportStyleAttributes(
aAny = xPropSet->getPropertyValue( sCategory );
sal_Int16 nCategory;
aAny >>= nCategory;
- const sal_Char *pValue = 0;
+ enum XMLTokenEnum eValue = XML_TOKEN_INVALID;
if( -1 != nCategory )
{
switch( nCategory )
{
case ParagraphStyleCategory::TEXT:
- pValue = sXML_text;
+ eValue = XML_TEXT;
break;
case ParagraphStyleCategory::CHAPTER:
- pValue = sXML_chapter;
+ eValue = XML_CHAPTER;
break;
case ParagraphStyleCategory::LIST:
- pValue = sXML_list;
+ eValue = XML_LIST;
break;
case ParagraphStyleCategory::INDEX:
- pValue = sXML_index;
+ eValue = XML_INDEX;
break;
case ParagraphStyleCategory::EXTRA:
- pValue = sXML_extra;
+ eValue = XML_EXTRA;
break;
case ParagraphStyleCategory::HTML:
- pValue = sXML_html;
+ eValue = XML_HTML;
break;
}
}
- if( pValue )
- GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_class,
- pValue );
+ if( eValue != XML_TOKEN_INVALID )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_CLASS, eValue);
}
if( xPropSetInfo->hasPropertyByName( sPageDescName ) )
{
@@ -172,7 +172,7 @@ void XMLTextParagraphExport::exportStyleAttributes(
OUString sName;
aAny >>= sName;
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- sXML_master_page_name,
+ XML_MASTER_PAGE_NAME,
sName );
}
}
@@ -204,16 +204,16 @@ void XMLTextParagraphExport::exportTextStyles( sal_Bool bUsed, sal_Bool bProg )
{
Reference < XPropertySet > xPropSet (xInt, UNO_QUERY);
if (xPropSet.is())
- exportDefaultStyle( xPropSet, sXML_paragraph, GetParaPropMapper());
+ exportDefaultStyle( xPropSet, GetXMLToken(XML_PARAGRAPH), GetParaPropMapper());
}
}
- exportStyleFamily( "ParagraphStyles", sXML_paragraph, GetParaPropMapper(),
+ exportStyleFamily( "ParagraphStyles", GetXMLToken(XML_PARAGRAPH), GetParaPropMapper(),
bUsed, XML_STYLE_FAMILY_TEXT_PARAGRAPH, 0);
- exportStyleFamily( "CharacterStyles", sXML_text, GetTextPropMapper(),
+ exportStyleFamily( "CharacterStyles", GetXMLToken(XML_TEXT), GetTextPropMapper(),
bUsed, XML_STYLE_FAMILY_TEXT_TEXT );
// get shape export to make sure the the frame family is added correctly.
GetExport().GetShapeExport();
- exportStyleFamily( "FrameStyles", XML_STYLE_FAMILY_SD_GRAPHICS_NAME, GetFramePropMapper(),
+ exportStyleFamily( "FrameStyles", OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), GetFramePropMapper(),
bUsed, XML_STYLE_FAMILY_TEXT_FRAME, 0);
exportNumStyles( bUsed );
if( !IsBlockMode() )
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 0dc12195b3a7..058560843b60 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtstyli.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: dvo $ $Date: 2001-06-25 17:22:38 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,8 +84,8 @@
#ifndef _XMLOFF_XMLNMSPE_HXX
#include "xmlnmspe.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_FAMILIES_HXX
#include "families.hxx"
@@ -158,21 +158,21 @@ void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
if( XML_NAMESPACE_STYLE == nPrefixKey )
{
// TODO: use a map here
- if( rLocalName.compareToAscii( sXML_auto_update ) == 0 )
+ if( IsXMLToken( rLocalName, XML_AUTO_UPDATE ) )
{
- if( rValue.compareToAscii( sXML_true ) == 0 )
+ if( IsXMLToken( rValue, XML_TRUE ) )
bAutoUpdate = sal_True;
}
- else if( rLocalName.compareToAscii( sXML_list_style_name ) == 0 )
+ else if( IsXMLToken( rLocalName, XML_LIST_STYLE_NAME ) )
{
sListStyleName = rValue;
}
- else if( rLocalName.compareToAscii( sXML_master_page_name ) == 0 )
+ else if( IsXMLToken( rLocalName, XML_MASTER_PAGE_NAME ) )
{
sMasterPageName = rValue;
bHasMasterPageName = sal_True;
}
- else if( rLocalName.compareToAscii( sXML_class ) == 0 )
+ else if( IsXMLToken( rLocalName, XML_CLASS ) )
{
sCategoryVal = rValue;
}
@@ -220,7 +220,7 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
SvXMLImportContext *pContext = 0;
if( XML_NAMESPACE_STYLE == nPrefix &&
- rLocalName.compareToAscii( sXML_properties ) == 0 )
+ IsXMLToken( rLocalName, XML_PROPERTIES ) )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
GetStyles()->GetImportPropertyMapper( GetFamily() );
@@ -232,7 +232,7 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
sDropCapTextStyleName );
}
else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
- rLocalName.equalsAsciiL( sXML_events, sizeof(sXML_events)-1 ) )
+ IsXMLToken( rLocalName, XML_EVENTS ) )
{
// create and remember events import context
// (for delayed processing of events)
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index ae49d99a4ee3..15059514e2bc 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtvfldi.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: dvo $ $Date: 2001-06-15 10:37:08 $
+ * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,8 +68,8 @@
#include "txtvfldi.hxx"
#endif
-#ifndef _XMLOFF_XMLKYWD_HXX
-#include "xmlkywd.hxx"
+#ifndef _XMLOFF_XMLTOKEN_HXX
+#include "xmltoken.hxx"
#endif
#ifndef _XMLOFF_TEXTIMP_HXX_
@@ -250,19 +250,19 @@ void XMLVarFieldImportContext::ProcessAttribute(
bFormulaOK = sal_True;
break;
case XML_TOK_TEXTFIELD_DISPLAY:
- if (0 == sAttrValue.compareToAscii(sXML_formula))
+ if (IsXMLToken(sAttrValue, XML_FORMULA))
{
bDisplayFormula = sal_True;
bDisplayNone = sal_False;
bDisplayOK = sal_True;
}
- else if (0 == sAttrValue.compareToAscii(sXML_value))
+ else if (IsXMLToken(sAttrValue, XML_VALUE))
{
bDisplayFormula = sal_False;
bDisplayNone = sal_False;
bDisplayOK = sal_True;
}
- else if (0 == sAttrValue.compareToAscii(sXML_none))
+ else if (IsXMLToken(sAttrValue, XML_NONE))
{
bDisplayFormula = sal_False;
bDisplayNone = sal_True;
@@ -447,8 +447,8 @@ XMLSequenceFieldImportContext::XMLSequenceFieldImportContext(
sal_True, sal_True, sal_True,
sal_False, sal_False, sal_False,
sal_False, sal_False, sal_False, sal_True),
- sNumFormat(sal_Unicode('1')),
- sNumFormatSync(RTL_CONSTASCII_USTRINGPARAM(sXML_false)),
+ sNumFormat(OUString::valueOf(sal_Unicode('1'))),
+ sNumFormatSync(GetXMLToken(XML_FALSE)),
sRefName(),
bRefNameOK(sal_False),
sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_number_format)),
@@ -768,25 +768,28 @@ SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName,
const Reference<xml::sax::XAttributeList> & xAttrList )
{
- sal_Char* sElementName;
+ enum XMLTokenEnum eElementName;
SvXMLImportContext* pImportContext = NULL;
- if (XML_NAMESPACE_TEXT == nPrefix) {
- switch (eVarDeclsContextType) {
- case VarTypeSequence:
- sElementName = sXML_sequence_decl;
- break;
- case VarTypeSimple:
- sElementName = sXML_variable_decl;
- break;
- case VarTypeUserField:
- sElementName = sXML_user_field_decl;
- break;
- default:
- DBG_ERROR("unknown field type!");
+ if( XML_NAMESPACE_TEXT == nPrefix )
+ {
+ switch (eVarDeclsContextType)
+ {
+ case VarTypeSequence:
+ eElementName = XML_SEQUENCE_DECL;
+ break;
+ case VarTypeSimple:
+ eElementName = XML_VARIABLE_DECL;
+ break;
+ case VarTypeUserField:
+ eElementName = XML_USER_FIELD_DECL;
+ break;
+ default:
+ DBG_ERROR("unknown field type!");
}
- if (0 == rLocalName.compareToAscii(sElementName)) {
+ if( IsXMLToken( rLocalName, eElementName ) )
+ {
pImportContext = new XMLVariableDeclImportContext(
GetImport(), rImportHelper, nPrefix, rLocalName, xAttrList,
eVarDeclsContextType);
@@ -829,9 +832,9 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
sPropertyIsExpression(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_expression))
{
if ( (XML_NAMESPACE_TEXT == nPrfx) &&
- ( (0 == rLocalName.compareToAscii(sXML_sequence_decl)) ||
- (0 == rLocalName.compareToAscii(sXML_variable_decl)) ||
- (0 == rLocalName.compareToAscii(sXML_user_field_decl)) )) {
+ ( ( IsXMLToken( rLocalName, XML_SEQUENCE_DECL )) ||
+ ( IsXMLToken( rLocalName, XML_VARIABLE_DECL)) ||
+ ( IsXMLToken( rLocalName, XML_USER_FIELD_DECL)) )) {
// TODO: check validity (need name!)
@@ -892,7 +895,7 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
if (nNumLevel >= 0)
{
- OUString sStr(cSeparationChar);
+ OUString sStr(&cSeparationChar, 1);
aAny <<= sStr;
xFieldMaster->setPropertyValue(
sPropertyNumberingSeparator, aAny);