diff options
author | Dr. David Alan Gilbert <dave@treblig.org> | 2023-05-31 01:58:18 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-06-02 16:58:57 +0200 |
commit | 7bec1689fcbe9102aa220739b6113118d9a8dd1f (patch) | |
tree | ad0146c3bf6f14530e36b79a0c620cfd1dad4084 /sw/qa/extras/odfexport | |
parent | f8036f2f5238adf227d0ffa646e503f0446bb37b (diff) |
tdf#145538,tdf#147021: qa: range based loops
A bunch of range based loop changes in various qa
sections that also take out about 1% of SAL_N_ELEMENTS
Change-Id: I8ef000e9aa400cd8363b48f6175f6ab258cefbd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152422
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa/extras/odfexport')
-rw-r--r-- | sw/qa/extras/odfexport/odfexport2.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index ec88381e39fe..103892a7723a 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -121,7 +121,7 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt") uno::Any aHu(OUString("Hu")); uno::Any ahu(OUString("hu")); - for (size_t i = 0; i < SAL_N_ELEMENTS(aFieldTexts); i++) + for (auto const& sFieldText : aFieldTexts) { uno::Any aField = xFields->nextElement(); uno::Reference<lang::XServiceInfo> xServiceInfo(aField, uno::UNO_QUERY); @@ -131,7 +131,7 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt") uno::Any aLang = xPropertySet->getPropertyValue("ReferenceFieldLanguage"); CPPUNIT_ASSERT_EQUAL(true, aLang == aHu || aLang == ahu); uno::Reference<text::XTextContent> xField(aField, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(aFieldTexts[i], xField->getAnchor()->getString()); + CPPUNIT_ASSERT_EQUAL(sFieldText, xField->getAnchor()->getString()); } } } |