summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 12:53:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 20:22:34 +0200
commit2a6f30194afb745df7412b95b53f8165b237da71 (patch)
tree7d7e99066931addf8bd3908f1c8fb7c47b38c4ac /sd/source/ui
parentf23f9d38db7e0b586130af88c7424cc3d85bc2d2 (diff)
loplugin:sequenceloop in sd
Change-Id: Ibd809c8e48cd08123194071bf6f179a836f84cde Reviewed-on: https://gerrit.libreoffice.org/77525 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx2
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationController.cxx2
-rw-r--r--sd/source/ui/framework/factories/ViewShellWrapper.cxx2
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx2
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx2
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx4
-rw-r--r--sd/source/ui/slideshow/PaneHider.cxx2
-rw-r--r--sd/source/ui/tools/ConfigurationAccess.cxx2
-rw-r--r--sd/source/ui/unoidl/SdUnoSlideView.cxx2
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
12 files changed, 14 insertions, 14 deletions
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 60d9a9d1c1f6..4af7c2f3c5ce 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -519,7 +519,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, weld::Button&, void)
if ( aDlg.Execute() == ERRCODE_NONE )
{
- Sequence< OUString > aFilesArr = aDlg.GetSelectedFiles();
+ const Sequence< OUString > aFilesArr = aDlg.GetSelectedFiles();
if( aFilesArr.hasElements() )
{
sUrl = aDlg.GetDisplayDirectory();
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index a99f1fcd2ef9..d7e74eb12ccf 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -207,7 +207,7 @@ void SdTPAction::Construct()
aVerbs = xObj->getSupportedVerbs();
}
- for( const embed::VerbDescriptor& aVerb : aVerbs )
+ for( const embed::VerbDescriptor& aVerb : std::as_const(aVerbs) )
{
if( aVerb.VerbAttributes & embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU )
{
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index d0d381d3032d..acde0a0cc5f4 100644
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -253,7 +253,7 @@ void SAL_CALL ConfigurationController::requestResourceActivation (
{
// Get a list of the matching resources and create deactivation
// requests for them.
- Sequence<Reference<XResourceId> > aResourceList (
+ const Sequence<Reference<XResourceId> > aResourceList (
mpImplementation->mxRequestedConfiguration->getResources(
rxResourceId->getAnchor(),
rxResourceId->getResourceTypePrefix(),
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 95557819e8c7..b63941541982 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -117,7 +117,7 @@ sal_Bool SAL_CALL ViewShellWrapper::select( const css::uno::Any& aSelection )
rSelector.DeselectAllPages();
Sequence<Reference<drawing::XDrawPage> > xPages;
aSelection >>= xPages;
- for (const auto& rPage : xPages)
+ for (const auto& rPage : std::as_const(xPages))
{
Reference<beans::XPropertySet> xSet (rPage, UNO_QUERY);
if (xSet.is())
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 830be7136bba..1f51a6bba052 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -752,7 +752,7 @@ OUString FrameworkHelper::ResourceIdToString (const Reference<XResourceId>& rxRe
sString.append(rxResourceId->getResourceURL());
if (rxResourceId->hasAnchor())
{
- Sequence<OUString> aAnchorURLs (rxResourceId->getAnchorURLs());
+ const Sequence<OUString> aAnchorURLs (rxResourceId->getAnchorURLs());
for (const auto& rAnchorURL : aAnchorURLs)
{
sString.append(" | ");
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index d93db30203cf..4171da6f4d84 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -146,7 +146,7 @@ void RemoteServer::execute()
// Check if we already have this server.
Reference< XNameAccess > const xConfig = officecfg::Office::Impress::Misc::AuthorisedRemotes::get();
- Sequence< OUString > aNames = xConfig->getElementNames();
+ const Sequence< OUString > aNames = xConfig->getElementNames();
bool aFound = false;
for ( const auto& rName : aNames )
{
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 65e1d58062ec..a5ce3f997aba 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -134,7 +134,7 @@ void RecentlyUsedMasterPages::LoadPersistentValues()
OUString sName;
// Read the names and URLs of the master pages.
- Sequence<OUString> aKeys (xSet->getElementNames());
+ const Sequence<OUString> aKeys (xSet->getElementNames());
mvMasterPages.clear();
mvMasterPages.reserve(aKeys.getLength());
for (const auto& rKey : aKeys)
@@ -194,7 +194,7 @@ void RecentlyUsedMasterPages::SavePersistentValues()
return;
// Clear the set.
- Sequence<OUString> aKeys (xSet->getElementNames());
+ const Sequence<OUString> aKeys (xSet->getElementNames());
for (const auto& rKey : aKeys)
xSet->removeByName (rKey);
diff --git a/sd/source/ui/slideshow/PaneHider.cxx b/sd/source/ui/slideshow/PaneHider.cxx
index a8d12a0b3123..3905317c6129 100644
--- a/sd/source/ui/slideshow/PaneHider.cxx
+++ b/sd/source/ui/slideshow/PaneHider.cxx
@@ -60,7 +60,7 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
if (mxConfiguration.is())
{
// Iterate over the resources and deactivate the panes.
- Sequence<Reference<XResourceId> > aResources (
+ const Sequence<Reference<XResourceId> > aResources (
mxConfiguration->getResources(
nullptr,
framework::FrameworkHelper::msPaneURLPrefix,
diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx
index 12d3af927d9d..c2623b53ecdd 100644
--- a/sd/source/ui/tools/ConfigurationAccess.cxx
+++ b/sd/source/ui/tools/ConfigurationAccess.cxx
@@ -131,7 +131,7 @@ void ConfigurationAccess::ForAll (
return;
::std::vector<Any> aValues(rArguments.size());
- Sequence<OUString> aKeys (rxContainer->getElementNames());
+ const Sequence<OUString> aKeys (rxContainer->getElementNames());
for (const OUString& rsKey : aKeys)
{
Reference<container::XNameAccess> xSetItem (rxContainer->getByName(rsKey), UNO_QUERY);
diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx
index 01c6d0d923e7..df6750e38947 100644
--- a/sd/source/ui/unoidl/SdUnoSlideView.cxx
+++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx
@@ -58,7 +58,7 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection)
rSelector.DeselectAllPages();
Sequence<Reference<drawing::XDrawPage> > xPages;
aSelection >>= xPages;
- for (const auto& rPage : xPages)
+ for (const auto& rPage : std::as_const(xPages))
{
Reference<beans::XPropertySet> xSet (rPage, UNO_QUERY);
if (xSet.is())
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 7c80b329a275..1c6751feab76 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1141,7 +1141,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
OUString aStrLibrary;
OUString aStrBookmark;
- for( const beans::PropertyValue& rProperty : aProperties )
+ for( const beans::PropertyValue& rProperty : std::as_const(aProperties) )
{
if( !( nFound & FoundFlags::EventType ) && rProperty.Name == gaStrEventType )
{
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 97b8dc05c8cf..6e7bca18d24f 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2459,7 +2459,7 @@ void SdDrawPage::setBackground( const Any& rValue )
Reference< beans::XPropertySet > xDestSet( static_cast<beans::XPropertySet*>(pBackground) );
Reference< beans::XPropertySetInfo > xDestSetInfo( xDestSet->getPropertySetInfo() );
- Sequence< beans::Property > aProperties( xDestSetInfo->getProperties() );
+ const Sequence< beans::Property > aProperties( xDestSetInfo->getProperties() );
for( const beans::Property& rProp : aProperties )
{
@@ -2827,7 +2827,7 @@ void SdMasterPage::setBackground( const Any& rValue )
Reference< beans::XPropertySet > xDestSet( static_cast<beans::XPropertySet*>(pBackground) );
Reference< beans::XPropertySetInfo > xDestSetInfo( xDestSet->getPropertySetInfo(), UNO_SET_THROW );
- uno::Sequence< beans::Property> aProperties( xDestSetInfo->getProperties() );
+ const uno::Sequence< beans::Property> aProperties( xDestSetInfo->getProperties() );
for( const beans::Property& rProp : aProperties )
{