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

New commits:
commit f6c5ba12d00be000dfacf9d1b8d94df95166e357
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Jan 23 17:41:11 2024 +0000
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Feb 14 09:40:43 2024 +0100

    complete filename isn't meaningful in this mode
    
    Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163093
    Tested-by: Miklos Vajna <vmik...@collabora.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 1a7a970c2e48..369df3f32d6e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -63,8 +63,8 @@
 #include <queryentry.hxx>
 #include <tokenarray.hxx>
 #include <compare.hxx>
-
 #include <com/sun/star/util/SearchResult.hpp>
+#include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/random.hxx>
 #include <comphelper/string.hxx>
@@ -2308,7 +2308,10 @@ void ScInterpreter::ScCell()
                         OUStringBuffer aBuf;
                         aBuf.append('\'');
                         const INetURLObject& rURLObj = 
pShell->GetMedium()->GetURLObject();
-                        
aBuf.append(rURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous));
+                        if (!comphelper::LibreOfficeKit::isActive())
+                            
aBuf.append(rURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous));
+                        else
+                            
aBuf.append(rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous));
                         aBuf.append("'#$");
                         OUString aTabName;
                         mrDoc.GetName( nTab, aTabName );

Reply via email to