From 80c2dfa225a3e082b0a7fdab95cfed3eef17d0c1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 11 May 2015 12:51:13 +0200 Subject: loplugin:cstylecast: nop between pointer types of exactly same spelling Change-Id: I0e42e757a6f7b0c28758193aad8b3cb01607b8b1 --- sw/source/core/access/accdoc.cxx | 2 +- sw/source/core/bastyp/swcache.cxx | 2 +- sw/source/core/crsr/callnk.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 2 +- sw/source/core/crsr/crstrvl.cxx | 4 ++-- sw/source/core/crsr/pam.cxx | 4 ++-- sw/source/core/crsr/swcrsr.cxx | 2 +- sw/source/core/doc/CntntIdxStore.cxx | 6 +++--- .../core/doc/DocumentContentOperationsManager.cxx | 8 ++++---- sw/source/core/doc/doc.cxx | 6 +++--- sw/source/core/doc/docdraw.cxx | 2 +- sw/source/core/doc/docedt.cxx | 2 +- sw/source/core/doc/docfmt.cxx | 10 +++++----- sw/source/core/doc/doclay.cxx | 2 +- sw/source/core/doc/docsort.cxx | 6 +++--- sw/source/core/doc/doctxm.cxx | 22 +++++++++++----------- sw/source/core/doc/htmltbl.cxx | 2 +- sw/source/core/doc/number.cxx | 2 +- sw/source/core/doc/tblcpy.cxx | 4 ++-- sw/source/core/doc/tblrwcl.cxx | 8 ++++---- sw/source/core/doc/visiturl.cxx | 2 +- sw/source/core/docnode/ndsect.cxx | 2 +- sw/source/core/docnode/ndtbl.cxx | 6 +++--- sw/source/core/docnode/node.cxx | 2 +- sw/source/core/edit/eddel.cxx | 4 ++-- sw/source/core/fields/docufld.cxx | 2 +- sw/source/core/fields/reffld.cxx | 2 +- sw/source/core/fields/tblcalc.cxx | 2 +- sw/source/core/frmedt/fecopy.cxx | 4 ++-- sw/source/core/frmedt/fefly1.cxx | 4 ++-- sw/source/core/frmedt/feshview.cxx | 4 ++-- sw/source/core/frmedt/tblsel.cxx | 2 +- sw/source/core/layout/findfrm.cxx | 8 ++++---- sw/source/core/layout/flowfrm.cxx | 2 +- sw/source/core/layout/fly.cxx | 2 +- sw/source/core/layout/flycnt.cxx | 4 ++-- sw/source/core/layout/flyincnt.cxx | 2 +- sw/source/core/layout/flylay.cxx | 6 +++--- sw/source/core/layout/ftnfrm.cxx | 10 +++++----- sw/source/core/layout/layact.cxx | 2 +- sw/source/core/layout/sectfrm.cxx | 2 +- sw/source/core/layout/tabfrm.cxx | 14 +++++++------- sw/source/core/layout/trvlfrm.cxx | 10 +++++----- sw/source/core/ole/ndole.cxx | 2 +- sw/source/core/table/swtable.cxx | 2 +- sw/source/core/text/EnhancedPDFExportHelper.cxx | 4 ++-- sw/source/core/txtnode/atrfld.cxx | 2 +- sw/source/core/txtnode/txtatr2.cxx | 10 +++++----- sw/source/core/txtnode/txtedt.cxx | 2 +- sw/source/core/undo/undel.cxx | 2 +- sw/source/core/undo/undobj1.cxx | 4 ++-- sw/source/core/undo/undraw.cxx | 14 +++++++------- sw/source/core/undo/unredln.cxx | 4 ++-- sw/source/core/undo/unsect.cxx | 2 +- sw/source/core/undo/untbl.cxx | 8 ++++---- sw/source/core/undo/untblk.cxx | 4 ++-- sw/source/core/unocore/SwXTextDefaults.cxx | 2 +- sw/source/core/unocore/unofield.cxx | 2 +- sw/source/core/unocore/unoframe.cxx | 2 +- sw/source/core/unocore/unoobj2.cxx | 2 +- sw/source/core/unocore/unotbl.cxx | 2 +- sw/source/core/view/vdraw.cxx | 2 +- sw/source/filter/basflt/fltshell.cxx | 4 ++-- sw/source/filter/html/htmlatr.cxx | 6 +++--- sw/source/filter/html/htmltab.cxx | 4 ++-- sw/source/filter/ww8/wrtw8num.cxx | 2 +- sw/source/filter/ww8/wrtww8.cxx | 2 +- sw/source/filter/ww8/ww8par5.cxx | 2 +- sw/source/ui/config/optcomp.cxx | 2 +- sw/source/ui/table/tabledlg.cxx | 2 +- sw/source/uibase/app/docsh2.cxx | 2 +- sw/source/uibase/app/docstyle.cxx | 2 +- sw/source/uibase/dbui/dbtree.cxx | 2 +- sw/source/uibase/dochdl/gloshdl.cxx | 4 ++-- sw/source/uibase/docvw/edtwin.cxx | 2 +- sw/source/uibase/shells/frmsh.cxx | 4 ++-- sw/source/uibase/shells/textfld.cxx | 4 ++-- sw/source/uibase/uno/unotxdoc.cxx | 2 +- sw/source/uibase/utlui/glbltree.cxx | 6 +++--- sw/source/uibase/utlui/uitool.cxx | 2 +- 80 files changed, 161 insertions(+), 161 deletions(-) diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 765ce5fb654d..435a2474be5a 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -705,7 +705,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() pCurrPageCol = pCurrPageCol->GetUpper(); } - SwLayoutFrm* pParent = (SwLayoutFrm*)(pCurrPageCol->GetUpper()); + SwLayoutFrm* pParent = pCurrPageCol->GetUpper(); if(pParent!=NULL) { diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index aa0a4158b750..58e722b9fcf2 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -154,7 +154,7 @@ void SwCache::Flush( const sal_uInt8 ) else #endif { - pTmp = (SwCacheObj*)pObj; + pTmp = pObj; pObj = pTmp->GetNext(); aFreePositions.push_back( pTmp->GetCachePos() ); m_aCacheObjects[pTmp->GetCachePos()] = NULL; diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 1c1a095862b8..60ddc4601b03 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -236,7 +236,7 @@ long SwCallLink::getLayoutFrm( const SwRootFrm* pRoot, SwTxtNode& rNd, sal_Int32 if ( pFrm && !pFrm->IsHiddenNow() ) { if( pFrm->HasFollow() ) - while( 0 != ( pNext = (SwTxtFrm*)pFrm->GetFollow() ) && + while( 0 != ( pNext = pFrm->GetFollow() ) && nCntPos >= pNext->GetOfst() ) pFrm = pNext; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 98e3360c8515..4aa3dcd7bc2f 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -979,7 +979,7 @@ bool SwCrsrShell::ChgCurrPam( return false; // search in all selections for this position - SwShellCrsr* pCmp = (SwShellCrsr*)m_pCurCrsr; // keep the pointer on cursor + SwShellCrsr* pCmp = m_pCurCrsr; // keep the pointer on cursor do { if( pCmp && pCmp->HasMark() && *pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos ) diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 32ceba63ebbd..727c2194527c 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -789,7 +789,7 @@ bool SwCrsrShell::GotoFld( const SwFmtFld& rFld ) SwCursor* pCrsr = getShellCrsr( true ); SwCrsrSaveState aSaveState( *pCrsr ); - SwTxtNode* pTNd = (SwTxtNode*)rFld.GetTxtFld()->GetpTxtNode(); + SwTxtNode* pTNd = rFld.GetTxtFld()->GetpTxtNode(); pCrsr->GetPoint()->nNode = *pTNd; pCrsr->GetPoint()->nContent.Assign( pTNd, rFld.GetTxtFld()->GetStart() ); @@ -916,7 +916,7 @@ void SwCrsrShell::GotoOutline( sal_uInt16 nIdx ) SwCrsrSaveState aSaveState( *pCrsr ); const SwNodes& rNds = GetDoc()->GetNodes(); - SwTxtNode* pTxtNd = (SwTxtNode*)rNds.GetOutLineNds()[ nIdx ]->GetTxtNode(); + SwTxtNode* pTxtNd = rNds.GetOutLineNds()[ nIdx ]->GetTxtNode(); pCrsr->GetPoint()->nNode = *pTxtNd; pCrsr->GetPoint()->nContent.Assign( pTxtNd, 0 ); diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index d09e1f3a90ad..95794338782f 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -806,7 +806,7 @@ SwCntntNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove, pNd = 0; continue; } - *(SwPosition*)rPam.GetPoint() = aPos; + *rPam.GetPoint() = aPos; } else pNd = 0; // no valid node @@ -874,7 +874,7 @@ bool GoInDoc( SwPaM & rPam, SwMoveFn fnMove ) bool GoInSection( SwPaM & rPam, SwMoveFn fnMove ) { - (*fnMove->fnSections)( (SwPosition*)rPam.GetPoint() ); + (*fnMove->fnSections)( rPam.GetPoint() ); return true; } diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 0000eb965aa5..1df0894774ed 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -74,7 +74,7 @@ struct _PercentHdl } _PercentHdl( const SwPaM& rPam ) - : pDSh( (SwDocShell*)rPam.GetDoc()->GetDocShell() ) + : pDSh( rPam.GetDoc()->GetDocShell() ) { sal_uLong nStt, nEnd; if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode ) diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 79bf10cd1897..1f0260e1c1d0 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -162,7 +162,7 @@ namespace } virtual void Restore(SwNode& rNd, sal_Int32 nLen, sal_Int32 nCorrLen) SAL_OVERRIDE { - SwCntntNode* pCNd = (SwCntntNode*)rNd.GetCntntNode(); + SwCntntNode* pCNd = rNd.GetCntntNode(); SwDoc* pDoc = rNd.GetDoc(); updater_t aUpdater = LimitUpdater(pCNd, nLen, nCorrLen); RestoreBkmks(pDoc, aUpdater); @@ -296,9 +296,9 @@ void CntntIdxStoreImpl::RestoreRedlines(SwDoc* pDoc, updater_t& rUpdater) const SwRedlineTbl& rRedlTbl = pDoc->getIDocumentRedlineAccess().GetRedlineTbl(); for (const MarkEntry& aEntry : m_aRedlineEntries) { - SwPosition* const pPos = (SwPosition*)( aEntry.m_bOther + SwPosition* const pPos = aEntry.m_bOther ? rRedlTbl[ aEntry.m_nIdx ]->GetMark() - : rRedlTbl[ aEntry.m_nIdx ]->GetPoint()); + : rRedlTbl[ aEntry.m_nIdx ]->GetPoint(); rUpdater(*pPos, aEntry.m_nCntnt); } } diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 562b54ebb628..970d2bc790e1 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -3434,7 +3434,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( bool DocumentContentOperationsManager::lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs ) { ParaRstFmt* pPara = static_cast(pArgs); - SwTxtNode * pTxtNode = (SwTxtNode*)rpNd->GetTxtNode(); + SwTxtNode * pTxtNode = rpNd->GetTxtNode(); if( pTxtNode && pTxtNode->GetpSwpHints() ) { SwIndex aSt( pTxtNode, 0 ); @@ -3568,7 +3568,7 @@ bool DocumentContentOperationsManager::DeleteRangeImpl(SwPaM & rPam, const bool) bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam) { - SwPosition *pStt = (SwPosition*)rPam.Start(), *pEnd = (SwPosition*)rPam.End(); + SwPosition *pStt = rPam.Start(), *pEnd = rPam.End(); if( !rPam.HasMark() || *pStt >= *pEnd ) return false; @@ -3764,8 +3764,8 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() ); ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() ); - SwPosition *pStt = (SwPosition*)aDelPam.Start(), - *pEnd = (SwPosition*)aDelPam.End(); + SwPosition *pStt = aDelPam.Start(), + *pEnd = aDelPam.End(); OSL_ENSURE( pStt->nNode == pEnd->nNode || ( pStt->nNode.GetIndex() + 1 == pEnd->nNode.GetIndex() && !pEnd->nContent.GetIndex() ), diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 9c3e75f30cba..5eba0736f49b 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1092,7 +1092,7 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector* pNames ) const static bool lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs ) { - SwTxtNode *pTxtNode = (SwTxtNode*)rpNd->GetTxtNode(); + SwTxtNode *pTxtNode = rpNd->GetTxtNode(); bool bOnlyWrong = *static_cast(pArgs); if( pTxtNode ) { @@ -1120,7 +1120,7 @@ static bool lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs ) static bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* ) { - SwTxtNode *pTxtNode = (SwTxtNode*)rpNd->GetTxtNode(); + SwTxtNode *pTxtNode = rpNd->GetTxtNode(); if( pTxtNode ) { pTxtNode->SetSmartTagDirty( true ); @@ -1279,7 +1279,7 @@ bool SwDoc::RemoveInvisibleContent() for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() ) { if( pFmtFld->GetTxtFld() && - 0 != ( pTxtNd = (SwTxtNode*)pFmtFld->GetTxtFld()->GetpTxtNode() ) && + 0 != ( pTxtNd = pFmtFld->GetTxtFld()->GetpTxtNode() ) && pTxtNd->GetpSwpHints() && pTxtNd->HasHiddenParaField() && &pTxtNd->GetNodes() == &GetNodes() ) { diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index ff8190f2d89c..5324063eec6c 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -399,7 +399,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); if( pObj->ISA(SwVirtFlyDrawObj) ) { - SwFlyFrmFmt* pFrmFmt = (SwFlyFrmFmt*) + SwFlyFrmFmt* pFrmFmt = static_cast(pObj)->GetFlyFrm()->GetFmt(); if( pFrmFmt ) { diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 287c8d1ea1c4..a83eb030d0fd 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -750,7 +750,7 @@ static bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs ) } long nStat = nPageNr >= *pPageSt ? nPageNr - *pPageSt + 1 : nPageNr + *pPageCnt - *pPageSt + 1; - ::SetProgressState( nStat, (SwDocShell*)pNode->GetDoc()->GetDocShell() ); + ::SetProgressState( nStat, pNode->GetDoc()->GetDocShell() ); } pHyphArgs->SetRange( rpNd ); if( pNode->Hyphenate( *pHyphArgs ) ) diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 5e41a85c2998..4ba534cb4a0f 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -99,7 +99,7 @@ static void SetTxtFmtCollNext( SwTxtFmtColl* pTxtColl, const SwTxtFmtColl* pDel static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs ) { const sw::DocumentContentOperationsManager::ParaRstFmt* pPara = static_cast(pArgs); - SwCntntNode* pNode = (SwCntntNode*)rpNd->GetCntntNode(); + SwCntntNode* pNode = rpNd->GetCntntNode(); if( pNode && pNode->HasSwAttrSet() ) { const bool bLocked = pNode->IsModifyLocked(); @@ -1115,7 +1115,7 @@ SwFmt* SwDoc::CopyFmt( const SwFmt& rFmt, { // Does the Doc already contain the template? if( rFmtArr.GetFmt(n)->GetName()==rFmt.GetName() ) - return (SwFmt*)rFmtArr.GetFmt(n); + return rFmtArr.GetFmt(n); } // Search for the "parent" first @@ -1258,7 +1258,7 @@ void SwDoc::CopyFmtArr( const SwFmtsBase& rSourceArr, // 1st step: Create all formats (skip the 0th - it's the default one) for( size_t nSrc = rSourceArr.GetFmtCount(); nSrc > 1; ) { - pSrc = (SwFmt*)rSourceArr.GetFmt( --nSrc ); + pSrc = rSourceArr.GetFmt( --nSrc ); if( pSrc->IsDefault() || pSrc->IsAuto() ) continue; @@ -1275,7 +1275,7 @@ void SwDoc::CopyFmtArr( const SwFmtsBase& rSourceArr, // 2nd step: Copy all attributes, set the right parents for( size_t nSrc = rSourceArr.GetFmtCount(); nSrc > 1; ) { - pSrc = (SwFmt*)rSourceArr.GetFmt( --nSrc ); + pSrc = rSourceArr.GetFmt( --nSrc ); if( pSrc->IsDefault() || pSrc->IsAuto() ) continue; @@ -1606,7 +1606,7 @@ SwFmt* SwDoc::FindFmtByName( const SwFmtsBase& rFmtArr, // Does the Doc already contain the template? if( rFmtArr.GetFmt(n)->GetName() == rName ) { - pFnd = (SwFmt*)rFmtArr.GetFmt(n); + pFnd = rFmtArr.GetFmt(n); break; } } diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index c73ebca8a0c8..0d0ebe4ef1a1 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -402,7 +402,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet, // So that this FlyFrame is preserved. if( aRg.aEnd.GetNode().IsEndNode() ) GetNodes().MakeTxtNode( aRg.aStart, - (SwTxtFmtColl*)GetDfltTxtFmtColl() ); + GetDfltTxtFmtColl() ); getIDocumentContentOperations().MoveNodeRange( aRg, aPos.nNode, SwMoveFlags::DEFAULT ); } diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 3637d34ddc61..69ee652d16fd 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -622,7 +622,7 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, if( pS != pT ) { - SwFrmFmt* pTFmt = (SwFrmFmt*)pT->GetFrmFmt(); + SwFrmFmt* pTFmt = pT->GetFrmFmt(); const SfxItemSet* pSSet = rBox.GetItemSet( i, nS ); if( pSSet || @@ -666,7 +666,7 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, if( pS != pT ) { - SwFrmFmt* pTFmt = (SwFrmFmt*)pT->GetFrmFmt(); + SwFrmFmt* pTFmt = pT->GetFrmFmt(); const SfxItemSet* pSSet = rBox.GetItemSet( nS, i ); if( pSSet || @@ -708,7 +708,7 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar, // points to the first ContentNode if( pNd->StartOfSectionNode() == pSource->GetSttNd() ) pNd = pDoc->GetNodes().MakeTxtNode( aRg.aStart, - (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() ); + pDoc->GetDfltTxtFmtColl() ); aRg.aEnd = *pNd->EndOfSectionNode(); // If the Target is empty (there is one empty Node) diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index e26b20ff59f6..9a2cbbafb692 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -993,7 +993,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, sw::DefaultToxTabStopTokenHandler::TABSTOPS_RELATIVE_TO_INDENT : sw::DefaultToxTabStopTokenHandler::TABSTOPS_RELATIVE_TO_PAGE); sw::ToxTextGenerator ttgn(GetTOXForm(), tabStopTokenHandler); - ttgn.GenerateText((SwDoc*) GetFmt()->GetDoc(), aSortArr, nCnt, nRange); + ttgn.GenerateText(GetFmt()->GetDoc(), aSortArr, nCnt, nRange); nCnt += nRange - 1; } @@ -1038,7 +1038,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); OUString sLastDeli; SwTOXSortTabBases::size_type i = 0; while( i < aSortArr.size() ) @@ -1079,7 +1079,7 @@ void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl ) /// Evaluate Template SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( sal_uInt16 nLevel ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); const OUString& rName = GetTOXForm().GetTemplate( nLevel ); SwTxtFmtColl* pColl = !rName.isEmpty() ? pDoc->FindTxtFmtCollByName(rName) :0; if( !pColl ) @@ -1134,7 +1134,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl, if( !pType->HasWriterListeners() ) return; - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); TOXTypes eTOXTyp = GetTOXType()->GetType(); SwIterator aIter( *pType ); @@ -1202,7 +1202,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl, /// Generate table of contents from outline void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); SwNodes& rNds = pDoc->GetNodes(); const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds(); @@ -1227,7 +1227,7 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode ) /// Generate table of contents from template areas void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { const OUString sTmpStyleNames = GetStyleNames(i); @@ -1268,7 +1268,7 @@ void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode ) /// Generate content from sequence fields void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); SwFieldType* pSeqFld = pDoc->getIDocumentFieldsAccess().GetFldType(RES_SETEXPFLD, GetSequenceName(), false); if(!pSeqFld) return; @@ -1310,7 +1310,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode ) void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); SwFieldType* pAuthFld = pDoc->getIDocumentFieldsAccess().GetFldType(RES_AUTHORITY, OUString(), false); if(!pAuthFld) return; @@ -1396,7 +1396,7 @@ static long lcl_IsSOObject( const SvGlobalName& rFactoryNm ) void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType, const SwTxtNode* pOwnChapterNode ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); SwNodes& rNds = pDoc->GetNodes(); // on the 1st Node of the 1st Section sal_uLong nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 2, @@ -1496,7 +1496,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType, /// Collect table entries void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode ) { - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); SwNodes& rNds = pDoc->GetNodes(); const SwFrmFmts& rArr = *pDoc->GetTblFrmFmts(); @@ -1550,7 +1550,7 @@ void SwTOXBaseSection::UpdatePageNum() // Insert the current PageNumber into the TOC SwPageFrm* pAktPage = 0; sal_uInt16 nPage = 0; - SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); + SwDoc* pDoc = GetFmt()->GetDoc(); SwTOXInternational aIntl( GetLanguage(), TOX_INDEX == GetTOXType()->GetType() ? diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index cc43de1bcbae..1af15487b7d8 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -1733,7 +1733,7 @@ void SwHTMLTableLayout::_Resize( sal_uInt16 nAbsAvail, bool bRecalc ) if( bRecalc ) AutoLayoutPass1(); - SwRootFrm *pRoot = (SwRootFrm*)GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()->GetLayout(); + SwRootFrm *pRoot = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()->GetLayout(); if ( pRoot && pRoot->IsCallbackActionEnabled() ) pRoot->StartAllAction(); diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 8a01ce7cd0e6..085f5021a4bc 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -227,7 +227,7 @@ SwNumFmt::~SwNumFmt() void SwNumFmt::NotifyGraphicArrived() { if( GetCharFmt() ) - UpdateNumNodes( (SwDoc*)GetCharFmt()->GetDoc() ); + UpdateNumNodes( GetCharFmt()->GetDoc() ); } // #i22362# diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 8d0d7d70cbd8..f2adfb50213c 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -535,7 +535,7 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox, if( pRg.get() ) pCpyDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pRg, 0, aInsIdx, NULL, false ); else - pDoc->GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() ); + pDoc->GetNodes().MakeTxtNode( aInsIdx, pDoc->GetDfltTxtFmtColl() ); ++aSavePos; SwTableLine* pLine = pDstBox->GetUpper(); @@ -729,7 +729,7 @@ bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox, SwTableNode* pTblNd = pDoc->IsIdxInTbl( rSttBox ); // Find the Box, to which should be copied: - SwTableBox* pMyBox = (SwTableBox*)GetTblBox( + SwTableBox* pMyBox = GetTblBox( rSttBox.GetNode().FindTableBoxStartNode()->GetIndex() ); OSL_ENSURE( pMyBox, "Index is not in a Box in this Table" ); diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 420318f3e9c8..eee05b9d04a9 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -356,7 +356,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) else { aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]; - pBox->ChgFrmFmt( (SwTableBoxFmt*)aFindFrm.pNewFrmFmt ); + pBox->ChgFrmFmt( aFindFrm.pNewFrmFmt ); } } else @@ -1251,7 +1251,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) else { aFindFrm = aFrmArr[ nFndPos ]; - pSelBox->ChgFrmFmt( (SwTableBoxFmt*)aFindFrm.pNewFrmFmt ); + pSelBox->ChgFrmFmt( aFindFrm.pNewFrmFmt ); pLastBoxFmt = aLastBoxArr[ nFndPos ]; } @@ -1456,7 +1456,7 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara) if( pULPara->bUL_LR ) // UpperLower ? { sal_uInt16 nPos; - SwTableLine* pFndLn = (SwTableLine*)rFndLine.GetLine(); + SwTableLine* pFndLn = rFndLine.GetLine(); pLines = pFndLn->GetUpper() ? &pFndLn->GetUpper()->GetTabLines() : &pULPara->pTblNd->GetTable().GetTabLines(); @@ -1880,7 +1880,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) // Create an empty Box pCpyPara->pDoc->GetNodes().InsBoxen( pCpyPara->pTblNd, pCpyPara->pInsLine, aFindFrm.pNewFrmFmt, - (SwTxtFmtColl*)pCpyPara->pDoc->GetDfltTxtFmtColl(), + pCpyPara->pDoc->GetDfltTxtFmtColl(), 0, pCpyPara->nInsPos ); pBox = pCpyPara->pInsLine->GetTabBoxes()[ pCpyPara->nInsPos ]; if( bDummy ) diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx index 7dafb6b66afc..6f8ea5e8a177 100644 --- a/sw/source/core/doc/visiturl.cxx +++ b/sw/source/core/doc/visiturl.cxx @@ -116,7 +116,7 @@ bool SwDoc::IsVisitedURL( const OUString& rURL ) // We also want to be informed about status updates in the History if( !mpURLStateChgd ) { - SwDoc* pD = (SwDoc*)this; + SwDoc* pD = this; pD->mpURLStateChgd = new SwURLStateChanged( this ); } } diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 5f7b6df7aba1..71b418df1e48 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -885,7 +885,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, pCpyTNd->MakeFrms( *pTNd ); } else - new SwTxtNode( aInsPos, (SwTxtFmtColl*)GetDoc()->GetDfltTxtFmtColl() ); + new SwTxtNode( aInsPos, GetDoc()->GetDfltTxtFmtColl() ); } new SwEndNode( aInsPos, *pSectNd ); diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index fe562d5827cf..c9ebc129ace7 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -316,7 +316,7 @@ bool SwNodes::InsBoxen( SwTableNode* pTblNd, // Handle Outline numbering correctly! SwTxtNode* pTNd = new SwTxtNode( SwNodeIndex( *pSttNd->EndOfSectionNode() ), - (SwTxtFmtColl*)GetDoc()->GetDfltTxtFmtColl(), + GetDoc()->GetDfltTxtFmtColl(), pAutoAttr ); pTNd->ChgFmtColl( pTxtColl ); } @@ -2416,7 +2416,7 @@ void SwTableNode::MakeFrms( SwNodeIndex* pIdxBehind ) dynamic_cast(pNew->FindPrevCnt( true )) ); } } - ((SwTabFrm*)pNew)->RegistFlys(); + pNew->RegistFlys(); } } @@ -3393,7 +3393,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter, // Insert an EndNode and TableNode into the Nodes Array SwTableNode * pNewTblNd; { - SwEndNode* pOldTblEndNd = (SwEndNode*)pTNd->EndOfSectionNode()->GetEndNode(); + SwEndNode* pOldTblEndNd = pTNd->EndOfSectionNode()->GetEndNode(); OSL_ENSURE( pOldTblEndNd, "Where is the EndNode?" ); SwNodeIndex aIdx( *pBox->GetSttNd() ); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index ee96eb72e89a..15da2b39e005 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1344,7 +1344,7 @@ void SwCntntNode::DelFrms( bool bIsDisposeAccTable ) if( pFrm->IsFollow() ) { - SwCntntFrm* pMaster = (SwTxtFrm*)pFrm->FindMaster(); + SwCntntFrm* pMaster = pFrm->FindMaster(); pMaster->SetFollow( pFrm->GetFollow() ); } pFrm->SetFollow( 0 );//So it doesn't get funny ideas. diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 37d9b55910be..48c376f63b7b 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -167,7 +167,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) { // First cursor represents the target position!! rPaM.DeleteMark(); - pPos = (SwPosition*)rPaM.GetPoint(); + pPos = rPaM.GetPoint(); continue; } else @@ -215,7 +215,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) { // First cursor represents the target position!! rPaM.DeleteMark(); - pPos = (SwPosition*)rPaM.GetPoint(); + pPos = rPaM.GetPoint(); continue; } else diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 67d73562455f..75139a9753cc 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -2128,7 +2128,7 @@ void SwRefPageGetFieldType::UpdateField( SwTxtFld* pTxtFld, pGetFld->SetText( OUString() ); // then search the correct RefPageSet field - SwTxtNode* pTxtNode = (SwTxtNode*)&pTxtFld->GetTxtNode(); + SwTxtNode* pTxtNode = &pTxtFld->GetTxtNode(); if( pTxtNode->StartOfSectionIndex() > pDoc->GetNodes().GetEndOfExtras().GetIndex() ) { diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 4b99ae860dd8..6ea05f55a3cc 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -847,7 +847,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark, static_cast(pFmtFld->GetField())->GetSeqNumber() ) { SwTxtFld* pTxtFld = pFmtFld->GetTxtFld(); - pTxtNd = (SwTxtNode*)pTxtFld->GetpTxtNode(); + pTxtNd = pTxtFld->GetpTxtNode(); *pStt = pTxtFld->GetStart(); if( pEnd ) *pEnd = (*pStt) + 1; diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx index 29d878eab40b..b993fd84eabc 100644 --- a/sw/source/core/fields/tblcalc.cxx +++ b/sw/source/core/fields/tblcalc.cxx @@ -84,7 +84,7 @@ const SwNode* SwTblField::GetNodeOfFormula() const SwIterator aIter( *GetTyp() ); for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() ) if( this == pFmtFld->GetField() ) - return (SwTxtNode*)&pFmtFld->GetTxtFld()->GetTxtNode(); + return &pFmtFld->GetTxtFld()->GetTxtNode(); return 0; } diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 4618a3394370..5611070ea26e 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -97,7 +97,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) pClpDoc->GetNodes().Delete( aSttIdx, pClpDoc->GetNodes().GetEndOfContent().GetIndex() - aSttIdx.GetIndex() ); pTxtNd = pClpDoc->GetNodes().MakeTxtNode( aSttIdx, - (SwTxtFmtColl*)pClpDoc->GetDfltTxtFmtColl() ); + pClpDoc->GetDfltTxtFmtColl() ); --aSttIdx; } @@ -146,7 +146,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) // assure the "RootFmt" is the first element in Spz-Array // (if necessary Flys were copied in Flys) - SwFrmFmts& rSpzFrmFmts = *(SwFrmFmts*)pClpDoc->GetSpzFrmFmts(); + SwFrmFmts& rSpzFrmFmts = *pClpDoc->GetSpzFrmFmts(); if( rSpzFrmFmts[ 0 ] != pFlyFmt ) { SwFrmFmts::iterator it = std::find( rSpzFrmFmts.begin(), rSpzFrmFmts.end(), pFlyFmt ); diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 0636002c3eb3..a7b1c1f7b756 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1040,7 +1040,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) sw_ChkAndSetNewAnchor( *pFly, rSet ); - SwFlyFrmFmt* pFlyFmt = (SwFlyFrmFmt*)pFly->GetFmt(); + SwFlyFrmFmt* pFlyFmt = pFly->GetFmt(); if( GetDoc()->SetFlyFrmAttr( *pFlyFmt, rSet )) { @@ -1171,7 +1171,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, bool bKeepOrient, Point* pDocPos ) StartAllAction(); SET_CURR_SHELL( this ); - SwFlyFrmFmt* pFlyFmt = (SwFlyFrmFmt*)pFly->GetFmt(); + SwFlyFrmFmt* pFlyFmt = pFly->GetFmt(); const Point aPt( pFly->Frm().Pos() ); SfxItemSet* pSet = 0; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index cf8481b98a2e..00eee4f83788 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2597,14 +2597,14 @@ SwChainRet SwFEShell::Chain( SwFrmFmt &rSource, const Point &rPt ) StartAllAction(); SdrObject* pObj; SdrPageView* pPView; - SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView(); + SwDrawView *pDView = Imp()->GetDrawView(); const auto nOld = pDView->GetHitTolerancePixel(); pDView->SetHitTolerancePixel( 0 ); pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ); pDView->SetHitTolerancePixel( nOld ); SwFlyFrm *pFly = static_cast(pObj)->GetFlyFrm(); - SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)pFly->GetFmt(); + SwFlyFrmFmt *pFmt = pFly->GetFmt(); GetDoc()->Chain(rSource, *pFmt); EndAllAction(); SetChainMarker(); diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 95fe266a03bc..d5e742ad548b 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -860,7 +860,7 @@ static void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox, else pDoc->GetNodes().InsBoxen( pTblNd, pBox->GetUpper(), static_cast(pBox->GetFrmFmt()), - (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl(), 0, + pDoc->GetDfltTxtFmtColl(), 0, nInsPos, nCnt ); } diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index b69a258ba663..afd6b1293233 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -751,7 +751,7 @@ SwFrm *SwFrm::_FindNext() ) { pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() - : (SwFrm*)pNxtCnt; + : pNxtCnt; break; } pNxtCnt = lcl_NextFrm( pNxtCnt ); @@ -760,7 +760,7 @@ SwFrm *SwFrm::_FindNext() else if ( pThis->IsInFly() ) { pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() - : (SwFrm*)pNxtCnt; + : pNxtCnt; } else //footer-/or header section { @@ -775,7 +775,7 @@ SwFrm *SwFrm::_FindNext() if ( pCntUp == pUp ) { pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() - : (SwFrm*)pNxtCnt; + : pNxtCnt; } } } @@ -1531,7 +1531,7 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const if ( bIsInFirstLine ) { - SwTabFrm *pMaster = (SwTabFrm*)pTab->FindMaster(); + SwTabFrm *pMaster = pTab->FindMaster(); if ( pMaster && pMaster->HasFollowFlowLine() ) { SwRowFrm* pMasterRow = static_cast(pMaster->GetLastLower()); diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index a41bb67ae098..4af6708d16dc 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -2506,7 +2506,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) { // First page could get empty for example by disabling // a section - SwFrm::CheckPageDescs( (SwPageFrm*)pNewPage, false); + SwFrm::CheckPageDescs( pNewPage, false); } } } diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 3d00dcfc6ec7..c183d747d351 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -408,7 +408,7 @@ void SwFlyFrm::InitDrawObj( bool bNotify ) if ( !pContact ) { // #i52858# - method name changed - pContact = new SwFlyDrawContact( (SwFlyFrmFmt*)GetFmt(), + pContact = new SwFlyDrawContact( GetFmt(), pIDDMA->GetOrCreateDrawModel() ); } OSL_ENSURE( pContact, "InitDrawObj failed" ); diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index fd59530a5bfc..20ac174c1a3d 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -343,7 +343,7 @@ void SwFlyAtCntFrm::MakeAll() { bSetCompletePaintOnInvalidate = true; { - SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt(); + SwFlyFrmFmt *pFmt = GetFmt(); const SwFmtFrmSize &rFrmSz = GetFmt()->GetFrmSize(); if( rFrmSz.GetHeightPercent() != 0xFF && rFrmSz.GetHeightPercent() >= 100 ) @@ -1284,7 +1284,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) } } - SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt(); + SwFlyFrmFmt *pFmt = GetFmt(); if( bVert ) { diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 1d9c8ba264e1..7758b7af8117 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -153,7 +153,7 @@ void SwFlyInCntFrm::MakeObjPos() if ( !mbValidPos ) { mbValidPos = true; - SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt(); + SwFlyFrmFmt *pFmt = GetFmt(); const SwFmtVertOrient &rVert = pFmt->GetVertOrient(); //Update the current values in the format if needed, during this we of //course must not send any Modify. diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 61ce8bb49709..8e5dce7d6bdd 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -403,7 +403,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz ) static_cast(Lower())->GetNode()->GetOLENode() && ( bWidthClipped || bHeightClipped ) ) { - SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt(); + SwFlyFrmFmt *pFmt = GetFmt(); pFmt->LockModify(); SwFmtFrmSize aFrmSize( rSz ); aFrmSize.SetWidth( aFrmRect.Width() ); @@ -886,7 +886,7 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt ) else { OSL_ENSURE( pFmt, ":-( No Format given for Fly." ); - pFly = new SwFlyLayFrm( (SwFlyFrmFmt*)pFmt, this, this ); + pFly = new SwFlyLayFrm( pFmt, this, this ); AppendFly( pFly ); ::RegistFlys( this, pFly ); } @@ -1173,7 +1173,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) else { const SwDrawContact *pC = static_cast(GetUserCall(pSdrObj)); - const SwFrmFmt *pFmt = (const SwFrmFmt*)pC->GetFmt(); + const SwFrmFmt *pFmt = pC->GetFmt(); const SwFmtAnchor &rAnch = pFmt->GetAnchor(); if ( FLY_AS_CHAR == rAnch.GetAnchorId() ) { diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 197290ac2132..23f683ae53bf 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -495,7 +495,7 @@ void SwFtnFrm::Cut() SwLayoutFrm *pUp = GetUpper(); // correct chaining - SwFtnFrm *pFtn = (SwFtnFrm*)this; + SwFtnFrm *pFtn = this; if ( pFtn->GetFollow() ) pFtn->GetFollow()->SetMaster( pFtn->GetMaster() ); if ( pFtn->GetMaster() ) @@ -732,7 +732,7 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn ) } else { - pSect = (SwSectionFrm*)pSect->FindMaster(); + pSect = pSect->FindMaster(); if( !pSect || !pSect->Lower() ) return 0; OSL_ENSURE( pSect->Lower()->IsColumnFrm(), @@ -1586,7 +1586,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr ) continue; } } - pCnt = (SwCntntFrm*)pCnt->FindNextCnt(); + pCnt = pCnt->FindNextCnt(); } // #i49383# if ( !bOldFtnFrmLocked ) @@ -1667,7 +1667,7 @@ void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr, if( bPrep && pRef->IsFollow() ) { OSL_ENSURE( pRef->IsTxtFrm(), "NoTxtFrm has Footnote?" ); - SwTxtFrm* pMaster = (SwTxtFrm*)pRef->FindMaster(); + SwTxtFrm* pMaster = pRef->FindMaster(); if( !pMaster->IsLocked() ) pMaster->Prepare( PREP_FTN_GONE ); } @@ -2596,7 +2596,7 @@ bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss, { if ( static_cast(pStart)->HasFtn() ) static_cast(pNewChief)->CollectFtns( pStart, - (SwFtnBossFrm*)pOldBoss, *pFtnArr ); + pOldBoss, *pFtnArr ); pStart = pStart->GetNextCntntFrm(); } if( pFtnArr->empty() ) diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 732c67a3c855..e8010ae3aec9 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1618,7 +1618,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) SwLayoutFrm *pLow = static_cast(pTab->Lower()); while ( pLow ) { - bChanged |= FormatLayout( (SwLayoutFrm*)pLow, bAddRect ); + bChanged |= FormatLayout( pLow, bAddRect ); if ( IsAgain() ) return false; pLow = static_cast(pLow->GetNext()); diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 144973b9daf5..cb8ccff8a4a8 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -1632,7 +1632,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) pLayLeaf->FindFtnBossFrm( true ), false ); } } - ((SwFlowFrm*)pNxt)->MoveSubTree( pLayLeaf, pNew->GetNext() ); + pNxt->MoveSubTree( pLayLeaf, pNew->GetNext() ); } if( pNew->GetFollow() ) pNew->SimpleFormat(); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 79dc69071fa8..fe60fdad4316 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -434,7 +434,7 @@ static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine ) } else { - SwFrm *pTmp = ::SaveCntnt( (SwCellFrm*)pCurrSourceCell ); + SwFrm *pTmp = ::SaveCntnt( pCurrSourceCell ); if ( pTmp ) { // NEW TABLES @@ -640,7 +640,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, // Lock this tab frame and its follow bool bUnlockMaster = false; bool bUnlockFollow = false; - SwTabFrm* pMaster = rTab.IsFollow() ? (SwTabFrm*)rTab.FindMaster() : 0; + SwTabFrm* pMaster = rTab.IsFollow() ? rTab.FindMaster() : 0; if ( pMaster && !pMaster->IsJoinLocked() ) { bUnlockMaster = true; @@ -1696,7 +1696,7 @@ void SwTabFrm::MakeAll() if ( HasFollow() ) { - SwTabFrm* pFollowFrm = (SwTabFrm*)GetFollow(); + SwTabFrm* pFollowFrm = GetFollow(); OSL_ENSURE( !pFollowFrm->IsJoinLocked() || !pFollowFrm->IsRebuildLastLine(), "SwTabFrm::MakeAll for master while follow is in RebuildLastLine()" ); if ( pFollowFrm->IsJoinLocked() && pFollowFrm->IsRebuildLastLine() ) @@ -1929,7 +1929,7 @@ void SwTabFrm::MakeAll() SwFrm *pFrm = GetFirstNonHeadlineRow(); if( pFrm && n1StLineHeight >(pFrm->Frm().*fnRect->fnGetHeight )() ) { - SwTabFrm *pMaster = (SwTabFrm*)FindMaster(); + SwTabFrm *pMaster = FindMaster(); bool bDummy; if ( ShouldBwdMoved( pMaster->GetUpper(), false, bDummy ) ) pMaster->InvalidatePos(); @@ -2378,7 +2378,7 @@ void SwTabFrm::MakeAll() pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this ); pAttrs = pAccess->Get(); - ((SwTabFrm*)GetFollow())->SetLowersFormatted(false); + GetFollow()->SetLowersFormatted(false); // #i43913# - lock follow table // to avoid its formatting during the format of // its content. @@ -2420,7 +2420,7 @@ void SwTabFrm::MakeAll() --nStack; } else if ( GetFollow() == GetNext() ) - ((SwTabFrm*)GetFollow())->MoveFwd( true, false ); + GetFollow()->MoveFwd( true, false ); } continue; } @@ -5340,7 +5340,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const { const bool bOldJoinLock = IsJoinLocked(); const_cast(this)->LockJoin(); - const SwTwips nHeightOfFirstContentLine = lcl_CalcHeightOfFirstContentLine( *(SwRowFrm*)pFirstRow ); + const SwTwips nHeightOfFirstContentLine = lcl_CalcHeightOfFirstContentLine( *pFirstRow ); // Consider minimum row height: const SwFmtFrmSize &rSz = static_cast(pFirstRow)->GetFmt()->GetFrmSize(); diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index bc127de45b4b..076f215a3478 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -609,7 +609,7 @@ bool SwCntntFrm::LeftMargin(SwPaM *pPam) const if( &pPam->GetNode() != GetNode() ) return false; const_cast(GetNode())-> - MakeStartIndex((SwIndex *) &pPam->GetPoint()->nContent); + MakeStartIndex(&pPam->GetPoint()->nContent); return true; } @@ -618,7 +618,7 @@ bool SwCntntFrm::RightMargin(SwPaM *pPam, bool) const if( &pPam->GetNode() != GetNode() ) return false; const_cast(GetNode())-> - MakeEndIndex((SwIndex *) &pPam->GetPoint()->nContent); + MakeEndIndex(&pPam->GetPoint()->nContent); return true; } @@ -933,9 +933,9 @@ static bool lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart, SwCntntNode *pCNd = const_cast(pCnt->GetNode()); pPam->GetPoint()->nNode = *pCNd; if ( fnNxtPrv == lcl_GetPrvCnt ) - pCNd->MakeEndIndex( (SwIndex*)&pPam->GetPoint()->nContent ); + pCNd->MakeEndIndex( &pPam->GetPoint()->nContent ); else - pCNd->MakeStartIndex( (SwIndex*)&pPam->GetPoint()->nContent ); + pCNd->MakeStartIndex( &pPam->GetPoint()->nContent ); return true; } return false; @@ -1012,7 +1012,7 @@ sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum ) { SwCntntNode* pCNd = const_cast(pCntnt->GetNode()); pToSet->GetPoint()->nNode = *pCNd; - pCNd->MakeStartIndex( (SwIndex*)&pToSet->GetPoint()->nContent ); + pCNd->MakeStartIndex( &pToSet->GetPoint()->nContent ); pToSet->GetPoint()->nContent = static_cast(pCntnt)->GetOfst(); SwShellCrsr* pSCrsr = dynamic_cast(pToSet); diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 6ab016466875..649d0b74744a 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -443,7 +443,7 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const OUString()); SwOLENode* pOLENd = pDoc->GetNodes().MakeOLENode( rIdx, aNewName, GetAspect(), - (SwGrfFmtColl*)pDoc->GetDfltGrfFmtColl(), + pDoc->GetDfltGrfFmtColl(), const_cast(GetpSwAttrSet()) ); pOLENd->SetChartTblName( GetChartTblName() ); diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 685fcfa1be6e..48de8ac5eced 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -228,7 +228,7 @@ void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd, } else pDoc->GetNodes().InsBoxen( pTblNd, pLine, pBoxFrmFmt, - (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl(), 0, + pDoc->GetDfltTxtFmtColl(), 0, nInsPos, nCnt ); long nRowSpan = pBox->getRowSpan(); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 36d41f4a48b6..ab8f3cb7ad76 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1571,7 +1571,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { if( pFirst->GetTxtFld() && pFirst->IsFldInDoc() ) { - const SwTxtNode* pTNd = (SwTxtNode*)pFirst->GetTxtFld()->GetpTxtNode(); + const SwTxtNode* pTNd = pFirst->GetTxtFld()->GetpTxtNode(); OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" ); // 1. Check if the whole paragraph is hidden @@ -1822,7 +1822,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { if( pFirst->GetTxtFld() && pFirst->IsFldInDoc() ) { - const SwTxtNode* pTNd = (SwTxtNode*)pFirst->GetTxtFld()->GetpTxtNode(); + const SwTxtNode* pTNd = pFirst->GetTxtFld()->GetpTxtNode(); OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" ); // 1. Check if the whole paragraph is hidden diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 018b448b6d55..2fb6b160b58a 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -245,7 +245,7 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) if( pNew && pNew->Which() == RES_OBJECTDYING ) return; - SwTxtNode* pTxtNd = (SwTxtNode*)&mpTxtFld->GetTxtNode(); + SwTxtNode* pTxtNd = &mpTxtFld->GetTxtNode(); OSL_ENSURE( pTxtNd, "wo ist denn mein Node?" ); if( pNew ) { diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index 7af7b015a9aa..923da67a3baf 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -145,17 +145,17 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt() if ( bResetMod ) { aOle2Lnk = pDoc->GetOle2Link(); - ( (SwDoc*) pDoc )->SetOle2Link( Link<>() ); + pDoc->SetOle2Link( Link<>() ); } pRet = IsPoolUserFmt( nId ) - ? ( (SwDoc*) pDoc )->FindCharFmtByName( rStr ) - : ( (SwDoc*) pDoc )->getIDocumentStylePoolAccess().GetCharFmtFromPool( nId ); + ? pDoc->FindCharFmtByName( rStr ) + : pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( nId ); if ( bResetMod ) { - ( (SwDoc*) pDoc )->getIDocumentState().ResetModified(); - ( (SwDoc*) pDoc )->SetOle2Link( aOle2Lnk ); + pDoc->getIDocumentState().ResetModified(); + pDoc->SetOle2Link( aOle2Lnk ); } } diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index ba0e2adf9818..9c8ea97f932c 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1615,7 +1615,7 @@ bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf ) pFrm->SetCompletePaint(); return true; } - pFrm = (SwTxtFrm*)(pFrm->GetFollow()); + pFrm = pFrm->GetFollow(); if( pFrm ) { rHyphInf.nEnd = rHyphInf.nEnd - (pFrm->GetOfst() - rHyphInf.nStart); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 51999e7518a0..e03897beeb13 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -762,7 +762,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) if( pInsNd->IsTableNode() ) { pInsNd = pDoc->GetNodes().MakeTxtNode( aIdx, - (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() ); + pDoc->GetDfltTxtFmtColl() ); --aIdx; aPos.nNode = aIdx; aPos.nContent.Assign( pInsNd->GetCntntNode(), nSttCntnt ); diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index 8f22cc711af2..fc6829207705 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -60,7 +60,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrm) SwDoc *const pDoc = & rContext.GetDoc(); // add again into array - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pDoc->GetSpzFrmFmts(); rFlyFmts.push_back( pFrmFmt ); // OD 26.06.2003 #108784# - insert 'master' drawing object into drawing page @@ -219,7 +219,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) pFrmFmt->ResetFmtAttr( RES_ANCHOR ); // delete anchor // delete from array - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pDoc->GetSpzFrmFmts(); rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFrmFmt )); } diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx index 3be72dd8d6b2..ecbfd4fb128f 100644 --- a/sw/source/core/undo/undraw.cxx +++ b/sw/source/core/undo/undraw.cxx @@ -226,7 +226,7 @@ void SwUndoDrawGroup::UndoImpl(::sw::UndoRedoContext &) // remove from array SwDoc* pDoc = pFmt->GetDoc(); - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pDoc->GetSpzFrmFmts(); rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt )); for( sal_uInt16 n = 1; n < nSize; ++n ) @@ -258,7 +258,7 @@ void SwUndoDrawGroup::RedoImpl(::sw::UndoRedoContext &) // remove from array SwDoc* pDoc = pObjArr->pFmt->GetDoc(); - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pDoc->GetSpzFrmFmts(); for( sal_uInt16 n = 1; n < nSize; ++n ) { @@ -309,7 +309,7 @@ void SwUndoDrawGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt, SdrObject* pO ::lcl_SendRemoveToUno( *pFmt ); // remove from array - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pFmt->GetDoc()->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pFmt->GetDoc()->GetSpzFrmFmts(); rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt )); } @@ -341,7 +341,7 @@ SwUndoDrawUnGroup::SwUndoDrawUnGroup( SdrObjGroup* pObj ) ::lcl_SendRemoveToUno( *pFmt ); // remove from array - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pFmt->GetDoc()->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pFmt->GetDoc()->GetSpzFrmFmts(); rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt )); } @@ -364,7 +364,7 @@ void SwUndoDrawUnGroup::UndoImpl(::sw::UndoRedoContext & rContext) bDelFmt = true; SwDoc *const pDoc = & rContext.GetDoc(); - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pDoc->GetSpzFrmFmts(); // remove from array for( sal_uInt16 n = 1; n < nSize; ++n ) @@ -416,7 +416,7 @@ void SwUndoDrawUnGroup::RedoImpl(::sw::UndoRedoContext &) // remove from array SwDoc* pDoc = pFmt->GetDoc(); - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pDoc->GetSpzFrmFmts(); rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt )); for( sal_uInt16 n = 1; n < nSize; ++n ) @@ -573,7 +573,7 @@ void SwUndoDrawDelete::AddObj( sal_uInt16 , SwDrawFrmFmt* pFmt, // remove from array SwDoc* pDoc = pFmt->GetDoc(); - SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts(); + SwFrmFmts& rFlyFmts = *pDoc->GetSpzFrmFmts(); rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt )); pMarkLst->InsertEntry( rMark ); diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index 02519240d4be..016ad41580db 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -355,7 +355,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns ) : SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( 0 ), pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ), bInsert( bIns ) { - SwDoc* pDoc = (SwDoc*)rRg.GetDoc(); + SwDoc* pDoc = rRg.GetDoc(); if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { RedlineType_t eTyp = bInsert ? nsRedlineType_t::REDLINE_INSERT : nsRedlineType_t::REDLINE_DELETE; @@ -370,7 +370,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwRangeRedline& rRedl ) // for MergeDoc the corresponding inverse is needed bInsert( nsRedlineType_t::REDLINE_DELETE == rRedl.GetType() ) { - SwDoc* pDoc = (SwDoc*)rRedl.GetDoc(); + SwDoc* pDoc = rRedl.GetDoc(); if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { pRedlData = new SwRedlineData( rRedl.GetRedlineData() ); diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 4fbf9f497843..c78d02a3ad28 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -76,7 +76,7 @@ SwUndoInsSection::SwUndoInsSection( , m_bSplitAtEnd(false) , m_bUpdateFtn(false) { - SwDoc& rDoc = *(SwDoc*)rPam.GetDoc(); + SwDoc& rDoc = *rPam.GetDoc(); if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) { m_pRedlData.reset(new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 160b169107b8..abbd5bdac6af 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -306,7 +306,7 @@ void SwUndoInsTbl::RedoImpl(::sw::UndoRedoContext & rContext) nAdjust, pAutoFmt, pColWidth ); ((SwFrmFmt*)pTbl->GetFrmFmt())->SetName( sTblNm ); - SwTableNode* pTblNode = (SwTableNode*)rDoc.GetNodes()[nSttNode]->GetTableNode(); + SwTableNode* pTblNode = rDoc.GetNodes()[nSttNode]->GetTableNode(); if( pDDEFldType ) { @@ -2439,7 +2439,7 @@ void SwUndoTblCpyTbl::UndoImpl(::sw::UndoRedoContext & rContext) SwTableBox& rBox = *pTblNd->GetTable().GetTblBox( nSttPos ); SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); - rDoc.GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() ); + rDoc.GetNodes().MakeTxtNode( aInsIdx, rDoc.GetDfltTxtFmtColl() ); // b62341295: Redline for copying tables const SwNode *pEndNode = rBox.GetSttNd()->EndOfSectionNode(); @@ -2592,7 +2592,7 @@ void SwUndoTblCpyTbl::RedoImpl(::sw::UndoRedoContext & rContext) SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); // b62341295: Redline for copying tables - Start. - rDoc.GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() ); + rDoc.GetNodes().MakeTxtNode( aInsIdx, rDoc.GetDfltTxtFmtColl() ); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode()); SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, true ); if( pEntry->pUndo ) @@ -2667,7 +2667,7 @@ void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, bool bDelCntnt ) if( bDelCntnt ) { SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); - pDoc->GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() ); + pDoc->GetNodes().MakeTxtNode( aInsIdx, pDoc->GetDfltTxtFmtColl() ); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() ); if( !pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index 126e2eb390ba..01457c71ab30 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -38,7 +38,7 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam ) bSttWasTxtNd( true ), nNdDiff( 0 ), nSetPos( 0 ) { pHistory = new SwHistory; - SwDoc* pDoc = (SwDoc*)rPam.GetDoc(); + SwDoc* pDoc = rPam.GetDoc(); SwTxtNode* pTxtNd = rPam.GetPoint()->nNode.GetNode().GetTxtNode(); if( pTxtNd ) @@ -103,7 +103,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys, if( bScanFlys && !nSttCntnt ) { // than collect all new Flys - SwDoc* pDoc = (SwDoc*)rPam.GetDoc(); + SwDoc* pDoc = rPam.GetDoc(); const size_t nArrLen = pDoc->GetSpzFrmFmts()->size(); for( size_t n = 0; n < nArrLen; ++n ) { diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index b43ef0172b62..e3c479f0032d 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -93,7 +93,7 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName, SwFmtCharFmt *pCharFmt = 0; if(pStyle) { - rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pStyle ) ); + rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *pStyle ) ); if (RES_PARATR_DROP == pMap->nWID) { pDrop = static_cast(rItem.Clone()); // because rItem is const... diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index f4056a03af99..23760adf7b3a 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1343,7 +1343,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); } - SwDoc* pDoc = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? (SwDoc*)pCursor->GetDoc() : 0; + SwDoc* pDoc = pRange ? pRange->GetDoc() : pCursor ? pCursor->GetDoc() : 0; // if a FieldMaster was attached, then the document is already fixed! // NOTE: sw.SwXAutoTextEntry unoapi test depends on m_pDoc = 0 being valid if (!pDoc || (m_pImpl->m_pDoc && m_pImpl->m_pDoc != pDoc)) diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index db5f34caf150..2876c8967e9b 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2690,7 +2690,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); } - SwDoc* pDoc = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? (SwDoc*)pCursor->GetDoc() : 0; + SwDoc* pDoc = pRange ? pRange->GetDoc() : pCursor ? pCursor->GetDoc() : 0; if(pDoc) { SwUnoInternalPaM aIntPam(*pDoc); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 18cb6a5deb66..e2cc2e39ab3f 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -291,7 +291,7 @@ void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem case RES_REMOVE_UNO_OBJECT: case RES_OBJECTDYING: if( (void*)pClient->GetRegisteredIn() == static_cast(pOld)->pObject ) - ((SwModify*)pClient->GetRegisteredIn())->Remove(pClient); + pClient->GetRegisteredIn()->Remove(pClient); break; case RES_FMT_CHG: diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 7218baee46e2..7c80f567c717 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3065,7 +3065,7 @@ void SwXTextTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) { if(pOld && pOld->Which() == RES_REMOVE_UNO_OBJECT && (void*)GetRegisteredIn() == static_cast(pOld)->pObject ) - ((SwModify*)GetRegisteredIn())->Remove(this); + GetRegisteredIn()->Remove(this); else ClientModify(this, pOld, pNew); if(!GetRegisteredIn()) diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index 9d808613653a..c9bf7159e5cd 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -213,7 +213,7 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) if( !pObj->ISA(SwVirtFlyDrawObj) ) { // Objects not anchored to the frame, do not need to be adjusted - const SwContact *pCont = (SwContact*)GetUserCall(pObj); + const SwContact *pCont = GetUserCall(pObj); // this function might be called by the InsertDocument, when // a PageDesc-Attribute is set on a node. Then the SdrObject // must not have an UserCall. diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index c98211ef32c3..96d2422a5060 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -722,7 +722,7 @@ SfxPoolItem* SwFltControlStack::GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * { if (pPos) *pPos = nSize; - return (SfxPoolItem*)rEntry.pAttr; // Ok, so stop + return rEntry.pAttr; // Ok, so stop } } return 0; @@ -739,7 +739,7 @@ const SfxPoolItem* SwFltControlStack::GetOpenStackAttr(const SwPosition& rPos, s SwFltStackEntry &rEntry = maEntries[--nSize]; if (rEntry.bOpen && rEntry.pAttr->Which() == nWhich && rEntry.m_aMkPos == aFltPos) { - return (SfxPoolItem*)rEntry.pAttr; + return rEntry.pAttr; } } return 0; diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index f85ae7fa776f..5eb03147a750 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -537,7 +537,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, false ); rHWrt.aTxtCollInfos.insert( pFmtInfo ); if( rHWrt.aScriptParaStyles.count( rFmt.GetName() ) ) - ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = true; + pFmtInfo->bScriptDependent = true; } // Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist @@ -1627,7 +1627,7 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt, bOutStyles ); rFmtInfos.insert( pFmtInfo ); if ( rScriptTxtStyles.count( rFmt.GetName() ) ) - ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = true; + pFmtInfo->bScriptDependent = true; } return pFmtInfo; @@ -1905,7 +1905,7 @@ void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet, void HTMLEndPosLst::Insert( const SwDrawFrmFmt& rFmt, sal_Int32 nPos, SwHTMLFmtInfos& rFmtInfos ) { - const SdrObject* pTextObj = (const SdrObject*) SwHTMLWriter::GetMarqueeTextObj( rFmt ); + const SdrObject* pTextObj = SwHTMLWriter::GetMarqueeTextObj( rFmt ); if( pTextObj ) { diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 050fd7f7a720..cc1ac7fa435a 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2536,8 +2536,8 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, } else { - pLineFmt = (SwTableLineFmt*)pTopTable->pLineFmt; - pBoxFmt = (SwTableBoxFmt*)pTopTable->pBoxFmt; + pLineFmt = pTopTable->pLineFmt; + pBoxFmt = pTopTable->pBoxFmt; } // ggf. muessen fuer Tabellen in Tabellen "Filler"-Zellen eingefuegt diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index bc14531c74f7..b1b9c36e16ef 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -618,7 +618,7 @@ void WW8Export::OutputOlst( const SwNumRule& rRule ) WW8_OLST aOlst; memset( &aOlst, 0, sizeof(aOlst) ); sal_uInt8* pC = aOlst.rgch; - sal_uInt8* pChars = (sal_uInt8*)pC; + sal_uInt8* pChars = pC; sal_uInt16 nCharLen = 64; for (sal_uInt16 j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 129beb314f27..09184f03cd10 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1128,7 +1128,7 @@ bool WW8_WrFkp::Combine() memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize ); delete[] pOfs; pOfs = 0; - ((sal_uInt8*)pFkp)[511] = nIMax; + pFkp[511] = nIMax; bCombined = true; #if defined OSL_BIGENDIAN // only the FCs will be rotated here diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 1192fd434343..a01a99e8ba0b 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -3323,7 +3323,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) SwPaM aRegion(*m_pPaM, m_pPaM); OSL_ENSURE(SwDoc::GetCurTOX(*aRegion.GetPoint()), "Misunderstood how toc works"); - if (SwTOXBase* pBase2 = (SwTOXBase*)SwDoc::GetCurTOX(*aRegion.GetPoint())) + if (SwTOXBase* pBase2 = SwDoc::GetCurTOX(*aRegion.GetPoint())) { pBase2->SetMSTOCExpression(rStr); diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index f60ab8839d86..d479d583b2fa 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -311,7 +311,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl) { const sal_Int32 nPos = m_pFormattingLB->GetSelectEntryPos(); - sal_uLong nOptions = reinterpret_cast((void*)m_pFormattingLB->GetEntryData( nPos )); + sal_uLong nOptions = reinterpret_cast(m_pFormattingLB->GetEntryData( nPos )); SetCurrentOptions( nOptions ); return 0; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index f96ccb5cca0e..30f5dd4e76e9 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1458,7 +1458,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet ) aBreak.SetValue( SVX_BREAK_NONE ); } - if ( !pBreak || !( *(const SvxFmtBreakItem*)pBreak == aBreak ) ) + if ( !pBreak || !( *pBreak == aBreak ) ) { bModified |= 0 != rSet->Put( aBreak ); } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index cddd9ae40565..9b0f6cf242c7 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -161,7 +161,7 @@ void SwDocShell::ToggleBrowserMode(bool bSet, SwView* _pView ) { GetDoc()->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bSet ); UpdateFontList(); - SwView* pTempView = _pView ? _pView : (SwView*)GetView(); + SwView* pTempView = _pView ? _pView : GetView(); if( pTempView ) { pTempView->GetViewFrame()->GetBindings().Invalidate(FN_SHADOWCURSOR); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 2f5802cb1dc4..d3ac73ff47ac 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -128,7 +128,7 @@ static SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, RES_POOLCOLL_TEXT_BEGIN ] ) { // Standard-Character template - pFmt = (SwCharFmt*)rDoc.GetDfltCharFmt(); + pFmt = rDoc.GetDfltCharFmt(); } if( !pFmt && bCreate ) diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index caa9df67cd97..2d893cb32aaa 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -261,7 +261,7 @@ void SwDBTreeList::ShowColumns(bool bShowCol) while (pEntry) { - pEntry = (SvTreeListEntry*)GetRootLevelParent( pEntry ); + pEntry = GetRootLevelParent( pEntry ); Collapse(pEntry); // zuklappen SvTreeListEntry* pChild; diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 42eb6f06a634..be9179a6fc34 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -437,7 +437,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, if(1 == aFoundArr.size()) { TextBlockInfo_Impl* pData = &aFoundArr.front(); - pGlossary = (SwTextBlocks *)pGlossaries->GetGroupDoc(pData->sGroupName); + pGlossary = pGlossaries->GetGroupDoc(pData->sGroupName); nFound = pGlossary->GetIndex( aShortName ); } else @@ -460,7 +460,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, if(LISTBOX_ENTRY_NOTFOUND != nRet) { TextBlockInfo_Impl* pData = &aFoundArr[nRet]; - pGlossary = (SwTextBlocks *)pGlossaries->GetGroupDoc(pData->sGroupName); + pGlossary = pGlossaries->GetGroupDoc(pData->sGroupName); nFound = pGlossary->GetIndex( aShortName ); } else diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 663395e6c63d..ed45693a154c 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1340,7 +1340,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) rSh.ToggleHeaderFooterEdit(); } - SfxObjectShell *pObjSh = (SfxObjectShell*)m_rView.GetViewFrame()->GetObjectShell(); + SfxObjectShell *pObjSh = m_rView.GetViewFrame()->GetObjectShell(); if ( m_bLockInput || (pObjSh && pObjSh->GetProgress()) ) // When the progress bar is active or a progress is // running on a document, no order is being taken diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index a486f9dfbf4d..e78ef356e430 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -534,7 +534,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) const SwFmtChain &rChain = pCurrFlyFmt->GetChain(); //needs cast - no non-const method available SwFlyFrmFmt* pFlyFmt = - (SwFlyFrmFmt*)rChain.GetPrev(); + rChain.GetPrev(); if(pFlyFmt) { if (pFlyFmt->GetName() != sPrevName) @@ -568,7 +568,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) const SwFmtChain &rChain = pCurrFlyFmt->GetChain(); //needs cast - no non-const method available SwFlyFrmFmt* pFlyFmt = - (SwFlyFrmFmt*)rChain.GetNext(); + rChain.GetNext(); if(pFlyFmt) { if (pFlyFmt->GetName() != sNextName) diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 150325fa4eb2..835191450907 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -855,7 +855,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn ) { SwWrtShell* pSh = GetShellPtr(); - AbstractSvxPostItDialog *pDlg = (AbstractSvxPostItDialog*)pBtn; + AbstractSvxPostItDialog *pDlg = pBtn; // Insert or change a comment. pSh->SetRedlineComment(pDlg->GetNote()); @@ -905,7 +905,7 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn ) IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn ) { SwWrtShell* pSh = GetShellPtr(); - AbstractSvxPostItDialog *pDlg = (AbstractSvxPostItDialog*)pBtn; + AbstractSvxPostItDialog *pDlg = pBtn; // Insert or change a comment. pSh->SetRedlineComment(pDlg->GetNote()); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index c86e8d19a228..01a4cb4d01dc 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3913,7 +3913,7 @@ void SwXLinkNameAccessWrapper::removeVetoableChangeListener( Reference< XNameAccess > SwXLinkNameAccessWrapper::getLinks() throw( RuntimeException, std::exception ) { - return (SwXLinkNameAccessWrapper*)this; + return this; } OUString SwXLinkNameAccessWrapper::getImplementationName() throw( RuntimeException, std::exception ) diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index bf2b8fe79c55..f60f7fe4d345 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -197,7 +197,7 @@ void SwGlobalTree::dispose() sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) { sal_Int8 nRet = DND_ACTION_NONE; - SvTreeListEntry* pLast = (SvTreeListEntry*)LastVisible(); + SvTreeListEntry* pLast = LastVisible(); if(pEmphasisEntry) { ImplShowTargetEmphasis( Prev(pEmphasisEntry), false ); @@ -278,7 +278,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt ) //initiate scrolling GetDropTarget( rEvt.maPosPixel ); - SvTreeListEntry* pLast = (SvTreeListEntry*)LastVisible(); + SvTreeListEntry* pLast = LastVisible(); if( rEvt.mbLeaving ) { if( pEmphasisEntry ) @@ -1277,7 +1277,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen bool bMove = false; if ( !_pContent ) { - SvTreeListEntry* pLast = (SvTreeListEntry*)LastVisible(); + SvTreeListEntry* pLast = LastVisible(); _pContent = static_cast(pLast->GetUserData()); bMove = true; } diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 9a134a4efefd..d7b30ac76096 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -420,7 +420,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) pColl = rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool( nId ); else pColl = rDoc.MakeTxtFmtColl( rColl, - (SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() ); + rDoc.GetDfltTxtFmtColl() ); } if( pColl ) pColl->SetFmtAttr( SwRegisterItem ( true )); -- cgit