[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Aug 5 18:28:38 UTC 2018


 sw/source/core/unocore/unotbl.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6792ed3b71c0c6d40dd2fc52ede64a84d897278f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Aug 5 10:31:57 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 5 20:28:16 2018 +0200

    coverity#1438212 Unchecked dynamic_cast
    
    Change-Id: I9c346fd09603d086542f7f3cb355c7e5acc3378e
    Reviewed-on: https://gerrit.libreoffice.org/58609
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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);


More information about the Libreoffice-commits mailing list