vcl/source/treelist/svtabbx.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 4030a0439142122227ee19487bcdd4389d0e184d
Author:     Darshan11 <darshan.upadh...@collabora.com>
AuthorDate: Wed Dec 20 11:35:46 2023 +0530
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Jan 5 15:10:19 2024 +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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161655
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

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);
 }

Reply via email to