summaryrefslogtreecommitdiff
path: root/sw/source
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/source
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/source')
-rw-r--r--sw/source/core/unocore/unoobj.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index ddd352386d11..c3690beab846 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -521,21 +521,21 @@ SwUnoCursorHelper::SetCursorPropertyValue(
SfxItemPropertyMap const& rMap(rPropSet.getPropertyMap());
SfxItemSet items{rPam.GetDoc()->GetAttrPool(), aCharAutoFormatSetRange};
- for (sal_Int32 i = 0; i < props.getLength(); ++i)
+ for (beans::NamedValue const & prop : std::as_const(props))
{
SfxItemPropertySimpleEntry const*const pEntry =
- rMap.getByName(props[i].Name);
+ rMap.getByName(prop.Name);
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + props[i].Name);
+ "Unknown property: " + prop.Name);
}
if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
{
throw beans::PropertyVetoException(
- "Property is read-only: " + props[i].Name);
+ "Property is read-only: " + prop.Name);
}
- rPropSet.setPropertyValue(*pEntry, props[i].Value, items);
+ rPropSet.setPropertyValue(*pEntry, prop.Value, items);
}
SwFormatAutoFormat item(RES_PARATR_LIST_AUTOFMT);