include/vcl/toolkit/treelistbox.hxx | 5 +++++ vcl/source/treelist/iconview.cxx | 1 + vcl/source/treelist/treelistbox.cxx | 5 +++++ 3 files changed, 11 insertions(+)
New commits: commit 47e3d6663741522ebd29dcc5c9132d3540981d34 Author: Javiya Vivekkumar Dineshbhai <[email protected]> AuthorDate: Mon Aug 5 19:47:14 2024 +0530 Commit: Szymon Kłos <[email protected]> CommitDate: Thu Aug 8 11:50:41 2024 +0200 jsdialog: support textWithIconEnabled into Dump icon view Signed-off-by: Javiya Vivekkumar Dineshbhai <[email protected]> Change-Id: Ib005da05fe500aae5729095533aab05578e567d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171491 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index 007c119c5257..5bd014f2ba47 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -215,6 +215,7 @@ class VCL_DLLPUBLIC SvTreeListBox bool mbActivateOnSingleClick; // Make single click "activate" a row like a double-click normally does bool mbHoverSelection; // Make mouse over a row "select" a row like a single-click normally does bool mbSelectingByHover; // true during "Select" if it was due to hover + bool mbIsTextColumEnabled; // true if the property name text-column is enabled sal_Int8 mnClicksToToggle; // 0 == Click on a row not toggle its checkbox. // 1 == Every click on row toggle its checkbox. // 2 == First click select, second click toggle. @@ -667,6 +668,10 @@ public: void SetHoverSelection(bool bEnable) { mbHoverSelection = bEnable; } bool GetHoverSelection() const { return mbHoverSelection; } + // to get enable or disable the text-column + void SetTextColumnEnabled(bool bEnable) { mbIsTextColumEnabled = bEnable; } + bool IsTextColumnEnabled() const { return mbIsTextColumEnabled; } + // only true during Select if the Select is due to a Hover bool IsSelectDueToHover() const { return mbSelectingByHover; } diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index 57bf2aea4bda..0f512fb819e3 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -341,6 +341,7 @@ void IconView::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) SvTreeListBox::DumpAsPropertyTree(rJsonWriter); rJsonWriter.put("type", "iconview"); rJsonWriter.put("singleclickactivate", GetActivateOnSingleClick()); + rJsonWriter.put("textWithIconEnabled", IsTextColumnEnabled()); auto aNode = rJsonWriter.startArray("entries"); DumpEntryAndSiblings(rJsonWriter, First()); } diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 67292505671f..3c333603bf74 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -393,6 +393,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) : mbActivateOnSingleClick(false), mbHoverSelection(false), mbSelectingByHover(false), + mbIsTextColumEnabled(false), mnClicksToToggle(0), //at default clicking on a row won't toggle its default checkbox eSelMode(SelectionMode::NONE), nMinWidthInChars(0), @@ -3580,6 +3581,10 @@ bool SvTreeListBox::set_property(const OUString &rKey, const OUString &rValue) if (toBool(rValue)) SetDragDropMode(DragDropMode::CTRL_MOVE | DragDropMode::ENABLE_TOP); } + else if (rKey == "text-column") + { + SetTextColumnEnabled(toBool(rValue)); + } else return Control::set_property(rKey, rValue); return true;
