summaryrefslogtreecommitdiff
path: root/xmloff/source/style/HatchStyle.cxx
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2002-09-25 15:19:26 +0000
committerChristian Lippka <cl@openoffice.org>2002-09-25 15:19:26 +0000
commit54dad2033499de3eaa701ead5bd69019c1119da8 (patch)
treebd0cf47b0cf211983b7ceb00cecf52c74586bfa8 /xmloff/source/style/HatchStyle.cxx
parent04b144cfbc55fb37ad222295bcb45f9133697bee (diff)
#103641# fixed possible duplicated attributes
Diffstat (limited to 'xmloff/source/style/HatchStyle.cxx')
-rw-r--r--xmloff/source/style/HatchStyle.cxx59
1 files changed, 32 insertions, 27 deletions
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index 4938dad60cf7..bb44d96dc350 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: HatchStyle.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: cl $ $Date: 2001-10-25 16:03:55 $
+ * last change: $Author: cl $ $Date: 2002-09-25 16:19:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -262,33 +262,38 @@ sal_Bool XMLHatchStyleExport::exportXML(
SvXMLUnitConverter& rUnitConverter =
rExport.GetMM100UnitConverter();
- // Name
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName );
-
// Style
if( !rUnitConverter.convertEnum( aOut, aHatch.Style, pXML_HatchStyle_Enum ) )
- return sal_False;
- aStrValue = aOut.makeStringAndClear();
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue );
-
- // Color
- rUnitConverter.convertColor( aOut, Color( aHatch.Color ) );
- aStrValue = aOut.makeStringAndClear();
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_COLOR, aStrValue );
-
- // Distance
- rUnitConverter.convertMeasure( aOut, aHatch.Distance );
- aStrValue = aOut.makeStringAndClear();
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_HATCH_DISTANCE, aStrValue );
-
- // Angle
- rUnitConverter.convertNumber( aOut, sal_Int32( aHatch.Angle ) );
- aStrValue = aOut.makeStringAndClear();
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ROTATION, aStrValue );
-
- // Do Write
- SvXMLElementExport rElem( rExport, XML_NAMESPACE_DRAW, XML_HATCH,
- sal_True, sal_False );
+ {
+ bRet = sal_False;
+ }
+ else
+ {
+ // Name
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName );
+
+ aStrValue = aOut.makeStringAndClear();
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE, aStrValue );
+
+ // Color
+ rUnitConverter.convertColor( aOut, Color( aHatch.Color ) );
+ aStrValue = aOut.makeStringAndClear();
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_COLOR, aStrValue );
+
+ // Distance
+ rUnitConverter.convertMeasure( aOut, aHatch.Distance );
+ aStrValue = aOut.makeStringAndClear();
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_HATCH_DISTANCE, aStrValue );
+
+ // Angle
+ rUnitConverter.convertNumber( aOut, sal_Int32( aHatch.Angle ) );
+ aStrValue = aOut.makeStringAndClear();
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ROTATION, aStrValue );
+
+ // Do Write
+ SvXMLElementExport rElem( rExport, XML_NAMESPACE_DRAW, XML_HATCH,
+ sal_True, sal_False );
+ }
}
}