[Libreoffice-commits] core.git: 5 commits - cui/source svtools/source sw/inc sw/source

Caolán McNamara caolanm at redhat.com
Mon Mar 31 09:05:15 PDT 2014


 cui/source/dialogs/linkdlg.cxx     |    2 +-
 svtools/source/misc/embedhlp.cxx   |    2 +-
 sw/inc/crstate.hxx                 |    1 +
 sw/source/filter/html/htmlform.cxx |    2 ++
 sw/source/filter/html/htmlgrin.cxx |    4 ++++
 5 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 790efdf1f96289a0b0de06faf19a60cafdab846b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 31 17:02:05 2014 +0100

    coverity#708406 Uninitialized pointer field
    
    Change-Id: I446c1eb18d45ca9d70690a763bffe1cc144369b4

diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index 9094c40..3533c7b 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -181,6 +181,7 @@ struct SwCrsrMoveState
     {}
     SwCrsrMoveState( SwFillCrsrPos *pInitFill ) :
         pFill( pInitFill ),
+        p2Lines( NULL ),
         pSpecialPos( NULL ),
         eState( MV_SETONLYTEXT ),
         nCursorBidiLevel( 0 ),
commit 5199e11317f8595bac652ff2bc28c54453c6534d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 31 16:57:42 2014 +0100

    coverity#1130409 Missing break in switch
    
    Change-Id: Iad5076e7717703c7eaea90eeb9ca082aa33cccac

diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 7da9981..4a3f179 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -859,6 +859,7 @@ void SwHTMLParser::InsertBodyOptions()
 
             case HTML_O_SDONLOAD:
                 eScriptType2 = STARBASIC;
+                //fallthrough
             case HTML_O_ONLOAD:
                 aEvent = GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC );
                 bSetEvent = sal_True;
@@ -866,6 +867,7 @@ void SwHTMLParser::InsertBodyOptions()
 
             case HTML_O_SDONUNLOAD:
                 eScriptType2 = STARBASIC;
+                //fallthrough
             case HTML_O_ONUNLOAD:
                 aEvent = GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC );
                 bSetEvent = sal_True;
@@ -873,6 +875,7 @@ void SwHTMLParser::InsertBodyOptions()
 
             case HTML_O_SDONFOCUS:
                 eScriptType2 = STARBASIC;
+                //fallthrough
             case HTML_O_ONFOCUS:
                 aEvent = GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC );
                 bSetEvent = sal_True;
@@ -880,6 +883,7 @@ void SwHTMLParser::InsertBodyOptions()
 
             case HTML_O_SDONBLUR:
                 eScriptType2 = STARBASIC;
+                //fallthrough
             case HTML_O_ONBLUR:
                 aEvent = GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC );
                 bSetEvent = sal_True;
commit 1f4a6d5526afc856496f462915e6386f78c44143
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 31 16:56:17 2014 +0100

    coverity#1130391 Missing break in switch
    
    Change-Id: If6202788224b59de7bb6db7a17ab2061c1f6f771

diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 90b5dcd..d05fd33 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1337,6 +1337,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
 
         case HTML_O_SDONSUBMIT:
             eScriptType2 = STARBASIC;
+            //fallthrough
         case HTML_O_ONSUBMIT:
             nEvent = HTML_ET_ONSUBMITFORM;
             bSetEvent = sal_True;
@@ -1344,6 +1345,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
 
         case HTML_O_SDONRESET:
             eScriptType2 = STARBASIC;
+            //fallthrough
         case HTML_O_ONRESET:
             nEvent = HTML_ET_ONRESETFORM;
             bSetEvent = sal_True;
commit 1e68d390229d1e446d1b77b395a70fa636cf5373
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 31 16:54:34 2014 +0100

    coverity#982430 Division or modulo by zero
    
    Change-Id: I9764d4e122c4dbab2349499f30c17842e432dadc

diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index f9cf047..55b6e9f 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -664,7 +664,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
     Bitmap aBmp( SvtResId( BMP_PLUGIN ) );
     long nHeight = rRect.GetHeight() - pOut->GetTextHeight();
     long nWidth = rRect.GetWidth();
-    if( nHeight > 0 && aBmp.GetSizePixel().Width() > 0 )
+    if(nHeight > 0 && nWidth > 0 && aBmp.GetSizePixel().Width() > 0)
     {
         aPt.Y() = nHeight;
         Point   aP = rRect.TopLeft();
commit 058b5cac90051949388f136da74a515b212e7bac
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 31 16:49:37 2014 +0100

    coverity#704604 Explicit null dereferenced
    
    Change-Id: I400105321f7bed54d56bd7af4dfd14656293b5b9

diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 323354c..fa7ecfe 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -500,7 +500,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
             SourceName().SetText( aEmpty );
             TypeName().SetText( aEmpty );
         }
-        if( pLinkMgr->GetPersist() )
+        if( pLinkMgr && pLinkMgr->GetPersist() )
             pLinkMgr->GetPersist()->SetModified();
     }
     return 0;


More information about the Libreoffice-commits mailing list