summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-08-30 16:46:49 +0200
committerEike Rathke <erack@redhat.com>2018-08-30 20:37:41 +0200
commit73c200d7e5779b18ee1406b7fbd2000a8c901589 (patch)
treee18888f6b4973296ec5e97e59750ecf642e7611c /svl
parentb9fa01a8d1137a95af9865a3e47995734c40da6e (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
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 3d7e1c42bd8e..cffa86176781 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2972,7 +2972,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;
@@ -3837,7 +3837,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)