vcl/source/treelist/svtabbx.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit dbe6721dc9bff868a83aaba3fb53d27efa5ffc17 Author: Darshan11 <[email protected]> AuthorDate: Wed Dec 20 11:35:46 2023 +0530 Commit: Szymon Kłos <[email protected]> CommitDate: Wed Dec 20 09:42:44 2023 +0100 Send checkboxtype property to online for webtreeview widget - webtreeview widget does not have any property that define that element is a checkbox or radio button - added `checboxtype` property - will help to identify the element type (radio/checbox) Change-Id: Ic8aa0c3eeb6373566f3507ebf01cee3427a57704 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161043 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 9b39429c20e7..8541a16c1fbc 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -140,6 +140,23 @@ void SvTabListBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) bool bCheckButtons = static_cast<int>(nTreeFlags & SvTreeFlags::CHKBTN); + bool isRadioButton = false; + if (pCheckButtonData) + { + isRadioButton = pCheckButtonData -> IsRadio(); + } + + OUString checkboxtype; + if (bCheckButtons) + { + checkboxtype = "checkbox"; + if(isRadioButton) + { + checkboxtype = "radio"; + } + } + + rJsonWriter.put("checkboxtype", checkboxtype); auto entriesNode = rJsonWriter.startArray("entries"); lcl_DumpEntryAndSiblings(rJsonWriter, First(), this, bCheckButtons); }
