sc/source/ui/optdlg/tpview.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 7283026323e6fb53c81b7a1fa6cd54db8ef77046
Author:     Simon Chenery <[email protected]>
AuthorDate: Sun Nov 30 22:47:58 2025 +0100
Commit:     Hossein <[email protected]>
CommitDate: Fri Jan 23 23:42:05 2026 +0100

    tdf#145538 Use range based for loop in tpview.cxx
    
    Change-Id: I4c0448ac9786060eb520aea3160f9def35ccfa4a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194847
    Tested-by: Jenkins
    Reviewed-by: Hossein <[email protected]>

diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 3aa079ec7d54..6e461edfd9c5 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -508,10 +508,9 @@ ScTpLayoutOptions::ScTpLayoutOptions(weld::Container* 
pPage, weld::DialogControl
     m_xUnitLB->connect_changed( LINK( this, ScTpLayoutOptions, MetricHdl ) );
     m_xAlignCB->connect_toggled(LINK(this, ScTpLayoutOptions, AlignHdl));
 
-    for (size_t i = 0; i < SAL_N_ELEMENTS(SCSTR_UNIT); ++i)
+    for (const auto& [pResId, eFUnit] : SCSTR_UNIT)
     {
-        OUString sMetric = ScResId(SCSTR_UNIT[i].first);
-        FieldUnit eFUnit = SCSTR_UNIT[i].second;
+        OUString sMetric = ScResId(pResId);
 
         switch ( eFUnit )
         {

Reply via email to