diff options
Diffstat (limited to 'filter/source/msfilter')
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 18 |
3 files changed, 13 insertions, 13 deletions
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 063a2f084a50..30a87f8e8576 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -887,7 +887,7 @@ bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) ImplFlushSolverContainer(); mpSdrPage = NULL; - mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( (SdrPage*) &rPage ); + mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( const_cast<SdrPage*>(&rPage) ); mXShapes = Reference< XShapes >::query( mXDrawPage ); if ( !mXShapes.is() ) break; @@ -1041,7 +1041,7 @@ ImplEESdrObject::ImplEESdrObject( ImplEscherExSdr& rEx, { // why not declare a const parameter if the object will // not be modified? - mXShape = uno::Reference< drawing::XShape >::query( ((SdrObject*)&rObj)->getUnoShape() ); + mXShape = uno::Reference< drawing::XShape >::query( const_cast<SdrObject*>(&rObj)->getUnoShape() ); Init( rEx ); } } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 653303dc33ea..2d9997ff5a77 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -220,7 +220,7 @@ void DffPropertyReader::SetDefaultPropSet( SvStream& rStCtrl, sal_uInt32 nOffsDg { if ( rManager.SeekToRec( rStCtrl, DFF_msofbtOPT, aRecHd.GetRecEndFilePos() ) ) { - ( (DffPropertyReader*) this )->pDefaultPropSet = new DffPropSet; + const_cast<DffPropertyReader*>(this)->pDefaultPropSet = new DffPropSet; ReadDffPropSet( rStCtrl, *pDefaultPropSet ); } } @@ -249,7 +249,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const } } - ( (DffPropertyReader*) this )->mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) ); + const_cast<DffPropertyReader*>(this)->mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) ); #ifdef DBG_CUSTOMSHAPE diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index a016b8543400..bc88ae8a723d 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1786,16 +1786,16 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, Graphic aGraphic( rGraf ); - if ( ((SdrPowerPointImport*)this)->maShapeRecords.SeekToContent( rStCtrl, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) ) + if ( const_cast<SdrPowerPointImport*>(this)->maShapeRecords.SeekToContent( rStCtrl, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) ) { DffRecordHeader aPlaceHd; while ( ( rStCtrl.GetError() == 0 ) - && ( rStCtrl.Tell() < ((SdrPowerPointImport*)this)->maShapeRecords.Current()->GetRecEndFilePos() ) ) + && ( rStCtrl.Tell() < const_cast<SdrPowerPointImport*>(this)->maShapeRecords.Current()->GetRecEndFilePos() ) ) { ReadDffRecordHeader( rStCtrl, aPlaceHd ); if ( aPlaceHd.nRecType == PPT_PST_RecolorInfoAtom ) { - ((SdrPowerPointImport*)this)->RecolorGraphic( rStCtrl, aPlaceHd.nRecLen, aGraphic ); + const_cast<SdrPowerPointImport*>(this)->RecolorGraphic( rStCtrl, aPlaceHd.nRecLen, aGraphic ); break; } else @@ -1804,9 +1804,9 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, } PPTOleEntry* pOe; - for ( size_t i = 0; i < ((SdrPowerPointImport*)this)->aOleObjectList.size(); ++i ) + for ( size_t i = 0; i < const_cast<SdrPowerPointImport*>(this)->aOleObjectList.size(); ++i ) { - pOe = ((SdrPowerPointImport*)this)->aOleObjectList[ i ]; + pOe = const_cast<SdrPowerPointImport*>(this)->aOleObjectList[ i ]; if ( pOe->nId != (sal_uInt32)nOLEId ) continue; @@ -2518,7 +2518,7 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) const PptSlidePersistEntry& rE = (*pPageList)[ nAktPageNum ]; nSlideFlags = rE.aSlideAtom.nFlags; if ( ! ( nSlideFlags & 2 ) ) - ((SdrPowerPointImport*)this)->aPageColors = rE.aColorScheme; + const_cast<SdrPowerPointImport*>(this)->aPageColors = rE.aColorScheme; } if ( nSlideFlags & 2 ) // follow master colorscheme? { @@ -2551,13 +2551,13 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) } if ( pMasterPersist ) { - ((SdrPowerPointImport*)this)->aPageColors = pMasterPersist->aColorScheme; + const_cast<SdrPowerPointImport*>(this)->aPageColors = pMasterPersist->aColorScheme; } } } // resgister current color scheme - ((SdrPowerPointImport*)this)->nPageColorsNum = nAktPageNum; - ((SdrPowerPointImport*)this)->ePageColorsKind = eAktPageKind; + const_cast<SdrPowerPointImport*>(this)->nPageColorsNum = nAktPageNum; + const_cast<SdrPowerPointImport*>(this)->ePageColorsKind = eAktPageKind; } rColor = aPageColors.GetColor( nNum ); return true; |