[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Mar 3 14:13:55 PST 2011
sc/source/core/tool/interpr1.cxx | 2 ++
sc/source/core/tool/interpr5.cxx | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+)
New commits:
commit 2933c21a71e1b9761f373f4870cbf7b731e58c31
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Thu Mar 3 17:10:29 2011 -0500
Support external reference range for INDEX function. (fdo#34938)
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index b3cb919..9a64b2d 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6879,6 +6879,8 @@ void ScInterpreter::ScIndex()
switch (GetStackType())
{
case svMatrix:
+ case svExternalSingleRef:
+ case svExternalDoubleRef:
{
if (nArea != 1)
SetError(errIllegalArgument);
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 66e2a4f..a5b8450 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -551,6 +551,31 @@ ScMatrixRef ScInterpreter::GetMatrix()
}
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if (!pToken)
+ {
+ PopError();
+ SetError( errIllegalArgument);
+ break;
+ }
+ if (pToken->GetType() == svDouble)
+ {
+ pMat = new ScMatrix(1, 1);
+ pMat->PutDouble(pToken->GetDouble(), 0, 0);
+ }
+ else
+ {
+ pMat = new ScMatrix(1, 1);
+ pMat->PutString(pToken->GetString(), 0, 0);
+ }
+ }
+ break;
+ case svExternalDoubleRef:
+ PopExternalDoubleRef(pMat);
+ break;
default:
PopError();
SetError( errIllegalArgument);
More information about the Libreoffice-commits
mailing list