summaryrefslogtreecommitdiff
path: root/xmloff/source/style
diff options
context:
space:
mode:
authorDaniel Vogelheim <dvo@openoffice.org>2001-06-29 20:07:26 +0000
committerDaniel Vogelheim <dvo@openoffice.org>2001-06-29 20:07:26 +0000
commitf4983559bde7e92cc93ddaf79650db9aabc15019 (patch)
treefb2a4107a2c056882b68f14fda364b2e14e142b3 /xmloff/source/style
parent5e7951a2d8e80d1353ee51be3c0129e24841e1ce (diff)
#86004# changes sXML_* strings to XML_* tokens
Diffstat (limited to 'xmloff/source/style')
-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
63 files changed, 906 insertions, 938 deletions
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 =