diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-23 17:41:11 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-01-23 21:55:19 +0100 |
commit | 86de5c5e7d54fda08ae5c8fb5f13dc57ec3ab9a8 (patch) | |
tree | 9418ccc3a44d40566fd605ce04b4a873cc2cc3f3 | |
parent | d24b3ee8195d96846649a407606ae9068ef2114c (diff) |
complete filename isn't meaningful in this mode
Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index e372228721e3..8412c0355ed0 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; } } } |