summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/interpr1.cxx')
-rw-r--r--sc/source/core/tool/interpr1.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 41b5e27b2807..c4a8cdd346cd 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -810,6 +810,38 @@ double ScInterpreter::Compare()
}
}
break;
+ case svExternalSingleRef:
+ {
+ ScMatrixRef pMat = GetMatrix();
+ if (!pMat)
+ {
+ SetError( errIllegalParameter);
+ break;
+ }
+
+ SCSIZE nC, nR;
+ pMat->GetDimensions(nC, nR);
+ if (!nC || !nR)
+ {
+ SetError( errIllegalParameter);
+ break;
+ }
+ if (pMat->IsEmpty(0, 0))
+ aComp.bEmpty[i] = true;
+ else if (pMat->IsString(0, 0))
+ {
+ *aComp.pVal[i] = pMat->GetString(0, 0);
+ aComp.bVal[i] = false;
+ }
+ else
+ {
+ aComp.nVal[i] = pMat->GetDouble(0, 0);
+ aComp.bVal[i] = true;
+ }
+ }
+ break;
+ case svExternalDoubleRef:
+ // TODO: Find out how to handle this...
default:
SetError( errIllegalParameter);
break;