diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-29 22:24:22 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-30 12:40:20 +0200 |
commit | 02872ceafb8adca47cce856d0e44107494ba2e21 (patch) | |
tree | 33a62ca57f6de9507ff1e9ccb7880372fbe91f77 /ucb/source/ucp/package/pkgcontent.cxx | |
parent | 639698862d16310b60514277d59227eec37eb02a (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/package/pkgcontent.cxx')
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index dba85a3a9d30..85cb0b16d3c8 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -714,13 +714,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( rxContext ); - sal_Int32 nCount = rProperties.getLength(); - if ( nCount ) - { - const beans::Property* pProps = rProperties.getConstArray(); - for ( sal_Int32 n = 0; n < nCount; ++n ) - xRow->appendVoid( pProps[ n ] ); - } + for ( const beans::Property& rProp : rProperties ) + xRow->appendVoid( rProp ); return uno::Reference< sdbc::XRow >( xRow.get() ); } @@ -741,17 +736,13 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( rxContext ); - sal_Int32 nCount = rProperties.getLength(); - if ( nCount ) + if ( rProperties.hasElements() ) { uno::Reference< beans::XPropertySet > xAdditionalPropSet; bool bTriedToGetAdditionalPropSet = false; - const beans::Property* pProps = rProperties.getConstArray(); - for ( sal_Int32 n = 0; n < nCount; ++n ) + for ( const beans::Property& rProp : rProperties ) { - const beans::Property& rProp = pProps[ n ]; - // Process Core properties. if ( rProp.Name == "ContentType" ) |