summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 11:26:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 14:18:49 +0200
commit5a526f9196a8aeb527a2fc6d7c081812770c28be (patch)
tree076a324476d79bf397fb97d5884db571106425e8 /desktop
parentcf3fb54debffeab546085e648c73c576343be9f4 (diff)
loplugin:sequenceloop dbaccess..extensions
Change-Id: I0eb33a8e293eb8afd0cf5a933384c44e023a2e6b Reviewed-on: https://gerrit.libreoffice.org/77498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx8
-rw-r--r--desktop/source/migration/migration.cxx13
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx3
3 files changed, 13 insertions, 11 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2a86c3f6a94f..c04f5c461dea 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2184,7 +2184,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha
// saveAs() is more like save-a-copy, which allows saving to any
// random format like PDF or PNG.
// It is not a real filter option, so we have to filter it out.
- uno::Sequence<OUString> aOptionSeq = comphelper::string::convertCommaSeparated(aFilterOptions);
+ const uno::Sequence<OUString> aOptionSeq = comphelper::string::convertCommaSeparated(aFilterOptions);
std::vector<OUString> aFilteredOptionVec;
bool bTakeOwnership = false;
MediaDescriptor aSaveMediaDescriptor;
@@ -4019,7 +4019,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
}
}
- uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
+ const uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
for (const OUString& rStyle: aStyles )
{
// Filter out the default styles - they are already at the top
@@ -4959,7 +4959,7 @@ static char* lo_getFilterTypes(LibreOfficeKit* pThis)
}
uno::Reference<container::XNameAccess> xTypeDetection(xSFactory->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY);
- uno::Sequence<OUString> aTypes = xTypeDetection->getElementNames();
+ const uno::Sequence<OUString> aTypes = xTypeDetection->getElementNames();
boost::property_tree::ptree aTree;
for (const OUString& rType : aTypes)
{
@@ -5228,7 +5228,7 @@ static void preloadData()
aLocales = xSpell->getLocales();
}
- for (const auto& aLocale : aLocales)
+ for (const auto& aLocale : std::as_const(aLocales))
{
//TODO: Add more types and cache more aggressively. For now this initializes the fontcache.
using namespace ::com::sun::star::i18n::ScriptType;
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 5d9f68e8e467..93bf9cd3e89b 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -383,38 +383,39 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName)
uno::Reference< XNameAccess > tmpAccess;
uno::Sequence< OUString > tmpSeq;
migrations_vr vrMigrations(new migrations_v);
- for (const OUString& rMigrationStep : theNameAccess->getElementNames()) {
+ const css::uno::Sequence<OUString> aMigrationSteps = theNameAccess->getElementNames();
+ for (const OUString& rMigrationStep : aMigrationSteps) {
// get current migration step
theNameAccess->getByName(rMigrationStep) >>= tmpAccess;
migration_step tmpStep;
// read included files from current step description
if (tmpAccess->getByName("IncludedFiles") >>= tmpSeq) {
- for (const OUString& rSeqEntry : tmpSeq)
+ for (const OUString& rSeqEntry : std::as_const(tmpSeq))
tmpStep.includeFiles.push_back(rSeqEntry);
}
// excluded files...
if (tmpAccess->getByName("ExcludedFiles") >>= tmpSeq) {
- for (const OUString& rSeqEntry : tmpSeq)
+ for (const OUString& rSeqEntry : std::as_const(tmpSeq))
tmpStep.excludeFiles.push_back(rSeqEntry);
}
// included nodes...
if (tmpAccess->getByName("IncludedNodes") >>= tmpSeq) {
- for (const OUString& rSeqEntry : tmpSeq)
+ for (const OUString& rSeqEntry : std::as_const(tmpSeq))
tmpStep.includeConfig.push_back(rSeqEntry);
}
// excluded nodes...
if (tmpAccess->getByName("ExcludedNodes") >>= tmpSeq) {
- for (const OUString& rSeqEntry : tmpSeq)
+ for (const OUString& rSeqEntry : std::as_const(tmpSeq))
tmpStep.excludeConfig.push_back(rSeqEntry);
}
// excluded extensions...
if (tmpAccess->getByName("ExcludedExtensions") >>= tmpSeq) {
- for (const OUString& rSeqEntry : tmpSeq)
+ for (const OUString& rSeqEntry : std::as_const(tmpSeq))
tmpStep.excludeExtensions.push_back(rSeqEntry);
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index c17e2ccbb9d1..fb04a35bccda 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -280,7 +280,8 @@ void CommandEnvironmentImpl::handle(
}
// select:
- for ( auto const& rCont : xRequest->getContinuations() )
+ const css::uno::Sequence<css::uno::Reference<css::task::XInteractionContinuation>> xIC = xRequest->getContinuations();
+ for ( auto const& rCont : xIC )
{
if (approve) {
Reference<task::XInteractionApprove> xInteractionApprove(