diff options
-rw-r--r-- | sc/inc/scmatrix.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 51 | ||||
-rw-r--r-- | sc/source/core/tool/makefile.mk | 1 | ||||
-rw-r--r-- | sc/source/core/tool/scmatrix.cxx | 2 |
4 files changed, 25 insertions, 30 deletions
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index deee92277f9e..675bbbad6378 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -226,6 +226,7 @@ public: ScMatrix( SCSIZE nC, SCSIZE nR, DensityType eType = FILLED_ZERO); /** Clone the matrix. */ + ScMatrix* Clone() const; ScMatrix* Clone( DensityType eType) const; /** Clone the matrix if mbCloneIfConst (immutable) is set, otherwise diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 8b0a631ee8bb..113c9cca5702 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -1780,42 +1780,37 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, ULON { if (xMat) { - ScMatValType nMatValType; - const ScMatrixValue* pMatVal = xMat->Get(0, 0, nMatValType); - if ( pMatVal ) + ScMatrixValue nMatVal = xMat->Get(0, 0); + ScMatValType nMatValType = nMatVal.nType; + if (ScMatrix::IsNonValueType( nMatValType)) { - if (ScMatrix::IsNonValueType( nMatValType)) - { - if ( xMat->IsEmptyPath( 0, 0)) - { // result of empty FALSE jump path - FormulaTokenRef xRes = new FormulaDoubleToken( 0.0); - PushTempToken( new ScMatrixCellResultToken( xMat, xRes)); - rRetTypeExpr = NUMBERFORMAT_LOGICAL; - } - else - { - String aStr( pMatVal->GetString()); - FormulaTokenRef xRes = new FormulaStringToken( aStr); - PushTempToken( new ScMatrixCellResultToken( xMat, xRes)); - rRetTypeExpr = NUMBERFORMAT_TEXT; - } + if ( xMat->IsEmptyPath( 0, 0)) + { // result of empty FALSE jump path + FormulaTokenRef xRes = new FormulaDoubleToken( 0.0); + PushTempToken( new ScMatrixCellResultToken( xMat, xRes)); + rRetTypeExpr = NUMBERFORMAT_LOGICAL; } else { - USHORT nErr = GetDoubleErrorValue( pMatVal->fVal); - FormulaTokenRef xRes; - if (nErr) - xRes = new FormulaErrorToken( nErr); - else - xRes = new FormulaDoubleToken( pMatVal->fVal); + String aStr( nMatVal.GetString()); + FormulaTokenRef xRes = new FormulaStringToken( aStr); PushTempToken( new ScMatrixCellResultToken( xMat, xRes)); - if ( rRetTypeExpr != NUMBERFORMAT_LOGICAL ) - rRetTypeExpr = NUMBERFORMAT_NUMBER; + rRetTypeExpr = NUMBERFORMAT_TEXT; } - rRetIndexExpr = 0; } else - SetError( errUnknownStackVariable); + { + USHORT nErr = GetDoubleErrorValue( nMatVal.fVal); + FormulaTokenRef xRes; + if (nErr) + xRes = new FormulaErrorToken( nErr); + else + xRes = new FormulaDoubleToken( nMatVal.fVal); + PushTempToken( new ScMatrixCellResultToken( xMat, xRes)); + if ( rRetTypeExpr != NUMBERFORMAT_LOGICAL ) + rRetTypeExpr = NUMBERFORMAT_NUMBER; + } + rRetIndexExpr = 0; xMat->SetErrorInterpreter( NULL); } else diff --git a/sc/source/core/tool/makefile.mk b/sc/source/core/tool/makefile.mk index e33ec8193c39..15ec283995e2 100644 --- a/sc/source/core/tool/makefile.mk +++ b/sc/source/core/tool/makefile.mk @@ -105,7 +105,6 @@ EXCEPTIONSFILES= \ $(SLO)$/reftokenhelper.obj \ $(SLO)$/scmatrix.obj \ $(SLO)$/refupdat.obj \ - $(SLO)$/scmatrix.obj \ $(SLO)$/simplerangelist.obj \ $(SLO)$/stringutil.obj \ $(SLO)$/subtotal.obj \ diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 3e3c9ccf71f9..d30eb3d8d02c 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -42,7 +42,7 @@ #include <math.h> -#define _MDDS_HASH_CONTAINER_COMPAT 1 +#define MDDS_HASH_CONTAINER_STLPORT 1 #include <mdds/quad_type_matrix.hpp> using ::std::pair; |