Kaydet (Commit) 99f25629 authored tarafından Laurent Balland-Poirier's avatar Laurent Balland-Poirier Kaydeden (comit) Andras Timar

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/19647Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
(cherry picked from commit 3f970cf2)
Reviewed-on: https://gerrit.libreoffice.org/19781
(cherry picked from commit 18be99af)
üst 832e2019
...@@ -1206,7 +1206,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt ...@@ -1206,7 +1206,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
if ( bExpFound && pElemStr ) if ( bExpFound && pElemStr )
nExpDigits += pElemStr->getLength(); nExpDigits += pElemStr->getLength();
else if ( !bDecDashes && pElemStr && (*pElemStr)[0] == '-' ) else if ( !bDecDashes && pElemStr && (*pElemStr)[0] == '-' )
{
bDecDashes = true; bDecDashes = true;
nMinDecimals = 0;
}
else if ( !bInInteger && pElemStr ) else if ( !bInInteger && pElemStr )
{ {
for ( sal_Int32 i = pElemStr->getLength()-1; i >= 0 && (*pElemStr)[i] == '#'; i-- ) for ( sal_Int32 i = pElemStr->getLength()-1; i >= 0 && (*pElemStr)[i] == '#'; i-- )
......
...@@ -1021,7 +1021,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport, ...@@ -1021,7 +1021,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
} }
if ( aNumInfo.nMinDecimalDigits == -1) if ( aNumInfo.nMinDecimalDigits == -1)
{ {
if ( bVarDecimals ) if ( bVarDecimals || aNumInfo.bDecReplace )
aNumInfo.nMinDecimalDigits = 0; aNumInfo.nMinDecimalDigits = 0;
else else
aNumInfo.nMinDecimalDigits = aNumInfo.nDecimals; aNumInfo.nMinDecimalDigits = aNumInfo.nDecimals;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment