summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-05-20 14:34:44 +0200
committerEike Rathke <erack@redhat.com>2016-05-20 14:40:28 +0200
commitf053086fbc625fca8ba7b956738d33ba78a80f9b (patch)
treedd09e0d9019d78b6d736ced88062796b300ad872
parentc42be58e4c006ab3e1f262b644789cba8659d0ab (diff)
handle svExternalSingleRef in all IS*() functions, tdf#93101 related
Change-Id: I14181dd2dbb5d412e3dd165dcbf7468cb8ea8b21
-rw-r--r--sc/source/core/tool/interpr1.cxx69
1 files changed, 61 insertions, 8 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fcbb2d086135..9a192eea6a2e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1885,6 +1885,14 @@ bool ScInterpreter::IsString()
}
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if (!nGlobalError && pToken->GetType() == svString)
+ bRes = true;
+ }
+ break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
@@ -2460,6 +2468,14 @@ void ScInterpreter::ScIsRef()
bRes = !x.get()->GetRefList()->empty();
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if (!nGlobalError)
+ bRes = true;
+ }
+ break;
default:
Pop();
}
@@ -2501,6 +2517,14 @@ void ScInterpreter::ScIsValue()
}
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if (!nGlobalError && pToken->GetType() == svDouble)
+ bRes = true;
+ }
+ break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
@@ -2651,6 +2675,15 @@ void ScInterpreter::ScIsNV()
}
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if (nGlobalError == NOTAVAILABLE ||
+ (pToken && pToken->GetType() == svError && pToken->GetError() == NOTAVAILABLE))
+ bRes = true;
+ }
+ break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
@@ -2698,6 +2731,15 @@ void ScInterpreter::ScIsErr()
}
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if ((nGlobalError && nGlobalError != NOTAVAILABLE) || !pToken ||
+ (pToken->GetType() == svError && pToken->GetError() != NOTAVAILABLE))
+ bRes = true;
+ }
+ break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
@@ -2754,6 +2796,14 @@ void ScInterpreter::ScIsError()
}
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if (nGlobalError || !pToken || pToken->GetType() == svError)
+ bRes = true;
+ }
+ break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
@@ -2771,14 +2821,6 @@ void ScInterpreter::ScIsError()
}
}
break;
- case svExternalSingleRef:
- {
- ScExternalRefCache::TokenRef pToken;
- PopExternalSingleRef(pToken);
- if (nGlobalError || !pToken || pToken->GetType() == svError)
- bRes = true;
- }
- break;
default:
PopError();
if ( nGlobalError )
@@ -2833,6 +2875,17 @@ bool ScInterpreter::IsEven()
bRes = true;
}
break;
+ case svExternalSingleRef:
+ {
+ ScExternalRefCache::TokenRef pToken;
+ PopExternalSingleRef(pToken);
+ if (!nGlobalError && pToken->GetType() == svDouble)
+ {
+ fVal = pToken->GetDouble();
+ bRes = true;
+ }
+ }
+ break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();