summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-18 21:35:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:52 +0100
commit19ae20096aa1c35217753ffd3d903364047834ff (patch)
tree53e9f670342c8e234a39db9cd98e140645dc7f3b
parent950028c6e3b20ee686e47fdf990de89377aaf92a (diff)
Some more loplugin:cstylecast: svx
Change-Id: I5eb4e1cae38decb293ea11f7cd4bfda0bad3afcb
-rw-r--r--include/svx/graphctl.hxx4
-rw-r--r--include/svx/svdsob.hxx4
-rw-r--r--svx/inc/xpolyimp.hxx2
-rw-r--r--svx/source/dialog/hdft.cxx6
-rw-r--r--svx/source/form/dbtoolsclient.cxx2
-rw-r--r--svx/source/unodraw/unoshap2.cxx2
-rw-r--r--svx/source/unodraw/unoshap4.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx2
-rw-r--r--svx/source/xoutdev/_xpoly.cxx8
9 files changed, 17 insertions, 15 deletions
diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx
index a2863d0f1f68..8cd389cc35e5 100644
--- a/include/svx/graphctl.hxx
+++ b/include/svx/graphctl.hxx
@@ -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;
diff --git a/include/svx/svdsob.hxx b/include/svx/svdsob.hxx
index 69bebbf56974..c417c4980e21 100644
--- a/include/svx/svdsob.hxx
+++ b/include/svx/svdsob.hxx
@@ -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;
}
diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx
index 2b9bc67c13fe..aa0cf766c32b 100644
--- a/svx/inc/xpolyimp.hxx
+++ b/svx/inc/xpolyimp.hxx
@@ -48,7 +48,7 @@ public:
{
if ( bDeleteOldPoints )
{
- delete[] (char*)pOldPointAry;
+ delete[] reinterpret_cast<char*>(pOldPointAry);
bDeleteOldPoints = false;
}
}
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 7c93eea15835..cacc9e8c107d 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -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 =
diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index 79e6eab0a4d6..4eb00fbde033 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -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)
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index d7429b9727de..935a1ee7dec6 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -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 )
{
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 75f88469a119..9f07d79327cf 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -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;
}
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index eff500b171d5..098063aa4fa5 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -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;
}
}
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index c77992af83fc..4d4ef9caaad5 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -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;
}