summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding/xfactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj/source/commonembedding/xfactory.cxx')
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx
index 47ea271c7ca9..bfd7d548358a 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -279,9 +279,9 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
// check if there is URL, URL must exist
OUString aURL;
- for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ )
- if ( aTempMedDescr[nInd].Name == "URL" )
- aTempMedDescr[nInd].Value >>= aURL;
+ for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) )
+ if ( prop.Name == "URL" )
+ prop.Value >>= aURL;
if ( aURL.isEmpty() )
throw lang::IllegalArgumentException( "No URL for the link is provided!",
@@ -334,9 +334,9 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Sequence< beans::PropertyValue > aTempMedDescr( lArguments );
OUString aURL;
- for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ )
- if ( aTempMedDescr[nInd].Name == "URL" )
- aTempMedDescr[nInd].Value >>= aURL;
+ for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) )
+ if ( prop.Name == "URL" )
+ prop.Value >>= aURL;
if ( aURL.isEmpty() )
throw lang::IllegalArgumentException( "No URL for the link is provided!",