diff options
Diffstat (limited to 'sd')
22 files changed, 153 insertions, 153 deletions
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 250fa8e9695c..624b0a8b492e 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -193,7 +193,7 @@ private: }; -#define SD_MOD() ( *(SdModule**) GetAppData(SHL_DRAW) ) +#define SD_MOD() ( *reinterpret_cast<SdModule**>(GetAppData(SHL_DRAW)) ) #endif // INCLUDED_SD_INC_SDMOD_HXX diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 637d6ec14c87..d4f0640f234e 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -193,7 +193,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ aAny >>= bVisible; if ( GetPropertyValue( aAny, mXPagePropSet, OUString( "Change" ) ) ) { - switch ( *(sal_Int32*)aAny.getValue() ) + switch ( *static_cast<sal_Int32 const *>(aAny.getValue()) ) { case 1 : // automatic mnDiaMode++; @@ -270,7 +270,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ nBuildFlags |= 256; if ( GetPropertyValue( aAny, mXPagePropSet, OUString( "Duration" ) ) )// duration of this slide - nSlideTime = *(sal_Int32*)aAny.getValue() << 10; // in ticks + nSlideTime = *static_cast<sal_Int32 const *>(aAny.getValue()) << 10; // in ticks mpPptEscherEx->AddAtom( 16, EPP_SSSlideInfoAtom ); mpStrm->WriteInt32( nSlideTime ) // standtime in ticks @@ -619,7 +619,7 @@ void PPTWriter::ImplCreateHeaderFooters( ::com::sun::star::uno::Reference< ::com } if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, OUString( "DateTimeFormat" ), true ) ) { - sal_Int32 nFormat = *(sal_Int32*)aAny.getValue(); + sal_Int32 nFormat = *static_cast<sal_Int32 const *>(aAny.getValue()); SvxDateFormat eDateFormat = (SvxDateFormat)( nFormat & 0xf ); SvxTimeFormat eTimeFormat = (SvxTimeFormat)( ( nFormat >> 4 ) & 0xf ); switch( eDateFormat ) @@ -783,7 +783,7 @@ bool PPTWriter::ImplCreateDocument() if ( ImplGetPropertyValue( OUString( "CustomShow" ) ) ) { - aCustomShow = ( *(OUString*)mAny.getValue() ); + aCustomShow = *static_cast<OUString const *>(mAny.getValue()); if ( !aCustomShow.isEmpty() ) { nFlags |= 8; @@ -793,7 +793,7 @@ bool PPTWriter::ImplCreateDocument() { if ( ImplGetPropertyValue( OUString( "FirstPage" ) ) ) { - OUString aSlideName( *(OUString*)mAny.getValue() ); + OUString aSlideName( *static_cast<OUString const *>(mAny.getValue()) ); std::vector<OUString>::const_iterator pIter = std::find( maSlideNameList.begin(),maSlideNameList.end(),aSlideName); @@ -1221,7 +1221,7 @@ void PPTWriter::ImplWriteBackground( ::com::sun::star::uno::Reference< ::com::su { if ( ImplGetPropertyValue( rXPropSet, OUString( "FillColor" ) ) ) { - nFillColor = mpPptEscherEx->GetColor( *((sal_uInt32*)mAny.getValue()) ); + nFillColor = mpPptEscherEx->GetColor( *static_cast<sal_uInt32 const *>(mAny.getValue()) ); nFillBackColor = nFillColor ^ 0xffffff; } } // PASSTHROUGH INTENDED @@ -1252,7 +1252,7 @@ void PPTWriter::ImplWriteVBA() nLen -= 8; mnVBAOleOfs = mpStrm->Tell(); mpPptEscherEx->BeginAtom(); - mpStrm->Write( (sal_Int8*)mpVBA->GetData() + 8, nLen ); + mpStrm->Write( static_cast<sal_Int8 const *>(mpVBA->GetData()) + 8, nLen ); mpPptEscherEx->EndAtom( EPP_ExOleObjStg, 0, 1 ); } } diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 4042b5b32761..31cbc5948ca7 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -844,7 +844,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) case ::com::sun::star::drawing::FillStyle_SOLID : { if ( PropValue::GetPropertyValue( aAny, mXPropSet, OUString( "FillColor" ) ) ) - nBackgroundColor = mpPptEscherEx->GetColor( *((sal_uInt32*)aAny.getValue()) ); + nBackgroundColor = mpPptEscherEx->GetColor( *static_cast<sal_uInt32 const *>(aAny.getValue()) ); } break; case ::com::sun::star::drawing::FillStyle_NONE : @@ -867,7 +867,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) case ::com::sun::star::drawing::FillStyle_SOLID : { if ( PropValue::GetPropertyValue( aAny, mXBackgroundPropSet, OUString( "FillColor" ) ) ) - nBackgroundColor = mpPptEscherEx->GetColor( *((sal_uInt32*)aAny.getValue()) ); + nBackgroundColor = mpPptEscherEx->GetColor( *static_cast<sal_uInt32 const *>(aAny.getValue()) ); } break; default: @@ -902,7 +902,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) if ( PropValue::GetPropertyValue( aAny, aPropSetOfNextShape, OUString( "FillColor" ), true ) ) { - if ( nCharColor == mpPptEscherEx->GetColor( *((sal_uInt32*)aAny.getValue()) ) ) + if ( nCharColor == mpPptEscherEx->GetColor( *static_cast<sal_uInt32 const *>(aAny.getValue()) ) ) { nCharAttr |= 0x200; } @@ -1874,7 +1874,7 @@ void PPTWriter::ImplWriteObjectEffect( SvStream& rSt, { if ( ImplGetPropertyValue( OUString( "Sound" ) ) ) { - nSoundRef = maSoundCollection.GetId( *(OUString*)mAny.getValue() ); + nSoundRef = maSoundCollection.GetId( *static_cast<OUString const *>(mAny.getValue()) ); if ( nSoundRef ) nFlags |= 0x10; } @@ -1891,7 +1891,7 @@ void PPTWriter::ImplWriteObjectEffect( SvStream& rSt, if ( bDimHide ) nAfterEffect |= 2; if ( ImplGetPropertyValue( OUString( "DimColor" ) ) ) - nDimColor = mpPptEscherEx->GetColor( *((sal_uInt32*)mAny.getValue()) ) | 0xfe000000; + nDimColor = mpPptEscherEx->GetColor( *static_cast<sal_uInt32 const *>(mAny.getValue()) ) | 0xfe000000; rSt.WriteUInt32( nDimColor ).WriteUInt32( nFlags ).WriteUInt32( nSoundRef ).WriteUInt32( nDelayTime ) .WriteUInt16( nOrder ) // order of build ( 1.. ) @@ -1960,14 +1960,14 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat case ::com::sun::star::presentation::ClickAction_SOUND : { if ( ImplGetPropertyValue( OUString( "Bookmark" ) ) ) - nSoundRef = maSoundCollection.GetId( *(OUString*)mAny.getValue() ); + nSoundRef = maSoundCollection.GetId( *static_cast<OUString const *>(mAny.getValue()) ); } break; case ::com::sun::star::presentation::ClickAction_PROGRAM : { if ( ImplGetPropertyValue( OUString( "Bookmark" ) ) ) { - INetURLObject aUrl( *(OUString*)mAny.getValue() ); + INetURLObject aUrl( *static_cast<OUString const *>(mAny.getValue()) ); if ( INET_PROT_FILE == aUrl.GetProtocol() ) { aFile = aUrl.PathToFileName(); @@ -1981,7 +1981,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat { if ( ImplGetPropertyValue( OUString( "Bookmark" ) ) ) { - OUString aBookmark( *(OUString*)mAny.getValue() ); + OUString aBookmark( *static_cast<OUString const *>(mAny.getValue()) ); sal_uInt32 nIndex = 0; std::vector<OUString>::const_iterator pIter; for ( pIter = maSlideNameList.begin(); pIter != maSlideNameList.end(); ++pIter, nIndex++ ) @@ -2008,7 +2008,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat { if ( ImplGetPropertyValue( OUString( "Bookmark" ) ) ) { - OUString aBookmark( *(OUString*)mAny.getValue() ); + OUString aBookmark( *static_cast<OUString const *>(mAny.getValue()) ); if ( !aBookmark.isEmpty() ) { nAction = 4; @@ -2211,7 +2211,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ::com::sun::star::presentation::AnimationEffect eTe; if ( ImplGetPropertyValue( OUString( "PresentationOrder" ) ) ) - nEffectCount = *(sal_uInt16*)mAny.getValue(); + nEffectCount = *static_cast<sal_uInt16 const *>(mAny.getValue()); bool bEffect = ImplGetEffect( mXPropSet, eAe, eTe, bIsSound ); ::com::sun::star::presentation::ClickAction eCa = ::com::sun::star::presentation::ClickAction_NONE; @@ -2270,7 +2270,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a { if ( ImplGetPropertyValue( OUString( "BoundRect" ) ) ) { - ::com::sun::star::awt::Rectangle aRect( *(::com::sun::star::awt::Rectangle*)mAny.getValue() ); + ::com::sun::star::awt::Rectangle aRect( *static_cast<css::awt::Rectangle const *>(mAny.getValue()) ); maPosition = MapPoint( ::com::sun::star::awt::Point( aRect.X, aRect.Y ) ); maSize = MapSize( ::com::sun::star::awt::Size( aRect.Width, aRect.Height ) ); maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); @@ -2391,10 +2391,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a sal_Int32 nStartAngle, nEndAngle; if ( !ImplGetPropertyValue( OUString( "CircleStartAngle" ) ) ) continue; - nStartAngle = *( (sal_Int32*)mAny.getValue() ); + nStartAngle = *static_cast<sal_Int32 const *>(mAny.getValue()); if( !ImplGetPropertyValue( OUString( "CircleEndAngle" ) ) ) continue; - nEndAngle = *( (sal_Int32*)mAny.getValue() ); + nEndAngle = *static_cast<sal_Int32 const *>(mAny.getValue()); ::com::sun::star::awt::Point aPoint( mXShape->getPosition() ); ::com::sun::star::awt::Size aSize( mXShape->getSize() ); ::com::sun::star::awt::Point aStart, aEnd, aCenter; @@ -3415,7 +3415,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a EscherPropertyContainer aPropOpt; mnAngle = ( PropValue::GetPropertyValue( aAny, mXPropSet, OUString( "RotateAngle" ), true ) ) - ? *((sal_Int32*)aAny.getValue() ) + ? *static_cast<sal_Int32 const *>(aAny.getValue()) : 0; aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90000 ); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index a01f5c1573cc..2606fa3785a3 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -494,7 +494,7 @@ sal_uInt32 PPTWriterBase::GetMasterIndex( PageType ePageType ) if ( aXPropertySet.is() ) { if ( ImplGetPropertyValue( aXPropertySet, OUString( "Number" ) ) ) - nRetValue |= *(sal_Int16*)mAny.getValue(); + nRetValue |= *static_cast<sal_Int16 const *>(mAny.getValue()); if ( nRetValue & 0xffff ) // avoid overflow nRetValue--; } @@ -537,7 +537,7 @@ bool PPTWriterBase::GetStyleSheets() aXPropSet( mXModel, UNO_QUERY ); sal_uInt16 nDefaultTab = ( aXPropSet.is() && ImplGetPropertyValue( aXPropSet, OUString( "TabStop" ) ) ) - ? (sal_uInt16)( *(sal_Int32*)mAny.getValue() / 4.40972 ) + ? (sal_uInt16)( *static_cast<sal_Int32 const *>(mAny.getValue()) / 4.40972 ) : 1250; maStyleSheetList.push_back( new PPTExStyleSheet( nDefaultTab, dynamic_cast<PPTExBulletProvider*>(this) ) ); @@ -754,7 +754,7 @@ bool PPTWriterBase::GetShapeByIndex( sal_uInt32 nIndex, bool bGroup ) mnAngle = ( PropValue::GetPropertyValue( aAny, mXPropSet, OUString( "RotateAngle" ), true ) ) - ? *((sal_Int32*)aAny.getValue() ) + ? *static_cast<sal_Int32 const *>(aAny.getValue()) : 0; return true; diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 361ee37e975d..4bce7232fc2a 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -234,7 +234,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe meFontName = ePropState; if ( bOk ) { - FontCollectionEntry aFontDesc( *(OUString*)mAny.getValue() ); + FontCollectionEntry aFontDesc( *static_cast<OUString const *>(mAny.getValue()) ); sal_uInt32 nCount = rFontCollection.GetCount(); mnFont = (sal_uInt16)rFontCollection.GetId( aFontDesc ); if ( mnFont == nCount ) @@ -261,7 +261,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe meAsianOrComplexFont = ePropState; if ( bOk ) { - FontCollectionEntry aFontDesc( *(OUString*)mAny.getValue() ); + FontCollectionEntry aFontDesc( *static_cast<OUString const *>(mAny.getValue()) ); sal_uInt32 nCount = rFontCollection.GetCount(); mnAsianOrComplexFont = (sal_uInt16)rFontCollection.GetId( aFontDesc ); if ( mnAsianOrComplexFont == nCount ) @@ -282,7 +282,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe meAsianOrComplexFont = ePropState; if ( bOk ) { - FontCollectionEntry aFontDesc( *(OUString*)mAny.getValue() ); + FontCollectionEntry aFontDesc( *static_cast<OUString const *>(mAny.getValue()) ); sal_uInt32 nCount = rFontCollection.GetCount(); mnAsianOrComplexFont = (sal_uInt16)rFontCollection.GetId( aFontDesc ); if ( mnAsianOrComplexFont == nCount ) @@ -410,7 +410,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe if ( ImplGetPropertyValue( OUString( "CharColor" ), bGetPropStateValue ) ) { - sal_uInt32 nSOColor = *( (sal_uInt32*)mAny.getValue() ); + sal_uInt32 nSOColor = *( static_cast<sal_uInt32 const *>(mAny.getValue()) ); mnCharColor = nSOColor & 0xff00ff00; // green and hibyte mnCharColor |= (sal_uInt8)( nSOColor ) << 16; // red and blue is switched mnCharColor |= (sal_uInt8)( nSOColor >> 16 ); @@ -498,7 +498,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com ::com::sun::star::uno::Any aAny; if ( GetPropertyValue( aAny, rXPropSet, OUString( "TextPortionType" ), true ) ) { - OUString aTextFieldType( *(OUString*)aAny.getValue() ); + OUString aTextFieldType( *static_cast<OUString const *>(aAny.getValue()) ); if ( aTextFieldType == "TextField" ) { if ( GetPropertyValue( aAny, rXPropSet, aTextFieldType, true ) ) @@ -523,7 +523,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com { if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "Format" ), true ) ) { - nFormat = *(sal_Int32*)aAny.getValue(); + nFormat = *static_cast<sal_Int32 const *>(aAny.getValue()); switch ( nFormat ) { default: @@ -544,7 +544,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com else if ( aFieldKind == "URL" ) { if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "URL" ), true ) ) - rURL = *(OUString*)aAny.getValue(); + rURL = *static_cast<OUString const *>(aAny.getValue()); nRetValue = 4 << 28; } else if ( aFieldKind == "Page" ) @@ -565,7 +565,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com { if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), true ) ) { - nFormat = *(sal_Int32*)aAny.getValue(); + nFormat = *static_cast<sal_Int32 const *>(aAny.getValue()); nRetValue |= ( ( ( 2 << 4 ) | nFormat ) << 24 ) | 0x800000; } } @@ -589,7 +589,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com { if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "Format" ), true ) ) { - nFormat = *(sal_Int32*)aAny.getValue(); + nFormat = *static_cast<sal_Int32 const *>(aAny.getValue()); switch ( nFormat ) { default: @@ -814,7 +814,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1 { mAny <<= aXIndexReplace->getByIndex( nNumberingDepth ); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> - aPropertySequence( *( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>*)mAny.getValue() ); + aPropertySequence( *static_cast<css::uno::Sequence< ::com::sun::star::beans::PropertyValue> const *>(mAny.getValue()) ); const ::com::sun::star::beans::PropertyValue* pPropValue = aPropertySequence.getArray(); @@ -833,18 +833,18 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1 { OUString aPropName( pPropValue[ i ].Name ); if ( aPropName == "NumberingType" ) - nNumberingType = *( (sal_Int16*)pValue ); + nNumberingType = *( static_cast<sal_Int16 const *>(pValue) ); else if ( aPropName == "Adjust" ) - nHorzAdjust = *( (sal_Int16*)pValue ); + nHorzAdjust = *( static_cast<sal_Int16 const *>(pValue) ); else if ( aPropName == "BulletChar" ) { - OUString aString( *( (OUString*)pValue ) ); + OUString aString( *( static_cast<OUString const *>(pValue) ) ); if ( !aString.isEmpty() ) cBulletId = aString[ 0 ]; } else if ( aPropName == "BulletFont" ) { - aFontDesc = *( (::com::sun::star::awt::FontDescriptor*)pValue ); + aFontDesc = *static_cast<css::awt::FontDescriptor const *>(pValue); // Our numbullet dialog has set the wrong textencoding for our "StarSymbol" font, // instead of a Unicode encoding the encoding RTL_TEXTENCODING_SYMBOL was used. @@ -855,7 +855,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1 } else if ( aPropName == "GraphicURL" ) - aGraphicURL = ( *(OUString*)pValue ); + aGraphicURL = *static_cast<OUString const *>(pValue); else if ( aPropName == "GraphicSize" ) { if ( pPropValue[ i ].Value.getValueType() == cppu::UnoType<com::sun::star::awt::Size>::get()) @@ -868,28 +868,28 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1 } } else if ( aPropName == "StartWith" ) - nStartWith = *( (sal_Int16*)pValue ); + nStartWith = *static_cast<sal_Int16 const *>(pValue); else if ( aPropName == "LeftMargin" ) - nTextOfs = nTextOfs + static_cast< sal_Int16 >( *( (sal_Int32*)pValue ) / ( 2540.0 / 576 ) ); + nTextOfs = nTextOfs + static_cast< sal_Int16 >( *static_cast<sal_Int32 const *>(pValue) / ( 2540.0 / 576 ) ); else if ( aPropName == "FirstLineOffset" ) - nBulletOfs += (sal_Int16)( *( (sal_Int32*)pValue ) / ( 2540.0 / 576 ) ); + nBulletOfs += (sal_Int16)( *static_cast<sal_Int32 const *>(pValue) / ( 2540.0 / 576 ) ); else if ( aPropName == "BulletColor" ) { - sal_uInt32 nSOColor = *( (sal_uInt32*)pValue ); + sal_uInt32 nSOColor = *static_cast<sal_uInt32 const *>(pValue); nBulletColor = nSOColor & 0xff00ff00; // green and hibyte nBulletColor |= (sal_uInt8)( nSOColor ) << 16; // red nBulletColor |= (sal_uInt8)( nSOColor >> 16 ) | 0xfe000000; // blue } else if ( aPropName == "BulletRelSize" ) { - nBulletRealSize = *( (sal_Int16*)pValue ); + nBulletRealSize = *static_cast<sal_Int16 const *>(pValue); nParaFlags |= 0x40; nBulletFlags |= 8; } else if ( aPropName == "Prefix" ) - sPrefix = ( *(OUString*)pValue ); + sPrefix = *static_cast<OUString const *>(pValue); else if ( aPropName == "Suffix" ) - sSuffix = ( *(OUString*)pValue ); + sSuffix = *static_cast<OUString const *>(pValue); #ifdef DBG_UTIL else if ( ! ( ( aPropName == "SymbolTextDistance" ) @@ -1110,7 +1110,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bG { if ( bGetPropStateValue ) meBullet = GetPropertyState( mXPropSet, "NumberingLevel" ); - nDepth = *( (sal_Int16*)aAny.getValue() ); + nDepth = *static_cast<sal_Int16 const *>(aAny.getValue()); if ( nDepth < 0 ) { @@ -1132,7 +1132,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bG ImplGetNumberingLevel( pBuProv, nDepth, mbIsBullet, bGetPropStateValue ); if ( ImplGetPropertyValue( OUString( "ParaTabStops" ), bGetPropStateValue ) ) - maTabStop = *( ::com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop>*)mAny.getValue(); + maTabStop = *static_cast<css::uno::Sequence< ::com::sun::star::style::TabStop> const *>(mAny.getValue()); sal_Int16 eTextAdjust( ::com::sun::star::style::ParagraphAdjust_LEFT ); if ( GetPropertyValue( aAny, mXPropSet, OUString( "ParaAdjust" ), bGetPropStateValue ) ) aAny >>= eTextAdjust; @@ -1157,7 +1157,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bG if ( ImplGetPropertyValue( OUString( "ParaLineSpacing" ), bGetPropStateValue ) ) { ::com::sun::star::style::LineSpacing aLineSpacing - = *( (::com::sun::star::style::LineSpacing*)mAny.getValue() ); + = *static_cast<css::style::LineSpacing const *>(mAny.getValue()); switch ( aLineSpacing.Mode ) { case ::com::sun::star::style::LineSpacingMode::FIX : @@ -1180,14 +1180,14 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bG if ( ImplGetPropertyValue( OUString( "ParaBottomMargin" ), bGetPropStateValue ) ) { - double fSpacing = *( (sal_uInt32*)mAny.getValue() ) + ( 2540.0 / 576.0 ) - 1; + double fSpacing = *static_cast<sal_uInt32 const *>(mAny.getValue()) + ( 2540.0 / 576.0 ) - 1; mnLineSpacingBottom = (sal_Int16)(-( fSpacing * 576.0 / 2540.0 ) ); } meLineSpacingBottom = ePropState; if ( ImplGetPropertyValue( OUString( "ParaTopMargin" ), bGetPropStateValue ) ) { - double fSpacing = *( (sal_uInt32*)mAny.getValue() ) + ( 2540.0 / 576.0 ) - 1; + double fSpacing = *static_cast<sal_uInt32 const *>(mAny.getValue()) + ( 2540.0 / 576.0 ) - 1; mnLineSpacingTop = (sal_Int16)(-( fSpacing * 576.0 / 2540.0 ) ); } meLineSpacingTop = ePropState; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 025249bb31d4..eb4e77e86105 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -2846,8 +2846,8 @@ OUString HtmlExport::StringToHTMLString( const OUString& rString ) SvMemoryStream aMemStm; HTMLOutFuncs::Out_String( aMemStm, rString, RTL_TEXTENCODING_UTF8 ); aMemStm.WriteChar( (char) 0 ); - sal_Int32 nLength = strlen((char*)aMemStm.GetData()); - return OUString( (char*)aMemStm.GetData(), nLength, RTL_TEXTENCODING_UTF8 ); + sal_Int32 nLength = strlen(static_cast<char const *>(aMemStm.GetData())); + return OUString( static_cast<char const *>(aMemStm.GetData()), nLength, RTL_TEXTENCODING_UTF8 ); } // creates a url for a specific page diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 17a37fe15699..076a71119362 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2516,7 +2516,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi // further setup placeholder objects if( pObj->ISA(SdrPageObj) && pData ) { - const ProcessData* pProcessData=(const ProcessData*)pData; + const ProcessData* pProcessData=static_cast<const ProcessData*>(pData); if( pProcessData->pPage.page ) static_cast<SdPage *>(pProcessData->pPage.page)->InsertPresObj( pObj, PRESOBJ_PAGE ); diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index 96466d08c1d8..18ff39048dc4 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -57,7 +57,7 @@ PropEntry& PropEntry::operator=(const PropEntry& rPropEntry) void PropItem::Clear() { Seek( STREAM_SEEK_TO_BEGIN ); - delete[] (sal_uInt8*)SwitchBuffer(); + delete[] static_cast<sal_uInt8*>(SwitchBuffer()); } static sal_Int32 lcl_getMaxSafeStrLen(sal_uInt32 nSize) @@ -175,7 +175,7 @@ PropItem& PropItem::operator=( PropItem& rPropItem ) if ( this != &rPropItem ) { Seek( STREAM_SEEK_TO_BEGIN ); - delete[] (sal_uInt8*)SwitchBuffer(); + delete[] static_cast<sal_uInt8*>(SwitchBuffer()); mnTextEnc = rPropItem.mnTextEnc; sal_uInt32 nItemPos = rPropItem.Tell(); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 3770c20ff052..68b7bc9c02ca 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -391,7 +391,7 @@ sal_Int32 ReadThroughComponent( Any aAny = xProps->getPropertyValue( "Encrypted" ); bool bEncrypted = aAny.getValueType() == ::getBooleanCppuType() && - *(sal_Bool *)aAny.getValue(); + *static_cast<sal_Bool const *>(aAny.getValue()); Reference <io::XInputStream> xInputStream = xStream->getInputStream(); diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index fdee1af5a3d2..f16a6af69c9e 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -235,13 +235,13 @@ void SdOptionsLayout::GetPropNameArray( const char**& ppNames, sal_uLong& rCount bool SdOptionsLayout::ReadData( const Any* pValues ) { - if( pValues[0].hasValue() ) SetRulerVisible( *(sal_Bool*) pValues[ 0 ].getValue() ); - if( pValues[1].hasValue() ) SetHandlesBezier( *(sal_Bool*) pValues[ 1 ].getValue() ); - if( pValues[2].hasValue() ) SetMoveOutline( *(sal_Bool*) pValues[ 2 ].getValue() ); - if( pValues[3].hasValue() ) SetDragStripes( *(sal_Bool*) pValues[ 3 ].getValue() ); - if( pValues[4].hasValue() ) SetHelplines( *(sal_Bool*) pValues[ 4 ].getValue() ); - if( pValues[5].hasValue() ) SetMetric( (sal_uInt16) *(sal_Int32*) pValues[ 5 ].getValue() ); - if( pValues[6].hasValue() ) SetDefTab( (sal_uInt16) *(sal_Int32*) pValues[ 6 ].getValue() ); + if( pValues[0].hasValue() ) SetRulerVisible( *static_cast<sal_Bool const *>(pValues[ 0 ].getValue()) ); + if( pValues[1].hasValue() ) SetHandlesBezier( *static_cast<sal_Bool const *>(pValues[ 1 ].getValue()) ); + if( pValues[2].hasValue() ) SetMoveOutline( *static_cast<sal_Bool const *>(pValues[ 2 ].getValue()) ); + if( pValues[3].hasValue() ) SetDragStripes( *static_cast<sal_Bool const *>(pValues[ 3 ].getValue()) ); + if( pValues[4].hasValue() ) SetHelplines( *static_cast<sal_Bool const *>(pValues[ 4 ].getValue()) ); + if( pValues[5].hasValue() ) SetMetric( (sal_uInt16) *static_cast<sal_Int32 const *>(pValues[ 5 ].getValue()) ); + if( pValues[6].hasValue() ) SetDefTab( (sal_uInt16) *static_cast<sal_Int32 const *>(pValues[ 6 ].getValue()) ); return true; } @@ -522,46 +522,46 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) bool SdOptionsMisc::ReadData( const Any* pValues ) { - if( pValues[0].hasValue() ) SetMarkedHitMovesAlways( *(sal_Bool*) pValues[ 0 ].getValue() ); - if( pValues[1].hasValue() ) SetCrookNoContortion( *(sal_Bool*) pValues[ 1 ].getValue() ); - if( pValues[2].hasValue() ) SetQuickEdit( *(sal_Bool*)pValues[ 2 ].getValue() ); - if( pValues[3].hasValue() ) SetMasterPagePaintCaching( *(sal_Bool*) pValues[ 3 ].getValue() ); - if( pValues[4].hasValue() ) SetDragWithCopy( *(sal_Bool*) pValues[ 4 ].getValue() ); - if( pValues[5].hasValue() ) SetPickThrough( *(sal_Bool*) pValues[ 5 ].getValue() ); - if( pValues[6].hasValue() ) SetDoubleClickTextEdit( *(sal_Bool*) pValues[ 6 ].getValue() ); - if( pValues[7].hasValue() ) SetClickChangeRotation( *(sal_Bool*) pValues[ 7 ].getValue() ); - if( pValues[9].hasValue() ) SetSolidDragging( *(sal_Bool*) pValues[ 9 ].getValue() ); - if( pValues[10].hasValue() ) SetDefaultObjectSizeWidth( *(sal_uInt32*) pValues[ 10 ].getValue() ); - if( pValues[11].hasValue() ) SetDefaultObjectSizeHeight( *(sal_uInt32*) pValues[ 11 ].getValue() ); - if( pValues[12].hasValue() ) SetPrinterIndependentLayout( *(sal_uInt16*) pValues[ 12 ].getValue() ); + if( pValues[0].hasValue() ) SetMarkedHitMovesAlways( *static_cast<sal_Bool const *>(pValues[ 0 ].getValue()) ); + if( pValues[1].hasValue() ) SetCrookNoContortion( *static_cast<sal_Bool const *>(pValues[ 1 ].getValue()) ); + if( pValues[2].hasValue() ) SetQuickEdit( *static_cast<sal_Bool const *>(pValues[ 2 ].getValue()) ); + if( pValues[3].hasValue() ) SetMasterPagePaintCaching( *static_cast<sal_Bool const *>(pValues[ 3 ].getValue()) ); + if( pValues[4].hasValue() ) SetDragWithCopy( *static_cast<sal_Bool const *>(pValues[ 4 ].getValue()) ); + if( pValues[5].hasValue() ) SetPickThrough( *static_cast<sal_Bool const *>(pValues[ 5 ].getValue()) ); + if( pValues[6].hasValue() ) SetDoubleClickTextEdit( *static_cast<sal_Bool const *>(pValues[ 6 ].getValue()) ); + if( pValues[7].hasValue() ) SetClickChangeRotation( *static_cast<sal_Bool const *>(pValues[ 7 ].getValue()) ); + if( pValues[9].hasValue() ) SetSolidDragging( *static_cast<sal_Bool const *>(pValues[ 9 ].getValue()) ); + if( pValues[10].hasValue() ) SetDefaultObjectSizeWidth( *static_cast<sal_uInt32 const *>(pValues[ 10 ].getValue()) ); + if( pValues[11].hasValue() ) SetDefaultObjectSizeHeight( *static_cast<sal_uInt32 const *>(pValues[ 11 ].getValue()) ); + if( pValues[12].hasValue() ) SetPrinterIndependentLayout( *static_cast<sal_uInt16 const *>(pValues[ 12 ].getValue()) ); if( pValues[13].hasValue() ) - SetShowComments( *(sal_Bool*) pValues[ 13 ].getValue() ); + SetShowComments( *static_cast<sal_Bool const *>(pValues[ 13 ].getValue()) ); // just for Impress if( GetConfigId() == SDCFG_IMPRESS ) { if( pValues[14].hasValue() ) - SetStartWithTemplate( *(sal_Bool*) pValues[ 14 ].getValue() ); + SetStartWithTemplate( *static_cast<sal_Bool const *>(pValues[ 14 ].getValue()) ); if( pValues[15].hasValue() ) - SetSummationOfParagraphs( *(sal_Bool*) pValues[ 15 ].getValue() ); + SetSummationOfParagraphs( *static_cast<sal_Bool const *>(pValues[ 15 ].getValue()) ); if( pValues[16].hasValue() ) - SetShowUndoDeleteWarning( *(sal_Bool*) pValues[ 16 ].getValue() ); + SetShowUndoDeleteWarning( *static_cast<sal_Bool const *>(pValues[ 16 ].getValue()) ); if( pValues[17].hasValue() ) - SetSlideshowRespectZOrder(*(sal_Bool*) pValues[ 17 ].getValue()); + SetSlideshowRespectZOrder(*static_cast<sal_Bool const *>(pValues[ 17 ].getValue())); if( pValues[18].hasValue() ) - SetPreviewNewEffects(*(sal_Bool*) pValues[ 18 ].getValue()); + SetPreviewNewEffects(*static_cast<sal_Bool const *>(pValues[ 18 ].getValue())); if( pValues[19].hasValue() ) - SetPreviewChangedEffects(*(sal_Bool*) pValues[ 19 ].getValue()); + SetPreviewChangedEffects(*static_cast<sal_Bool const *>(pValues[ 19 ].getValue())); if( pValues[20].hasValue() ) - SetPreviewTransitions(*(sal_Bool*) pValues[ 20 ].getValue()); + SetPreviewTransitions(*static_cast<sal_Bool const *>(pValues[ 20 ].getValue())); if( pValues[21].hasValue() ) - SetDisplay(*(sal_Int32*) pValues[ 21 ].getValue()); + SetDisplay(*static_cast<sal_Int32 const *>(pValues[ 21 ].getValue())); if( pValues[22].hasValue() ) SetPresentationPenColor( getSafeValue< sal_Int32 >( pValues[ 22 ] ) ); @@ -570,10 +570,10 @@ bool SdOptionsMisc::ReadData( const Any* pValues ) SetPresentationPenWidth( getSafeValue< double >( pValues[ 23 ] ) ); if( pValues[24].hasValue() ) - SetEnableSdremote( *(sal_Bool*) pValues[ 24 ].getValue() ); + SetEnableSdremote( *static_cast<sal_Bool const *>(pValues[ 24 ].getValue()) ); if( pValues[25].hasValue() ) - SetEnablePresenterScreen( *(sal_Bool*) pValues[ 25 ].getValue() ); + SetEnablePresenterScreen( *static_cast<sal_Bool const *>(pValues[ 25 ].getValue()) ); } return true; @@ -799,16 +799,16 @@ void SdOptionsSnap::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) bool SdOptionsSnap::ReadData( const Any* pValues ) { - if( pValues[0].hasValue() ) SetSnapHelplines( *(sal_Bool*) pValues[ 0 ].getValue() ); - if( pValues[1].hasValue() ) SetSnapBorder( *(sal_Bool*)pValues[ 1 ].getValue() ); - if( pValues[2].hasValue() ) SetSnapFrame( *(sal_Bool*) pValues[ 2 ].getValue() ); - if( pValues[3].hasValue() ) SetSnapPoints( *(sal_Bool*) pValues[ 3 ].getValue() ); - if( pValues[4].hasValue() ) SetOrtho( *(sal_Bool*) pValues[ 4 ].getValue() ); - if( pValues[5].hasValue() ) SetBigOrtho( *(sal_Bool*) pValues[ 5 ].getValue() ); - if( pValues[6].hasValue() ) SetRotate( *(sal_Bool*) pValues[ 6 ].getValue() ); - if( pValues[7].hasValue() ) SetSnapArea( (sal_Int16) *(sal_Int32*) pValues[ 7 ].getValue() ); - if( pValues[8].hasValue() ) SetAngle( (sal_Int16) *(sal_Int32*) pValues[ 8 ].getValue() ); - if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( (sal_Int16) *(sal_Int32*) pValues[ 9 ].getValue() ); + if( pValues[0].hasValue() ) SetSnapHelplines( *static_cast<sal_Bool const *>(pValues[ 0 ].getValue()) ); + if( pValues[1].hasValue() ) SetSnapBorder( *static_cast<sal_Bool const *>(pValues[ 1 ].getValue()) ); + if( pValues[2].hasValue() ) SetSnapFrame( *static_cast<sal_Bool const *>(pValues[ 2 ].getValue()) ); + if( pValues[3].hasValue() ) SetSnapPoints( *static_cast<sal_Bool const *>(pValues[ 3 ].getValue()) ); + if( pValues[4].hasValue() ) SetOrtho( *static_cast<sal_Bool const *>(pValues[ 4 ].getValue()) ); + if( pValues[5].hasValue() ) SetBigOrtho( *static_cast<sal_Bool const *>(pValues[ 5 ].getValue()) ); + if( pValues[6].hasValue() ) SetRotate( *static_cast<sal_Bool const *>(pValues[ 6 ].getValue()) ); + if( pValues[7].hasValue() ) SetSnapArea( (sal_Int16) *static_cast<sal_Int32 const *>(pValues[ 7 ].getValue()) ); + if( pValues[8].hasValue() ) SetAngle( (sal_Int16) *static_cast<sal_Int32 const *>(pValues[ 8 ].getValue()) ); + if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( (sal_Int16) *static_cast<sal_Int32 const *>(pValues[ 9 ].getValue()) ); return true; } @@ -946,8 +946,8 @@ bool SdOptionsZoom::ReadData( const Any* pValues ) { sal_Int32 x = 1, y = 1; - if( pValues[0].hasValue() ) x = ( *(sal_Int32*) pValues[ 0 ].getValue() ); - if( pValues[1].hasValue() ) y = ( *(sal_Int32*) pValues[ 1 ].getValue() ); + if( pValues[0].hasValue() ) x = ( *static_cast<sal_Int32 const *>(pValues[ 0 ].getValue()) ); + if( pValues[1].hasValue() ) y = ( *static_cast<sal_Int32 const *>(pValues[ 1 ].getValue()) ); SetScale( x, y ); @@ -1060,27 +1060,27 @@ void SdOptionsGrid::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) bool SdOptionsGrid::ReadData( const Any* pValues ) { - if( pValues[0].hasValue() ) SetFldDrawX( *(sal_Int32*) pValues[ 0 ].getValue() ); - if( pValues[1].hasValue() ) SetFldDrawY( *(sal_Int32*) pValues[ 1 ].getValue() ); + if( pValues[0].hasValue() ) SetFldDrawX( *static_cast<sal_Int32 const *>(pValues[ 0 ].getValue()) ); + if( pValues[1].hasValue() ) SetFldDrawY( *static_cast<sal_Int32 const *>(pValues[ 1 ].getValue()) ); if( pValues[2].hasValue() ) { - const sal_uInt32 nDivX = FRound( *(double*) pValues[ 2 ].getValue() ); + const sal_uInt32 nDivX = FRound( *static_cast<double const *>(pValues[ 2 ].getValue()) ); SetFldDivisionX( SvxOptionsGrid::GetFldDrawX() / ( nDivX + 1 ) ); } if( pValues[3].hasValue() ) { - const sal_uInt32 nDivY = FRound( *(double*) pValues[ 3 ].getValue() ); + const sal_uInt32 nDivY = FRound( *static_cast<double const *>(pValues[ 3 ].getValue()) ); SetFldDivisionY( SvxOptionsGrid::GetFldDrawY() / ( nDivY + 1 ) ); } - if( pValues[4].hasValue() ) SetFldSnapX( *(sal_Int32*) pValues[ 4 ].getValue() ); - if( pValues[5].hasValue() ) SetFldSnapY( *(sal_Int32*) pValues[ 5 ].getValue() ); - if( pValues[6].hasValue() ) SetUseGridSnap( *(sal_Bool*) pValues[ 6 ].getValue() ); - if( pValues[7].hasValue() ) SetSynchronize( *(sal_Bool*) pValues[ 7 ].getValue() ); - if( pValues[8].hasValue() ) SetGridVisible( *(sal_Bool*) pValues[ 8 ].getValue() ); - if( pValues[9].hasValue() ) SetEqualGrid( *(sal_Bool*) pValues[ 9 ].getValue() ); + if( pValues[4].hasValue() ) SetFldSnapX( *static_cast<sal_Int32 const *>(pValues[ 4 ].getValue()) ); + if( pValues[5].hasValue() ) SetFldSnapY( *static_cast<sal_Int32 const *>(pValues[ 5 ].getValue()) ); + if( pValues[6].hasValue() ) SetUseGridSnap( *static_cast<sal_Bool const *>(pValues[ 6 ].getValue()) ); + if( pValues[7].hasValue() ) SetSynchronize( *static_cast<sal_Bool const *>(pValues[ 7 ].getValue()) ); + if( pValues[8].hasValue() ) SetGridVisible( *static_cast<sal_Bool const *>(pValues[ 8 ].getValue()) ); + if( pValues[9].hasValue() ) SetEqualGrid( *static_cast<sal_Bool const *>(pValues[ 9 ].getValue()) ); return true; } @@ -1272,27 +1272,27 @@ void SdOptionsPrint::GetPropNameArray( const char**& ppNames, sal_uLong& rCount bool SdOptionsPrint::ReadData( const Any* pValues ) { - if( pValues[0].hasValue() ) SetDate( *(sal_Bool*) pValues[ 0 ].getValue() ); - if( pValues[1].hasValue() ) SetTime( *(sal_Bool*) pValues[ 1 ].getValue() ); - if( pValues[2].hasValue() ) SetPagename( *(sal_Bool*) pValues[ 2 ].getValue() ); - if( pValues[3].hasValue() ) SetHiddenPages( *(sal_Bool*) pValues[ 3 ].getValue() ); - if( pValues[4].hasValue() ) SetPagesize( *(sal_Bool*) pValues[ 4 ].getValue() ); - if( pValues[5].hasValue() ) SetPagetile( *(sal_Bool*) pValues[ 5 ].getValue() ); - if( pValues[6].hasValue() ) SetBooklet( *(sal_Bool*) pValues[ 6 ].getValue() ); - if( pValues[7].hasValue() ) SetFrontPage( *(sal_Bool*) pValues[ 7 ].getValue() ); - if( pValues[8].hasValue() ) SetBackPage( *(sal_Bool*) pValues[ 8 ].getValue() ); - if( pValues[9].hasValue() ) SetPaperbin( *(sal_Bool*) pValues[ 9 ].getValue() ); - if( pValues[10].hasValue() ) SetOutputQuality( (sal_uInt16) *(sal_Int32*) pValues[ 10 ].getValue() ); - if( pValues[11].hasValue() ) SetDraw( *(sal_Bool*) pValues[ 11 ].getValue() ); + if( pValues[0].hasValue() ) SetDate( *static_cast<sal_Bool const *>(pValues[ 0 ].getValue()) ); + if( pValues[1].hasValue() ) SetTime( *static_cast<sal_Bool const *>(pValues[ 1 ].getValue()) ); + if( pValues[2].hasValue() ) SetPagename( *static_cast<sal_Bool const *>(pValues[ 2 ].getValue()) ); + if( pValues[3].hasValue() ) SetHiddenPages( *static_cast<sal_Bool const *>(pValues[ 3 ].getValue()) ); + if( pValues[4].hasValue() ) SetPagesize( *static_cast<sal_Bool const *>(pValues[ 4 ].getValue()) ); + if( pValues[5].hasValue() ) SetPagetile( *static_cast<sal_Bool const *>(pValues[ 5 ].getValue()) ); + if( pValues[6].hasValue() ) SetBooklet( *static_cast<sal_Bool const *>(pValues[ 6 ].getValue()) ); + if( pValues[7].hasValue() ) SetFrontPage( *static_cast<sal_Bool const *>(pValues[ 7 ].getValue()) ); + if( pValues[8].hasValue() ) SetBackPage( *static_cast<sal_Bool const *>(pValues[ 8 ].getValue()) ); + if( pValues[9].hasValue() ) SetPaperbin( *static_cast<sal_Bool const *>(pValues[ 9 ].getValue()) ); + if( pValues[10].hasValue() ) SetOutputQuality( (sal_uInt16) *static_cast<sal_Int32 const *>(pValues[ 10 ].getValue()) ); + if( pValues[11].hasValue() ) SetDraw( *static_cast<sal_Bool const *>(pValues[ 11 ].getValue()) ); // just for impress if( GetConfigId() == SDCFG_IMPRESS ) { - if( pValues[12].hasValue() ) SetNotes( *(sal_Bool*) pValues[ 12 ].getValue() ); - if( pValues[13].hasValue() ) SetHandout( *(sal_Bool*) pValues[ 13 ].getValue() ); - if( pValues[14].hasValue() ) SetOutline( *(sal_Bool*) pValues[ 14 ].getValue() ); - if( pValues[15].hasValue() ) SetHandoutHorizontal( *(sal_Bool*) pValues[15].getValue() ); - if( pValues[16].hasValue() ) SetHandoutPages( (sal_uInt16)*(sal_Int32*) pValues[16].getValue() ); + if( pValues[12].hasValue() ) SetNotes( *static_cast<sal_Bool const *>(pValues[ 12 ].getValue()) ); + if( pValues[13].hasValue() ) SetHandout( *static_cast<sal_Bool const *>(pValues[ 13 ].getValue()) ); + if( pValues[14].hasValue() ) SetOutline( *static_cast<sal_Bool const *>(pValues[ 14 ].getValue()) ); + if( pValues[15].hasValue() ) SetHandoutHorizontal( *static_cast<sal_Bool const *>(pValues[15].getValue()) ); + if( pValues[16].hasValue() ) SetHandoutPages( (sal_uInt16)*static_cast<sal_Int32 const *>(pValues[16].getValue()) ); } return true; diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index 6485138b4f0a..7da803a3ab44 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -287,7 +287,7 @@ void SdDLL::Init() pDrawFact = &::sd::GraphicDocShell::Factory(); // the SdModule must be created - SdModule** ppShlPtr = (SdModule**) GetAppData(SHL_DRAW); + SdModule** ppShlPtr = reinterpret_cast<SdModule**>(GetAppData(SHL_DRAW)); // #i46427# // The SfxModule::SfxModule stops when the first given factory diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index f7fb1c270938..b982264de845 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -114,7 +114,7 @@ SdModule::~SdModule() mpResourceContainer.reset(); // Mark the module in the global AppData structure as deleted. - SdModule** ppShellPointer = (SdModule**)GetAppData(SHL_DRAW); + SdModule** ppShellPointer = reinterpret_cast<SdModule**>(GetAppData(SHL_DRAW)); if (ppShellPointer != NULL) (*ppShellPointer) = NULL; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 8df6940b7d76..a0e2880b7004 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -420,7 +420,7 @@ IMPL_LINK( SdModule, EventListenerHdl, VclSimpleEvent*, pEvent ) { if( pEvent && (pEvent->GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(pEvent)->GetData() ) { - const CommandEvent& rEvent = *(const CommandEvent*)static_cast<VclWindowEvent*>(pEvent)->GetData(); + const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(pEvent)->GetData()); if( rEvent.GetCommand() == COMMAND_MEDIA ) { diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index dc1ec49cc6b7..67170e969f4a 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -584,7 +584,7 @@ bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject, So try { static const bool bDontBurnInStyleSheet = ( getenv( "AVOID_BURN_IN_FOR_GALLERY_THEME" ) != NULL ); - SdDrawDocument* pDoc = (SdDrawDocument*) pObject; + SdDrawDocument* pDoc = static_cast<SdDrawDocument*>(pObject); if ( !bDontBurnInStyleSheet ) pDoc->BurnInStyleSheetAttributes(); rxOStm->SetBufferSize( 16348 ); @@ -611,7 +611,7 @@ bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject, So case( SDTRANSFER_OBJECTTYPE_DRAWOLE ): { - SfxObjectShell* pEmbObj = (SfxObjectShell*) pObject; + SfxObjectShell* pEmbObj = static_cast<SfxObjectShell*>(pObject); ::utl::TempFile aTempFile; aTempFile.EnableKillingFile(); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 9b7d571c8dd2..5a62f7207fad 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -107,7 +107,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl) OUString sUrl; for( sal_Int16 i = 0; i < pImagesLst->GetEntryCount(); ++i ) { - OUString* pData = (OUString*) pImagesLst->GetEntryData(i); + OUString const * pData = static_cast<OUString const *>(pImagesLst->GetEntryData(i)); sUrl = *pData; Reference< drawing::XDrawPage > xSlide = appendNewSlide(AUTOLAYOUT_NONE, xDrawPages); @@ -163,7 +163,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl) for( sal_Int32 i = 0; i < pImagesLst->GetEntryCount(); i+=2 ) { - OUString* pData = NULL; + OUString const * pData = NULL; // create the slide Reference< drawing::XDrawPage > xSlide = appendNewSlide(AUTOLAYOUT_NONE, xDrawPages); @@ -178,11 +178,11 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl) // grab the left one void* pD1 = pImagesLst->GetEntryData(i); - pData = (OUString*) pD1; + pData = static_cast<OUString const *>(pD1); sUrl1 = pData ? OUString(*pData) : ""; // grab the right one void* pD2 = pImagesLst->GetEntryData(i+1); - pData = (OUString*) pD2; + pData = static_cast<OUString const *>(pD2); sUrl2 = pData ? OUString(*pData) : ""; if( !sUrl1.isEmpty() ) @@ -283,22 +283,22 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl) // grab the upper left one void* pD1 = pImagesLst->GetEntryData(i); - pData = (OUString*) pD1; + pData = static_cast<OUString*>(pD1); sUrl1 = pData ? OUString(*pData) : ""; // grab the upper right one void* pD2 = pImagesLst->GetEntryData(i+1); - pData = (OUString*) pD2; + pData = static_cast<OUString *>(pD2); sUrl2 = pData ? OUString(*pData) : ""; // grab the lower left one void* pD3 = pImagesLst->GetEntryData(i+2); - pData = (OUString*) pD3; + pData = static_cast<OUString*>(pD3); sUrl3 = pData ? OUString(*pData) : ""; // grab the lower right one void* pD4 = pImagesLst->GetEntryData(i+3); - pData = (OUString*) pD4; + pData = static_cast<OUString*>(pD4); sUrl4 = pData ? OUString(*pData) : ""; if( !sUrl1.isEmpty() ) @@ -504,12 +504,12 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, UpHdl) sal_uInt16 nActPos = pImagesLst->GetSelectEntryPos(); OUString sActEntry( pImagesLst->GetEntry(nActPos) ); // actual data - OUString* pActData = (OUString*) pImagesLst->GetEntryData(nActPos); + OUString* pActData = static_cast<OUString*>(pImagesLst->GetEntryData(nActPos)); OUString sAct(*pActData); OUString sUpperEntry( pImagesLst->GetEntry(nActPos - 1) ); // upper data - OUString* pUpperData = (OUString*) pImagesLst->GetEntryData(nActPos - 1); + OUString* pUpperData = static_cast<OUString*>(pImagesLst->GetEntryData(nActPos - 1)); OUString sUpper(*pUpperData); pImagesLst->RemoveEntry( sActEntry ); @@ -534,11 +534,11 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, DownHdl) if (!pImagesLst->GetEntry(nActPos + 1).isEmpty()) { OUString sActEntry( pImagesLst->GetSelectEntry() ); - OUString* pActData = (OUString*) pImagesLst->GetSelectEntryData(); + OUString* pActData = static_cast<OUString*>(pImagesLst->GetSelectEntryData()); OUString sAct(*pActData); OUString sDownEntry( pImagesLst->GetEntry(nActPos + 1) ); - OUString* pDownData = (OUString*) pImagesLst->GetEntryData(nActPos + 1); + OUString* pDownData = static_cast<OUString*>(pImagesLst->GetEntryData(nActPos + 1)); OUString sDown(*pDownData); pImagesLst->RemoveEntry( sActEntry ); @@ -568,7 +568,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, RemoveHdl) IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl) { - OUString* pData = (OUString*) pImagesLst->GetSelectEntryData(); + OUString* pData = static_cast<OUString*>(pImagesLst->GetSelectEntryData()); OUString sImgUrl = pData ? OUString(*pData) : ""; if (sImgUrl != SD_RESSTR(STR_PHOTO_ALBUM_TEXTBOX)) diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 6e996ddcdfa5..d1c023e9b387 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -441,7 +441,7 @@ void SdDefineCustomShowDlg::CheckCustomShow() pEntry != NULL; pEntry = m_pLbCustomPages->Next( pEntry ) ) { - SdPage* pPage = (SdPage*) pEntry->GetUserData(); + SdPage* pPage = static_cast<SdPage*>(pEntry->GetUserData()); rpCustomShow->PagesVector().push_back( pPage ); } bModified = true; diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 648b60bb30b6..7a2120b4e5ff 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -930,7 +930,7 @@ DBusHandlerResult ProfileMessageFunction int nDescriptor; dbus_message_iter_get_basic(&it, &nDescriptor); - std::vector<Communicator*>* pCommunicators = (std::vector<Communicator*>*) user_data; + std::vector<Communicator*>* pCommunicators = static_cast<std::vector<Communicator*>*>(user_data); // Bluez gives us non-blocking sockets, but our code relies // on blocking behaviour. diff --git a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx index 7633283f3237..9b756fe76012 100644 --- a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx +++ b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx @@ -56,7 +56,7 @@ sal_Int32 BufferedStreamSocket::write( const void* pBuffer, sal_uInt32 n ) if ( !usingCSocket ) return StreamSocket::write( pBuffer, n ); else - return ::send( mSocket, (const char *) pBuffer, (size_t) n, 0 ); + return ::send( mSocket, pBuffer, (size_t) n, 0 ); } void BufferedStreamSocket::close() diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx index 34924a66e302..5e01b5fa66e4 100644 --- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx @@ -277,7 +277,7 @@ IMPL_LINK(CurrentMasterPagesSelector,EventMultiplexerListener, case sd::tools::EventMultiplexerEvent::EID_SHAPE_CHANGED: case sd::tools::EventMultiplexerEvent::EID_SHAPE_INSERTED: case sd::tools::EventMultiplexerEvent::EID_SHAPE_REMOVED: - InvalidatePreview((const SdPage*)pEvent->mpUserData); + InvalidatePreview(static_cast<const SdPage*>(pEvent->mpUserData)); break; } } diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 38eee1f0f680..4879b51bd339 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2029,7 +2029,7 @@ IMPL_LINK( SlideshowImpl, EventListenerHdl, VclSimpleEvent*, pEvent ) if( pEvent && (pEvent->GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(pEvent)->GetData() ) { - const CommandEvent& rEvent = *(const CommandEvent*)static_cast<VclWindowEvent*>(pEvent)->GetData(); + const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(pEvent)->GetData()); if( rEvent.GetCommand() == COMMAND_MEDIA ) { diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx index 94bf10085b44..dcb3f669731c 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx @@ -153,7 +153,7 @@ public: {} virtual ~PngReplacement (void) { - delete [] (char*)mpData; + delete [] static_cast<char*>(mpData); } virtual sal_Int32 GetMemorySize (void) const SAL_OVERRIDE { diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index e6b828dc3db3..16817235eb87 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1122,7 +1122,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( *xMetaFile, aDestStrm, NULL, false ); - Sequence<sal_Int8> aSeq( (sal_Int8*)aDestStrm.GetData(), aDestStrm.Tell() ); + Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aDestStrm.GetData()), aDestStrm.Tell() ); aAny <<= aSeq; } } @@ -1152,7 +1152,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) { SvMemoryStream aMemStream; WriteDIB(aBitmap.GetBitmap(), aMemStream, false, false); - uno::Sequence<sal_Int8> aSeq( (sal_Int8*)aMemStream.GetData(), aMemStream.Tell() ); + uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aMemStream.GetData()), aMemStream.Tell() ); aAny <<= aSeq; } } |