svtools/source/control/tabbar.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 3430a2c639a9f714259f9d319515464a653d21ab
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Thu Dec 21 20:33:20 2023 +0100
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Thu Dec 21 20:33:47 2023 +0100

    Revert "tdf#100584 - Arrange sheets in the tab bar depending on the RTL 
settings"
    
    This reverts commit be86c8f2432623fdb8ed4f22ca08c35121fd8bec.
    
    Reason for revert: To many regressions.
    
    Change-Id: Id3fb8dc5d4edb84c0008b7834a80887aaa7d9f83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161154
    Tested-by: Andreas Heinisch <andreas.heini...@yahoo.de>
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index dafdf5f7e218..58fa5d76de3a 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -710,15 +710,10 @@ void TabBar::ImplFormat()
     if (!mbFormat)
         return;
 
+    sal_uInt16 nItemIndex = 0;
     tools::Long x = mnOffX;
-
-    const size_t nItemListSize = mpImpl->maItemList.size();
-    for (size_t nItemIndex = 0; nItemIndex < nItemListSize; nItemIndex++)
+    for (auto & rItem : mpImpl->maItemList)
     {
-        // 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))
             rItem.maRect.SetEmpty();
@@ -746,6 +741,8 @@ void TabBar::ImplFormat()
                 rItem.maRect.SetLeft(nNewLeft);
             }
         }
+
+        nItemIndex++;
     }
 
     mbFormat = false;

Reply via email to