[Libreoffice-commits] core.git: sfx2/source vcl/osx

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu May 28 21:11:33 UTC 2020


 sfx2/source/appl/shutdowniconaqua.mm |    2 +-
 vcl/osx/OSXTransferable.cxx          |    4 +++-
 vcl/osx/a11ytextattributeswrapper.mm |    2 +-
 vcl/osx/a11ywrapper.mm               |    4 ++--
 vcl/osx/printaccessoryview.mm        |    5 +++--
 vcl/osx/salprn.cxx                   |    2 +-
 6 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 651844c9b122fd8463ad1dde4f9a0200efc345a3
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu May 28 19:07:57 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu May 28 23:11:00 2020 +0200

    loplugin:sequenceloop (macOS)
    
    Change-Id: Ie1f5c925a058ef79df3f5183051c87fa8d342fb7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95063
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index 78c89f33865c..3fa4d61443a0 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -189,7 +189,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< css::util::XStrin
     {
         for ( int i = 0; i < nPickListMenuItems; i++ )
         {
-            css::uno::Sequence< css::beans::PropertyValue >& rPickListEntry = aHistoryList[i];
+            css::uno::Sequence< css::beans::PropertyValue > const & rPickListEntry = aHistoryList[i];
             RecentMenuEntry aRecentFile;
 
             for ( const css::beans::PropertyValue& rProp : rPickListEntry )
diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx
index 77417f3c29bb..92f997f90d34 100644
--- a/vcl/osx/OSXTransferable.cxx
+++ b/vcl/osx/OSXTransferable.cxx
@@ -19,6 +19,8 @@
 
 #include <sal/config.h>
 
+#include <utility>
+
 #include <com/sun/star/datatransfer/UnsupportedFlavorException.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <sal/types.h>
@@ -143,7 +145,7 @@ Sequence< DataFlavor > SAL_CALL OSXTransferable::getTransferDataFlavors(  )
 
 sal_Bool SAL_CALL OSXTransferable::isDataFlavorSupported(const DataFlavor& aFlavor)
 {
-    for (const DataFlavor& rFlavor : mFlavorList)
+    for (const DataFlavor& rFlavor : std::as_const(mFlavorList))
       if (compareDataFlavors(aFlavor, rFlavor))
         return true;
 
diff --git a/vcl/osx/a11ytextattributeswrapper.mm b/vcl/osx/a11ytextattributeswrapper.mm
index 433906d7d9b3..897514b559f7 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -192,7 +192,7 @@ using namespace ::com::sun::star::uno;
     }
 }
 
-+(void)applyAttributesFrom:(Sequence < PropertyValue >)attributes toString:(NSMutableAttributedString *)string forRange:(NSRange)range fontDescriptor:(AquaA11yFontDescriptor*)fontDescriptor {
++(void)applyAttributesFrom:(Sequence < PropertyValue > const &)attributes toString:(NSMutableAttributedString *)string forRange:(NSRange)range fontDescriptor:(AquaA11yFontDescriptor*)fontDescriptor {
     NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
     // constants
     static const OUString attrUnderline("CharUnderline");
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index d3a42058dca9..6ed9774c24a2 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -313,7 +313,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) {
     if ( mActsAsRadioGroup ) {
         NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
         Reference < XAccessibleRelationSet > rxAccessibleRelationSet = [ self accessibleContext ] -> getAccessibleRelationSet();
-        AccessibleRelation relationMemberOf = rxAccessibleRelationSet -> getRelationByType ( AccessibleRelationType::MEMBER_OF );
+        AccessibleRelation const relationMemberOf = rxAccessibleRelationSet -> getRelationByType ( AccessibleRelationType::MEMBER_OF );
         if ( relationMemberOf.RelationType == AccessibleRelationType::MEMBER_OF && relationMemberOf.TargetSet.hasElements() ) {
             for ( const auto& i : relationMemberOf.TargetSet ) {
                 Reference < XAccessible > rMateAccessible( i, UNO_QUERY );
@@ -1045,7 +1045,7 @@ static Reference < XAccessibleContext > hitTestRunner ( css::awt::Point point,
                 Reference < XAccessibleRelationSet > relationSet = [ static_cast<SalFrameWindow *>(element) accessibleContext ] -> getAccessibleRelationSet();
                 if ( relationSet.is() && relationSet -> containsRelation ( AccessibleRelationType::SUB_WINDOW_OF )) {
                     // we have a valid relation to the parent element
-                    AccessibleRelation relation = relationSet -> getRelationByType ( AccessibleRelationType::SUB_WINDOW_OF );
+                    AccessibleRelation const relation = relationSet -> getRelationByType ( AccessibleRelationType::SUB_WINDOW_OF );
                     for ( const auto & i : relation.TargetSet ) {
                         Reference < XAccessible > rxAccessible ( i, UNO_QUERY );
                         if ( rxAccessible.is() && rxAccessible -> getAccessibleContext().is() ) {
diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index 932b65dd3609..110e30976c06 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -41,6 +41,7 @@
 #include <com/sun/star/i18n/WordType.hpp>
 
 #include <map>
+#include <utility>
 
 using namespace vcl;
 using namespace com::sun::star;
@@ -1016,7 +1017,7 @@ static void addEdit( NSView* pCurParent, long rCurX, long& rCurY, long nAttachOf
         Sequence< OUString > aChoices;
         Sequence< sal_Bool > aChoicesDisabled;
         sal_Int32 aSelectionChecked = 0;
-        for( const beans::PropertyValue& rEntry : aOptProp )
+        for( const beans::PropertyValue& rEntry : std::as_const(aOptProp) )
         {
             if( rEntry.Name == "ControlType" )
             {
@@ -1066,7 +1067,7 @@ static void addEdit( NSView* pCurParent, long rCurX, long& rCurY, long nAttachOf
         long nAttachOffset = 0;
         bool bIgnore = false;
 
-        for( const beans::PropertyValue& rEntry : aOptProp )
+        for( const beans::PropertyValue& rEntry : std::as_const(aOptProp) )
         {
             if( rEntry.Name == "Text" )
             {
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index a1e5a0908b3b..bb35f74a5343 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -333,7 +333,7 @@ void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
 static Size getPageSize( vcl::PrinterController const & i_rController, sal_Int32 i_nPage )
 {
     Size aPageSize;
-    uno::Sequence< PropertyValue > aPageParms( i_rController.getPageParameters( i_nPage ) );
+    uno::Sequence< PropertyValue > const aPageParms( i_rController.getPageParameters( i_nPage ) );
     for( const PropertyValue & pv : aPageParms )
     {
         if ( pv.Name == "PageSize" )


More information about the Libreoffice-commits mailing list