From 4b81e61682e7af2af0c00c0a267d4a1f267c45f1 Mon Sep 17 00:00:00 2001 From: Laurent Balland-Poirier Date: Thu, 22 Sep 2016 22:04:38 +0200 Subject: tdf#102370 Correctly export to Excel exponent without sign Exponent without sign in scientific notation is coded in Excel with a minus sign replacing plus sign: 0.00E-00 for instance This format is already correctly treated in Calc but was not correctly exported to Excel or ODF Change-Id: Ide117b04e0eb887c6cdd6699ae8ec723d1d29d50 Reviewed-on: https://gerrit.libreoffice.org/29198 Tested-by: Jenkins Reviewed-by: Eike Rathke --- xmloff/source/style/xmlnumfe.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xmloff') 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; -- cgit