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

2012-04-20 Thread Caolán McNamara
 basic/inc/basic/sbmod.hxx |6 +++---
 basic/source/classes/sbxmod.cxx   |6 --
 toolkit/inc/toolkit/helper/macros.hxx |2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit b2fdaed46509127ec3ac2fb87404bc1b51d8
Author: Caolán McNamara 
Date:   Fri Apr 20 20:01:54 2012 +0100

WaE: MSVC2008 C2220 unsafe mix of types in operation

diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index 24700e9..392082b 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -73,7 +73,7 @@ protected:
 SbiImage*   pImage;// the Image
 SbiBreakpoints* pBreaks;   // Breakpoints
 SbClassData*pClassData;
-sal_Bool mbVBACompat;
+bool mbVBACompat;
 sal_Int32 mnType;
 SbxObjectRef pDocObject; // an impl object ( used by Document Modules )
 boolbIsProxyModule;
@@ -139,8 +139,8 @@ public:
 sal_Bool ExceedsLegacyModuleSize();
 void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const;
 bool HasExeCode();
-sal_Bool IsVBACompat() const;
-void SetVBACompat( sal_Bool bCompat );
+bool IsVBACompat() const;
+void SetVBACompat( bool bCompat );
 sal_Int32 GetModuleType() { return mnType; }
 void SetModuleType( sal_Int32 nType ) { mnType = nType; }
 bool isProxyModule() { return bIsProxyModule; }
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 9d3a4b9..87928cf 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1077,15 +1077,17 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic )
 if( ((StarBASIC*)p) != pBasic )
 ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p );
 }
-sal_Bool SbModule::IsVBACompat() const
+
+bool SbModule::IsVBACompat() const
 {
 return mbVBACompat;
 }
 
-void SbModule::SetVBACompat( sal_Bool bCompat )
+void SbModule::SetVBACompat( bool bCompat )
 {
 mbVBACompat = bCompat;
 }
+
 // Run a Basic-subprogram
 sal_uInt16 SbModule::Run( SbMethod* pMeth )
 {
commit 6f9971f3b935f669b39d7a53266950ee92955027
Author: Caolán McNamara 
Date:   Fri Apr 20 15:16:43 2012 +0100

WaE: MSVC20082 unreferenced argument

diff --git a/toolkit/inc/toolkit/helper/macros.hxx 
b/toolkit/inc/toolkit/helper/macros.hxx
index b2acbf2..3d59e60 100644
--- a/toolkit/inc/toolkit/helper/macros.hxx
+++ b/toolkit/inc/toolkit/helper/macros.hxx
@@ -176,7 +176,7 @@ void ClassName::disposing( const 
::com::sun::star::lang::EventObject& ) throw(::
 sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), 
RTL_TEXTENCODING_ASCII_US ); \
 OSL_FAIL( sMessage.getStr() );
 #else
-#define DISPLAY_EXCEPTION( ClassName, MethodName, e )
+#define DISPLAY_EXCEPTION( ClassName, MethodName, e ) (void)e;
 #endif
 
 #define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_2PARAM( ClassName, 
InterfaceName, MethodName, ParamType1, ParamType2 ) \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-03-05 Thread Tor Lillqvist
 basic/inc/basic/sbxbase.hxx|3 ++-
 basic/source/sbx/sbxbase.cxx   |   25 +++--
 basic/source/sbx/sbxscan.cxx   |1 +
 sfx2/source/appl/appbaslib.cxx |4 +++-
 sfx2/source/appl/appdde.cxx|4 +++-
 5 files changed, 20 insertions(+), 17 deletions(-)

New commits:
commit 8d4fe3ed1fcd826200e2611e7743b755eff923a6
Author: Noel Grandin 
Date:   Mon Feb 27 16:26:41 2012 +0200

Convert SbxFactory from SV_DECL_PTRARR_DEL to boost::ptr_vector

diff --git a/basic/inc/basic/sbxbase.hxx b/basic/inc/basic/sbxbase.hxx
index 55341fa..e760c4f 100644
--- a/basic/inc/basic/sbxbase.hxx
+++ b/basic/inc/basic/sbxbase.hxx
@@ -33,12 +33,13 @@
 #include "svl/svarray.hxx"
 #include 
 #include "basicdllapi.h"
+#include 
 
 class SbxFactory;
 class SbxVariable;
 class SbxBasicFormater;
 
-SV_DECL_PTRARR_DEL(SbxFacs,SbxFactory*,5)
+typedef boost::ptr_vector SbxFacs;
 
 // AppData structure for SBX:
 struct SbxAppData
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index e2987d0..048ea3c 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -36,11 +36,10 @@
 #include 
 #include 
 #include 
+#include 
 
 // AppData-Structure for SBX:
 
-SV_IMPL_PTRARR(SbxFacs,SbxFactory*);
-
 TYPEINIT0(SbxBase)
 
 namespace
@@ -147,28 +146,27 @@ void SbxBase::ResetError()
 void SbxBase::AddFactory( SbxFactory* pFac )
 {
 SbxAppData& r = GetSbxData_Impl();
-const SbxFactory* pTemp = pFac;
 
 // From 1996-03-06: take the HandleLast-Flag into account
-sal_uInt16 nPos = r.aFacs.Count(); // Insert position
+sal_uInt16 nPos = r.aFacs.size(); // Insert position
 if( !pFac->IsHandleLast() ) // Only if not self HandleLast
 {
 // Rank new factory in front of factories with HandleLast
 while( nPos > 0 &&
-(static_cast(r.aFacs.GetObject( nPos-1 
)))->IsHandleLast() )
+r.aFacs[ nPos-1 ].IsHandleLast() )
 nPos--;
 }
-r.aFacs.Insert( pTemp, nPos );
+r.aFacs.insert( r.aFacs.begin() + nPos, pFac );
 }
 
 void SbxBase::RemoveFactory( SbxFactory* pFac )
 {
 SbxAppData& r = GetSbxData_Impl();
-for( sal_uInt16 i = 0; i < r.aFacs.Count(); i++ )
+for(SbxFacs::iterator it = r.aFacs.begin(); it != r.aFacs.end(); ++it)
 {
-if( r.aFacs.GetObject( i ) == pFac )
+if( &(*it) == pFac )
 {
-r.aFacs.Remove( i, 1 ); break;
+r.aFacs.release( it ).release(); break;
 }
 }
 }
@@ -200,10 +198,9 @@ SbxBase* SbxBase::Create( sal_uInt16 nSbxId, sal_uInt32 
nCreator )
 // Unknown type: go over the factories!
 SbxAppData& r = GetSbxData_Impl();
 SbxBase* pNew = NULL;
-for( sal_uInt16 i = 0; i < r.aFacs.Count(); i++ )
+BOOST_FOREACH(SbxFactory& rFac, r.aFacs)
 {
-SbxFactory* pFac = r.aFacs.GetObject( i );
-pNew = pFac->Create( nSbxId, nCreator );
+pNew = rFac.Create( nSbxId, nCreator );
 if( pNew )
 break;
 }
@@ -215,9 +212,9 @@ SbxObject* SbxBase::CreateObject( const rtl::OUString& 
rClass )
 {
 SbxAppData& r = GetSbxData_Impl();
 SbxObject* pNew = NULL;
-for( sal_uInt16 i = 0; i < r.aFacs.Count(); i++ )
+BOOST_FOREACH(SbxFactory& rFac, r.aFacs)
 {
-pNew = r.aFacs.GetObject( i )->CreateObject( rClass );
+pNew = rFac.CreateObject( rClass );
 if( pNew )
 break;
 }
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 18bb46d..a253377 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -43,6 +43,7 @@
 
 #include "sbxres.hxx"
 #include 
+#include 
 #include 
 #include 
 
commit 695f0be4d184f4845cb2fedb1d64bb0597f52be4
Author: Tor Lillqvist 
Date:   Mon Mar 5 12:20:37 2012 +0200

WaE: unused parameters in the DISABLE_SCRIPTING case

diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index a8fb71e..fcb3728 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -55,7 +55,9 @@ void SfxBasicManagerHolder::reset( BasicManager* 
_pBasicManager )
 {
 impl_releaseContainers();
 
-#ifndef DISABLE_SCRIPTING
+#ifdef DISABLE_SCRIPTING
+(void) _pBasicManager;
+#else
 // Note: we do not delete the old BasicManager. BasicManager instances are
 // nowadays obtained from the BasicManagerRepository, and the ownership is 
with
 // the repository.
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index d46a016..5f2420a 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -350,7 +350,9 @@ long SfxObjectShell::DdeExecute
 */
 
 {
-#ifndef DISABLE_SCRIPTING
+#ifdef DISABLE_SCRIPTING
+(void) rCmd;
+#else
 StarBASIC* pBasic = GetBasic();
 DBG_ASSERT( pBasic, "Where is the Basic???" ) ;
 SbxVariable* pRet = pBasic->Execute( rCmd );
___
Libreoffice-commits mailing list
Libreoffice-commits@li

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

2012-01-16 Thread August Sodora
 basic/inc/basic/basmgr.hxx   |2 --
 basic/inc/basic/basrdll.hxx  |2 --
 basic/source/runtime/basrdll.cxx |2 --
 3 files changed, 6 deletions(-)

New commits:
commit d9ce7a484fdb870a5f41dca205469ddcf7f8b608
Author: August Sodora 
Date:   Mon Jan 16 23:35:26 2012 -0500

Remove unused SttResMgr from basic

diff --git a/basic/inc/basic/basrdll.hxx b/basic/inc/basic/basrdll.hxx
index 72e32d7..55ac29d 100644
--- a/basic/inc/basic/basrdll.hxx
+++ b/basic/inc/basic/basrdll.hxx
@@ -37,7 +37,6 @@ class ResMgr;
 class BASIC_DLLPUBLIC BasicDLL
 {
 private:
-ResMgr* pSttResMgr;
 ResMgr* pBasResMgr;
 
 sal_BoolbDebugMode;
@@ -47,7 +46,6 @@ public:
 BasicDLL();
 ~BasicDLL();
 
-ResMgr* GetSttResMgr() const { return pSttResMgr; }
 ResMgr* GetBasResMgr() const { return pBasResMgr; }
 
 static void BasicBreak();
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index 63050d9..e55910b 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -46,7 +46,6 @@ BasicDLL::BasicDLL()
 {
  *(BasicDLL**)GetAppData(SHL_BASIC) = this;
 ::com::sun::star::lang::Locale aLocale = 
Application::GetSettings().GetUILocale();
-pSttResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(stt), aLocale );
 pBasResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(sb), aLocale );
 bDebugMode = sal_False;
 bBreakEnabled = sal_True;
@@ -54,7 +53,6 @@ BasicDLL::BasicDLL()
 
 BasicDLL::~BasicDLL()
 {
-delete pSttResMgr;
 delete pBasResMgr;
 }
 
commit 4383bb532e2663823f54dc922f3b4e2f0703f241
Author: August Sodora 
Date:   Mon Jan 16 23:31:59 2012 -0500

Remove unused function

diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx
index 2d238d1..4b4bf38 100644
--- a/basic/inc/basic/basmgr.hxx
+++ b/basic/inc/basic/basmgr.hxx
@@ -259,8 +259,6 @@ private:
const String& LinkTargetURL );
 };
 
-BASIC_DLLPUBLIC void SetAppBasicManager( BasicManager* pBasMgr );
-
 #endif  //_BASMGR_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits