diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-03 21:13:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-05 21:18:10 +0200 |
commit | c9e58c516e050f0134505f72b584490912d8dbb4 (patch) | |
tree | 6e6928e48a619760f3b4be184287c38ac4227ad6 /filter | |
parent | 420a8de648e77f7b065bac0bd8ef0d654fb0075e (diff) |
Improved loplugin:cstylecast to reference types: filter
Change-Id: I2db987556b4b4c7542edf40c7f839c2939e78e25
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 8 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index ee61ed4f538e..6aa7842e4d14 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -4612,7 +4612,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst ) *pType >>= sShapeType; MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType ); - uno::Any* pGluePointType = ((SdrCustomShapeGeometryItem&)rGeometryItem).GetPropertyValueByName( sPath, sGluePointType ); + uno::Any* pGluePointType = const_cast<SdrCustomShapeGeometryItem&>(rGeometryItem).GetPropertyValueByName( sPath, sGluePointType ); sal_Int16 nGluePointType = sal_Int16(); if ( !( pGluePointType && diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 11f83205f1b3..3c865e8ebe3c 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -256,7 +256,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const #endif { sal_uLong nFilePos = rIn.Tell(); - ReadDffPropSet( rIn, (DffPropertyReader&)*this ); + ReadDffPropSet( rIn, const_cast<DffPropertyReader&>(*this) ); if ( IsProperty( DFF_Prop_hspMaster ) ) { @@ -266,7 +266,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const bool bOk = ReadDffRecordHeader(rIn, aRecHd); if (bOk && SvxMSDffManager::SeekToRec(rIn, DFF_msofbtOPT, aRecHd.GetRecEndFilePos())) { - rIn |= (DffPropertyReader&)*this; + rIn |= const_cast<DffPropertyReader&>(*this); } } } @@ -4479,7 +4479,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > seqAdjustmentValues; // before clearing the GeometryItem we have to store the current Coordinates - const uno::Any* pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sPath, sCoordinates ); + const uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sPath, sCoordinates ); tools::Rectangle aPolyBoundRect; Point aStartPt( 0,0 ); if ( pAny && ( *pAny >>= seqCoordinates ) && ( seqCoordinates.getLength() >= 4 ) ) @@ -4514,7 +4514,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r sal_Int32 nEndAngle = 9000; sal_Int32 nStartAngle = 0; - pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sAdjustmentValues ); + pAny = aGeometryItem.GetPropertyValueByName( sAdjustmentValues ); if ( pAny && ( *pAny >>= seqAdjustmentValues ) && seqAdjustmentValues.getLength() > 1 ) { if ( seqAdjustmentValues[ 0 ].State == css::beans::PropertyState_DIRECT_VALUE ) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 966e5f773bc9..52af6cfab9d3 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2318,13 +2318,13 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* aSelection.nEndPos = sal::static_int_cast< sal_uInt16 >( aSelection.nEndPos + nLen ); } - pPortion->ApplyTo( aPortionAttribs, (SdrPowerPointImport&)*this, nDestinationInstance, pTextObj ); + pPortion->ApplyTo( aPortionAttribs, const_cast<SdrPowerPointImport&>(*this), nDestinationInstance, pTextObj ); rOutliner.QuickSetAttribs( aPortionAttribs, aSelection ); aSelection.nStartPos = aSelection.nEndPos; } boost::optional< sal_Int16 > oStartNumbering; SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() ); - pPara->ApplyTo( aParagraphAttribs, oStartNumbering, (SdrPowerPointImport&)*this, nDestinationInstance ); + pPara->ApplyTo( aParagraphAttribs, oStartNumbering, const_cast<SdrPowerPointImport&>(*this), nDestinationInstance ); sal_uInt32 nIsBullet2 = 0; //, nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : pTextObj->GetInstance(); pPara->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance ); @@ -2606,7 +2606,7 @@ bool SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, sal_uIn if ( const_cast<SdrPowerPointImport*>(this)->maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) ) { sal_uInt32 nStreamPos = rSt.Tell(); - PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, nullptr ); + PPTTextObj aTextObj( rSt, const_cast<SdrPowerPointImport&>(*this), rPersistEntry, nullptr ); if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() ) { sal_uInt32 nShapePos = 0; @@ -3037,7 +3037,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage //DffRecordHeader aEscherPropertiesHd; if ( SeekToRec( rStCtrl, DFF_msofbtOPT,nEscherF002End ) ) { - ReadDffPropSet( rStCtrl, (DffPropertyReader&)*this ); + ReadDffPropSet( rStCtrl, static_cast<DffPropertyReader&>(*this) ); mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) ); sal_uInt32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff ); pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() )); |