[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Fri May 20 12:40:50 UTC 2016


 sc/source/core/tool/interpr1.cxx |   69 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 61 insertions(+), 8 deletions(-)

New commits:
commit f053086fbc625fca8ba7b956738d33ba78a80f9b
Author: Eike Rathke <erack at redhat.com>
Date:   Fri May 20 14:34:44 2016 +0200

    handle svExternalSingleRef in all IS*() functions, tdf#93101 related
    
    Change-Id: I14181dd2dbb5d412e3dd165dcbf7468cb8ea8b21

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fcbb2d0..9a192ee 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();


More information about the Libreoffice-commits mailing list