Kaydet (Commit) 23275bee authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#1213073-5 Unchecked dynamic cast

Change-Id: I166fdb236f5f70ae854d14b00860a6ef2b814b32
üst 15c3a08b
......@@ -723,10 +723,10 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
// cursor of the ring points to identical document positions. Then
// we should avoid double insertion of text portions...
while( nCursorCount > 1 && *pCurrCrsr->GetPoint() ==
*(dynamic_cast<SwPaM*>(pCurrCrsr->GetPrev())->GetPoint()) )
*(static_cast<SwPaM*>(pCurrCrsr->GetPrev())->GetPoint()) )
{
--nCursorCount;
pCurrCrsr = dynamic_cast<SwPaM*>(pCurrCrsr->GetNext());
pCurrCrsr = static_cast<SwPaM*>(pCurrCrsr->GetNext());
pStartCursor = pCurrCrsr;
}
SwPosition aStartPos( *pStartCursor->GetPoint() );
......@@ -758,7 +758,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
}
else // as long as we find more insert positions in the cursor ring
{ // we'll take them
pCurrCrsr = dynamic_cast<SwPaM*>(pCurrCrsr->GetNext());
pCurrCrsr = static_cast<SwPaM*>(pCurrCrsr->GetNext());
aInsertPos = *pCurrCrsr->GetPoint();
--nCursorCount;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment