summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorAnkur Khandelwal <khandelwalankur176@gmail.com>2021-10-19 13:06:34 +0530
committerHossein <hossein@libreoffice.org>2021-12-30 21:43:53 +0100
commit96882cdec23c64974737c4833f157d54b85a129e (patch)
treec2741860597a92d6da06bca7abdab20909ba37cd /cui
parentb779831ae89a7b921ec3d8658009a191e2270525 (diff)
tdf#145538 Use range based loops
* Use range based loops in cui/source/tabpages/swpossizetabpage.cxx + Goal: Better readability of the code Change-Id: I8df81be6d6d628d4f3366bc2de4b3e44adbc430f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123871 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 105cf43f7ca2..8bd464a799ee 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -465,19 +465,19 @@ static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(
{SvxSwFramePosString::REL_FRM_TOP, SvxSwFramePosString::REL_FRM_LEFT },
{SvxSwFramePosString::REL_FRM_BOTTOM, SvxSwFramePosString::REL_FRM_RIGHT }
};
- for(size_t nIndex = 0; nIndex < SAL_N_ELEMENTS(aHoriIds); ++nIndex)
+ for(const auto &a : aHoriIds)
{
- if(aHoriIds[nIndex].eHori == eStringId)
+ if(a.eHori == eStringId)
{
- eStringId = aHoriIds[nIndex].eVert;
+ eStringId = a.eVert;
return eStringId;
}
}
- for(size_t nIndex = 0; nIndex < SAL_N_ELEMENTS(aVertIds); ++nIndex)
+ for(const auto &a : aVertIds)
{
- if(aVertIds[nIndex].eHori == eStringId)
+ if(a.eHori == eStringId)
{
- eStringId = aVertIds[nIndex].eVert;
+ eStringId = a.eVert;
break;
}
}