diff options
-rw-r--r-- | svtools/source/control/tabbar.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
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; |