svtools/source/control/tabbar.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
New commits: commit b3e86695022f8db57344f4115ee360072d671838 Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Thu Dec 21 20:33:20 2023 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Dec 22 12:30:54 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> (cherry picked from commit 3430a2c639a9f714259f9d319515464a653d21ab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161159 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 1690269ba234..f9faa2bbe0dc 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;