sc/source/ui/app/inputhdl.cxx | 9 ++++++++- sw/source/uibase/docvw/edtwin2.cxx | 1 + 2 files changed, 9 insertions(+), 1 deletion(-)
New commits: commit 3e42811c2935a6501d8a0383431b2f2154baf709 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Wed Feb 28 15:05:06 2024 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Thu Feb 29 19:53:38 2024 +0100 Online: Make tooltip message specific to function usage tooltip Using same callback caused a regression about showing tooltip while reviewing a change in writer. So we need a type to understand which tooltip comes. Signed-off-by: Gülşah Köse <gulsah.k...@collabora.com> Change-Id: Iae26ff48f9c5c711af071fd66b5314e7bc96ff8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164122 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index d3c838c24322..5c6f73d5a6d6 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -58,6 +58,7 @@ #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <tools/urlobj.hxx> +#include <tools/json_writer.hxx> #include <formula/formulahelper.hxx> #include <formula/funcvarargs.h> #include <LibreOfficeKit/LibreOfficeKitEnums.h> @@ -1292,7 +1293,13 @@ void ScInputHandler::ShowArgumentsTip( OUString& rSelText ) const SfxViewShell* pViewShell = SfxViewShell::Current(); if (comphelper::LibreOfficeKit::isActive() && pViewShell->isLOKDesktop()) - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TOOLTIP, aNew.toUtf8()); + { + tools::JsonWriter writer; + writer.put("type", "formulausage"); + writer.put("text", aNew); + OString sFunctionUsageTip = writer.finishAndGetAsOString(); + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TOOLTIP, sFunctionUsageTip); + } } } } diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index b6dcfdbeb70e..07bf72ff4b99 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -315,6 +315,7 @@ static OString getTooltipPayload(const OUString& tooltip, const SwRect& rect) { tools::JsonWriter writer; { + writer.put("type", "generaltooltip"); writer.put("text", tooltip); writer.put("rectangle", rect.SVRect().toString()); }