summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-07-09 16:42:01 +0100
committerEike Rathke <erack@redhat.com>2013-07-10 20:42:46 +0000
commit6466fdc869116384025c8a84e1591de7c1dbd9ee (patch)
tree63552a55300f1e1f5fecb732f29d8228c1e0bfa4 /sc
parentcc3293b94ab58b196bc2786eb4012d64351e8fa4 (diff)
fix for fdo#51990 process external refs for macros
(cherry picked from commit f3a0dd8fbc3ead1fe1ec1faec3377cedaacadd93) and also cherry pick from commit adab0134662562298ff13e7fe564623af4bc33da ) use GetMatrix instead of manually disambiguating External and normal refs and cherry-pick further tweak from commit 35f9cd513d6dd796a5bc54c51df3961a674addcb Change-Id: I4fe1d7240f277b532e11d2fbb5aa18f54f2c4695 4fe1d7240f277b532e11d2fbb5aa18f54f2c4695 Reviewed-on: https://gerrit.libreoffice.org/4800 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr4.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 1f789b96b333..5662baf5f2ac 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3215,6 +3215,21 @@ void ScInterpreter::ScMacro()
case svString:
pPar->PutString( GetString() );
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if ( pToken->GetType() == svString )
+ pPar->PutString( pToken->GetString() );
+ else if ( pToken->GetType() == svDouble )
+ pPar->PutDouble( pToken->GetDouble() );
+ else
+ {
+ SetError( errIllegalArgument );
+ bOk = false;
+ }
+ }
+ break;
case svSingleRef:
{
ScAddress aAdr;
@@ -3275,11 +3290,12 @@ void ScInterpreter::ScMacro()
}
}
break;
+ case svExternalDoubleRef:
case svMatrix:
{
- ScMatrixRef pMat = PopMatrix();
+ ScMatrixRef pMat = GetMatrix();
SCSIZE nC, nR;
- if (pMat)
+ if (pMat && !nGlobalError)
{
pMat->GetDimensions(nC, nR);
SbxDimArrayRef refArray = new SbxDimArray;