sc/source/core/tool/interpr1.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
New commits: commit 5babeba8d9e5087ea974a3b656543fd8e5a1d93e 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: Wed Jan 24 09:55:04 2024 +0100 complete filename isn't meaningful in this mode Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162476 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index eeb4cc6b1b9e..13036fe1d55d 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -65,7 +65,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> @@ -2357,16 +2357,20 @@ void ScInterpreter::ScCell() eConv == FormulaGrammar::CONV_XL_OOX) { // file name and table name: FILEPATH/[FILENAME]TABLE - aFuncResult = rURLObj.GetPartBeforeLastName() - + "[" + rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous) - + "]" + aTabName; + if (!comphelper::LibreOfficeKit::isActive()) + aFuncResult = rURLObj.GetPartBeforeLastName(); + aFuncResult += "[" + rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous) + + "]" + aTabName; } else { // file name and table name: 'FILEPATH/FILENAME'#$TABLE - 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; } } }