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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 6 07:33:51 UTC 2020


 sc/source/core/tool/compiler.cxx |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 7a98ab1fa6b3f3de2c7077c1d2601f7bc12be2d7
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Jan 5 12:30:43 2020 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jan 6 08:33:13 2020 +0100

    Simplify IsOpCode a bit
    
    The removed code block made it impossible to enter the following
    "if (aIntName.isEmpty())" block whenever mxSymbols->hasExternals() was true. Thus
    removing that block and making the following block the "else" branch keeps the
    logic.
    
    And fix an apparent omission from commit 9ccaa4b1468527bbec12d7e0fccf4ea443478f50,
    which removed setting bFound to true in case of "Old (deprecated) addins".
    
    Change-Id: I96da0620eb9d622f1f7650985e284a1e9817e27a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86240
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b2aa24f727b5..769790de7fdb 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2933,21 +2933,13 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray )
                 if (ScGlobal::GetAddInCollection()->GetFuncData( (*iExt).second))
                     aIntName = (*iExt).second;
             }
-            if (aIntName.isEmpty())
-            {
-                // If that isn't found we might continue with rName lookup as a
-                // last resort by just falling through to FindFunction(), but
-                // it shouldn't happen if the map was setup correctly. Don't
-                // waste time and bail out.
-                return false;
-            }
         }
-        if (aIntName.isEmpty())
+        else
         {
             // Old (deprecated) addins first for legacy.
             if (ScGlobal::GetLegacyFuncCollection()->findByName(cSymbol))
             {
-                maRawToken.SetExternal( cSymbol );
+                aIntName = cSymbol;
             }
             else
                 // bLocalFirst=false for (English) upper full original name


More information about the Libreoffice-commits mailing list