summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-20 13:45:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-21 08:48:26 +0200
commit89340fcb6509afd1bffea7b6060d5ff5a444b3f1 (patch)
treed5ae1feaeed8b67afb89b71e642b6306dd4ebc37 /forms/source
parentf94aae5cbab5b826ea8821e9ed3b456d65c03c70 (diff)
use for-range on Sequence in f*
Change-Id: I820255001c1b96d1f4b76a203f3c0f76fa09fe66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/xforms/model_helper.hxx10
-rw-r--r--forms/source/xforms/xpathlib/extension.cxx4
2 files changed, 6 insertions, 8 deletions
diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx
index 592649f839de..59056bf26e62 100644
--- a/forms/source/xforms/model_helper.hxx
+++ b/forms/source/xforms/model_helper.hxx
@@ -109,14 +109,12 @@ class InstanceCollection : public Collection<css::uno::Sequence<css::beans::Prop
public:
virtual bool isValid( const T& t ) const override
{
- const css::beans::PropertyValue* pValues = t.getConstArray();
- OUString sInstance( "Instance" );
- bool bFound = false;
- for( sal_Int32 i = 0; ( ! bFound ) && ( i < t.getLength() ); i++ )
+ for( const css::beans::PropertyValue& rProp : t )
{
- bFound |= ( pValues[i].Name == sInstance );
+ if (rProp.Name == "Instance" )
+ return true;
}
- return bFound;
+ return false;
}
};
diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx
index d5c26c1e63f6..0af6a3eb17db 100644
--- a/forms/source/xforms/xpathlib/extension.cxx
+++ b/forms/source/xforms/xpathlib/extension.cxx
@@ -53,9 +53,9 @@ void SAL_CALL CLibxml2XFormsExtension::initialize(const Sequence< Any >& aSequen
}
NamedValue aValue;
- for (sal_Int32 i = 0; i < aSequence.getLength(); i++)
+ for (const Any& rArg : aSequence)
{
- if (! (aSequence[i] >>= aValue))
+ if (! (rArg >>= aValue))
throw RuntimeException();
if ( aValue.Name == "Model" )
aValue.Value >>= m_aModel;