[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Mon Sep 28 09:27:21 PDT 2015
sc/source/ui/view/tabvwsha.cxx | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 00475bdd32a0745a4b2597bae73990491378945e
Author: Eike Rathke <erack at redhat.com>
Date: Mon Sep 28 18:19:45 2015 +0200
do not use unlimited precision in status bar
Test case scenario:
* in A1 enter =1E222
* move cell cursor back onto A1
* status bar displays Sum=1000000... repeated until filled (or 222 '0'
characters)
Change-Id: Icc1a11a2b007649fc7074e7538917e56dc943444
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index f6ac626..dce648c 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -123,8 +123,18 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode )
}
OUString aValStr;
- Color* pDummy;
- pFormatter->GetOutputString( nVal, nNumFmt, aValStr, &pDummy );
+ // Do not use the unlimited precision of the General format or
+ // the display string for 1E+222 would be '1' and 222 repeated
+ // '0' characters in the status bar ... Instead of setting
+ // standard precision back and forth simply use the input line
+ // string.
+ if ((nNumFmt % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
+ pFormatter->GetInputLineString( nVal, nNumFmt, aValStr);
+ else
+ {
+ Color* pDummy;
+ pFormatter->GetOutputString( nVal, nNumFmt, aValStr, &pDummy );
+ }
aStr += aValStr;
}
}
More information about the Libreoffice-commits
mailing list