summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-21 09:11:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-21 09:54:30 +0200
commit60846212c7f5271a86fd43555d633f77d59f5a10 (patch)
treeba3d9464385a2f3abdeea93b1fe887bf385f8463 /sw/qa/extras/ooxmlimport
parent8477bbf8d6867e656b8132f0ddd682d08590a547 (diff)
use for-range on Sequence in sfx2..sw
Change-Id: I09806869f2fdbae61f4c5d5c9db6859202bb63b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx8
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx7
2 files changed, 5 insertions, 10 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index e08fadcc6b70..343c08a94d89 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1303,10 +1303,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf101626, "tdf101626.docx")
uno::Sequence<beans::PropertyValue> aProps;
xLevels->getByIndex(0) >>= aProps; // 1st level
- for (int i = 0; i < aProps.getLength(); ++i)
+ for (beans::PropertyValue const & rProp : std::as_const(aProps))
{
- const beans::PropertyValue& rProp = aProps[i];
-
if (rProp.Name == "BulletChar")
{
// the bulletChar has to be 0x2d!
@@ -1325,10 +1323,8 @@ DECLARE_OOXMLIMPORT_TEST( testTdf106606, "tdf106606.docx" )
uno::Sequence<beans::PropertyValue> aProps;
xLevels->getByIndex( 0 ) >>= aProps; // 1st level
- for ( int i = 0; i < aProps.getLength(); ++i )
+ for ( beans::PropertyValue const & rProp : std::as_const(aProps))
{
- const beans::PropertyValue& rProp = aProps[i];
-
// If the image was prematurely removed from cache when processed for previous numbering list, then the sequence hasn't the property.
if ( rProp.Name == "GraphicBitmap" )
return true;
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index be99a8b9c47a..78e79add953a 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -539,12 +539,11 @@ DECLARE_OOXMLIMPORT_TEST(testTdf103345, "numbering-circle.docx")
uno::Sequence<beans::PropertyValue> aProps;
xLevels->getByIndex(0) >>= aProps; // 1st level
- for (int i = 0; i < aProps.getLength(); ++i)
+ for (beans::PropertyValue const& prop : std::as_const(aProps))
{
- if (aProps[i].Name == "NumberingType")
+ if (prop.Name == "NumberingType")
{
- CPPUNIT_ASSERT_EQUAL(style::NumberingType::CIRCLE_NUMBER,
- aProps[i].Value.get<sal_Int16>());
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::CIRCLE_NUMBER, prop.Value.get<sal_Int16>());
return;
}
}