summaryrefslogtreecommitdiffstats
path: root/desktop/source/pkgchk/unopkg/unopkg_app.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/pkgchk/unopkg/unopkg_app.cxx')
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 8532366885c0..6c9f8ce00bae 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -164,15 +164,15 @@ Reference<deployment::XPackage> findPackage(
Reference<ucb::XCommandEnvironment > const & environment,
OUString const & idOrFileName )
{
- Sequence< Reference<deployment::XPackage> > ps(
+ const Sequence< Reference<deployment::XPackage> > ps(
manager->getDeployedExtensions(repository,
Reference<task::XAbortChannel>(), environment ) );
- for ( sal_Int32 i = 0; i < ps.getLength(); ++i )
- if ( dp_misc::getIdentifier( ps[i] ) == idOrFileName )
- return ps[i];
- for ( sal_Int32 i = 0; i < ps.getLength(); ++i )
- if ( ps[i]->getName() == idOrFileName )
- return ps[i];
+ for ( auto const & package : ps )
+ if ( dp_misc::getIdentifier( package ) == idOrFileName )
+ return package;
+ for ( auto const & package : ps )
+ if ( package->getName() == idOrFileName )
+ return package;
return Reference<deployment::XPackage>();
}