summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2024-02-28 15:05:06 +0300
committerSzymon Kłos <szymon.klos@collabora.com>2024-02-29 14:24:20 +0100
commitb1f84f5479a8ed06d07d4eef6b83578789fd67f0 (patch)
tree83726be3ecc45a0b0d2eaf2f5d1196b41670d90d /sc
parent676f4e67493f4fec0004a925da675c0912b0637b (diff)
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.kose@collabora.com> Change-Id: Iae26ff48f9c5c711af071fd66b5314e7bc96ff8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164093 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputhdl.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 6658bde6af7f..62bd2a3c66cf 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>
@@ -1277,7 +1278,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);
+ }
}
}
}