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-10-01 16:30:20 +0200 |
commit | 8f5f2ec5d1055f2bb81ad05e23280c51f5e6eb27 (patch) | |
tree | 730533c1a876571c8550ed4eac1c887662efbf0c /sfx2 | |
parent | d35840a2111beafe018851314a624e268e3cde6a (diff) |
jsdialogs: send JSON to the client
Change-Id: If43a774e1e3a4bff4a8ec862f0091d60477090d4
Reviewed-on: https://gerrit.libreoffice.org/79803
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/Deck.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index d00a214e0fed..5bc09fdfc2f5 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; @@ -201,6 +203,17 @@ void Deck::Resize() aItems.emplace_back(std::make_pair("position", Point(GetOutOffXPixel(), GetOutOffYPixel()).toString())); aItems.emplace_back(std::make_pair("size", GetSizePixel().toString())); pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); + + 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()); + } } } |