[Libreoffice-commits] core.git: 5 commits - basic/source include/vcl jvmfwk/plugins

Caolán McNamara caolanm at redhat.com
Fri Jan 24 07:40:27 PST 2014


 basic/source/basmgr/basmgr.cxx                      |    4 ++--
 basic/source/classes/sbxmod.cxx                     |    4 ++--
 include/vcl/builder.hxx                             |    4 ++++
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |    1 +
 4 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit ff1cc2ae942306939a5b520d300c8c08c49e9827
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 24 15:39:26 2014 +0000

    undef check to progress mac build
    
    Change-Id: Ia13df162916c115390b87b027e6f9a1dbb72b7d9

diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 2719aba..9424306 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -21,6 +21,10 @@
 #include <stack>
 #include <vector>
 #include <boost/noncopyable.hpp>
+#ifdef check
+#  //some problem with MacOSX and a check define
+#  undef check
+#endif
 #include <boost/ptr_container/ptr_map.hpp>
 
 #include <com/sun/star/frame/XFrame.hpp>
commit 7593b006dfea88f065e463194001783c0c8b46af
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 24 15:27:57 2014 +0000

    coverity#736909 Allocation too small for type
    
    Change-Id: I330ebdfd94d0c30b40e180e307d7543c09fd334b

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 522a652..1627f8e 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -395,7 +395,7 @@ SbMethodRef DocObjectWrapper::getMethod( const OUString& aName ) throw (RuntimeE
         sal_uInt16 nSaveFlgs = m_pMod->GetFlags();
         // Limit search to this module
         m_pMod->ResetFlag( SBX_GBLSEARCH );
-        pMethod = (SbMethod*) m_pMod->SbModule::Find( aName,  SbxCLASS_METHOD );
+        pMethod = dynamic_cast<SbMethod*>(m_pMod->SbModule::Find(aName,  SbxCLASS_METHOD));
         m_pMod->SetFlags( nSaveFlgs );
     }
 
commit 28793abda5bdb55bedb21213a9aa06efe095a931
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 24 15:26:47 2014 +0000

    coverity#736908 Allocation too small for type
    
    Change-Id: Ic41c5071957f5e95322971f8ec3ef864edecdb20

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 9f283d5..522a652 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -410,7 +410,7 @@ SbPropertyRef DocObjectWrapper::getProperty( const OUString& aName ) throw (Runt
         sal_uInt16 nSaveFlgs = m_pMod->GetFlags();
         // Limit search to this module.
         m_pMod->ResetFlag( SBX_GBLSEARCH );
-        pProperty = (SbProperty*)m_pMod->SbModule::Find( aName,  SbxCLASS_PROPERTY );
+        pProperty = dynamic_cast<SbProperty*>(m_pMod->SbModule::Find(aName,  SbxCLASS_PROPERTY));
         m_pMod->SetFlag( nSaveFlgs );
     }
 
commit fcf23e8a44f410e79149b9e7a649d42cc245026b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 24 15:22:55 2014 +0000

    coverity#706117 Allocation too small for type
    
    Change-Id: I1bb2bd26e533cf5b7de5225f0bcf323446e69f63

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index a797947..7a22f78 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -2074,8 +2074,8 @@ SbxObject* implCreateDialog( uno::Sequence< sal_Int8 > aData )
 {
     sal_Int8* pData = aData.getArray();
     SvMemoryStream aMemStream( pData, aData.getLength(), STREAM_READ );
-    SbxObject* pDialog = (SbxObject*)SbxBase::Load( aMemStream );
-    return pDialog;
+    SbxBase* pBase = SbxBase::Load( aMemStream );
+    return dynamic_cast<SbxObject*>(pBase);
 }
 
 // HACK! Because this value is defined in basctl/inc/vcsbxdef.hxx
commit def94cc40ef9a9b3498032e24c178a6c3c74262e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 24 15:09:41 2014 +0000

    coverity#705670 Resource leak
    
    Change-Id: Ib89a580127d91e9d7a23b998df3cd100246bf289

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 099ff83..8310d79 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -614,6 +614,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
         fprintf(stderr,"[Java framework]sunjavaplugin" SAL_DLLEXTENSION
                 "Java runtime library: %s does not export symbol %s !\n",
                 sLib.getStr(), sSymbol.getStr());
+        osl_unloadModule(moduleRt);
         return JFW_PLUGIN_E_VM_CREATION_FAILED;
     }
 


More information about the Libreoffice-commits mailing list