diff options
author | Eike Rathke <erack@redhat.com> | 2012-12-15 20:18:57 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-12-15 21:42:41 +0100 |
commit | 470a581bcb7b1ffeecb434560ccd8ef0d1ba6d73 (patch) | |
tree | afb17750fc9f93add151478e15d31f98edd4864d /sc | |
parent | 2a8470dca4726d512a33ac3af4ba140aed86909e (diff) |
ScInterpreter::IterateParametersIfs() with external references
Added handling of svExternalSingleRef and svExternalDoubleRef for
SUMIFS, AVERAGEIFS and COUNTIFS.
Change-Id: I99bf6860f2bda5a99aeb85d4e4971032b1c7da0d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
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) |