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>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e68e381..66b4996 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