diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-07-13 07:18:27 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-07-13 07:18:27 +0000 |
commit | fc69cd6cd1d25d770081e10587cd91a31db1ec35 (patch) | |
tree | bbf6a8662945d26daae1c55737d827080a0843cc /xmloff/source/style | |
parent | 2051b1aa06d3e073b2f279e93f57f03006a06d6f (diff) |
INTEGRATION: CWS oasis (1.10.270); FILE MERGED
2004/05/11 11:11:22 mib 1.10.270.2: - #i20153#: encode/decode style names finished
2004/05/07 11:59:55 mib 1.10.270.1: - #i20153#: encode/decode style names (ooo2oasis missing)
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/DashStyle.cxx | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx index c861ee56c6b6..3eb92c1adce9 100644 --- a/xmloff/source/style/DashStyle.cxx +++ b/xmloff/source/style/DashStyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DashStyle.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: thb $ $Date: 2001-10-23 10:05:52 $ + * last change: $Author: rt $ $Date: 2004-07-13 08:18:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -122,6 +122,7 @@ using namespace ::xmloff::token; enum SvXMLTokenMapAttrs { XML_TOK_DASH_NAME, + XML_TOK_DASH_DISPLAY_NAME, XML_TOK_DASH_STYLE, XML_TOK_DASH_DOTS1, XML_TOK_DASH_DOTS1LEN, @@ -134,6 +135,7 @@ enum SvXMLTokenMapAttrs static __FAR_DATA SvXMLTokenMapEntry aDashStyleAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_DASH_NAME }, + { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_DASH_DISPLAY_NAME }, { XML_NAMESPACE_DRAW, XML_STYLE, XML_TOK_DASH_STYLE }, { XML_NAMESPACE_DRAW, XML_DOTS1, XML_TOK_DASH_DOTS1 }, { XML_NAMESPACE_DRAW, XML_DOTS1_LENGTH, XML_TOK_DASH_DOTS1LEN }, @@ -177,6 +179,7 @@ sal_Bool XMLDashStyleImport::importXML( aLineDash.Dashes = 0; aLineDash.DashLen = 0; aLineDash.Distance = 20; + OUString aDisplayName; sal_Bool bIsRel = sal_False; @@ -200,6 +203,11 @@ sal_Bool XMLDashStyleImport::importXML( rStrName = rStrValue; } break; + case XML_TOK_DASH_DISPLAY_NAME: + { + aDisplayName = rStrValue; + } + break; case XML_TOK_DASH_STYLE: { sal_uInt16 eValue; @@ -268,6 +276,13 @@ sal_Bool XMLDashStyleImport::importXML( rValue <<= aLineDash; + if( aDisplayName.getLength() ) + { + rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_STROKE_DASH_ID, + rStrName, aDisplayName ); + rStrName = aDisplayName; + } + return sal_True; } @@ -307,7 +322,13 @@ sal_Bool XMLDashStyleExport::exportXML( OUStringBuffer aOut; // Name - rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName ); + sal_Bool bEncoded = sal_False; + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, + rExport.EncodeStyleName( rStrName, + &bEncoded ) ); + if( bEncoded ) + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, + rStrName ); // Style rUnitConverter.convertEnum( aOut, aLineDash.Style, pXML_DashStyle_Enum ); |