diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2016-09-22 22:04:38 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-07 19:29:21 +0000 |
commit | 4b81e61682e7af2af0c00c0a267d4a1f267c45f1 (patch) | |
tree | 26c2abf647eebb297fc61d3b3949257cb0bfaf7a /xmloff | |
parent | 9d19634c8e719a80674ca4b3dfc3c7e49f049e5b (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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; |