diff options
Diffstat (limited to 'sw/source/core/crsr')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/crsr/trvltbl.cxx | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index db3106707482..72269f071b84 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2881,9 +2881,8 @@ void SwCursorShell::ParkCursor( const SwNodeIndex &rIdx ) // take care of all shells for(SwViewShell& rTmp : GetRingContainer()) { - if( dynamic_cast<const SwCursorShell *>(&rTmp) != nullptr) + if( auto pSh = dynamic_cast<SwCursorShell *>(&rTmp)) { - SwCursorShell* pSh = static_cast<SwCursorShell*>(&rTmp); if (pSh->m_pStackCursor) pSh->ParkPams(pNew.get(), &pSh->m_pStackCursor); diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 835304a9e6c9..fb093622b51a 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -917,9 +917,9 @@ bool SwCursorShell::EndAllTableBoxEdit() bool bRet = false; for(SwViewShell& rSh : GetRingContainer()) { - if( dynamic_cast<const SwCursorShell *>(&rSh) != nullptr ) - bRet |= static_cast<SwCursorShell*>(&rSh)->CheckTableBoxContent( - static_cast<SwCursorShell*>(&rSh)->m_pCurrentCursor->GetPoint() ); + if( auto pCursorShell = dynamic_cast<SwCursorShell *>(&rSh) ) + bRet |= pCursorShell->CheckTableBoxContent( + pCursorShell->m_pCurrentCursor->GetPoint() ); } return bRet; |