summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/ext/ucpext_content.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-29 22:24:22 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-06-30 12:40:20 +0200
commit02872ceafb8adca47cce856d0e44107494ba2e21 (patch)
tree33a62ca57f6de9507ff1e9ccb7880372fbe91f77 /ucb/source/ucp/ext/ucpext_content.cxx
parent639698862d16310b60514277d59227eec37eb02a (diff)
Simplify Sequence iterations in ucb
Use range-based loops or replace with STL functions Change-Id: I755dec47aeeed879a032eecd50dee585c392ec59 Reviewed-on: https://gerrit.libreoffice.org/74915 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'ucb/source/ucp/ext/ucpext_content.cxx')
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index f55c3418cc48..efb67d4fdfe2 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -381,14 +381,10 @@ namespace ucb { namespace ucp { namespace ext
// note: empty sequence means "get values of all supported properties".
::rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( rxContext );
- const sal_Int32 nCount = i_rProperties.getLength();
- if ( nCount )
+ if ( i_rProperties.hasElements() )
{
- const Property* pProps = i_rProperties.getConstArray();
- for ( sal_Int32 n = 0; n < nCount; ++n )
+ for ( const Property& rProp : i_rProperties )
{
- const Property& rProp = pProps[ n ];
-
// Process Core properties.
if ( rProp.Name == "ContentType" )
{
@@ -513,13 +509,10 @@ namespace ucb { namespace ucp { namespace ext
aEvent.Further = false;
aEvent.PropertyHandle = -1;
- const PropertyValue* pValues = i_rValues.getConstArray();
- const sal_Int32 nCount = i_rValues.getLength();
-
- for ( sal_Int32 n = 0; n < nCount; ++n, ++pValues )
+ for ( auto& rRet : aRet )
{
// all our properties are read-only ...
- aRet[ n ] <<= IllegalAccessException("property is read-only.", *this );
+ rRet <<= IllegalAccessException("property is read-only.", *this );
}
return aRet;