From c4c1a6e6bfc42dddfa7a7ded826dca37c1d35dce Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 2 Mar 2022 11:06:53 +0000 Subject: [PATCH] wina11y: Simplify this loop a bit Use a range-based for loop, `OUString::isEmpty` instead of checking the length and combine the two conditions into one. Change-Id: Iddc75369b1600f2f540f7ec4a6f8ed0b8462fd93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130841 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- winaccessibility/source/UAccCOM/MAccessible.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 56542b10028f..3f0253fbed19 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2808,14 +2808,11 @@ OUString CMAccessible::get_String4Numbering(const Any& pAny, sal_Int16 numbering Any aAny = pXIndex->getByIndex(numberingLevel); Sequence< css::beans::PropertyValue > aProps; aAny >>= aProps; - const css::beans::PropertyValue* pPropArray = aProps.getConstArray(); - sal_Int32 nCount = aProps.getLength(); OUStringBuffer buf("Numbering:NumberingLevel="); buf.append(sal_Int32(numberingLevel)); buf.append(','); - for( sal_Int32 i=0; i