vcl/source/app/salvtables.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
New commits: commit 0e258c94980266cc669f3b18025fc9f2dc3abfcb Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun May 26 16:30:14 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon May 27 09:57:39 2019 +0200 Resolves: tdf#125490 use a single get_text impl for treeview Change-Id: Id9f74d8660fbd706251c9ea759b27a873b9113c6 Reviewed-on: https://gerrit.libreoffice.org/72988 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index e68e3818dcbc..66b49964a003 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2947,9 +2947,8 @@ public: return aRows; } - virtual OUString get_text(int pos, int col) const override + static OUString get_text(SvTreeListEntry* pEntry, int col) { - SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, pos); if (col == -1) return SvTabListBox::GetEntryText(pEntry, 0); @@ -2964,6 +2963,12 @@ public: return static_cast<SvLBoxString&>(rItem).GetText(); } + virtual OUString get_text(int pos, int col) const override + { + SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, pos); + return get_text(pEntry, col); + } + void set_text(SvTreeListEntry* pEntry, const OUString& rText, int col) { if (col == -1) @@ -3407,11 +3412,7 @@ public: virtual OUString get_text(const weld::TreeIter& rIter, int col) const override { const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter); - - if (col == -1) - col = 0xffff; - - return SvTabListBox::GetEntryText(rVclIter.iter, col); + return get_text(rVclIter.iter, col); } virtual void set_text(const weld::TreeIter& rIter, const OUString& rText, int col) override _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits