[Libreoffice-commits] core.git: include/svtools svtools/source
Muhammet Kara
muhammet.kara at pardus.org.tr
Thu Jun 22 14:32:02 UTC 2017
include/svtools/treelistbox.hxx | 4 ++++
svtools/source/contnr/treelistbox.cxx | 5 +++++
2 files changed, 9 insertions(+)
New commits:
commit 89594b646eb53df91329d5e68cba068b1ec49492
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date: Mon Jun 19 16:50:50 2017 +0300
Add RemoveEntry method to SvTreeListBox
Allows you to remove an entry along with its children
without selecting the entry.
Change-Id: Ie833df5e0d2d3bc86ed01a70dc6f042ebb6d6a47
Reviewed-on: https://gerrit.libreoffice.org/38971
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 3bc9168cbc00..5080ebcff5df 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -380,6 +380,10 @@ public:
bool CopySelection( SvTreeListBox* pSource, SvTreeListEntry* pTarget );
bool MoveSelectionCopyFallbackPossible( SvTreeListBox* pSource, SvTreeListEntry* pTarget, bool bAllowCopyFallback );
void RemoveSelection();
+ /**
+ * Removes the entry along with all of its descendants
+ */
+ void RemoveEntry(SvTreeListEntry* pEntry);
DragDropMode GetDragDropMode() const { return nDragDropMode; }
SelectionMode GetSelectionMode() const { return eSelMode; }
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 17da61af2333..0b728f512c38 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -676,6 +676,11 @@ void SvTreeListBox::RemoveSelection()
pModel->Remove(*it);
}
+void SvTreeListBox::RemoveEntry(SvTreeListEntry* pEntry)
+{
+ pModel->Remove(pEntry);
+}
+
void SvTreeListBox::RecalcViewData()
{
SvTreeListEntry* pEntry = First();
More information about the Libreoffice-commits
mailing list