[Libreoffice-commits] core.git: 3 commits - sd/source sfx2/source

Caolán McNamara caolanm at redhat.com
Tue Oct 14 05:42:45 PDT 2014


 sd/source/ui/docshell/docshel2.cxx |    3 +--
 sfx2/source/bastyp/sfxhtml.cxx     |    2 +-
 sfx2/source/menu/virtmenu.cxx      |    2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 2fff4927c4401f81b183883c94cb18d0b7806ca6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 14 13:12:02 2014 +0100

    coverity#1242426 Dereference after null check
    
    Change-Id: I59c96846aa5bf4780e4c5bfb0b71242e3b928976

diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 923e70b..0cf004b 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -296,8 +296,7 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName )
         {
             aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
 
-            if( mpViewShell )
-                aNameDlg->SetCheckNameHdl( LINK( this, DrawDocShell, RenameSlideHdl ) );
+            aNameDlg->SetCheckNameHdl( LINK( this, DrawDocShell, RenameSlideHdl ) );
 
             rtl::Reference<FuPoor> xFunc( mpViewShell->GetCurrentFunction() );
             if( xFunc.is() )
commit f9a90514dec3dfbf1aea74a9296513c830ec6481
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 14 13:08:41 2014 +0100

    coverity#1078471 Unchecked return value
    
    Change-Id: I2eb340eddf77ef5f007b5588e78d2b03bb5eb059

diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 0e036c9..8549e9b 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -332,7 +332,7 @@ double SfxHTMLParser::GetTableDataOptionsValNum( sal_uInt32& nNumForm,
     LanguageType eParseLang = (LanguageType )aNumStr.toInt32();
     sal_uInt32 nParseForm = rFormatter.GetFormatForLanguageIfBuiltIn( 0, eParseLang );
     double fVal;
-    rFormatter.IsNumberFormat( aValStr, nParseForm, fVal );
+    (void)rFormatter.IsNumberFormat(aValStr, nParseForm, fVal);
     if ( comphelper::string::getTokenCount(aNumStr, ';') > 2 )
     {
         eNumLang = (LanguageType)aNumStr.getToken( 1, ';' ).toInt32();
commit 4f7cb49f93a55215c48f9e98f293b08293b56036
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 14 13:07:11 2014 +0100

    coverity#735851 Dereference after null check
    
    Change-Id: I8f6e5803efe0db06d081903b9b852d1a1f881f7b

diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index bd81d69..e6e4d8f 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -901,7 +901,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
     {
         // Find the VirtualMenu for the SubMenu and if possible, bind a
         // VirtualMenu
-        bool bRet = Bind_Impl( pMenu );
+        bool bRet = pMenu ? Bind_Impl(pMenu) : false;
 #ifdef DBG_UTIL
         if ( !bRet)
             DBG_WARNING( "W1: Virtual menu could not be created!" );


More information about the Libreoffice-commits mailing list