[Libreoffice-commits] core.git: sfx2/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 1 14:31:13 UTC 2019
sfx2/source/sidebar/Deck.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit 8f5f2ec5d1055f2bb81ad05e23280c51f5e6eb27
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Sep 24 17:29:53 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 1 16:30:20 2019 +0200
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 at collabora.com>
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());
+ }
}
}
More information about the Libreoffice-commits
mailing list