diff options
author | Michael Stahl <mst@openoffice.org> | 2011-10-11 14:19:09 +0200 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2011-10-11 17:57:01 +0200 |
commit | 8666469d7b0f450ec1448f80eda3c591f8d8d318 (patch) | |
tree | ae63c5f07df7d3c2d45ea03e47f147661f280923 /xmloff/source/text/XMLTextFrameContext.cxx | |
parent | ae3e2f170045a1525f67e9f3e9b7e03d94f2b56b (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/text/XMLTextFrameContext.cxx')
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 0ba202c465ce..a4c5af402dca 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -280,20 +280,18 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( sPoints = rValue; break; case XML_TOK_TEXT_CONTOUR_WIDTH: - if( GetImport().GetMM100UnitConverter().convertMeasurePx( nWidth, - rValue) ) + if (::sax::Converter::convertMeasurePx(nWidth, rValue)) bPixelWidth = sal_True; else - GetImport().GetMM100UnitConverter().convertMeasure( nWidth, - rValue); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nWidth, rValue); break; case XML_TOK_TEXT_CONTOUR_HEIGHT: - if( GetImport().GetMM100UnitConverter().convertMeasurePx( nHeight, - rValue) ) + if (::sax::Converter::convertMeasurePx(nHeight, rValue)) bPixelHeight = sal_True; else - GetImport().GetMM100UnitConverter().convertMeasure( nHeight, - rValue); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nHeight, rValue); break; case XML_TOK_TEXT_CONTOUR_AUTO: bAuto = IsXMLToken(rValue, XML_TRUE); @@ -914,10 +912,12 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( } break; case XML_TOK_TEXT_FRAME_X: - GetImport().GetMM100UnitConverter().convertMeasure( nX, rValue ); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nX, rValue); break; case XML_TOK_TEXT_FRAME_Y: - GetImport().GetMM100UnitConverter().convertMeasure( nY, rValue ); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nY, rValue ); break; case XML_TOK_TEXT_FRAME_WIDTH: // relative widths are obsolete since SRC617. Remove them some day! @@ -929,8 +929,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( } else { - GetImport().GetMM100UnitConverter().convertMeasure( nWidth, - rValue, 0 ); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nWidth, rValue, 0 ); } break; case XML_TOK_TEXT_FRAME_REL_WIDTH: @@ -954,8 +954,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( } else { - GetImport().GetMM100UnitConverter().convertMeasure( nWidth, - rValue, 0 ); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nWidth, rValue, 0 ); } bMinWidth = sal_True; break; @@ -969,8 +969,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( } else { - GetImport().GetMM100UnitConverter().convertMeasure( nHeight, - rValue, 0 ); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nHeight, rValue, 0 ); } break; case XML_TOK_TEXT_FRAME_REL_HEIGHT: @@ -999,8 +999,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( } else { - GetImport().GetMM100UnitConverter().convertMeasure( nHeight, - rValue, 0 ); + GetImport().GetMM100UnitConverter().convertMeasureToCore( + nHeight, rValue, 0 ); } bMinHeight = sal_True; break; |