summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-04-20 17:22:29 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-04-20 22:21:29 +0200
commit014738b17e07a25a156dd3b459442678d0de3d03 (patch)
tree498a810de13ec762d4e8f53c611422367c2092b6 /sax
parent299387dab1b365427cc44d810026facd30e11a31 (diff)
fdo#48969: switch units in Converter::convertDouble
The factor here is used to divide, so the parameters have to be switched; this has always been broken but probably before 3ca2bef76886450058d1667703aeafe4c2e456c3 nothing called this. This also reverts 7bf1fa3757133f12cf6ca624f8cee6ba5363e7d8 because that was a workaround for the problem in the wrong place. Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
Diffstat (limited to 'sax')
-rw-r--r--sax/source/tools/converter.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index eb22e0f2d544..cf5a5b50089f 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -644,8 +644,9 @@ bool Converter::convertDouble(double& rValue,
if(eStatus == rtl_math_ConversionStatus_Ok)
{
OUStringBuffer sUnit;
+ // fdo#48969: switch source and target because factor is used to divide!
double const fFactor =
- GetConversionFactor(sUnit, nSourceUnit, nTargetUnit);
+ GetConversionFactor(sUnit, nTargetUnit, nSourceUnit);
if(fFactor != 1.0 && fFactor != 0.0)
rValue /= fFactor;
}