sc/source/core/tool/interpr1.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 7fb34ef1845b7d793b168db805ebbb64969c74b7
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Jan 23 17:41:11 2024 +0000
Commit:     Miklos Vajna <[email protected]>
CommitDate: Wed Feb 7 12:25:46 2024 +0100

    complete filename isn't meaningful in this mode
    
    Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162456
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 27917500254a..9a2ad349ddba 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -63,7 +63,7 @@
 #include <queryentry.hxx>
 #include <tokenarray.hxx>
 #include <compare.hxx>
-
+#include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/random.hxx>
 #include <comphelper/string.hxx>
@@ -2326,9 +2326,12 @@ void ScInterpreter::ScCell()
                         const INetURLObject& rURLObj = 
pShell->GetMedium()->GetURLObject();
                         OUString aTabName;
                         mrDoc.GetName( nTab, aTabName );
-                        aFuncResult = "'"
-                            + 
rURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)
-                            + "'#$" + aTabName;
+                        aFuncResult = "'";
+                        if (!comphelper::LibreOfficeKit::isActive())
+                            aFuncResult += 
rURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
+                        else
+                            aFuncResult += 
rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
+                        aFuncResult += "'#$" + aTabName;
                     }
                 }
             }

Reply via email to