summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-06-05 10:49:07 +0200
committerEike Rathke <erack@redhat.com>2018-06-05 12:11:16 +0200
commit5870cf6d9b42094dfda3dbf85817003e021d6559 (patch)
treeafb267e47120d0e316e50d4cd5abcc3579b1bbe5
parent423d01ec92a2c99ca8309a78f6763478e299f6a3 (diff)
Add "Unsupported inline array content." BadArrayContent message, tdf#117879
Change-Id: I176884ea5161c4f12419431a74bfb2c6fbed4e0f Reviewed-on: https://gerrit.libreoffice.org/55317 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--include/formula/errorcodes.hxx3
-rw-r--r--sc/inc/globstr.hrc1
-rw-r--r--sc/source/core/data/global.cxx3
-rw-r--r--sc/source/core/tool/compiler.cxx2
4 files changed, 8 insertions, 1 deletions
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 46c9870500e7..775db26946fb 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -446,6 +446,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)
{