summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-05 10:30:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-05 20:27:42 +0200
commit1852e9c80677e32544fe5302e7d4a8ecbebb9a75 (patch)
tree7aafcc9cde433de67b6529edafbd3034355fe598 /sw
parent39f504dc888aeef8e52c65d3d4ac7d0639407a73 (diff)
coverity#1438219 Unchecked dynamic_cast
Change-Id: I83664684ac75d534b529438332d9aeee17e6dcf3 Reviewed-on: https://gerrit.libreoffice.org/58606 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unotbl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 37fe6c7b19d8..69d51138c319 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -4191,12 +4191,12 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
pUnoCursor->SetMark();
pUnoCursor->GetPoint()->nNode = *pTRBox->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()->DeleteCol(*pUnoCursor);