[Libreoffice-commits] core.git: shell/source slideshow/source sot/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 15 18:53:04 UTC 2019


 shell/source/cmdmail/cmdmailsuppl.cxx            |    6 +++---
 slideshow/source/engine/shapes/shapeimporter.cxx |    2 +-
 slideshow/source/engine/slide/slideimpl.cxx      |    2 +-
 sot/source/sdstor/ucbstorage.cxx                 |    2 +-
 sot/source/unoolestorage/xolesimplestorage.cxx   |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 8e0918a04ee6797909264943eba23707b224c34c
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 15 13:35:20 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 15 20:51:38 2019 +0200

    loplugin:sequenceloop in shell..sot
    
    Change-Id: I40e2a1be0ce7df627d3820192d24821ddd7c3e2f
    Reviewed-on: https://gerrit.libreoffice.org/77527
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx
index df8e1f5c170e..bbd0ae07d4cf 100644
--- a/shell/source/cmdmail/cmdmailsuppl.cxx
+++ b/shell/source/cmdmail/cmdmailsuppl.cxx
@@ -237,7 +237,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
 
     // Append carbon copy recipients set in the message
     Sequence< OUString > aStringList = xSimpleMailMessage->getCcRecipient();
-    for ( const auto& rString : aStringList )
+    for ( const auto& rString : std::as_const(aStringList) )
     {
         aBuffer.append(" --cc ");
         appendShellWord(aBuffer, rString, false);
@@ -245,7 +245,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
 
     // Append blind carbon copy recipients set in the message
     aStringList = xSimpleMailMessage->getBccRecipient();
-    for ( const auto& rString : aStringList )
+    for ( const auto& rString : std::as_const(aStringList) )
     {
         aBuffer.append(" --bcc ");
         appendShellWord(aBuffer, rString, false);
@@ -260,7 +260,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
 
     // Append attachments set in the message
     aStringList = xSimpleMailMessage->getAttachement();
-    for ( const auto& rString : aStringList )
+    for ( const auto& rString : std::as_const(aStringList) )
     {
         OUString aSystemPath;
         if ( FileBase::E_None == FileBase::getSystemPathFromFileURL(rString, aSystemPath) )
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index 2b2139ab63b8..65b0414d2645 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -397,7 +397,7 @@ void ShapeImporter::importPolygons(uno::Reference<beans::XPropertySet> const& xP
     getPropertyValue( nLineColor, xPropSet, "LineColor" );
     getPropertyValue( fLineWidth, xPropSet, "LineWidth" );
 
-    drawing::PointSequence* pOuterSequence = aRetval.getArray();
+    const drawing::PointSequence* pOuterSequence = aRetval.getArray();
 
     ::basegfx::B2DPolygon aPoly;
     basegfx::B2DPoint aPoint;
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index 3786a00786c2..911f9866074d 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -841,7 +841,7 @@ void SlideImpl::applyShapeAttributes(
     const css::uno::Reference< css::animations::XAnimationNode >& xRootAnimationNode,
     bool bInitial) const
 {
-    uno::Sequence< animations::TargetProperties > aProps(
+    const uno::Sequence< animations::TargetProperties > aProps(
         TargetPropertiesCreator::createTargetProperties( xRootAnimationNode, bInitial ) );
 
     // apply extracted values to our shapes
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 0aa9fff0b3c9..1b3bd3381e8a 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1941,7 +1941,7 @@ bool UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
 
     try
     {
-        Sequence< ContentInfo > aInfo = pContent->queryCreatableContentsInfo();
+        const Sequence< ContentInfo > aInfo = pContent->queryCreatableContentsInfo();
         if ( !aInfo.hasElements() )
             return false;
 
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 82d7f8bbb7a5..5a7f561b0a22 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -236,7 +236,7 @@ void OLESimpleStorage::InsertNameAccessToStorage_Impl( BaseStorage* pStorage, co
 
     try
     {
-        uno::Sequence< OUString > aElements = xNameAccess->getElementNames();
+        const uno::Sequence< OUString > aElements = xNameAccess->getElementNames();
         for ( const auto& rElement : aElements )
         {
             uno::Reference< io::XInputStream > xInputStream;


More information about the Libreoffice-commits mailing list