summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svl/source/numbers/zformat.cxx7
-rw-r--r--xmloff/source/style/xmlnumfe.cxx5
2 files changed, 8 insertions, 4 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 17583d455628..f4b7834ff375 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4806,9 +4806,12 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords,
aStr.append( rLocWrp.getNumThousandSep() );
break;
case NF_SYMBOLTYPE_EXP :
- // tdf#95677: Excel does not support exponent without sign
aStr.append( rKeywords[NF_KEY_E] );
- aStr.append( "+" );
+ if ( pStr[j].getLength() > 1 && pStr[j][1] == '+' )
+ aStr.append( "+" );
+ else
+ // tdf#102370: Excel code for exponent without sign
+ aStr.append( "-" );
break;
case NF_SYMBOLTYPE_DATESEP :
aStr.append( rLocWrp.getDateSep() );
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index f449331333c4..3790e79eaafd 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1321,8 +1321,9 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
case NF_SYMBOLTYPE_EXP:
bExpFound = true; // following digits are exponent digits
bInInteger = false;
- if ( pElemStr && pElemStr->getLength() == 1 )
- bExpSign = false; // for 0.00E0
+ if ( pElemStr && ( pElemStr->getLength() == 1
+ || ( pElemStr->getLength() == 2 && (*pElemStr)[1] == '-' ) ) )
+ bExpSign = false; // for 0.00E0 or 0.00E-00
break;
case NF_SYMBOLTYPE_CURRENCY:
bCurrFound = true;