diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-20 14:02:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-20 15:55:19 +0200 |
commit | 008382650edf51d1561c7cdf8b1e0d43f0426c02 (patch) | |
tree | 058b7a852b406c4a5709c9b2a98e096cfb4861db /svx | |
parent | 95dd183c41c52aa0ed9b5223ae7584f486103a78 (diff) |
loplugin:constvars in svx
Change-Id: I42d04c84c87a792456f36013e1f05159ccf7cd1e
Reviewed-on: https://gerrit.libreoffice.org/77808
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 16 | ||||
-rw-r--r-- | svx/source/engine3d/helperhittest3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/filtnav.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/contact/objectcontact.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontact.cxx | 2 | ||||
-rw-r--r-- | svx/source/styles/ColorSets.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdlayer.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 2 |
10 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index c5b296941ebb..9ff539f43e16 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -2644,7 +2644,7 @@ static void CorrectCalloutArrows( { sal_uInt32 nLine = 0; - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); @@ -2671,7 +2671,7 @@ static void CorrectCalloutArrows( { sal_uInt32 nLine = 0; - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); @@ -2699,7 +2699,7 @@ static void CorrectCalloutArrows( { sal_uInt32 nLine = 0; - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); @@ -2842,7 +2842,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) // #i37011# remove invisible objects std::vector< std::pair< SdrPathObj*, double> > vNewList; - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); const drawing::LineStyle eLineStyle(pObj->GetMergedItem(XATTR_LINESTYLE).GetValue()); @@ -2878,7 +2878,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) sal_Int32 nLineObjectCount(0); // correct some values and collect content data - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); @@ -2920,7 +2920,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) std::vector< std::pair< SdrPathObj*, double> > vTempList; vTempList.reserve(vObjectList.size()); - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); @@ -2930,7 +2930,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) } } - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); @@ -2953,7 +2953,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) { pRet = new SdrObjGroup(mrSdrObjCustomShape.getSdrModelFromSdrObject()); - for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) + for ( const std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { SdrPathObj* pObj(rCandidate.first); diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index 39b2ec2fe05a..7d644192a3ae 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -200,7 +200,7 @@ void getAllHit3DObjectsSortedFrontToBack( ::std::vector< basegfx::B3DPoint > aHitsWithObject; getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject, false); - for(basegfx::B3DPoint & a : aHitsWithObject) + for(const basegfx::B3DPoint & a : aHitsWithObject) { const basegfx::B3DPoint aPointInViewCoordinates(aViewInfo3D.getObjectToView() * a); aDepthAndObjectResults.emplace_back(pCandidate, aPointInViewCoordinates.getZ()); diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 1ea13ebe31c0..3886630dcf58 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -910,7 +910,7 @@ void FmFilterModel::EnsureEmptyFilterRows( FmParentData& _rItem ) ::std::vector< std::unique_ptr<FmFilterData> >& rChildren = _rItem.GetChildren(); bool bAppendLevel = dynamic_cast<const FmFormItem*>(&_rItem) != nullptr; - for ( auto& rpChild : rChildren ) + for ( const auto& rpChild : rChildren ) { FmFilterItems* pItems = dynamic_cast<FmFilterItems*>( rpChild.get() ); if ( pItems && pItems->GetChildren().empty() ) diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 62b84c6a05e0..b053b3e6a8d4 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -581,7 +581,7 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize if( pIStm && pTmpStm ) { - for (auto & i : aObjectList) + for (const auto & i : aObjectList) { GalleryObject* pEntry = i.get(); std::unique_ptr<SgaObject> pObj; diff --git a/svx/source/sdr/contact/objectcontact.cxx b/svx/source/sdr/contact/objectcontact.cxx index 09fc1f8015d6..1f5f5b3c4c1e 100644 --- a/svx/source/sdr/contact/objectcontact.cxx +++ b/svx/source/sdr/contact/objectcontact.cxx @@ -69,7 +69,7 @@ ObjectContact::~ObjectContact() COVERITY_NOEXCEPT_FALSE std::vector< ViewObjectContact* > aLocalVOCList; aLocalVOCList.swap(maViewObjectContactVector); - for (auto & pCandidate : aLocalVOCList) + for (const auto & pCandidate : aLocalVOCList) // ViewObjectContacts only make sense with View and Object contacts. // When the contact to the SdrObject is deleted like in this case, // all ViewObjectContacts can be deleted, too. diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index bfe5ae89712d..2a6da14f0b6f 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -58,7 +58,7 @@ void ViewContact::deleteAllVOCs() std::vector< ViewObjectContact* > aLocalVOCList; aLocalVOCList.swap(maViewObjectContactVector); - for (auto & pCandidate : aLocalVOCList) + for (const auto & pCandidate : aLocalVOCList) // ViewObjectContacts only make sense with View and Object contacts. // When the contact to the SdrObject is deleted like in this case, // all ViewObjectContacts can be deleted, too. diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx index 7a3fabf6a9d8..66eead82d9a3 100644 --- a/svx/source/styles/ColorSets.cxx +++ b/svx/source/styles/ColorSets.cxx @@ -110,7 +110,7 @@ void ColorSets::init() const ColorSet& ColorSets::getColorSet(const OUString& rName) { - for (ColorSet & rColorSet : maColorSets) + for (const ColorSet & rColorSet : maColorSets) { if (rColorSet.getName() == rName) return rColorSet; diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 7085145ff24d..04c868e8815b 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -327,7 +327,7 @@ void SdrLayerAdmin::QueryValue(const SdrLayerIDSet& rViewLayerSet, css::uno::Any sal_uInt8 nBitpos = 0; sal_uInt16 nLayerPos = 0; // Position of the layer in member aLayer and in <draw:layer-set> in file sal_uInt16 nLayerIndex = 0; - for( auto& pCurrentLayer : maLayers ) + for( const auto& pCurrentLayer : maLayers ) { SdrLayerID nCurrentID = pCurrentLayer->GetID(); if ( rViewLayerSet.IsSet(nCurrentID) ) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 3439b50ac48e..2ec316e2b810 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2338,7 +2338,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(bool bForceLineDash) extractLineContourFromPrimitive2DSequence(xSequence, aExtractedHairlines, aExtractedLineFills); // for SdrObject creation, just copy all to a single Hairline-PolyPolygon - for(basegfx::B2DPolygon & rExtractedHairline : aExtractedHairlines) + for(const basegfx::B2DPolygon & rExtractedHairline : aExtractedHairlines) { aMergedHairlinePolyPolygon.append(rExtractedHairline); } diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index b8cfc498083f..31d4cf2163f0 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -678,7 +678,7 @@ Graphic SdrExchangeView::GetObjGraphic(const SdrObject& rSdrObject) rObjVector1.push_back( pMark ); } - for(std::vector<SdrMark*> & rObjVector : aObjVectors) + for(const std::vector<SdrMark*> & rObjVector : aObjVectors) { for(SdrMark* pMark : rObjVector) { |