diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-11-18 13:50:30 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-11-18 13:51:59 -0500 |
commit | c1af8ab3f5214b66cf0b18ed302ef86b6362f48e (patch) | |
tree | 461e03558562dd0f90200c8a06289768a5a4e727 | |
parent | 9d2e343f36f80852bd4c7452f67db4068f366b71 (diff) |
Make VLOOKUP work with an external reference once again. (fdo#31718)
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index ee317f246466..f561317f71a3 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -5638,7 +5638,8 @@ void ScInterpreter::CalculateLookup(BOOL HLookup) SCCOL nCol2 = 0; SCROW nRow2 = 0; SCTAB nTab2; - if (GetStackType() == svDoubleRef) + StackVar eType = GetStackType(); + if (eType == svDoubleRef) { PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); if (nTab1 != nTab2) @@ -5647,9 +5648,13 @@ void ScInterpreter::CalculateLookup(BOOL HLookup) return; } } - else if (GetStackType() == svMatrix) + else if (eType == svMatrix || eType == svExternalDoubleRef) { - pMat = PopMatrix(); + if (eType == svMatrix) + pMat = PopMatrix(); + else + PopExternalDoubleRef(pMat); + if (pMat) pMat->GetDimensions(nC, nR); else |