[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 26 14:38:05 UTC 2019
vcl/source/app/salvtables.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 055751130b8095985feda2b612ecfa7b1ad86c13
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 26 09:46:56 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Nov 26 15:37:10 2019 +0100
Resolves: tdf#129021 dummy entry in multicolumn lists not working properly
Change-Id: I94afa3a29e0ce52cd8d17fab358d5737881814fa
Reviewed-on: https://gerrit.libreoffice.org/83744
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 327853bba1d1..30ac908a128c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3369,6 +3369,11 @@ private:
DECL_LINK(CompareHdl, const SvSortData&, sal_Int32);
DECL_LINK(PopupMenuHdl, const CommandEvent&, bool);
+ bool IsDummyEntry(SvTreeListEntry* pEntry) const
+ {
+ return m_xTreeView->GetEntryText(pEntry).trim() == "<dummy>";
+ }
+
public:
SalInstanceTreeView(SvTabListBox* pTreeView, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
: SalInstanceContainer(pTreeView, pBuilder, bTakeOwnership)
@@ -4135,7 +4140,7 @@ public:
{
SalInstanceTreeIter& rVclIter = static_cast<SalInstanceTreeIter&>(rIter);
rVclIter.iter = m_xTreeView->Next(rVclIter.iter);
- if (rVclIter.iter && m_xTreeView->GetEntryText(rVclIter.iter) == "<dummy>")
+ if (rVclIter.iter && IsDummyEntry(rVclIter.iter))
return iter_next(rVclIter);
return rVclIter.iter != nullptr;
}
@@ -4148,7 +4153,7 @@ public:
if (bRet)
{
//on-demand dummy entry doesn't count
- return m_xTreeView->GetEntryText(rVclIter.iter) != "<dummy>";
+ return !IsDummyEntry(rVclIter.iter);
}
return bRet;
}
@@ -4656,7 +4661,7 @@ IMPL_LINK_NOARG(SalInstanceTreeView, ExpandingHdl, SvTreeListBox*, bool)
{
auto pChild = m_xTreeView->FirstChild(pEntry);
assert(pChild);
- if (m_xTreeView->GetEntryText(pChild) == "<dummy>")
+ if (IsDummyEntry(pChild))
{
m_xTreeView->RemoveEntry(pChild);
bPlaceHolder = true;
More information about the Libreoffice-commits
mailing list