summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorRashesh <rashesh.padia@collabora.com>2024-08-20 13:10:15 +0530
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-09 15:16:11 +0200
commit9672841f6d4afb11debe268ee45a686643c54a4e (patch)
tree6a3fab0ad8a548429d1bf8353469cdf763c2e7c0 /sc
parent93441942a9032c290996abfa68f27ef32f1a4e0d (diff)
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 <gokaysatir@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit d805785b2cf7c570fc0bb480100bc50d8fbc5077) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172745 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputhdl.cxx26
1 files changed, 23 insertions, 3 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 95a971a4dd49..233a8656f07c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1472,7 +1472,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;
@@ -1480,8 +1493,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);