diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-07-13 07:19:05 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-07-13 07:19:05 +0000 |
commit | b975271431e47d56971ee2aeeea442f2965afc23 (patch) | |
tree | e51f88e978532b2df1cf2bbb4a63afc2d08f1215 /xmloff/source/style | |
parent | ebae1cb2cdbbaf4ba28289f8b49bdbf53f2dec78 (diff) |
INTEGRATION: CWS oasis (1.9.248); FILE MERGED
2004/05/11 11:11:24 mib 1.9.248.2: - #i20153#: encode/decode style names finished
2004/05/07 11:59:56 mib 1.9.248.1: - #i20153#: encode/decode style names (ooo2oasis missing)
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/HatchStyle.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx index bb44d96dc350..92c1ef6b35b8 100644 --- a/xmloff/source/style/HatchStyle.cxx +++ b/xmloff/source/style/HatchStyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: HatchStyle.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: cl $ $Date: 2002-09-25 16:19:26 $ + * last change: $Author: rt $ $Date: 2004-07-13 08:19:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -114,6 +114,7 @@ using namespace ::xmloff::token; enum SvXMLTokenMapAttrs { XML_TOK_HATCH_NAME, + XML_TOK_HATCH_DISPLAY_NAME, XML_TOK_HATCH_STYLE, XML_TOK_HATCH_COLOR, XML_TOK_HATCH_DISTANCE, @@ -124,6 +125,7 @@ enum SvXMLTokenMapAttrs static __FAR_DATA SvXMLTokenMapEntry aHatchAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_HATCH_NAME }, + { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_HATCH_DISPLAY_NAME }, { XML_NAMESPACE_DRAW, XML_STYLE, XML_TOK_HATCH_STYLE }, { XML_NAMESPACE_DRAW, XML_COLOR, XML_TOK_HATCH_COLOR }, { XML_NAMESPACE_DRAW, XML_HATCH_DISTANCE, XML_TOK_HATCH_DISTANCE }, @@ -164,6 +166,7 @@ sal_Bool XMLHatchStyleImport::importXML( sal_Bool bHasStyle = sal_False; sal_Bool bHasColor = sal_False; sal_Bool bHasDist = sal_False; + OUString aDisplayName; drawing::Hatch aHatch; aHatch.Style = drawing::HatchStyle_SINGLE; @@ -191,6 +194,9 @@ sal_Bool XMLHatchStyleImport::importXML( bHasName = sal_True; } break; + case XML_TOK_HATCH_DISPLAY_NAME: + aDisplayName = rStrValue; + break; case XML_TOK_HATCH_STYLE: { sal_uInt16 eValue; @@ -224,6 +230,13 @@ sal_Bool XMLHatchStyleImport::importXML( rValue <<= aHatch; + if( aDisplayName.getLength() ) + { + rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_HATCH_ID, rStrName, + aDisplayName ); + rStrName = aDisplayName; + } + bRet = bHasName && bHasStyle && bHasColor && bHasDist; return bRet; @@ -270,7 +283,13 @@ sal_Bool XMLHatchStyleExport::exportXML( else { // 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 ); aStrValue = aOut.makeStringAndClear(); rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue ); |