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 /sw | |
parent | fc5cd8b5e916dcf97ada18ea7e8458bfd820f0b9 (diff) |
redundant cast
Change-Id: Ib812a7cafabc4820946da67fb3f8896b6aad1461
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 14 |
2 files changed, 8 insertions, 8 deletions
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 ); |