sc/source/ui/app/inputhdl.cxx | 26 +++++++++++++++++++++++--- vcl/jsdialog/enabled.cxx | 1 + 2 files changed, 24 insertions(+), 3 deletions(-)
New commits: commit d805785b2cf7c570fc0bb480100bc50d8fbc5077 Author: Rashesh <[email protected]> AuthorDate: Tue Aug 20 13:10:15 2024 +0530 Commit: Gökay ŞATIR <[email protected]> CommitDate: Wed Aug 21 13:30:26 2024 +0200 lokit: calc: send named ranges as well on calcfunctionlist callback Change-Id: Ib8082d81da0eec54ba201b5958b86770a508ec91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172099 Reviewed-by: Gökay ŞATIR <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 4c5d1875fd31..85a1b1bd27b6 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1487,7 +1487,20 @@ void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec + "\", " "\"description\": \"" + escapeJSON(ppFDesc->getDescription()) - + "\"}, "); + + "\", \"namedRange\": false }, "); + } + else + { + aPayload.append("{" + "\"index\": " + + OString::number(static_cast<sal_Int64>(nCurIndex)) + + ", " + "\"signature\": \"" + + escapeJSON(aFuncNameStr) + + "\", " + "\"description\": \"" + + escapeJSON(OUString()) + + "\", \"namedRange\": true }, "); } } ++nCurIndex; @@ -1495,8 +1508,15 @@ void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec nCurIndex = 0; } sal_Int32 nLen = aPayload.getLength(); - aPayload[nLen - 2] = ' '; - aPayload[nLen - 1] = ']'; + if (nLen <= 2) + { + aPayload[nLen - 1] = ']'; + } + else + { + aPayload[nLen - 2] = ' '; + aPayload[nLen - 1] = ']'; + } OString s = aPayload.makeStringAndClear(); pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CALC_FUNCTION_LIST, s); diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 89c2654d9445..2718d458ee17 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -153,6 +153,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/scalc/ui/validationhelptabpage.ui" || rUIFile == u"modules/scalc/ui/warnautocorrect.ui" || rUIFile == u"modules/scalc/ui/ztestdialog.ui" + || rUIFile == u"modules/scalc/ui/definedatabaserangedialog.ui" // schart || rUIFile == u"modules/schart/ui/attributedialog.ui" || rUIFile == u"modules/schart/ui/charttypedialog.ui"
