summaryrefslogtreecommitdiff
path: root/xmloff/source/style/HatchStyle.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2011-10-11 14:19:09 +0200
committerMichael Stahl <mst@openoffice.org>2011-10-11 17:57:01 +0200
commit8666469d7b0f450ec1448f80eda3c591f8d8d318 (patch)
treeae63c5f07df7d3c2d45ea03e47f147661f280923 /xmloff/source/style/HatchStyle.cxx
parentae3e2f170045a1525f67e9f3e9b7e03d94f2b56b (diff)
#i108468#: clean up xmluconv code duplication, measured approach:
modify sax::Converter::convertMeasure to use sal_Int64 instead of BigInt: should be sufficient, since the largest number is SAL_INT32_MAX * 10^7. remove duplicate methods from SvXMLUnitConverter: convertMeasurePx, convertMeasure (static variants) remove entirely duplicative class SvXMLExportHelper: GetConversionFactor, GetUnitFromString, AddLength change SvXMLUnitConverter interface from MapUnit to css::util::MeasureUnit. change SvXMLExport constructor params from MapUnit to css::util::MeasureUnit. rename some methods to turn compiler into merge conflict detector :)
Diffstat (limited to 'xmloff/source/style/HatchStyle.cxx')
-rw-r--r--xmloff/source/style/HatchStyle.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index 2a0be91b6e87..833a8bb1593b 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -155,7 +155,8 @@ sal_Bool XMLHatchStyleImport::importXML(
}
break;
case XML_TOK_HATCH_DISTANCE:
- bHasDist = rUnitConverter.convertMeasure( (sal_Int32&)aHatch.Distance, rStrValue );
+ bHasDist = rUnitConverter.convertMeasureToCore(
+ (sal_Int32&)aHatch.Distance, rStrValue );
break;
case XML_TOK_HATCH_ROTATION:
{
@@ -243,7 +244,7 @@ sal_Bool XMLHatchStyleExport::exportXML(
rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_COLOR, aStrValue );
// Distance
- rUnitConverter.convertMeasure( aOut, aHatch.Distance );
+ rUnitConverter.convertMeasureToXML( aOut, aHatch.Distance );
aStrValue = aOut.makeStringAndClear();
rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_HATCH_DISTANCE, aStrValue );