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

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


 sw/source/core/unocore/unochart.cxx |    8 ++++----
 sw/source/core/unocore/unotbl.cxx   |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 1852e9c80677e32544fe5302e7d4a8ecbebb9a75
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Aug 5 10:30:30 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 5 20:27:42 2018 +0200

    coverity#1438219 Unchecked dynamic_cast
    
    Change-Id: I83664684ac75d534b529438332d9aeee17e6dcf3
    Reviewed-on: https://gerrit.libreoffice.org/58606
    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 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);
commit 39f504dc888aeef8e52c65d3d4ac7d0639407a73
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Aug 5 10:29:32 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 5 20:27:32 2018 +0200

    coverity#1438226 Unchecked dynamic_cast
    
    Change-Id: Ic00eae935f81cab692b614abee9d30992fc7b176
    Reviewed-on: https://gerrit.libreoffice.org/58605
    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/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 7858cf0d64be..614e675d432c 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -419,11 +419,11 @@ static void GetFormatAndCreateCursorFromRangeRep(
                 pUnoCursor->SetMark();
                 pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd();
                 pUnoCursor->Move( fnMoveForward, GoInNode );
-                SwUnoTableCursor* pCursor =
-                    dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get());
+                SwUnoTableCursor& rCursor =
+                    dynamic_cast<SwUnoTableCursor&>(*pUnoCursor.get());
                 // HACK: remove pending actions for old style tables
-                UnoActionRemoveContext aRemoveContext(*pCursor);
-                pCursor->MakeBoxSels();
+                UnoActionRemoveContext aRemoveContext(rCursor);
+                rCursor.MakeBoxSels();
                 rpUnoCursor = pUnoCursor;
             }
         }


More information about the Libreoffice-commits mailing list