From 19ae20096aa1c35217753ffd3d903364047834ff Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 18 Jan 2015 21:35:16 +0100 Subject: Some more loplugin:cstylecast: svx Change-Id: I5eb4e1cae38decb293ea11f7cd4bfda0bad3afcb --- svx/inc/xpolyimp.hxx | 2 +- svx/source/dialog/hdft.cxx | 6 +++--- svx/source/form/dbtoolsclient.cxx | 2 +- svx/source/unodraw/unoshap2.cxx | 2 +- svx/source/unodraw/unoshap4.cxx | 2 +- svx/source/unodraw/unoshape.cxx | 2 +- svx/source/xoutdev/_xpoly.cxx | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) (limited to 'svx') 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(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(&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(&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(&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 - s_pFactoryCreationFunc = (createDataAccessToolsFactoryFunction)( + s_pFactoryCreationFunc = reinterpret_cast( 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 aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize()); + uno::Sequence aSeq(reinterpret_cast(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 aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize()); + uno::Sequence aSeq(reinterpret_cast(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(pPointAry); delete[] pFlagAry; if ( bDeleteOldPoints ) - delete[] (char*) pOldPointAry; + delete[] reinterpret_cast(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(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(pOldPointAry); else bDeleteOldPoints = true; delete[] pOldFlagAry; } -- cgit distro/mimo/mimo-7-0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author