include/vcl/treelist.hxx | 2 +- vcl/source/treelist/treelist.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 344a87f0bc4027825480e1c44235bd6d8d8fc2aa Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Apr 2 17:17:06 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Apr 2 20:57:19 2020 +0200 make SvListView::IsSelected take const arg Change-Id: I1e6d2ed5b092741499505bdfd65c6a583495204c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91594 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/treelist.hxx b/include/vcl/treelist.hxx index 433cd5db91f7..a6cdbe0aa60e 100644 --- a/include/vcl/treelist.hxx +++ b/include/vcl/treelist.hxx @@ -281,7 +281,7 @@ public: bool IsExpanded( SvTreeListEntry* pEntry ) const; bool IsAllExpanded( SvTreeListEntry* pEntry) const; - bool IsSelected( SvTreeListEntry* pEntry ) const; + bool IsSelected(const SvTreeListEntry* pEntry) const; void SetEntryFocus( SvTreeListEntry* pEntry, bool bFocus ); const SvViewDataEntry* GetViewData( const SvTreeListEntry* pEntry ) const; SvViewDataEntry* GetViewData( SvTreeListEntry* pEntry ); diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index 1f16f1d1a150..2f99060ac1ea 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -1355,10 +1355,10 @@ bool SvListView::IsAllExpanded( SvTreeListEntry* pEntry ) const return true; } -bool SvListView::IsSelected( SvTreeListEntry* pEntry ) const +bool SvListView::IsSelected(const SvTreeListEntry* pEntry) const { DBG_ASSERT(pEntry,"IsExpanded:No Entry"); - SvDataTable::const_iterator itr = m_pImpl->m_DataTable.find(pEntry); + SvDataTable::const_iterator itr = m_pImpl->m_DataTable.find(const_cast<SvTreeListEntry*>(pEntry)); if (itr == m_pImpl->m_DataTable.end()) return false; return itr->second->IsSelected(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits