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

Eike Rathke erack at redhat.com
Wed Apr 29 16:55:54 PDT 2015


 sc/source/core/tool/compiler.cxx |   25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

New commits:
commit 0cd88d27ecd87c8c5791418bcac6ab1684ece74a
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Apr 30 01:52:53 2015 +0200

    simplify logic and less comparisons, fdo#69552 follow-up
    
    Change-Id: Id1150b53a57a6b7d9a6c623637c123e4f37a0876

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f2a54d4..c07f0ea 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2507,21 +2507,18 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray )
     if (bFound)
     {
         OpCode eOp = iLook->second;
-        if ( eOp != ocOpen && eOp != ocClose )
+        if (bInArray)
         {
-            if (bInArray)
-            {
-                if (rName.equals(mxSymbols->getSymbol(ocArrayColSep)))
-                    eOp = ocArrayColSep;
-                else if (rName.equals(mxSymbols->getSymbol(ocArrayRowSep)))
-                    eOp = ocArrayRowSep;
-            }
-            else if (mxSymbols->isOOXML())
-            {
-                // OOXML names that need to treated differently on import.
-                if ( rName.equalsIgnoreAsciiCaseAscii( "_XLFN.CEILING.MATH" ) )
-                    eOp = ocCeil_Math;
-            }
+            if (rName.equals(mxSymbols->getSymbol(ocArrayColSep)))
+                eOp = ocArrayColSep;
+            else if (rName.equals(mxSymbols->getSymbol(ocArrayRowSep)))
+                eOp = ocArrayRowSep;
+        }
+        else if (eOp == ocCeil && mxSymbols->isOOXML())
+        {
+            // Ensure that _xlfn.CEILING.MATH maps to ocCeil_Math. ocCeil is
+            // unassigned for import.
+            eOp = ocCeil_Math;
         }
         maRawToken.SetOpCode(eOp);
     }


More information about the Libreoffice-commits mailing list