summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-02-11 23:44:00 +0100
committerEike Rathke <erack@redhat.com>2015-02-11 23:47:09 +0100
commiteccbc97c7c224269fe261b8924e7866c3758ec91 (patch)
tree45aeebee8e650c7d43113026101a723249199da3 /sc
parentcf3f1d8dfeb45249eb60a30dba3243fe9a4a65e5 (diff)
Resolves: tdf#39316 add matrix empty cells to ScInterpreter::QueryMatrixType()
Change-Id: Ifa5d59e90afcfff66f2e8683fac2a9090ed615da
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr4.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index e3c48d6e3217..c6eff6be2a1d 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1852,6 +1852,16 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
rRetTypeExpr = NUMBERFORMAT_LOGICAL;
}
+ else if ( xMat->IsEmptyResult( 0, 0))
+ { // empty formula result
+ FormulaTokenRef xRes = new ScEmptyCellToken( true, true); // inherited, display empty
+ PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
+ }
+ else if ( xMat->IsEmpty( 0, 0))
+ { // empty or empty cell
+ FormulaTokenRef xRes = new ScEmptyCellToken( false, true); // not inherited, display empty
+ PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMat, xRes.get()));
+ }
else
{
svl::SharedString aStr( nMatVal.GetString());