summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-09-08 13:13:54 +0200
committerEike Rathke <erack@redhat.com>2017-09-08 13:14:30 +0200
commitfd5ac4c4f5de9ef475156dafcba1b37a56b5cb8d (patch)
tree445fdcd46702378a89f8a217f94e8085c3ad5459
parent1c983335116a6f09cabf0b3eae7f51951111341e (diff)
If children then insert only if a child is selected, tdf#112258 follow-up
Otherwise the chain down to the parent would be pickable, though in practice it doesn't have a consequence as only leaves are picked. However, inserting to the set can be avoided. Change-Id: I6a6b63b2d7c031a2dd13d8cc7d98f15e1f946298
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index e4f04da83504..74c5f6df301a 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1658,7 +1658,7 @@ void ScCheckListBox::GetRecursiveChecked( SvTreeListEntry* pEntry, std::unordere
{
OUString aLabel = rLabel;
GetRecursiveChecked( rChild.get(), vOut, aLabel);
- if (!aLabel.isEmpty())
+ if (!aLabel.isEmpty() && aLabel != rLabel)
vOut.insert( aLabel);
}
// Let the caller not add the parent alone.