summaryrefslogtreecommitdiff
path: root/winaccessibility/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-03-01 10:05:41 +0000
committerMichael Weghorn <m.weghorn@posteo.de>2022-03-01 15:51:27 +0100
commitdf80ed941621da16459c16eae04f73300a606c9b (patch)
treee4f9aa56f6e05e98f2e8949f0dd672dc1b6eeb75 /winaccessibility/source
parent9888bb3dbb7ca558e0b440314bdb24bc60843bb0 (diff)
wina11y: Use range-based for
Change-Id: Icf2a4cb3a4baf0c7aaeb627d05ba355f238b4d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130756 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/source')
-rw-r--r--winaccessibility/source/service/AccObject.cxx23
1 files changed, 5 insertions, 18 deletions
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index 87556090941f..d2862577ffb2 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -432,14 +432,8 @@ OUString AccObject::GetMAccessibleValueFromAny(Any pAny)
Sequence< OUString > val;
if (pAny >>= val)
{
-
- int count = val.getLength();
-
- for( int iIndex = 0;iIndex < count;iIndex++ )
- {
- strValue += val[iIndex];
- }
-
+ for (const OUString& rElem : val)
+ strValue += rElem;
}
}
else if(pAny.getValueType() == cppu::UnoType<double>::get())
@@ -1052,19 +1046,12 @@ void AccObject::GetExpandedState( sal_Bool* isExpandable, sal_Bool* isExpanded)
return;
}
- Sequence<short> pStates = pRState->getStates();
- int count = pStates.getLength();
-
- for( int iIndex = 0;iIndex < count;iIndex++ )
+ for (sal_Int16 nState : pRState->getStates())
{
- if( EXPANDED == pStates[iIndex] )
- {
+ if (nState == EXPANDED)
*isExpanded = true;
- }
- else if( EXPANDABLE == pStates[iIndex] )
- {
+ else if (nState == EXPANDABLE)
*isExpandable = true;
- }
}
}