[Libreoffice-commits] .: 2 commits - basic/inc basic/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Aug 5 09:02:27 PDT 2011


 basic/inc/basic/sbmod.hxx    |    6 ++----
 basic/inc/basic/sbobjmod.hxx |    5 -----
 basic/source/sbx/sbxdec.cxx  |    2 +-
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 3460e44348bc1c6ed392321431e9fdb04b26cd71
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 5 16:56:22 2011 +0100

    strange delete variant

diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index f786277..8415224 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -239,7 +239,7 @@ bool SbxDecimal::setString( ::rtl::OUString* pOUString )
             i++;
         }
         hResult = VarDecFromStr( (OLECHAR*)pBuffer, nLANGID, 0, &maDec );
-        delete pBuffer[];
+        delete [] pBuffer;
     }
     else
     {
commit c3ea4c410bbb384257845c425446f168b51ec1a9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 5 16:54:24 2011 +0100

    I believe the intent is to be non-copyable, so lets use boost on base-class

diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index 2d9b33d..31305d7 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -35,8 +35,8 @@
 #include <basic/sbxdef.hxx>
 #include <rtl/ustring.hxx>
 #include <vector>
-
 #include <deque>
+#include <boost/utility.hpp>
 #include "basicdllapi.h"
 
 class SbMethod;
@@ -53,7 +53,7 @@ struct ClassModuleRunInitItem;
 struct SbClassData;
 class SbModuleImpl;
 
-class BASIC_DLLPUBLIC SbModule : public SbxObject
+class BASIC_DLLPUBLIC SbModule : public SbxObject, private ::boost::noncopyable
 {
     friend class	TestToolObj;	// allows module initialisation at runtime
     friend class	SbiCodeGen;
@@ -64,8 +64,6 @@ class BASIC_DLLPUBLIC SbModule : public SbxObject
 
     SbModuleImpl*	mpSbModuleImpl;		// Impl data
     std::vector< String > mModuleVariableNames;
-    BASIC_DLLPRIVATE SbModule();
-    BASIC_DLLPRIVATE SbModule(const SbModule&);
 
     BASIC_DLLPRIVATE void implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC* pDeletedBasic );
 
diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx
index ba4f623..3d0e5a5 100644
--- a/basic/inc/basic/sbobjmod.hxx
+++ b/basic/inc/basic/sbobjmod.hxx
@@ -46,9 +46,6 @@ namespace css = ::com::sun::star;
 
 class BASIC_DLLPUBLIC SbObjModule : public SbModule
 {
-    BASIC_DLLPRIVATE SbObjModule( const SbObjModule& );
-    BASIC_DLLPRIVATE SbObjModule();
-
 protected:
     virtual ~SbObjModule();
 
@@ -75,8 +72,6 @@ class BASIC_DLLPUBLIC SbUserFormModule : public SbObjModule
     css::uno::Reference<css::frame::XModel> m_xModel;
     String sFormName;
     bool mbInit;
-    BASIC_DLLPRIVATE SbUserFormModule( const SbUserFormModule& );
-    BASIC_DLLPRIVATE SbUserFormModule();
 
 //protected:
     virtual void InitObject();


More information about the Libreoffice-commits mailing list