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 /svl/source/numbers | |
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 'svl/source/numbers')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 7 |
1 files changed, 5 insertions, 2 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() ); |