diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-04-20 17:22:29 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-04-20 20:54:16 +0200 |
commit | 84aeb737c7c013c8d98d8c40abfca44f6f70cee8 (patch) | |
tree | 7c951f402a2a889549940e1ebb3ee733ca38a8b6 /sax | |
parent | CharAttribList::OptimizeRanges: de-optimize to not crash so fast (diff) | |
download | core-84aeb737c7c013c8d98d8c40abfca44f6f70cee8.tar.gz core-84aeb737c7c013c8d98d8c40abfca44f6f70cee8.zip |
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.
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/converter.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index 95f6494a2fc4..4fe6d7fbd35d 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -628,8 +628,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; } |