sc/source/core/tool/address.cxx |   19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

New commits:
commit fe687d1b8f5305edfb167152a4fb19ffa20c5404
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Thu May 12 00:20:05 2022 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Thu May 12 01:29:02 2022 +0200

    Related: tdf#142635 Remove address parsing failback code
    
    This could not have been correct. It may have served some odd
    purpose back when it was added with
    
        commit 296baa2fb6dd4150a7855114093a9703cdc18b09
        CommitDate: Tue Oct 5 18:14:37 2010 -0400
    
            Ported calc-extref-interpreter-rework-*.diff from ooo-build.
    
    during the transition from ocExternalRef to ocPush with
    svExternal*Ref, but parsed syntactically wrong strings and all
    valid external document references with "'filename'#" had been
    detected earlier at the beginning or passed via
    pExtInfo->mbExternal. The case it treated here is neither a valid
    OOo nor ODF notation.
    
    Change-Id: I5a519aec4b251720da382cb76a93ab10c8aeb493
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134212
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index c5c49bd65553..ca1010a393bd 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1223,23 +1223,12 @@ static ScRefFlags lcl_ScAddress_Parse_OOo( const 
sal_Unicode* p, const ScDocumen
                 }
                 aTab = aTabAcc.makeStringAndClear();
             }
-            if( *p++ != '.' )
+            if (*p != '.')
                 nBits = ScRefFlags::ZERO;
-
-            if (!bExtDoc && !rDoc.GetTable( aTab, nTab ))
+            else
             {
-                // Specified table name is not found in this document.  Assume 
this is an external document.
-                aDocName = aTab;
-                sal_Int32 n = aDocName.lastIndexOf('.');
-                // Assume that common filename extensions are not more than 4 
characters.
-                if (n > 0 && aTab.getLength() - n <= 4)
-                {
-                    // Extension found.  Strip it.
-                    aTab = aTab.copy(0, n);
-                    bExtDoc = true;
-                }
-                else
-                    // No extension found.  This is probably not an external 
document.
+                ++p;
+                if (!bExtDoc && !rDoc.GetTable( aTab, nTab ))
                     nBits = ScRefFlags::ZERO;
             }
         }

Reply via email to