[Libreoffice-commits] .: 3 commits - basic/CppunitTest_basic_nested_struct.mk basic/inc basic/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 6 17:59:02 PDT 2012


 basic/CppunitTest_basic_nested_struct.mk |   11 +++++++++++
 basic/inc/basic/basmgr.hxx               |    6 +++---
 basic/inc/basic/basrdll.hxx              |    8 ++++----
 basic/inc/basic/sbmod.hxx                |    2 +-
 basic/inc/basic/sbstar.hxx               |    6 +++---
 basic/inc/basic/sbstdobj.hxx             |    3 ---
 basic/inc/basic/sbxfac.hxx               |    6 +++---
 basic/source/basmgr/basmgr.cxx           |    4 ++--
 basic/source/classes/eventatt.cxx        |    2 +-
 basic/source/classes/image.cxx           |    4 ++--
 basic/source/classes/sb.cxx              |    2 +-
 basic/source/classes/sbunoobj.cxx        |    8 ++++----
 basic/source/classes/sbxmod.cxx          |    6 +++---
 basic/source/runtime/basrdll.cxx         |   10 +++++-----
 14 files changed, 43 insertions(+), 35 deletions(-)

New commits:
commit b5afbbd8afb1e4f2ba21c2ff2032a4d1b466bff3
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Sep 7 05:03:13 2012 +0900

    Bin useless includes
    
    Change-Id: I08a58468a3ce75038b65a8d9641cc2138541a7f5

diff --git a/basic/inc/basic/sbstdobj.hxx b/basic/inc/basic/sbstdobj.hxx
index c9befbe..cd04364 100644
--- a/basic/inc/basic/sbstdobj.hxx
+++ b/basic/inc/basic/sbstdobj.hxx
@@ -25,9 +25,6 @@
 #include <basic/sbxfac.hxx>
 #include "basicdllapi.h"
 
-class StarBASIC;
-class SbStdFactory;
-
 //--------------------
 // class SbStdFactory
 //--------------------
commit 00b7328732f560b3c8517f0125e22b6ce6064c09
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Sep 7 04:59:11 2012 +0900

    sal_Bool to bool
    
    Change-Id: Ie8a128db35bebcdcee5eda984a7875339418d9bb

diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx
index a52771e..69ddb8e 100644
--- a/basic/inc/basic/basmgr.hxx
+++ b/basic/inc/basic/basmgr.hxx
@@ -124,7 +124,7 @@ private:
 
     String              aName;
     String              maStorageName;
-    sal_Bool                mbDocMgr;
+    bool                mbDocMgr;
 
     BasicManagerImpl*   mpImpl;
 
@@ -146,8 +146,8 @@ protected:
 
 public:
                     TYPEINFO();
-                    BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib = NULL, String* pLibPath = NULL, sal_Bool bDocMgr = sal_False );
-                    BasicManager( StarBASIC* pStdLib, String* pLibPath = NULL, sal_Bool bDocMgr = sal_False );
+                    BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib = NULL, String* pLibPath = NULL, bool bDocMgr = false );
+                    BasicManager( StarBASIC* pStdLib, String* pLibPath = NULL, bool bDocMgr = false );
 
     /** deletes the given BasicManager instance
 
diff --git a/basic/inc/basic/basrdll.hxx b/basic/inc/basic/basrdll.hxx
index 3e920e6..20edde6 100644
--- a/basic/inc/basic/basrdll.hxx
+++ b/basic/inc/basic/basrdll.hxx
@@ -30,8 +30,8 @@ class BASIC_DLLPUBLIC BasicDLL
 private:
     ResMgr*     pBasResMgr;
 
-    sal_Bool        bDebugMode;
-    sal_Bool        bBreakEnabled;
+    bool        bDebugMode;
+    bool        bBreakEnabled;
 
 public:
                 BasicDLL();
@@ -41,8 +41,8 @@ public:
 
     static void BasicBreak();
 
-    static void EnableBreak( sal_Bool bEnable );
-    static void SetDebugMode( sal_Bool bDebugMode );
+    static void EnableBreak( bool bEnable );
+    static void SetDebugMode( bool bDebugMode );
 };
 
 #define BASIC_DLL() (*(BasicDLL**)GetAppData( SHL_BASIC ) )
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index e654c53..ea9fff5 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -80,7 +80,7 @@ protected:
     void            RunInit();
     void            ClearPrivateVars();
     void            ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic );
-    void            GlobalRunInit( sal_Bool bBasicStart );  // for all modules
+    void            GlobalRunInit( bool bBasicStart );  // for all modules
     void            GlobalRunDeInit( void );
     const sal_uInt8*    FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16& ) const;
     const sal_uInt8*    FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16&,
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index 68765f4..e40583a 100644
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -62,7 +62,7 @@ class BASIC_DLLPUBLIC StarBASIC : public SbxObject
     Link            aBreakHdl;              // Breakpoint handler
     sal_Bool            bNoRtl;                 // if sal_True: do not search RTL
     sal_Bool            bBreak;                 // if sal_True: Break, otherwise Step
-    sal_Bool            bDocBasic;
+    bool            bDocBasic;
     sal_Bool            bVBAEnabled;
     BasicLibInfo*   pLibInfo;           // Info block for basic manager
     sal_Bool            bQuit;
@@ -93,7 +93,7 @@ public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASIC,1);
     TYPEINFO();
 
-    StarBASIC( StarBASIC* pParent = NULL, sal_Bool bIsDocBasic = sal_False );
+    StarBASIC( StarBASIC* pParent = NULL, bool bIsDocBasic = false );
 
     // #51727 SetModified overridden so that the Modfied-State is
         // not delivered to Parent.
@@ -171,7 +171,7 @@ public:
     sal_Bool isVBAEnabled();
 
     SbxObjectRef getRTL( void ) { return pRtl; }
-    sal_Bool IsDocBasic() { return bDocBasic; }
+    bool IsDocBasic() { return bDocBasic; }
     SbxVariable* VBAFind( const rtl::OUString& rName, SbxClassType t );
     bool GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut );
     void QuitAndExitApplication();
diff --git a/basic/inc/basic/sbxfac.hxx b/basic/inc/basic/sbxfac.hxx
index e36cbe6..ce368dc 100644
--- a/basic/inc/basic/sbxfac.hxx
+++ b/basic/inc/basic/sbxfac.hxx
@@ -29,11 +29,11 @@ class SbxObject;
 
 class BASIC_DLLPUBLIC SbxFactory
 {
-    sal_Bool bHandleLast;   // sal_True: Factory is asked at last because of its expensiveness
+    bool bHandleLast;   // true: Factory is asked at last because of its expensiveness
 public:
     virtual ~SbxFactory();
-    SbxFactory( sal_Bool bLast=sal_False )  { bHandleLast = bLast; }
-    sal_Bool IsHandleLast( void )       { return bHandleLast; }
+    SbxFactory( bool bLast=false )  { bHandleLast = bLast; }
+    bool IsHandleLast( void )       { return bHandleLast; }
     virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
     virtual SbxObject* CreateObject( const rtl::OUString& );
 };
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 62fde97..697ca6d 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -579,7 +579,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
     return pInfo;
 }
 
-BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib, String* pLibPath, sal_Bool bDocMgr ) : mbDocMgr( bDocMgr )
+BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib, String* pLibPath, bool bDocMgr ) : mbDocMgr( bDocMgr )
 {
     DBG_CTOR( BasicManager, 0 );
 
@@ -776,7 +776,7 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
     SetGlobalUNOConstant( "DialogLibraries", makeAny( mpImpl->maContainerInfo.mxDialogCont ) );
 }
 
-BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, sal_Bool bDocMgr ) : mbDocMgr( bDocMgr )
+BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, bool bDocMgr ) : mbDocMgr( bDocMgr )
 {
     DBG_CTOR( BasicManager, 0 );
     Init();
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index 10f096b..1c111e2 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -252,7 +252,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
             xAppStandardBasic = (StarBASIC*)p;
         }
 
-        sal_Bool bSearchLib = true;
+        bool bSearchLib = true;
         StarBASICRef xLibSearchBasic;
         if( aLocation.EqualsAscii("application") )
             xLibSearchBasic = xAppStandardBasic;
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 81c0910..3c91470 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -115,14 +115,14 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
     sal_uInt16 nReserved1;
     sal_uInt32 nReserved2;
     sal_uInt32 nReserved3;
-    sal_Bool bBadVer = sal_False;
+    bool bBadVer = false;
     if( nSign == B_MODULE )
     {
         r >> nVersion >> nCharSet >> lDimBase
           >> nFlags >> nReserved1 >> nReserved2 >> nReserved3;
         eCharSet = (CharSet) nCharSet;
         eCharSet = GetSOLoadTextEncoding( eCharSet );
-        bBadVer  = sal_Bool( nVersion > B_CURVERSION );
+        bBadVer  = ( nVersion > B_CURVERSION );
         nDimBase = (sal_uInt16) lDimBase;
     }
 
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 06ec026..394d299 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -876,7 +876,7 @@ SbModule* SbClassFactory::FindClass( const String& rClassName )
     return pMod;
 }
 
-StarBASIC::StarBASIC( StarBASIC* p, sal_Bool bIsDocBasic  )
+StarBASIC::StarBASIC( StarBASIC* p, bool bIsDocBasic  )
     : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic )
 {
     SetParent( p );
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 5f44542..c4f5fd8 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -963,7 +963,7 @@ Type getUnoTypeForSbxValue( SbxValue* pVal )
                 {
                     // If all elements of the arrays are from the same type, take
                     // this one - otherwise the whole will be considered as Any-Sequence
-                    sal_Bool bNeedsInit = sal_True;
+                    bool bNeedsInit = true;
 
                     sal_Int32 nSize = nUpper - nLower + 1;
                     sal_Int32 nIdx = nLower;
@@ -981,7 +981,7 @@ Type getUnoTypeForSbxValue( SbxValue* pVal )
                                 break;
                             }
                             aElementType = aType;
-                            bNeedsInit = sal_False;
+                            bNeedsInit = false;
                         }
                         else if( aElementType != aType )
                         {
@@ -1005,7 +1005,7 @@ Type getUnoTypeForSbxValue( SbxValue* pVal )
                     // For this check the array's dim structure does not matter
                     sal_uInt32 nFlatArraySize = pArray->Count32();
 
-                    sal_Bool bNeedsInit = sal_True;
+                    bool bNeedsInit = true;
                     for( sal_uInt32 i = 0 ; i < nFlatArraySize ; i++ )
                     {
                         SbxVariableRef xVar = pArray->SbxArray::Get32( i );
@@ -1020,7 +1020,7 @@ Type getUnoTypeForSbxValue( SbxValue* pVal )
                                 break;
                             }
                             aElementType = aType;
-                            bNeedsInit = sal_False;
+                            bNeedsInit = false;
                         }
                         else if( aElementType != aType )
                         {
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 6c42394..a70a7ea 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1085,7 +1085,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
     static sal_uInt16 nMaxCallLevel = 0;
 
     sal_uInt16 nRes = 0;
-    sal_Bool bDelInst = sal_Bool( GetSbData()->pInst == NULL );
+    bool bDelInst = ( GetSbData()->pInst == NULL );
         bool bQuit = false;
     StarBASICRef xBasic;
     uno::Reference< frame::XModel > xModel;
@@ -1229,7 +1229,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
                 clearNativeObjectWrapperVector();
 
                 DBG_ASSERT(GetSbData()->pInst->nCallLvl==0,"BASIC-Call-Level > 0");
-                delete GetSbData()->pInst, GetSbData()->pInst = NULL, bDelInst = sal_False;
+                delete GetSbData()->pInst, GetSbData()->pInst = NULL, bDelInst = false;
 
                 // #i30690
                 SolarMutexGuard aSolarGuard;
@@ -1447,7 +1447,7 @@ void StarBASIC::ClearAllModuleVars( void )
 }
 
 // Execution of the init-code of all module
-void SbModule::GlobalRunInit( sal_Bool bBasicStart )
+void SbModule::GlobalRunInit( bool bBasicStart )
 {
     // If no Basic-Start, only initialise, if the module is not initialised
     if( !bBasicStart )
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index a49b6f3..d5d00ea 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -38,8 +38,8 @@ BasicDLL::BasicDLL()
     BASIC_DLL() = this;
     ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
     pBasResMgr = ResMgr::CreateResMgr("sb", aLocale );
-    bDebugMode = sal_False;
-    bBreakEnabled = sal_True;
+    bDebugMode = false;
+    bBreakEnabled = true;
 }
 
 BasicDLL::~BasicDLL()
@@ -47,7 +47,7 @@ BasicDLL::~BasicDLL()
     delete pBasResMgr;
 }
 
-void BasicDLL::EnableBreak( sal_Bool bEnable )
+void BasicDLL::EnableBreak( bool bEnable )
 {
     BasicDLL* pThis = BASIC_DLL();
     DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
@@ -55,7 +55,7 @@ void BasicDLL::EnableBreak( sal_Bool bEnable )
         pThis->bBreakEnabled = bEnable;
 }
 
-void BasicDLL::SetDebugMode( sal_Bool bDebugMode )
+void BasicDLL::SetDebugMode( bool bDebugMode )
 {
     BasicDLL* pThis = BASIC_DLL();
     DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
@@ -68,7 +68,7 @@ void BasicDLL::BasicBreak()
 {
     // bJustStopping: if there's someone pressing STOP like crazy umpteen times,
     // but the Basic doesn't stop early enough, the box might appear more often...
-    static bool bJustStopping = sal_False;
+    static bool bJustStopping = false;
 
     BasicDLL* pThis = BASIC_DLL();
     DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
commit 30affe2f2fde8add8b1e89799e0e09515ccd9e54
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Sep 6 19:09:57 2012 +0900

    Add missing header/footer comment
    
    Change-Id: I0ca050a8d0e9f92308ecf0525ee7f0c32ddd0492

diff --git a/basic/CppunitTest_basic_nested_struct.mk b/basic/CppunitTest_basic_nested_struct.mk
index c8922e8..b6e421c 100644
--- a/basic/CppunitTest_basic_nested_struct.mk
+++ b/basic/CppunitTest_basic_nested_struct.mk
@@ -1,3 +1,12 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
 $(eval $(call gb_CppunitTest_CppunitTest,basic_nested_struct))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,basic_nested_struct, \
@@ -47,3 +56,5 @@ $(eval $(call gb_CppunitTest_use_components,basic_nested_struct,\
     ucb/source/core/ucb1 \
 ))
 $(eval $(call gb_CppunitTest_use_configuration,basic_nested_struct))
+
+# vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list