diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-05 10:31:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-05 20:28:16 +0200 |
commit | 6792ed3b71c0c6d40dd2fc52ede64a84d897278f (patch) | |
tree | 0fb64494202e41bb4bceac686dcd15f15a3ca045 | |
parent | 816da33afa4b0dcafed301880c1a12279193b95d (diff) |
coverity#1438212 Unchecked dynamic_cast
Change-Id: I9c346fd09603d086542f7f3cb355c7e5acc3378e
Reviewed-on: https://gerrit.libreoffice.org/58609
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 568009959399..b2e720e9df42 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -4040,12 +4040,12 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pBLBox->GetSttNd(); pUnoCursor->Move(fnMoveForward, GoInNode); - SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); + SwUnoTableCursor& rCursor = dynamic_cast<SwUnoTableCursor&>(*pUnoCursor.get()); { // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(*pCursor); + UnoActionRemoveContext aRemoveContext(rCursor); } - pCursor->MakeBoxSels(); + rCursor.MakeBoxSels(); { // these braces are important UnoActionContext aAction(pFrameFormat->GetDoc()); pFrameFormat->GetDoc()->DeleteRow(*pUnoCursor); |