diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-09-24 17:29:53 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-09-30 09:39:57 +0200 |
commit | 11730bf818c2df6b471efbcc6254cca5ad6a6054 (patch) | |
tree | 7862a9c3040ee0064c4c97c412ca3310b3188709 /sfx2 | |
parent | f89ebad04011b38f21ffb0b19cd3e89465449954 (diff) |
jsdialogs: send JSON to the client
Change-Id: If43a774e1e3a4bff4a8ec862f0091d60477090d4
Reviewed-on: https://gerrit.libreoffice.org/79695
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/Deck.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 15f591fd1e64..f1114982204c 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -38,6 +38,8 @@ #include <vcl/IDialogRenderable.hxx> #include <tools/svborder.hxx> #include <sal/log.hxx> +#include <boost/property_tree/json_parser.hpp> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> using namespace css; using namespace css::uno; @@ -179,6 +181,20 @@ bool Deck::EventNotify(NotifyEvent& rEvent) void Deck::Resize() { Window::Resize(); + + if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) + { + try + { + std::stringstream aStream; + boost::property_tree::write_json(aStream, DumpAsPropertyTree()); + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, aStream.str().c_str()); + } + catch(boost::property_tree::json_parser::json_parser_error& rError) + { + SAL_WARN("sfx.sidebar", rError.message()); + } + } } bool Deck::ProcessWheelEvent(CommandEvent const * pCommandEvent) |