diff options
author | Eike Rathke <erack@redhat.com> | 2018-08-31 11:21:03 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-08-31 12:50:52 +0200 |
commit | e2e47898180e547cad7ccde1e5890385d573e551 (patch) | |
tree | c91b4e1e053c69bbf0906953fe1bba276977ef2c /include | |
parent | 370d4c9ba34913076f7a73a2912eb2e0e48ca73c (diff) |
Use tools::Time::GetClock() in number formatter for wall clock time
Also handle rounding/scaling better in ImpGetTimeOutput() for the
[] duration formats, of which [HH]:MM:SS(.0000000) is used to edit
time values.
The wall clock change made it necessary to adapt some test cases in
Test::testUserDefinedNumberFormats() where M_PI formatted to
date+time actually is 1900-01-02 03:23:53.60527 with second 53
instead of the previously rounded 54.
Change-Id: I242a6c753a24281e041d3f73af019bdd77c65b37
Reviewed-on: https://gerrit.libreoffice.org/59857
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/zformat.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 88b015f4adce..4f5dcb243ec5 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -700,6 +700,15 @@ private: return OUString::number(nVal); } + // Obtain the string of the fraction of second, without leading "0.", + // rounded to nFractionDecimals (or nFractionDecimals+1 if + // bAddOneRoundingDecimal==true but then truncated at nFractionDecimals, + // for use with the result of tools::Time::GetClock()) with the length of + // nFractionDecimals, unless nMinimumInputLineDecimals>0 is given for input + // line string where extra trailing "0" are discarded. + SVL_DLLPRIVATE sal_uInt16 ImpGetFractionOfSecondString( OUStringBuffer& rBuf, double fFractionOfSecond, + int nFractionDecimals, bool bAddOneRoundingDecimal, sal_uInt16 nIx, sal_uInt16 nMinimumInputLineDecimals ); + // transliterate according to NativeNumber SVL_DLLPRIVATE OUString impTransliterateImpl(const OUString& rStr, const SvNumberNatNum& rNum) const; SVL_DLLPRIVATE void impTransliterateImpl(OUStringBuffer& rStr, const SvNumberNatNum& rNum) const; |