Kaydet (Commit) 0cd1ae1f authored tarafından Noel Power's avatar Noel Power Kaydeden (comit) Eike Rathke

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/1047Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst b537d021
......@@ -1595,7 +1595,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++;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment