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

New commits:
commit a90d89d5b2dae2b4c3fd6a411de2160a3bf20779
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Mon Oct 30 20:29:05 2023 +0100
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Tue Oct 31 15:37:57 2023 +0100

    tdf#100584, tdff#157784 - Arrange sheets depending on the RTL settings
    
    The tab bar's position should be determined globally based on the RTL 
settings, rather than being individually set for each sheet.
    
    Change-Id: I0906f85058a5b4250540dda07740eec61f46d299
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158675
    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 d158516fdb0a..25d60abc2946 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -280,7 +280,8 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
     if (bHasHint)
         RemoveHintWindow();
 
-    bool bLayoutRTL = aViewData.GetDocument().IsLayoutRTL( 
aViewData.GetTabNo() );
+    // tdf#100584 - arrange sheets depending on the RTL settings
+    bool bLayoutRTL = AllSettings::GetLayoutRTL();
     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 1690269ba234..02a23b8aea33 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -715,9 +715,7 @@ void TabBar::ImplFormat()
     const size_t nItemListSize = mpImpl->maItemList.size();
     for (size_t nItemIndex = 0; nItemIndex < nItemListSize; nItemIndex++)
     {
-        // tdf#100584 - arrange sheets depending on the RTL settings
-        auto& rItem = mbMirrored ? mpImpl->maItemList[nItemListSize - 
nItemIndex - 1]
-                                 : mpImpl->maItemList[nItemIndex];
+        auto& rItem = mpImpl->maItemList[nItemIndex];
 
         // At all non-visible tabs an empty rectangle is set
         if ((nItemIndex + 1 < mnFirstPos) || (x > mnLastOffX))

Reply via email to