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:
virtual void SdrObjChanged( const SdrObject& rObj );
virtual void MarkListHasChanged();
SdrObjUserCall* GetSdrUserCall() { return (SdrObjUserCall*) pUserCall; }
inline SdrObjUserCall* GetSdrUserCall();
public:
......@@ -134,6 +134,8 @@ public:
virtual void Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect ) SAL_OVERRIDE;
};
SdrObjUserCall* GraphCtrl::GetSdrUserCall() { return pUserCall; }
class GraphCtrlView : public SdrView
{
GraphCtrl& rGraphCtrl;
......
......@@ -102,13 +102,13 @@ public:
inline SvStream& WriteSetOfByte(SvStream& rOut, const SetOfByte& rSet)
{
rOut.Write((char*)rSet.aData,32);
rOut.Write(rSet.aData, 32);
return rOut;
}
inline SvStream& ReadSetOfByte(SvStream& rIn, SetOfByte& rSet)
{
rIn.Read((char*)rSet.aData,32);
rIn.Read(rSet.aData, 32);
return rIn;
}
......
......@@ -48,7 +48,7 @@ public:
{
if ( bDeleteOldPoints )
{
delete[] (char*)pOldPointAry;
delete[] reinterpret_cast<char*>(pOldPointAry);
bDeleteOldPoints = false;
}
}
......
......@@ -382,7 +382,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
const SvxSetItem* pSetItem = 0;
if ( SfxItemState::SET == rSet->GetItemState( GetWhich(nId), false,
(const SfxPoolItem**)&pSetItem ) )
reinterpret_cast<const SfxPoolItem**>(&pSetItem) ) )
{
const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
const SfxBoolItem& rHeaderOn =
......@@ -957,7 +957,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ),
false,
(const SfxPoolItem**)&pSetItem ) )
reinterpret_cast<const SfxPoolItem**>(&pSetItem) ) )
{
const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
const SfxBoolItem& rHeaderOn =
......@@ -997,7 +997,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ),
false,
(const SfxPoolItem**)&pSetItem ) )
reinterpret_cast<const SfxPoolItem**>(&pSetItem) ) )
{
const SfxItemSet& rFooterSet = pSetItem->GetItemSet();
const SfxBoolItem& rFooterOn =
......
......@@ -123,7 +123,7 @@ namespace svxform
// get the symbol for the method creating the factory
const OUString sFactoryCreationFunc( "createDataAccessToolsFactory" );
// reinterpret_cast<createDataAccessToolsFactoryFunction>
s_pFactoryCreationFunc = (createDataAccessToolsFactoryFunction)(
s_pFactoryCreationFunc = reinterpret_cast<createDataAccessToolsFactoryFunction>(
osl_getFunctionSymbol(s_hDbtoolsModule, sFactoryCreationFunc.pData));
if (NULL == s_pFactoryCreationFunc)
......
......@@ -1429,7 +1429,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
SvMemoryStream aMemStm;
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 )
{
......
......@@ -238,7 +238,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro
if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF )
{
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;
}
}
......
......@@ -2915,7 +2915,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF )
{
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;
}
}
......
......@@ -69,10 +69,10 @@ ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly )
ImpXPolygon::~ImpXPolygon()
{
delete[] (char*) pPointAry;
delete[] reinterpret_cast<char*>(pPointAry);
delete[] pFlagAry;
if ( bDeleteOldPoints )
delete[] (char*) pOldPointAry;
delete[] reinterpret_cast<char*>(pOldPointAry);
}
bool ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const
......@@ -111,7 +111,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints )
}
// create point array
nSize = nNewSize;
pPointAry = (Point*)new char[ nSize*sizeof( Point ) ];
pPointAry = reinterpret_cast<Point*>(new char[ nSize*sizeof( Point ) ]);
memset( pPointAry, 0, nSize*sizeof( Point ) );
// create flag array
......@@ -135,7 +135,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, bool bDeletePoints )
if( nPoints > nSize )
nPoints = nSize;
}
if ( bDeletePoints ) delete[] (char*) pOldPointAry;
if ( bDeletePoints ) delete[] reinterpret_cast<char*>(pOldPointAry);
else bDeleteOldPoints = true;
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