[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/source
Eike Rathke
erack at redhat.com
Thu Jan 5 16:47:27 UTC 2017
sc/source/core/data/formulacell.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit d321ba87f5ab67f939034c59846d2a3d0ab7e9b4
Author: Eike Rathke <erack at redhat.com>
Date: Thu Jan 5 13:28:36 2017 +0100
tdf#105024 use context to generate "error only" formula string
The ScGlobal::GetErrorString() shortcut produced error constants in the
localized UI language, which was wrong anyway when storing ODFF. Use compiler
with context instead to generate the proper symbols.
However, this currently maps all not defined Err:xxx to #NULL! so to preserve
those additional work is needed.
Change-Id: I1de7621d6349d5b00a5aac1cedc9f265c78c7db1
(cherry picked from commit 896dd3962cd7e62bb2a9ebc6f97ff77936ec06a8)
Reviewed-on: https://gerrit.libreoffice.org/32752
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index f59ad09..6616439 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1042,7 +1042,10 @@ OUString ScFormulaCell::GetFormula( sc::CompileFormulaContext& rCxt ) const
OUStringBuffer aBuf;
if (pCode->GetCodeError() != FormulaError::NONE && !pCode->GetLen())
{
- aBuf = OUStringBuffer( ScGlobal::GetErrorString( pCode->GetCodeError()));
+ ScTokenArray aCode;
+ aCode.AddToken( FormulaErrorToken( pCode->GetCodeError()));
+ ScCompiler aComp(rCxt, aPos, aCode);
+ aComp.CreateStringFromTokenArray(aBuf);
return aBuf.makeStringAndClear();
}
else if( cMatrixFlag == MM_REFERENCE )
More information about the Libreoffice-commits
mailing list