summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 16:12:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 12:50:55 +0200
commit20571c472528c4f98fe3f55700d134915d32a49a (patch)
tree9b350824d845b8aaeb13d087ef74febb454b821b /framework
parentb401896a56149aa2871b65a330a6f601a9830ccd (diff)
use more range-for on uno::Sequence
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/jobs/jobdata.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx
index 8555605a3673..5e7776b62827 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -530,17 +530,16 @@ std::vector< OUString > JobData::getEnabledJobsForEvent( const css::uno::Referen
// step over all job entries ... check her time stamps ... and put only job names to the
// destination list, which represent an enabled job.
css::uno::Sequence< OUString > lAllJobs = xJobList->getElementNames();
- OUString* pAllJobs = lAllJobs.getArray();
sal_Int32 c = lAllJobs.getLength();
std::vector< OUString > lEnabledJobs(c);
sal_Int32 d = 0;
- for (sal_Int32 s=0; s<c; ++s)
+ for (OUString const & jobName : lAllJobs)
{
css::uno::Reference< css::beans::XPropertySet > xJob;
if (
- !(xJobList->getByName(pAllJobs[s]) >>= xJob) ||
+ !(xJobList->getByName(jobName) >>= xJob) ||
!(xJob.is() )
)
{
@@ -556,7 +555,7 @@ std::vector< OUString > JobData::getEnabledJobsForEvent( const css::uno::Referen
if (!isEnabled(sAdminTime, sUserTime))
continue;
- lEnabledJobs[d] = pAllJobs[s];
+ lEnabledJobs[d] = jobName;
++d;
}
lEnabledJobs.resize(d);