sfx2/source/dialog/dinfdlg.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 7c6ebdfb0a7b8abbb5141bbec13467438288fa84 Author: Simon Chenery <[email protected]> AuthorDate: Sat Jan 24 17:23:24 2026 +0100 Commit: David Gilbert <[email protected]> CommitDate: Wed Jan 28 23:51:39 2026 +0100 tdf#145538 Use range based for loops in dinfdlg.cxx Change-Id: Ie9d7a60d2fd3609ea2eb4de48ccb20a554be40b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198046 Reviewed-by: David Gilbert <[email protected]> Tested-by: Jenkins diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index a30bdf65d19b..f17047e9ab51 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1475,18 +1475,18 @@ namespace { void fillNameBox(weld::ComboBox& rNameBox) { - for (size_t i = 0; i < SAL_N_ELEMENTS(SFX_CB_PROPERTY_STRINGARRAY); ++i) - rNameBox.append_text(SfxResId(SFX_CB_PROPERTY_STRINGARRAY[i])); + for (const auto& rResId : SFX_CB_PROPERTY_STRINGARRAY) + rNameBox.append_text(SfxResId(rResId)); Size aSize(rNameBox.get_preferred_size()); rNameBox.set_size_request(aSize.Width(), aSize.Height()); } void fillTypeBox(weld::ComboBox& rTypeBox) { - for (size_t i = 0; i < SAL_N_ELEMENTS(SFX_LB_PROPERTY_STRINGARRAY); ++i) + for (const auto& rCustomProperty : SFX_LB_PROPERTY_STRINGARRAY) { - OUString sId(OUString::number(SFX_LB_PROPERTY_STRINGARRAY[i].second)); - rTypeBox.append(sId, SfxResId(SFX_LB_PROPERTY_STRINGARRAY[i].first)); + OUString sId(OUString::number(rCustomProperty.second)); + rTypeBox.append(sId, SfxResId(rCustomProperty.first)); } rTypeBox.set_active(0); Size aSize(rTypeBox.get_preferred_size());
