summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-26 16:30:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-27 09:57:39 +0200
commit0e258c94980266cc669f3b18025fc9f2dc3abfcb (patch)
treeb01b1e976f8744f786d3ba95d927bdd225b20551 /vcl
parentd45bf5e20e5abc2dcf5ea3d3be06aa61d92c762e (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/salvtables.cxx15
1 files changed, 8 insertions, 7 deletions
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