diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2015-07-29 22:18:04 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-07-31 14:32:52 +0000 |
commit | f1333692475201ce1be7a037397158051d8bd039 (patch) | |
tree | 6652acd8f5ab1b29401e90bf5c1b2b37f39287a5 | |
parent | 0e530f22bf43993ca5db7efec4b6dbc0673b2e12 (diff) |
tdf#92918 Engineering notation lost with Add/Delete Decimal Place
With scientific format, use the trick of thousand separator to detect
Engineering notation.
Change-Id: I7acdfb8bec646f9d6c1a17c334b60fa9708c8111
Reviewed-on: https://gerrit.libreoffice.org/17406
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit f4bdd7989f237e8e90ac94c2798e0ea0fb31af6b)
Reviewed-on: https://gerrit.libreoffice.org/17440
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 3783473fdd90..2cb761258869 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2543,6 +2543,12 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement ) nPrecision = aOut.getLength() - nPos - aDecSep.getLength(); // else keep 0 } + else + { + if ( (nOldType & css::util::NumberFormat::SCIENTIFIC) && !bThousand && + (pOldEntry->GetFormatIntegerDigits()%3 == 0) && pOldEntry->GetFormatIntegerDigits() > 0 ) + bThousand = true; + } if (!bError) { |