vcl: allow editing a column other than the first one in SvTabListBox

There are 2 members mvTabList and aTabs in SvTabListBox and
SvTreeListBox, and only aTabs is evaluated to determine which column
should be edited when calling start_editing().

This solution is probably not ideal; it would be better to have a
parameter to select the column because one might want multiple editable
columns with multiple buttons...

Also, the native GTK implementation has the same bug (but there
double-clicking the column works).

Change-Id: I727792e635d3b610a2132ee5f4155e3ee610aaf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137362
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index d4fb5db..f1277ea 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -153,6 +153,16 @@ void SvTabListBox::SetTabs()
    }
    */

    // the 1st column (index 1 or 2 depending on button flags) is always set
    // editable by SvTreeListBox::SetTabs(),
    // which prevents setting a different column to editable as the first
    // one with the flag is picked in SvTreeListBox::ImplEditEntry()
    assert(aTabs.back()->nFlags & SvLBoxTabFlags::EDITABLE);
    if (!(mvTabList[0].nFlags & SvLBoxTabFlags::EDITABLE))
    {
        aTabs.back()->nFlags &= ~SvLBoxTabFlags::EDITABLE;
    }

    // append all other tabs to the list
    for( sal_uInt16 nCurTab = 1; nCurTab < sal_uInt16(mvTabList.size()); nCurTab++ )
    {