summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorgokaysatir <gokaysatir@collabora.com>2020-09-15 11:35:16 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-09-18 13:00:34 +0200
commit433996f47b5354c0d936b07ba95440ac3354c620 (patch)
tree21da0e2e2d3d1cb011bdac08377fa1d1c0de49e6 /sc/source
parentd676d2c22f1d092c9978ffc1595b8356d8db1f7a (diff)
Online: Show input help on Online / Core part.
Change-Id: I9d10179f266a725b770fdae50045fdb5d77178ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102708 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 110069adbba4d272450b30fa03c56efbd478e84c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102935 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/inc/gridwin.hxx1
-rw-r--r--sc/source/ui/view/gridwin.cxx14
-rw-r--r--sc/source/ui/view/tabview3.cxx1
3 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 8bdee8a55190..a3ddbc84bac1 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -475,6 +475,7 @@ public:
virtual FactoryFunction GetUITestFactory() const override;
void updateLOKValListButton(bool bVisible, const ScAddress& rPos) const;
+ void updateLOKInputHelp(const OUString& title, const OUString& content) const;
protected:
void ImpCreateOverlayObjects();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 7ee10d644e9e..e858a9337041 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -137,6 +137,7 @@
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <vector>
+#include <boost/property_tree/json_parser.hpp>
using namespace css;
using namespace css::uno;
@@ -4730,6 +4731,19 @@ void ScGridWindow::UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange)
}
}
+void ScGridWindow::updateLOKInputHelp(const OUString& title, const OUString& content) const
+{
+ ScTabViewShell* pViewShell = pViewData->GetViewShell();
+
+ boost::property_tree::ptree aTree;
+ aTree.put("title", title);
+ aTree.put("content", content);
+
+ std::stringstream aStream;
+ boost::property_tree::write_json(aStream, aTree);
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_VALIDITY_INPUT_HELP, aStream.str().c_str());
+}
+
void ScGridWindow::updateLOKValListButton( bool bVisible, const ScAddress& rPos ) const
{
SCCOL nX = rPos.Col();
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 30986e02d044..ace30689b743 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -833,6 +833,7 @@ void ScTabView::TestHintWindow()
if (pWindow == pWin)
{
xOverlayManager->add(*pOverlay);
+ pWindow->updateLOKInputHelp(aTitle, aMessage);
}
else
{