Related: tdf#131725 if SvTreeListBox RTL set, set scrollbars to match

so if we have a RTL SvTreeListBox in a LTR environ then we get RTL
scrollbars

Change-Id: Ia9aaab81f273e31c61cfe4fd4e138709414ad599
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133778
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx
index 0a9ea9d..e280e90 100644
--- a/include/vcl/toolkit/treelistbox.hxx
+++ b/include/vcl/toolkit/treelistbox.hxx
@@ -690,6 +690,8 @@ public:
    virtual FactoryFunction GetUITestFactory() const override;

    void            SetDragHelper(const rtl::Reference<TransferDataContainer>& rHelper, sal_uInt8 eDNDConstants);

    virtual void    EnableRTL(bool bEnable = true) override;
};

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 896e1c7..51c9d1f 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -3567,6 +3567,14 @@ bool SvTreeListBox::set_property(const OString &rKey, const OUString &rValue)
    return true;
}

void SvTreeListBox::EnableRTL(bool bEnable)
{
    Control::EnableRTL(bEnable);
    pImpl->m_aHorSBar->EnableRTL(bEnable);
    pImpl->m_aVerSBar->EnableRTL(bEnable);
    pImpl->m_aScrBarBox->EnableRTL(bEnable);
}

FactoryFunction SvTreeListBox::GetUITestFactory() const
{
    return TreeListUIObject::create;