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 | 5d75f3d8c0689b3dea34747ca4334096ff66913c (patch) | |
tree | 4cc1951676b1d3c8a55b704e5661677b56eeca17 | |
parent | 27d40392c0164cd616c621b3500adac237a23ca2 (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 ee317f246..f561317f7 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 |