From 470a581bcb7b1ffeecb434560ccd8ef0d1ba6d73 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 15 Dec 2012 20:18:57 +0100 Subject: ScInterpreter::IterateParametersIfs() with external references Added handling of svExternalSingleRef and svExternalDoubleRef for SUMIFS, AVERAGEIFS and COUNTIFS. Change-Id: I99bf6860f2bda5a99aeb85d4e4971032b1c7da0d --- sc/source/core/tool/interpr1.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'sc') diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index d2bc4a44a2d7..270236bfde8d 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -5804,11 +5804,28 @@ double ScInterpreter::IterateParametersIfs( ScIterFuncIfs eFunc ) rString = GetString(); break; case svMatrix : + case svExternalDoubleRef: { ScMatValType nType = GetDoubleOrStringFromMatrix( fVal, rString); bIsString = ScMatrix::IsNonValueType( nType); } break; + case svExternalSingleRef: + { + ScExternalRefCache::TokenRef pToken; + PopExternalSingleRef(pToken); + if (pToken) + { + if (pToken->GetType() == svDouble) + { + fVal = pToken->GetDouble(); + bIsString = false; + } + else + rString = pToken->GetString(); + } + } + break; default: { fVal = GetDouble(); @@ -5848,6 +5865,8 @@ double ScInterpreter::IterateParametersIfs( ScIterFuncIfs eFunc ) nTab2 = nTab1; break; case svMatrix: + case svExternalSingleRef: + case svExternalDoubleRef: { pQueryMatrix = PopMatrix(); if (!pQueryMatrix) @@ -6002,6 +6021,8 @@ double ScInterpreter::IterateParametersIfs( ScIterFuncIfs eFunc ) nMainTab2 = nMainTab1; break; case svMatrix: + case svExternalSingleRef: + case svExternalDoubleRef: { pMainMatrix = PopMatrix(); if (!pMainMatrix) -- cgit v1.2.3