[Libreoffice-commits] .: Branch 'libreoffice-3-6' - svl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Nov 14 06:55:54 PST 2012
svl/source/numbers/zforscan.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 4e57d13eca14fb4b0dd2c5a27eba1647b207b0d2
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 13 16:30:07 2012 +0000
don't always show integer part for fraction formats with hard denom fdo#56205
fixes bug when you have a fraction format with a forced denominator e.g. '?/5'
which showed the integer part of the fraction ( as if the format was '# ?/5' )
but even without the space
e.g. before fix
pi 3.14159265358979 with format '?/8' would be shown as "31/8"
after the fix
3.14159265358979 with format '?/8' would be shown as "25/8"
Change-Id: I1feb8b78af94b90db1bcc30da248077243dd8dfc
Reviewed-on: https://gerrit.libreoffice.org/1047
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/1064
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 069d2d3..1124fc5 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1605,7 +1605,9 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString )
nCounter = nCntPost;
else if (nCntPre)
nCounter = nCntPre;
- if (!nCntPre)
+ // don't artificially increment nCntPre
+ // for forced denominator
+ if ( ( eScannedType != NUMBERFORMAT_FRACTION ) && (!nCntPre) )
nCntPre++;
}
}
More information about the Libreoffice-commits
mailing list