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

New commits:
commit f245e2548be0ce8adcd71b5aa77dec50538997e0
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Jan 23 17:41:11 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Jan 23 20:29:10 2024 +0100

    complete filename isn't meaningful in this mode
    
    Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162474
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d2b171dd76bb..3520872d7846 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -64,7 +64,7 @@
 #include <queryiter.hxx>
 #include <tokenarray.hxx>
 #include <compare.hxx>
-
+#include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/random.hxx>
 #include <comphelper/string.hxx>
@@ -2346,9 +2346,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