sc/source/core/tool/interpr1.cxx |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit d94a3ea01a49779b0423e764dd50e784ea75290c
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: Tue Jan 23 21:12:12 2024 +0100

    complete filename isn't meaningful in this mode
    
    Change-Id: Icc5bdac688ca6b328dcf097c9638b4e6df211332
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162457
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    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 e372228721e3..bd3157ffd562 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,15 +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)
+                            aFuncResult = "'";
+                            if (!comphelper::LibreOfficeKit::isActive())
+                                aFuncResult += 
rURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
+                            else
+                                aFuncResult += 
rURLObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous);
+                            aFuncResult += "'#$" + aTabName;
                                 + "'#$" + aTabName;
                         }
                     }

Reply via email to