summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-23 17:41:11 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-23 20:29:10 +0100
commitf245e2548be0ce8adcd71b5aa77dec50538997e0 (patch)
tree85f33a2a5c0fdb0ebc4669bdc8f591946dcdd154
parent6ece9bae17307644774e53ef15b150e626239d9f (diff)
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.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--sc/source/core/tool/interpr1.cxx11
1 files changed, 7 insertions, 4 deletions
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;
}
}
}