From 8f5f2ec5d1055f2bb81ad05e23280c51f5e6eb27 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 24 Sep 2019 17:29:53 +0200 Subject: jsdialogs: send JSON to the client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If43a774e1e3a4bff4a8ec862f0091d60477090d4 Reviewed-on: https://gerrit.libreoffice.org/79803 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- sfx2/source/sidebar/Deck.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sfx2') 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 #include #include +#include +#include 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()); + } } } -- cgit