[Libreoffice-commits] core.git: vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jan 22 10:32:04 UTC 2021
vcl/source/control/tabctrl.cxx | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
New commits:
commit ba05c093143ba993af143e25acdeda76d9d1f888
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Jan 15 09:55:24 2021 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jan 22 11:31:22 2021 +0100
jsdialog: fix tabcontrol json structure
Change-Id: I1a295ece6e618e3bb81b8842a8b9df5de1cbffac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109366
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index dee5e226452c..6579613dbd62 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2180,18 +2180,37 @@ FactoryFunction TabControl::GetUITestFactory() const
void TabControl::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
{
- Control::DumpAsPropertyTree(rJsonWriter);
+ rJsonWriter.put("id", get_id());
+ rJsonWriter.put("type", "tabcontrol");
+ rJsonWriter.put("selected", GetCurPageId());
+
+ {
+ auto childrenNode = rJsonWriter.startArray("children");
+ for (int i = 0; i < GetChildCount(); i++)
+ {
+ vcl::Window* pChild = GetChild(i);
+
+ if (pChild)
+ {
+ auto childNode = rJsonWriter.startStruct();
+ pChild->DumpAsPropertyTree(rJsonWriter);
+
+ if (pChild->IsVisible()) {
+ rJsonWriter.put("hidden", "true");
+ }
+ }
+ }
+ }
{
- auto tabsNode = rJsonWriter.startNode("tabs");
+ auto tabsNode = rJsonWriter.startArray("tabs");
for(auto id : GetPageIDs())
{
- auto tabNode = rJsonWriter.startNode("");
+ auto tabNode = rJsonWriter.startStruct();
rJsonWriter.put("text", GetPageText(id));
rJsonWriter.put("id", id);
rJsonWriter.put("name", GetPageName(id));
}
}
- rJsonWriter.put("selected", GetCurPageId());
}
sal_uInt16 NotebookbarTabControlBase::m_nHeaderHeight = 0;
More information about the Libreoffice-commits
mailing list