diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2015-10-28 16:17:23 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-11-05 22:02:47 +0100 |
commit | 99f256296fc8121eb02422e58bd0718f1ccbe397 (patch) | |
tree | 3376dd30cb83105194eb12d698c58c656a7ce848 | |
parent | 832e2019a9c45b1e605a87dcfec2143f03bde97f (diff) |
tdf#93296 dashes in decimal part => 0 min decimal places
During import, as well during export, "0.--" must be considered
as 0 min decimal places
Change-Id: I33d06dd95c0678660bc0bb222972f82ef54f2c6e
Reviewed-on: https://gerrit.libreoffice.org/19647
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 3f970cf247ad96d1663462acb0be7f1c767d1ebf)
Reviewed-on: https://gerrit.libreoffice.org/19781
(cherry picked from commit 18be99af0b2a9ad6d7303ba6e594774b4292c316)
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 6c9d360828e8..0d160add9598 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1206,7 +1206,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt if ( bExpFound && pElemStr ) nExpDigits += pElemStr->getLength(); else if ( !bDecDashes && pElemStr && (*pElemStr)[0] == '-' ) + { bDecDashes = true; + nMinDecimals = 0; + } else if ( !bInInteger && pElemStr ) { for ( sal_Int32 i = pElemStr->getLength()-1; i >= 0 && (*pElemStr)[i] == '#'; i-- ) diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index e9e25f484c99..4b01d13a1b6b 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1021,7 +1021,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport, } if ( aNumInfo.nMinDecimalDigits == -1) { - if ( bVarDecimals ) + if ( bVarDecimals || aNumInfo.bDecReplace ) aNumInfo.nMinDecimalDigits = 0; else aNumInfo.nMinDecimalDigits = aNumInfo.nDecimals; |