sc/source/ui/view/tabview.cxx     |    3 +--
 svtools/source/control/tabbar.cxx |    4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit a735f64391b5c194b38cacb577f14ef60556bcbc
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Thu Dec 21 20:29:32 2023 +0100
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Thu Dec 21 23:32:56 2023 +0100

    Revert "tdf#100584, tdf#157784 - Arrange sheets depending on the RTL 
settings"
    
    This reverts commit 4f1b3c16f5530a2a190cab07c07c7bf63acf42c7.
    
    Reason for revert: To many regressions.
    
    Change-Id: I7352bb3c192d5e6c72e95c387ee551764007e97b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161152
    Tested-by: Andreas Heinisch <andreas.heini...@yahoo.de>
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>
    (cherry picked from commit 19e856aa1ade6686fa495e57386b81cabae47495)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161157
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index f580198f9bfc..44c74c5455a7 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -281,8 +281,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
     if (bHasHint)
         RemoveHintWindow();
 
-    // tdf#100584 - arrange sheets depending on the RTL settings
-    bool bLayoutRTL = AllSettings::GetLayoutRTL();
+    bool bLayoutRTL = aViewData.GetDocument().IsLayoutRTL( 
aViewData.GetTabNo() );
     tools::Long nTotalWidth = rSize.Width();
     if ( bLayoutRTL )
         nTotalWidth += 2*rOffset.X();
diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index 02a23b8aea33..1690269ba234 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -715,7 +715,9 @@ void TabBar::ImplFormat()
     const size_t nItemListSize = mpImpl->maItemList.size();
     for (size_t nItemIndex = 0; nItemIndex < nItemListSize; nItemIndex++)
     {
-        auto& rItem = mpImpl->maItemList[nItemIndex];
+        // tdf#100584 - arrange sheets depending on the RTL settings
+        auto& rItem = mbMirrored ? mpImpl->maItemList[nItemListSize - 
nItemIndex - 1]
+                                 : mpImpl->maItemList[nItemIndex];
 
         // At all non-visible tabs an empty rectangle is set
         if ((nItemIndex + 1 < mnFirstPos) || (x > mnLastOffX))

Reply via email to