summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-05-28 19:07:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-05-28 23:11:00 +0200
commit651844c9b122fd8463ad1dde4f9a0200efc345a3 (patch)
tree68f8ac08f02adcc50e6ef05e3ef2260c734ba043 /vcl/osx
parent1a3aa986f258233189895bb5a9f0f73eec64940c (diff)
loplugin:sequenceloop (macOS)
Change-Id: Ie1f5c925a058ef79df3f5183051c87fa8d342fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/OSXTransferable.cxx4
-rw-r--r--vcl/osx/a11ytextattributeswrapper.mm2
-rw-r--r--vcl/osx/a11ywrapper.mm4
-rw-r--r--vcl/osx/printaccessoryview.mm5
-rw-r--r--vcl/osx/salprn.cxx2
5 files changed, 10 insertions, 7 deletions
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" )