summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-23 17:41:11 +0000
committerMiklos Vajna <vmiklos@collabora.com>2024-02-14 09:40:43 +0100
commitf6c5ba12d00be000dfacf9d1b8d94df95166e357 (patch)
tree634b0827b06cc1e54803f656035bd659c3a1d7c2
parent8d6af3cd9d61fbb716ee249cd480dc4c6d089f9d (diff)
complete filename isn't meaningful in this mode
Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163093 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sc/source/core/tool/interpr1.cxx7
1 files 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 <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 );