cui/source/tabpages/numpages.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 03c9875b873d24d72587ab7d9f3190c7c0cf0e5e
Author:     RMZeroFour <ritobrot...@gmail.com>
AuthorDate: Sun Mar 31 19:42:57 2024 +0530
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Apr 2 21:14:12 2024 +0200

    tdf#145538 Use range based for loops
    
    As part of the efforts in tdf#145538 to replace regular for
    loops with range-based for loops in the codebase where suitable,
    this commit does so in SvxNumOptionsTabPage::PageCreated.
    
    PS-2: Renamed a variable.
    
    Change-Id: I7ec813a3c6fead3246137a2841c9f3e80f5adc63
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165594
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index cbdf7fc5a23d..447638836add 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3044,9 +3044,8 @@ void SvxNumOptionsTabPage::PageCreated(const 
SfxAllItemSet& aSet)
     if (pListItem)
     {
         const std::vector<OUString> &aList = pListItem->GetList();
-        sal_uInt32 nCount = aList.size();
-        for(sal_uInt32 i = 0; i < nCount; i++)
-            m_xCharFmtLB->append_text(aList[i]);
+        for (const auto& rItem : aList)
+            m_xCharFmtLB->append_text(rItem);
     }
     if (pMetricItem)
         SetMetric(static_cast<FieldUnit>(pMetricItem->GetValue()));

Reply via email to