summaryrefslogtreecommitdiff
path: root/xmloff/source/style
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/style')
-rw-r--r--xmloff/source/style/xmlnumfe.cxx3
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 2d6043d0d54a..6801d3c05fbf 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1201,7 +1201,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 eca9301e83c5..c375a78824ef 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1006,7 +1006,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
}
if ( aNumInfo.nMinDecimalDigits == -1)
{
- if ( bVarDecimals )
+ if ( bVarDecimals || aNumInfo.bDecReplace )
aNumInfo.nMinDecimalDigits = 0;
else
aNumInfo.nMinDecimalDigits = aNumInfo.nDecimals;