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

New commits:
commit 3be361d00eb1d61543e2c8c6953e63c149fb1eb0
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Tue Oct 31 15:39:13 2023 +0100
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Tue Oct 31 15:40:01 2023 +0100

    Revert "tdf#100584, tdff#157784 - Arrange sheets depending on the RTL 
settings"
    
    This reverts commit a90d89d5b2dae2b4c3fd6a411de2160a3bf20779.
    
    Reason for revert: Typo in the commit message
    
    Change-Id: I58f184e2733d91aa827396868fb4f7b8e9d47a48
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158693
    Tested-by: Andreas Heinisch <andreas.heini...@yahoo.de>
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 25d60abc2946..d158516fdb0a 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -280,8 +280,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