From f6c5ba12d00be000dfacf9d1b8d94df95166e357 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 23 Jan 2024 17:41:11 +0000 Subject: complete filename isn't meaningful in this mode Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163093 Tested-by: Miklos Vajna Reviewed-by: Miklos Vajna --- sc/source/core/tool/interpr1.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 #include #include - #include +#include #include #include #include @@ -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 ); -- cgit v1.2.3