diff options
author | Laurent Balland <laurent.balland@mailo.fr> | 2023-01-14 15:48:12 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2023-01-30 17:00:46 +0000 |
commit | 46b7fd59f9d0dfb5544df99494d3a3d3a372ae8b (patch) | |
tree | d446f477e8f8de4268eb77284c5913450ece088a /svl | |
parent | e783208906611238a9a6ce9d14029eb732fc611d (diff) |
tdf#118324 Treat blank ? in integer
Restore and update change 56352
Test of https://cgit.freedesktop.org/libreoffice/core/commit/?id=8ca6468f0f4900d4d3bb45e0e938fe35c308512c is now ok
Add disambiguation between '0' and '?' in integer part
XML_MAX_BLANK_INTEGER_DIGITS is added for the number of '?'
XML_MIN_INTEGER_DIGITS is the number of '?' and '0'
This preserve compatibility with previous versions:
in previous versions '?' will be transformed in '0'
It also applies to scientific and fraction numbers.
Integer part for number, scientific and fraction are
treated the same way
Include QA unit test
Change-Id: Iab3127bf07223caac60e409306a1bee2edc37428
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145932
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index eb790ee425b0..effb34ad996f 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -4947,9 +4947,10 @@ void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, SvNumFormatType& rScanne { p++; } - while ( *p++ == '0' ) + while ( *p == '0' || *p == '?' ) { nLeadingCnt++; + p++; } } else if (nType == NF_SYMBOLTYPE_DECSEP |