diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-29 09:42:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-29 10:12:49 +0100 |
commit | 626fe1669f7062e04db60ce7757d1c7d32842b3a (patch) | |
tree | 4e2174055ca2ba67c392010177bf8a401ba730a1 | |
parent | fc5cd8b5e916dcf97ada18ea7e8458bfd820f0b9 (diff) |
redundant cast
Change-Id: Ib812a7cafabc4820946da67fb3f8896b6aad1461
-rw-r--r-- | connectivity/source/drivers/kab/KPreparedStatement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/macab/MacabPreparedStatement.cxx | 2 | ||||
-rw-r--r-- | extensions/source/bibliography/bibload.cxx | 2 | ||||
-rw-r--r-- | hwpfilter/source/hgzip.cxx | 8 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfilter.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 10 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 12 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptinanimations.cxx | 2 | ||||
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 17 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 4 | ||||
-rw-r--r-- | stoc/test/testintrosp.cxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 14 |
16 files changed, 42 insertions, 45 deletions
diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx index 7157ad2439c6..1d9853dfa5b6 100644 --- a/connectivity/source/drivers/kab/KPreparedStatement.cxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx @@ -39,7 +39,7 @@ void KabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQL m_aParameterRow = new OValueVector(); if (nParams < 1) - ::dbtools::throwInvalidIndexException(*(KabPreparedStatement *) this,Any()); + ::dbtools::throwInvalidIndexException(*this, Any()); if (nParams >= (sal_Int32) (m_aParameterRow->get()).size()) (m_aParameterRow->get()).resize(nParams); diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx index 2c6a96b363fb..600b3ce96927 100644 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx @@ -40,7 +40,7 @@ void MacabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(S m_aParameterRow = new OValueVector(); if (nParams < 1) - ::dbtools::throwInvalidIndexException(*(MacabPreparedStatement *) this,Any()); + ::dbtools::throwInvalidIndexException(*this, Any()); if (nParams >= (sal_Int32) (m_aParameterRow->get()).size()) (m_aParameterRow->get()).resize(nParams); diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index afa6cb083076..bee83d8f3869 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -449,7 +449,7 @@ Any BibliographyLoader::getByName(const OUString& rName) throw Any aRet; try { - BibDataManager* pDatMan = ((BibliographyLoader*)this)->GetDataManager(); + BibDataManager* pDatMan = GetDataManager(); Reference< XResultSet > xCursor = GetDataCursor(); Reference< sdbcx::XColumnsSupplier > xSupplyCols(xCursor, UNO_QUERY); Reference< XNameAccess > xColumns; diff --git a/hwpfilter/source/hgzip.cxx b/hwpfilter/source/hgzip.cxx index fa11f6f45dbd..c1eee1377a34 100644 --- a/hwpfilter/source/hgzip.cxx +++ b/hwpfilter/source/hgzip.cxx @@ -90,7 +90,7 @@ gz_stream *gz_open(HStream & _stream) errno = 0; s->_inputstream = &_stream; - return (gz_stream *) s; + return s; } @@ -156,7 +156,7 @@ local int destroy(gz_stream * s) int gz_read(gz_stream * file, voidp buf, unsigned len) { //printf("@@ gz_read : len : %d\t",len); - gz_stream *s = (gz_stream *) file; + gz_stream *s = file; Bytef *start = static_cast<Bytef *>(buf); /* starting point for crc computation */ Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ if (s == NULL) @@ -242,7 +242,7 @@ int gz_flush(gz_stream * file, int flush) { uInt len; bool done = false; - gz_stream *s = (gz_stream *) file; + gz_stream *s = file; if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; @@ -304,7 +304,7 @@ local uLong getLong(gz_stream * s) int gz_close(gz_stream * file) { // int err; - gz_stream *s = (gz_stream *) file; + gz_stream *s = file; if (s == NULL) return Z_STREAM_ERROR; diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index 9e66d7b480e2..8f93df0ce5cd 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -115,7 +115,7 @@ using namespace OpenStormBento; if (ulRet != BenErr_OK) return false; - boost::scoped_ptr<LtcUtBenValueStream> aWordProData((LtcUtBenValueStream *)pBentoContainer->FindValueStreamWithPropertyName("WordProData")); + boost::scoped_ptr<LtcUtBenValueStream> aWordProData(pBentoContainer->FindValueStreamWithPropertyName("WordProData")); if (!aWordProData.get()) return false; diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index f3034577b876..fcf678ec669f 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -672,7 +672,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) for (sal_uInt16 nSdPage=0; nSdPage < nMaxSdPages; nSdPage++) { - SdPage* pPage = (SdPage*) GetSdPage(nSdPage, PK_STANDARD); + SdPage* pPage = GetSdPage(nSdPage, PK_STANDARD); if (pPage && !pPage->GetFileName().isEmpty() && pPage->GetBookmarkName().getLength()) { diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 087010f3efba..68535643f64e 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1204,8 +1204,8 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl if (!pMaster) { - pMaster = (SdPage*) GetMasterSdPage( (sal_uInt16) nMPage, PK_STANDARD ); - pNotesMaster = (SdPage*) GetMasterSdPage( (sal_uInt16) nMPage, PK_NOTES ); + pMaster = GetMasterSdPage( (sal_uInt16) nMPage, PK_STANDARD ); + pNotesMaster = GetMasterSdPage( (sal_uInt16) nMPage, PK_NOTES ); } else { @@ -1235,7 +1235,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl bDeleteMaster = false; for (sal_uInt16 i = 0; i < GetMasterSdPageCount( PK_STANDARD ); i++) { - SdPage* pMPg = (SdPage*) GetMasterSdPage( i, PK_STANDARD ); + SdPage* pMPg = GetMasterSdPage( i, PK_STANDARD ); if( pMPg != pMaster && pMPg->GetLayoutName() == aLayoutName ) { @@ -1432,8 +1432,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, if (rLayoutName.isEmpty()) { // No LayoutName: take first MasterPage - pMaster = (SdPage*) pSourceDoc->GetMasterSdPage(0, PK_STANDARD); - pNotesMaster = (SdPage*) pSourceDoc->GetMasterSdPage(0, PK_NOTES); + pMaster = pSourceDoc->GetMasterSdPage(0, PK_STANDARD); + pNotesMaster = pSourceDoc->GetMasterSdPage(0, PK_NOTES); } else { diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index a8c3e90ef9a9..d5e15180799f 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -431,7 +431,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe void PortionObj::ImplClear() { - delete (FieldEntry*)mpFieldEntry; + delete mpFieldEntry; delete[] mpText; } diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 4f405760780e..09dacec14653 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -564,7 +564,7 @@ bool ImplSdPPTImport::Import() pPage->SetPageKind( ePgKind ); pSdrModel->InsertMasterPage( (SdrPage*)pPage ); if ( bNotesMaster && bStarDrawFiller ) - ((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_NOTES, true ); + pPage->SetAutoLayout( AUTOLAYOUT_NOTES, true ); if ( nMasterNum ) { boost::optional< sal_Int16 > oStartNumbering; @@ -818,7 +818,7 @@ bool ImplSdPPTImport::Import() } } rStCtrl.Seek( nFPosMerk ); - ImportPageEffect( (SdPage*)pMPage, bNewAnimationsUsed ); + ImportPageEffect( pMPage, bNewAnimationsUsed ); // background object pObj = pMPage->GetObj( 0 ); @@ -941,7 +941,7 @@ bool ImplSdPPTImport::Import() aHd.SeekToEndOfRecord( rStCtrl ); } - ImportPageEffect( (SdPage*)pPage, bNewAnimationsUsed ); + ImportPageEffect( pPage, bNewAnimationsUsed ); } // creating the corresponding note page @@ -1012,8 +1012,8 @@ bool ImplSdPPTImport::Import() } if ( pFoundMaster ) { - static_cast<SdPage*>(pPage)->TRG_SetMasterPage( *((SdPage*)pFoundMaster) ); - static_cast<SdPage*>(pPage)->SetLayoutName( ((SdPage*)pFoundMaster)->GetLayoutName() ); + static_cast<SdPage*>(pPage)->TRG_SetMasterPage( *pFoundMaster ); + static_cast<SdPage*>(pPage)->SetLayoutName( pFoundMaster->GetLayoutName() ); } static_cast<SdPage*>(pPage)->SetAutoLayout( AUTOLAYOUT_TITLE, true, true ); @@ -2604,7 +2604,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi // interactive object SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj, true); - ( (ImplSdPPTImport*) this )->FillSdAnimationInfo( pInfo, &aInteractiveInfoAtom, aMacroName ); + FillSdAnimationInfo( pInfo, &aInteractiveInfoAtom, aMacroName ); if ( aInteractiveInfoAtom.nAction == 6 ) // Sj -> media action { rHdClientData.SeekToContent( rStCtrl ); diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 35e28a1a1cf0..dc170bf23a1c 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -3010,7 +3010,7 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An case 2: // sound { - OUString aSoundURL( ((ImplSdPPTImport*)mpPPTImport)->ReadSound( nRefId ) ); + OUString aSoundURL( mpPPTImport->ReadSound( nRefId ) ); rTarget <<= aSoundURL; dump( " srcRef=\"%s\"", aSoundURL ); } diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 86b2a38dd535..49635c149a49 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -1224,9 +1224,8 @@ Sequence< Property > ImplIntrospectionAccess::getProperties(sal_Int32 PropertyCo nCount += mpStaticImpl->mnMethodPropCount; // Sequence entsprechend der geforderten Anzahl reallocieren - ImplIntrospectionAccess* pThis = (ImplIntrospectionAccess*)this; // const umgehen - pThis->maLastPropertySeq.realloc( nCount ); - Property* pDestProps = pThis->maLastPropertySeq.getArray(); + maLastPropertySeq.realloc( nCount ); + Property* pDestProps = maLastPropertySeq.getArray(); // Alle Properties durchgehen und entsprechend der Concepte uebernehmen Sequence<Property> aPropSeq = mpStaticImpl->getProperties(); @@ -1243,7 +1242,7 @@ Sequence< Property > ImplIntrospectionAccess::getProperties(sal_Int32 PropertyCo } // PropertyConcept merken, dies entspricht maLastPropertySeq - pThis->mnLastPropertyConcept = PropertyConcepts; + mnLastPropertyConcept = PropertyConcepts; // Zusammengebastelte Sequence liefern return maLastPropertySeq; @@ -1286,8 +1285,6 @@ sal_Bool ImplIntrospectionAccess::hasMethod(const OUString& Name, sal_Int32 Meth Sequence< Reference<XIdlMethod> > ImplIntrospectionAccess::getMethods(sal_Int32 MethodConcepts) throw( RuntimeException, std::exception ) { - ImplIntrospectionAccess* pThis = (ImplIntrospectionAccess*)this; // const umgehen - // Wenn alle unterstuetzten Konzepte gefordert werden, Sequence einfach durchreichen sal_Int32 nAllSupportedMask = MethodConcept::DANGEROUS | PROPERTY | @@ -1317,8 +1314,8 @@ Sequence< Reference<XIdlMethod> > ImplIntrospectionAccess::getMethods(sal_Int32 // Anders als bei den Properties kann die Anzahl nicht durch // Zaehler in inspect() vorher ermittelt werden, da Methoden // mehreren Konzepten angehoeren koennen - pThis->maLastMethodSeq.realloc( nLen ); - Reference<XIdlMethod>* pDestMethods = pThis->maLastMethodSeq.getArray(); + maLastMethodSeq.realloc( nLen ); + Reference<XIdlMethod>* pDestMethods = maLastMethodSeq.getArray(); // Alle Methods durchgehen und entsprechend der Concepte uebernehmen sal_Int32 iDest = 0; @@ -1330,10 +1327,10 @@ Sequence< Reference<XIdlMethod> > ImplIntrospectionAccess::getMethods(sal_Int32 } // Auf die richtige Laenge bringen - pThis->maLastMethodSeq.realloc( iDest ); + maLastMethodSeq.realloc( iDest ); // MethodConcept merken, dies entspricht maLastMethodSeq - pThis->mnLastMethodConcept = MethodConcepts; + mnLastMethodConcept = MethodConcepts; // Zusammengebastelte Sequence liefern return maLastMethodSeq; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 33a35578e0e1..733bdb9a92f3 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -1588,9 +1588,9 @@ Reference<XEnumeration > ORegistryServiceManager::createContentEnumeration( throw(css::uno::RuntimeException, std::exception) { check_undisposed(); - MutexGuard aGuard( ((ORegistryServiceManager *)this)->m_mutex ); + MutexGuard aGuard(m_mutex); // get all implementation names registered under this service name from the registry - Sequence<OUString> aImpls = ((ORegistryServiceManager *)this)->getFromServiceName( aServiceName ); + Sequence<OUString> aImpls = getFromServiceName( aServiceName ); // load and insert all factories specified by the registry sal_Int32 i; OUString aImplName; diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index 9e89f6987215..b8ae54460a8c 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -581,7 +581,7 @@ Any ImplIntroTest::getByName( const OUString& aName ) Any aRetAny; if( !pNameAccessTab ) - ((ImplIntroTest*)this)->pNameAccessTab = new Reference< XIntroTest >[ DEFAULT_NAME_ACCESS_COUNT ]; + pNameAccessTab = new Reference< XIntroTest >[ DEFAULT_NAME_ACCESS_COUNT ]; sal_Int32 iIndex = getIndexForName( aName ); if( iIndex != -1 ) @@ -634,7 +634,7 @@ Any ImplIntroTest::getByIndex( sal_Int32 Index ) Any aRetAny; if( !pIndexAccessTab ) - ((ImplIntroTest*)this)->pIndexAccessTab = new Reference< XIntroTest >[ iIndexAccessCount ]; + pIndexAccessTab = new Reference< XIntroTest >[ iIndexAccessCount ]; if( Index < iIndexAccessCount ) { diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index f978dcd2fbbe..078ebc92e67e 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1663,7 +1663,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect, if( pEntry->IsFocused() ) { - Rectangle aRect ( CalcFocusRect( (SvxIconChoiceCtrlEntry*)pEntry ) ); + Rectangle aRect ( CalcFocusRect( pEntry ) ); /*pView->*/ShowFocus( aRect ); DrawFocusRect( pOut ); } diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ca9266dc14bd..2085aaad4bac 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3101,7 +3101,7 @@ bool SwCrsrShell::SelectHiddenRange() bool bRet = false; if ( !GetViewOptions()->IsShowHiddenChar() && !m_pCurCrsr->HasMark() ) { - SwPosition& rPt = *(SwPosition*)m_pCurCrsr->GetPoint(); + SwPosition& rPt = *m_pCurCrsr->GetPoint(); const SwTxtNode* pNode = rPt.nNode.GetNode().GetTxtNode(); if ( pNode ) { diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 648c2cd3661b..324a3b3b082a 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -85,7 +85,7 @@ SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos, { pFrm = pFrmAtPos; pFrm->GetFormatted(); - pFrmAtPos = (SwTxtFrm*)pFrm->GetFrmAtPos( rPos ); + pFrmAtPos = pFrm->GetFrmAtPos( rPos ); } if( nOffset && bRightMargin ) @@ -148,7 +148,7 @@ SwTxtFrm& SwTxtFrm::GetFrmAtOfst( const sal_Int32 nWhere ) SwTxtFrm *SwTxtFrm::GetFrmAtPos( const SwPosition &rPos ) { - SwTxtFrm *pFoll = (SwTxtFrm*)this; + SwTxtFrm *pFoll = this; while( pFoll->GetFollow() ) { if( rPos.nContent.GetIndex() > pFoll->GetFollow()->GetOfst() ) @@ -572,7 +572,7 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, { SwTwips nDiff = rPoint.X() - Frm().Left() - Prt().Left(); if( nDiff > 50 || nDiff < 0 ) - ((SwCrsrMoveState*)pCMS)->bPosCorr = true; + pCMS->bPosCorr = true; } } else @@ -597,7 +597,7 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, sal_Int32 nOffset = aLine.GetCrsrOfst( pPos, rPoint, bChgFrm, pCMS ); if( pCMS && pCMS->eState == MV_NONE && aLine.GetEnd() == nOffset ) - ((SwCrsrMoveState*)pCMS)->eState = MV_RIGHTMARGIN; + pCMS->eState = MV_RIGHTMARGIN; // pPos is a pure IN parameter and must not be evaluated. // pIter->GetCrsrOfst returns from a nesting with COMPLETE_STRING. @@ -1041,10 +1041,10 @@ void SwTxtFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, if( IsEmpty() || IsHiddenNow() ) return; - ((SwTxtFrm*)this)->GetFormatted(); + GetFormatted(); - SwTxtSizeInfo aInf( (SwTxtFrm*)this ); - SwTxtCursor aLine( ((SwTxtFrm*)this), &aInf ); + SwTxtSizeInfo aInf(this); + SwTxtCursor aLine(this, &aInf); if( nPos ) aLine.CharCrsrToLine( nPos ); |