summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-08-30 16:46:49 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-09-04 10:00:25 +0200
commit3099e4261eab39304411eec4cd782592fa139862 (patch)
tree87d13a5aed41f04bf8d934e3d2a47d2ed4f7655c /svl
parent328646778fcf7242863f0fe20f33bd99d3386c63 (diff)
Use INPUTSTRING_PRECISION to enable input of fraction of second
This got lost when SvNumberFormatter::INPUTSTRING_PRECISION was introduced but not all places changed using the previous hard coded number 300, so input of fraction of second in time clock and duration was either truncated or not available at all, already since commit 0ce0dd5863208500d8d4658f1f68f34e254ab015 CommitDate: Tue Dec 1 16:58:07 2009 -0500 #i46511# Fixed one bug where the standard percent format incorrectly got unlimited precision. Change-Id: I9e4dd867b07090db16b23639fd01fb2cebb3f5d0 Reviewed-on: https://gerrit.libreoffice.org/59815 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 73c200d7e5779b18ee1406b7fbd2000a8c901589) Reviewed-on: https://gerrit.libreoffice.org/59838 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zformat.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index afbab5087e54..a1d55cbc82f9 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2945,7 +2945,7 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber,
}
bool bInputLine;
sal_Int32 nCntPost;
- if ( rScan.GetStandardPrec() == 300 &&
+ if ( rScan.GetStandardPrec() == SvNumberFormatter::INPUTSTRING_PRECISION &&
0 < rInfo.nCntPost && rInfo.nCntPost < 7 )
{ // round at 7 decimals (+5 of 86400 == 12 significant digits)
bInputLine = true;
@@ -3807,7 +3807,7 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
bool bInputLine;
sal_Int32 nCntPost;
- if ( rScan.GetStandardPrec() == 300 &&
+ if ( rScan.GetStandardPrec() == SvNumberFormatter::INPUTSTRING_PRECISION &&
0 < rInfo.nCntPost && rInfo.nCntPost < 7 )
{
// round at 7 decimals (+5 of 86400 == 12 significant digits)