include/vcl/toolkit/treelistbox.hxx |    2 ++
 vcl/source/treelist/treelistbox.cxx |    8 ++++++++
 2 files changed, 10 insertions(+)

New commits:
commit b1ea5cc2ee0b50651c7cac4d85a49a199693ed1c
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue May 3 20:38:04 2022 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed May 4 09:57:28 2022 +0200

    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 <[email protected]>

diff --git a/include/vcl/toolkit/treelistbox.hxx 
b/include/vcl/toolkit/treelistbox.hxx
index 0a9ea9da5a22..e280e9043ce3 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 896e1c78dbe7..51c9d1f4c57c 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;

Reply via email to