summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-11-28 18:25:01 +0100
committerRadek Doulik <rodo@novell.com>2011-11-28 18:25:55 +0100
commitadf84183d445b0a58a90770d681acaf4db97ff8d (patch)
tree65579902e0883edf939e04eb49850db8979adc33
parent7bf1fa3757133f12cf6ca624f8cee6ba5363e7d8 (diff)
fix conversions from cm
-rw-r--r--sax/source/tools/converter.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 198ea4d14732..b1629c8ec572 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1972,17 +1972,17 @@ double Converter::GetConversionFactor(::rtl::OUStringBuffer& rUnit, sal_Int16 nS
{
case MeasureUnit::MM_100TH:
{
- fRetval = .001;
+ fRetval = 1000.0;
break;
}
case MeasureUnit::MM_10TH:
{
- fRetval = .01;
+ fRetval = 100.0;
break;
}
case MeasureUnit::MM:
{
- fRetval = .1;
+ fRetval = 10.0;
psUnit = gpsMM;
break;
}
@@ -1992,8 +1992,7 @@ double Converter::GetConversionFactor(::rtl::OUStringBuffer& rUnit, sal_Int16 nS
}
case MeasureUnit::POINT:
{
- // 0.01pt = 0.35 mm/100 (exactly)
- fRetval = 2.54 / 72.0;
+ fRetval = 72.0 / 2.54;
psUnit = gpsPT;
break;
}
@@ -2001,8 +2000,7 @@ double Converter::GetConversionFactor(::rtl::OUStringBuffer& rUnit, sal_Int16 nS
default:
{
OSL_ENSURE( MeasureUnit::INCH == nTargetUnit, "output unit not supported for cm values");
- // 0.0001in = 0.254 mm/100 (exactly)
- fRetval = 2.54;
+ fRetval = 1 / 2.54;
psUnit = gpsINCH;
break;
}