sc/source/core/data/formulacell.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 896dd3962cd7e62bb2a9ebc6f97ff77936ec06a8 Author: Eike Rathke <er...@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 diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 198077b..a9cb0e8 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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits