From 8e03875ca77e4e3adf13373a5ed2935eef56283f Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 8 Jun 2021 15:28:41 +0200 Subject: jsdialog: sidebar: dump visibility state for widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we need this to build all the widgets on the client side and alow then show/hide widgets Change-Id: Ib3d8fc673cc787925e19a6e9df673e923ed7ecef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116841 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- sfx2/source/sidebar/Deck.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 7a5b89139a08..35203a18c4cd 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -136,10 +136,12 @@ void Deck::Resize() */ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) { - rJsonWriter.put("id", get_id()); // TODO could be missing - sort out + rJsonWriter.put("id", get_id() != "" ? get_id() : msId); rJsonWriter.put("type", "deck"); rJsonWriter.put("text", GetText()); rJsonWriter.put("enabled", IsEnabled()); + if (!IsVisible()) + rJsonWriter.put("visible", false); auto childrenNode = rJsonWriter.startArray("children"); for (auto &it : maPanels) -- cgit