summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-07-09 16:42:01 +0100
committerNoel Power <noel.power@suse.com>2013-07-09 16:42:59 +0100
commitf3a0dd8fbc3ead1fe1ec1faec3377cedaacadd93 (patch)
tree9a76cd3433e925e0c8effaec4ff209fdbb56cec6
parentec5a7256ca549d358b9c5380194ea2d1b991a73e (diff)
fix for fdo#51990 process external refs for macros
Change-Id: I4fe1d7240f277b532e11d2fbb5aa18f54f2c4695
-rw-r--r--sc/source/core/tool/interpr4.cxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 926866d094cb..62e28c31dd3c 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3209,6 +3209,22 @@ void ScInterpreter::ScMacro()
case svString:
pPar->PutString( GetString() );
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if ( nGlobalError )
+ {
+ SetError( errIllegalArgument);
+ bOk = false;
+ }
+ else
+ {
+ pPar->PutDouble( pToken->GetDouble() );
+ bOk = true;
+ }
+ }
+ break;
case svSingleRef:
{
ScAddress aAdr;
@@ -3269,11 +3285,16 @@ void ScInterpreter::ScMacro()
}
}
break;
+ case svExternalDoubleRef:
case svMatrix:
{
- ScMatrixRef pMat = PopMatrix();
+ ScMatrixRef pMat;
+ if (nStackType == svMatrix)
+ pMat = PopMatrix();
+ else
+ PopExternalDoubleRef(pMat);
SCSIZE nC, nR;
- if (pMat)
+ if (pMat && !nGlobalError)
{
pMat->GetDimensions(nC, nR);
SbxDimArrayRef refArray = new SbxDimArray;