From eccbc97c7c224269fe261b8924e7866c3758ec91 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 11 Feb 2015 23:44:00 +0100 Subject: Resolves: tdf#39316 add matrix empty cells to ScInterpreter::QueryMatrixType() Change-Id: Ifa5d59e90afcfff66f2e8683fac2a9090ed615da --- sc/source/core/tool/interpr4.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sc') 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()); -- cgit