include/formula/errorcodes.hxx | 3 +++ sc/inc/globstr.hrc | 1 + sc/source/core/data/global.cxx | 3 +++ sc/source/core/tool/compiler.cxx | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit 6083c974531afe0d9a80c5e3d5f883f194703684 Author: Eike Rathke <er...@redhat.com> Date: Tue Jun 5 10:49:07 2018 +0200 Add "Unsupported inline array content." BadArrayContent message, tdf#117879 Change-Id: I176884ea5161c4f12419431a74bfb2c6fbed4e0f Reviewed-on: https://gerrit.libreoffice.org/55317 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit 5870cf6d9b42094dfda3dbf85817003e021d6559) Reviewed-on: https://gerrit.libreoffice.org/55324 diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx index 41bffa4d9ef9..d4324a998db0 100644 --- a/include/formula/errorcodes.hxx +++ b/include/formula/errorcodes.hxx @@ -81,6 +81,8 @@ enum class FormulaError : sal_uInt16 RetryCircular = 537, // If matrix could not be allocated. MatrixSize = 538, +// Bad inline array content, non-value/non-string. + BadArrayContent = 539, // Interpreter: NA() not available condition, not a real error NotAvailable = 0x7fff @@ -159,6 +161,7 @@ inline bool isPublishedFormulaError( FormulaError nErr ) case FormulaError::NoMacro: case FormulaError::DivisionByZero: case FormulaError::NestedArray: + case FormulaError::BadArrayContent: return true; case FormulaError::NotNumericString: diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index 4ca23e111439..d33be62479dd 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -387,6 +387,7 @@ #define STR_RECALC_MANUAL NC_("STR_RECALC_MANUAL", "Manual") #define STR_RECALC_AUTO NC_("STR_RECALC_AUTO", "Automatic") #define STR_ERR_LONG_NESTED_ARRAY NC_("STR_ERR_LONG_NESTED_ARRAY", "Nested arrays are not supported.") +#define STR_ERR_LONG_BAD_ARRAY_CONTENT NC_("STR_ERR_LONG_BAD_ARRAY_CONTENT", "Unsupported inline array content.") #define STR_UNDO_TEXTTOCOLUMNS NC_("STR_UNDO_TEXTTOCOLUMNS", "Text to Columns") #define STR_DOC_UPDATED NC_("STR_DOC_UPDATED", "Your spreadsheet has been updated with changes saved by other users.") #define STR_DOC_WILLBESAVED NC_("STR_DOC_WILLBESAVED", "The spreadsheet must be saved now to activate sharing mode.\n\nDo you want to continue?") diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 4e33090757f7..3f33f97cf685 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -447,6 +447,9 @@ OUString ScGlobal::GetLongErrorString(FormulaError nErr) case FormulaError::NestedArray: pErrNumber = STR_ERR_LONG_NESTED_ARRAY; break; + case FormulaError::BadArrayContent: + pErrNumber = STR_ERR_LONG_BAD_ARRAY_CONTENT; + break; case FormulaError::NoValue: pErrNumber = STR_LONG_ERR_NO_VALUE; break; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 93065ddd0326..4ec04d968042 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4584,7 +4584,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula ) // Nested inline array or non-value/non-string in array. The // original tokens are still in the ScTokenArray and not merged // into an ScMatrixToken. Set error but keep on tokenizing. - SetError( FormulaError::NestedArray); + SetError( FormulaError::BadArrayContent); } else if (!pNewToken) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits