Kaydet (Commit) 19ae2009 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more loplugin:cstylecast: svx

Change-Id: I5eb4e1cae38decb293ea11f7cd4bfda0bad3afcb
üst 950028c6
...@@ -76,7 +76,7 @@ protected: ...@@ -76,7 +76,7 @@ protected:
virtual void SdrObjChanged( const SdrObject& rObj ); virtual void SdrObjChanged( const SdrObject& rObj );
virtual void MarkListHasChanged(); virtual void MarkListHasChanged();
SdrObjUserCall* GetSdrUserCall() { return (SdrObjUserCall*) pUserCall; } inline SdrObjUserCall* GetSdrUserCall();
public: public:
...@@ -134,6 +134,8 @@ public: ...@@ -134,6 +134,8 @@ public:
virtual void Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect ) SAL_OVERRIDE; virtual void Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect ) SAL_OVERRIDE;
}; };
SdrObjUserCall* GraphCtrl::GetSdrUserCall() { return pUserCall; }
class GraphCtrlView : public SdrView class GraphCtrlView : public SdrView
{ {
GraphCtrl& rGraphCtrl; GraphCtrl& rGraphCtrl;
......
...@@ -102,13 +102,13 @@ public: ...@@ -102,13 +102,13 @@ public:
inline SvStream& WriteSetOfByte(SvStream& rOut, const SetOfByte& rSet) inline SvStream& WriteSetOfByte(SvStream& rOut, const SetOfByte& rSet)
{ {
rOut.Write((char*)rSet.aData,32); rOut.Write(rSet.aData, 32);
return rOut; return rOut;
} }
inline SvStream& ReadSetOfByte(SvStream& rIn, SetOfByte& rSet) inline SvStream& ReadSetOfByte(SvStream& rIn, SetOfByte& rSet)
{ {
rIn.Read((char*)rSet.aData,32); rIn.Read(rSet.aData, 32);
return rIn; return rIn;
} }
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
{ {
if ( bDeleteOldPoints ) if ( bDeleteOldPoints )
{ {
delete[] (char*)pOldPointAry; delete[] reinterpret_cast<char*>(pOldPointAry);
bDeleteOldPoints = false; bDeleteOldPoints = false;
} }
} }
......
...@@ -382,7 +382,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) ...@@ -382,7 +382,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
const SvxSetItem* pSetItem = 0; const SvxSetItem* pSetItem = 0;
if ( SfxItemState::SET == rSet->GetItemState( GetWhich(nId), false, if ( SfxItemState::SET == rSet->GetItemState( GetWhich(nId), false,
(const SfxPoolItem**)&pSetItem ) ) reinterpret_cast<const SfxPoolItem**>(&pSetItem) ) )
{ {
const SfxItemSet& rHeaderSet = pSetItem->GetItemSet(); const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
const SfxBoolItem& rHeaderOn = const SfxBoolItem& rHeaderOn =
...@@ -957,7 +957,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) ...@@ -957,7 +957,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ),
false, false,
(const SfxPoolItem**)&pSetItem ) ) reinterpret_cast<const SfxPoolItem**>(&pSetItem) ) )
{ {
const SfxItemSet& rHeaderSet = pSetItem->GetItemSet(); const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
const SfxBoolItem& rHeaderOn = const SfxBoolItem& rHeaderOn =
...@@ -997,7 +997,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) ...@@ -997,7 +997,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ),
false, false,
(const SfxPoolItem**)&pSetItem ) ) reinterpret_cast<const SfxPoolItem**>(&pSetItem) ) )
{ {
const SfxItemSet& rFooterSet = pSetItem->GetItemSet(); const SfxItemSet& rFooterSet = pSetItem->GetItemSet();
const SfxBoolItem& rFooterOn = const SfxBoolItem& rFooterOn =
......
...@@ -123,7 +123,7 @@ namespace svxform ...@@ -123,7 +123,7 @@ namespace svxform
// get the symbol for the method creating the factory // get the symbol for the method creating the factory
const OUString sFactoryCreationFunc( "createDataAccessToolsFactory" ); const OUString sFactoryCreationFunc( "createDataAccessToolsFactory" );
// reinterpret_cast<createDataAccessToolsFactoryFunction> // reinterpret_cast<createDataAccessToolsFactoryFunction>
s_pFactoryCreationFunc = (createDataAccessToolsFactoryFunction)( s_pFactoryCreationFunc = reinterpret_cast<createDataAccessToolsFactoryFunction>(
osl_getFunctionSymbol(s_hDbtoolsModule, sFactoryCreationFunc.pData)); osl_getFunctionSymbol(s_hDbtoolsModule, sFactoryCreationFunc.pData));
if (NULL == s_pFactoryCreationFunc) if (NULL == s_pFactoryCreationFunc)
......
...@@ -1429,7 +1429,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte ...@@ -1429,7 +1429,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
SvMemoryStream aMemStm; SvMemoryStream aMemStm;
Graphic aGraphic; Graphic aGraphic;
aMemStm.SetBuffer( (char*)pSeq->getConstArray(), pSeq->getLength(), false, pSeq->getLength() ); aMemStm.SetBuffer( pSeq->getArray(), pSeq->getLength(), false, pSeq->getLength() );
if( GraphicConverter::Import( aMemStm, aGraphic ) == ERRCODE_NONE ) if( GraphicConverter::Import( aMemStm, aGraphic ) == ERRCODE_NONE )
{ {
......
...@@ -238,7 +238,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro ...@@ -238,7 +238,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro
if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF ) if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF )
{ {
bIsWMF = true; bIsWMF = true;
uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize()); uno::Sequence<sal_Int8> aSeq(reinterpret_cast<sal_Int8 const *>(aLnk.GetData()), (sal_Int32) aLnk.GetDataSize());
rValue <<= aSeq; rValue <<= aSeq;
} }
} }
......
...@@ -2915,7 +2915,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl ...@@ -2915,7 +2915,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF ) if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF )
{ {
bIsWMF = true; bIsWMF = true;
uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize()); uno::Sequence<sal_Int8> aSeq(reinterpret_cast<sal_Int8 const *>(aLnk.GetData()), (sal_Int32) aLnk.GetDataSize());
rValue <<= aSeq; rValue <<= aSeq;
} }
} }
......
...@@ -69,10 +69,10 @@ ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly ) ...@@ -69,10 +69,10 @@ ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly )
ImpXPolygon::~ImpXPolygon() ImpXPolygon::~ImpXPolygon()
{ {
delete[] (char*) pPointAry; delete[] reinterpret_cast<char*>(pPointAry);
delete[] pFlagAry; delete[] pFlagAry;
if ( bDeleteOldPoints ) if ( bDeleteOldPoints )
delete[] (char*) pOldPointAry; delete[] reinterpret_cast<char*>(pOldPointAry);
} }
bool ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const bool ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const
...@@ -111,7 +111,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints ) ...@@ -111,7 +111,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints )
} }
// create point array // create point array
nSize = nNewSize; nSize = nNewSize;
pPointAry = (Point*)new char[ nSize*sizeof( Point ) ]; pPointAry = reinterpret_cast<Point*>(new char[ nSize*sizeof( Point ) ]);
memset( pPointAry, 0, nSize*sizeof( Point ) ); memset( pPointAry, 0, nSize*sizeof( Point ) );
// create flag array // create flag array
...@@ -135,7 +135,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints ) ...@@ -135,7 +135,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints )
if( nPoints > nSize ) if( nPoints > nSize )
nPoints = nSize; nPoints = nSize;
} }
if ( bDeletePoints ) delete[] (char*) pOldPointAry; if ( bDeletePoints ) delete[] reinterpret_cast<char*>(pOldPointAry);
else bDeleteOldPoints = true; else bDeleteOldPoints = true;
delete[] pOldFlagAry; delete[] pOldFlagAry;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment