summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDarshan11 <darshan.upadhyay@collabora.com>2023-12-20 11:35:46 +0530
committerAndras Timar <andras.timar@collabora.com>2024-01-15 19:41:39 +0100
commit0652a662b7dc670818622b360458c5e086c32c7f (patch)
tree8bd07f7856b6a0fef1714e29c00ac52c38540243 /vcl
parent3a63faf973692fde8eba5d37994217dd95c3c902 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161655 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/treelist/svtabbx.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 81f0f4e8b078..6f309bb9a85f 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -142,6 +142,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);
}