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.weghorn@posteo.de>
This commit is contained in:
RMZeroFour
2024-04-02 21:14:12 +02:00
committed by Michael Weghorn
parent 89e23bb599
commit 03c9875b87
+2 -3
View File
@@ -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()));