[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source

Eike Rathke erack at redhat.com
Sun Jan 7 14:19:40 UTC 2018


 sc/source/core/tool/token.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 174822c33c8d35d514fbb713e6a22d20559bb034
Author: Eike Rathke <erack at redhat.com>
Date:   Sun Dec 17 00:46:07 2017 +0100

    Related: tdf#114251 disable ocName named expressions for vectorization
    
    Recursive checking of their token arrays would be needed.
    
    This solves the slowness in the non-threading case of tdf#114251
    because no arrays are generated for the named ranges, which is
    rather a lucky workaround than a solution.
    
    The wrong handling of range references in general (array where
    scalar is expected, no implicit intersection) still persists.
    
    Change-Id: I57385bd95efa584108d93d724921285c97a91a45
    Reviewed-on: https://gerrit.libreoffice.org/46623
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 3193e78aba75c5b38d2683d9fd8593820048e8b9)
    Reviewed-on: https://gerrit.libreoffice.org/46669
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 027786958ceb..7a9db36dbb1a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1595,6 +1595,22 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
         SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables S/W interpreter for formula group");
         meVectorState = FormulaVectorDisabledNotInSoftwareSubset;
     }
+    else
+    {
+        // All the rest, special commands, separators, error codes, ...
+        switch (eOp)
+        {
+            case ocName:
+                // Named expression would need "recursive" handling of its
+                // token array for vector state in
+                // ScFormulaCell::InterpretFormulaGroup() and below.
+                SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
+                meVectorState = FormulaVectorDisabledByOpCode;
+            break;
+            default:
+                ;   // nothing
+        }
+    }
 }
 
 bool ScTokenArray::ImplGetReference( ScRange& rRange, const ScAddress& rPos, bool bValidOnly ) const


More information about the Libreoffice-commits mailing list