summaryrefslogtreecommitdiff
path: root/basic/inc/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic/inc/basic')
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basicmanagerrepository.hxx0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basicrt.hxx12
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basmgr.hxx71
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basrdll.hxx8
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/dispdefs.hxx0
-rwxr-xr-xbasic/inc/basic/modsizeexceeded.hxx63
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/mybasic.hxx14
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/process.hxx16
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbdef.hxx0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sberrors.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbmeth.hxx22
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbmod.hxx73
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbobjmod.hxx17
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbprop.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbstar.hxx91
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbstdobj.hxx60
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbuno.hxx0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbx.hxx102
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxbase.hxx0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxcore.hxx104
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxdef.hxx33
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxfac.hxx8
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxform.hxx28
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxmeth.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxmstrm.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxobj.hxx22
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxprop.hxx0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxvar.hxx203
-rwxr-xr-xbasic/inc/basic/svtmsg.hrc115
-rwxr-xr-xbasic/inc/basic/testtool.hrc36
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/testtool.hxx14
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/ttglobal.hrc0
-rwxr-xr-xbasic/inc/basic/ttmsg.hrc111
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/ttstrhlp.hxx20
-rwxr-xr-xbasic/inc/basic/vbahelper.hxx86
35 files changed, 892 insertions, 445 deletions
diff --git a/basic/inc/basic/basicmanagerrepository.hxx b/basic/inc/basic/basicmanagerrepository.hxx
index e486c3880f41..e486c3880f41 100644..100755
--- a/basic/inc/basic/basicmanagerrepository.hxx
+++ b/basic/inc/basic/basicmanagerrepository.hxx
diff --git a/basic/inc/basic/basicrt.hxx b/basic/inc/basic/basicrt.hxx
index 8f55b4f8f247..2d39eb79ca02 100644..100755
--- a/basic/inc/basic/basicrt.hxx
+++ b/basic/inc/basic/basicrt.hxx
@@ -45,8 +45,8 @@ public:
xub_StrLen GetLine();
xub_StrLen GetCol1();
xub_StrLen GetCol2();
- BOOL IsRun();
- BOOL IsValid() { return pRun != NULL; }
+ sal_Bool IsRun();
+ sal_Bool IsValid() { return pRun != NULL; }
BasicRuntime GetNextRuntime();
};
@@ -68,12 +68,12 @@ class BasicRuntimeAccess
public:
static BasicRuntime GetRuntime();
static bool HasRuntime();
- static USHORT GetStackEntryCount();
- static BasicErrorStackEntry GetStackEntry( USHORT nIndex );
- static BOOL HasStack();
+ static sal_uInt16 GetStackEntryCount();
+ static BasicErrorStackEntry GetStackEntry( sal_uInt16 nIndex );
+ static sal_Bool HasStack();
static void DeleteStack();
- static BOOL IsRunInit();
+ static sal_Bool IsRunInit();
};
#endif
diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx
index 360063bbface..51550eab5700 100644..100755
--- a/basic/inc/basic/basmgr.hxx
+++ b/basic/inc/basic/basmgr.hxx
@@ -69,21 +69,21 @@ class SotStorage;
class BasicError
{
private:
- ULONG nErrorId;
- USHORT nReason;
+ sal_uIntPtr nErrorId;
+ sal_uInt16 nReason;
String aErrStr;
public:
BasicError();
BasicError( const BasicError& rErr );
- BasicError( ULONG nId, USHORT nR, const String& rErrStr );
+ BasicError( sal_uIntPtr nId, sal_uInt16 nR, const String& rErrStr );
- ULONG GetErrorId() const { return nErrorId; }
- USHORT GetReason() const { return nReason; }
+ sal_uIntPtr GetErrorId() const { return nErrorId; }
+ sal_uInt16 GetReason() const { return nReason; }
String GetErrorStr() { return aErrStr; }
- void SetErrorId( ULONG n ) { nErrorId = n; }
- void SetReason( USHORT n ) { nReason = n; }
+ void SetErrorId( sal_uIntPtr n ) { nErrorId = n; }
+ void SetReason( sal_uInt16 n ) { nReason = n; }
void SetErrorStr( const String& rStr) { aErrStr = rStr; }
};
@@ -147,33 +147,33 @@ private:
String aName;
String maStorageName;
- BOOL bBasMgrModified;
- BOOL mbDocMgr;
+ sal_Bool bBasMgrModified;
+ sal_Bool mbDocMgr;
BasicManagerImpl* mpImpl;
void Init();
protected:
- BOOL ImpLoadLibary( BasicLibInfo* pLibInfo ) const;
- BOOL ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, BOOL bInfosOnly = FALSE ) const;
+ sal_Bool ImpLoadLibary( BasicLibInfo* pLibInfo ) const;
+ sal_Bool ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, sal_Bool bInfosOnly = sal_False ) const;
void ImpCreateStdLib( StarBASIC* pParentFromStdLib );
void ImpMgrNotLoaded( const String& rStorageName );
BasicLibInfo* CreateLibInfo();
- void LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, BOOL bLoadBasics = TRUE );
+ void LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, sal_Bool bLoadBasics = sal_True );
void LoadOldBasicManager( SotStorage& rStorage );
- BOOL ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const;
- BOOL ImplEncryptStream( SvStream& rStream ) const;
+ sal_Bool ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const;
+ sal_Bool ImplEncryptStream( SvStream& rStream ) const;
BasicLibInfo* FindLibInfo( StarBASIC* pBasic ) const;
- void CheckModules( StarBASIC* pBasic, BOOL bReference ) const;
- void SetFlagToAllLibs( short nFlag, BOOL bSet ) const;
+ void CheckModules( StarBASIC* pBasic, sal_Bool bReference ) const;
+ void SetFlagToAllLibs( short nFlag, sal_Bool bSet ) const;
BasicManager(); // This is used only to customize the paths for 'Save as'.
~BasicManager();
public:
TYPEINFO();
- BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib = NULL, String* pLibPath = NULL, BOOL bDocMgr = FALSE );
- BasicManager( StarBASIC* pStdLib, String* pLibPath = NULL, BOOL bDocMgr = FALSE );
+ 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 );
/** deletes the given BasicManager instance
@@ -190,12 +190,12 @@ public:
String GetName() const { return aName; }
- USHORT GetLibCount() const;
- StarBASIC* GetLib( USHORT nLib ) const;
+ sal_uInt16 GetLibCount() const;
+ StarBASIC* GetLib( sal_uInt16 nLib ) const;
StarBASIC* GetLib( const String& rName ) const;
- USHORT GetLibId( const String& rName ) const;
+ sal_uInt16 GetLibId( const String& rName ) const;
- String GetLibName( USHORT nLib );
+ String GetLibName( sal_uInt16 nLib );
/** announces the library containers which belong to this BasicManager
@@ -209,14 +209,14 @@ public:
const ::com::sun::star::uno::Reference< com::sun::star::script::XPersistentLibraryContainer >&
GetScriptLibraryContainer() const;
- BOOL LoadLib( USHORT nLib );
- BOOL RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage );
+ sal_Bool LoadLib( sal_uInt16 nLib );
+ sal_Bool RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage );
// Modify-Flag will be reset only during save.
- BOOL IsModified() const;
- BOOL IsBasicModified() const;
+ sal_Bool IsModified() const;
+ sal_Bool IsBasicModified() const;
- BOOL HasErrors();
+ sal_Bool HasErrors();
void ClearErrors();
BasicError* GetFirstError();
BasicError* GetNextError();
@@ -238,15 +238,22 @@ public:
*/
bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& _out_rModuleNames );
bool HasExeCode( const String& );
+ /// determines whether the Basic Manager has a given macro, given by fully qualified name
+ bool HasMacro( String const& i_fullyQualifiedName ) const;
+ /// executes a given macro
+ ErrCode ExecuteMacro( String const& i_fullyQualifiedName, SbxArray* i_arguments, SbxValue* i_retValue );
+ /// executes a given macro
+ ErrCode ExecuteMacro( String const& i_fullyQualifiedName, String const& i_commaSeparatedArgs, SbxValue* i_retValue );
+
private:
- BOOL IsReference( USHORT nLib );
+ sal_Bool IsReference( sal_uInt16 nLib );
- BOOL SetLibName( USHORT nLib, const String& rName );
+ sal_Bool SetLibName( sal_uInt16 nLib, const String& rName );
StarBASIC* GetStdLib() const;
- StarBASIC* AddLib( SotStorage& rStorage, const String& rLibName, BOOL bReference );
- BOOL RemoveLib( USHORT nLib );
- BOOL HasLib( const String& rName ) const;
+ StarBASIC* AddLib( SotStorage& rStorage, const String& rLibName, sal_Bool bReference );
+ sal_Bool RemoveLib( sal_uInt16 nLib );
+ sal_Bool HasLib( const String& rName ) const;
StarBASIC* CreateLibForLibContainer( const String& rLibName,
const com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >&
diff --git a/basic/inc/basic/basrdll.hxx b/basic/inc/basic/basrdll.hxx
index 2434dd40ea10..b11607201bb5 100644..100755
--- a/basic/inc/basic/basrdll.hxx
+++ b/basic/inc/basic/basrdll.hxx
@@ -39,8 +39,8 @@ private:
ResMgr* pSttResMgr;
ResMgr* pBasResMgr;
- BOOL bDebugMode;
- BOOL bBreakEnabled;
+ sal_Bool bDebugMode;
+ sal_Bool bBreakEnabled;
public:
BasicDLL();
@@ -51,8 +51,8 @@ public:
static void BasicBreak();
- static void EnableBreak( BOOL bEnable );
- static void SetDebugMode( BOOL bDebugMode );
+ static void EnableBreak( sal_Bool bEnable );
+ static void SetDebugMode( sal_Bool bDebugMode );
};
#define BASIC_DLL() (*(BasicDLL**)GetAppData( SHL_BASIC ) )
diff --git a/basic/inc/basic/dispdefs.hxx b/basic/inc/basic/dispdefs.hxx
index 9feb0edbef98..9feb0edbef98 100644..100755
--- a/basic/inc/basic/dispdefs.hxx
+++ b/basic/inc/basic/dispdefs.hxx
diff --git a/basic/inc/basic/modsizeexceeded.hxx b/basic/inc/basic/modsizeexceeded.hxx
new file mode 100755
index 000000000000..414b7aff72e0
--- /dev/null
+++ b/basic/inc/basic/modsizeexceeded.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BASIC_MODSIZEEXCEEDED_HXX
+#define _BASIC_MODSIZEEXCEEDED_HXX
+
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+class ModuleSizeExceeded : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
+{
+ // C++ interface
+ public:
+ ModuleSizeExceeded( const com::sun::star::uno::Sequence< ::rtl::OUString>& sModules );
+
+ sal_Bool isAbort() const;
+ sal_Bool isApprove() const;
+
+ // UNO interface
+ public:
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException ) { return m_lContinuations; }
+ com::sun::star::uno::Any SAL_CALL getRequest() throw( com::sun::star::uno::RuntimeException )
+ {
+ return m_aRequest;
+ }
+
+ // member
+ private:
+ rtl::OUString m_sMods;
+ com::sun::star::uno::Any m_aRequest;
+ com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::task::XInteractionContinuation > > m_lContinuations;
+ com::sun::star::uno::Reference< com::sun::star::task::XInteractionContinuation > m_xAbort;
+ com::sun::star::uno::Reference< com::sun::star::task::XInteractionContinuation> m_xApprove;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/mybasic.hxx b/basic/inc/basic/mybasic.hxx
index 2f87fb69c5a6..3a2ab068d4c4 100644..100755
--- a/basic/inc/basic/mybasic.hxx
+++ b/basic/inc/basic/mybasic.hxx
@@ -42,10 +42,10 @@ class ErrorEntry;
//-----------------------------------------------------------------------------
class BasicError {
AppBasEd* pWin;
- USHORT nLine, nCol1, nCol2;
+ sal_uInt16 nLine, nCol1, nCol2;
String aText;
public:
- BasicError( AppBasEd*, USHORT, const String&, USHORT, USHORT, USHORT );
+ BasicError( AppBasEd*, sal_uInt16, const String&, sal_uInt16, sal_uInt16, sal_uInt16 );
void Show();
};
@@ -53,8 +53,8 @@ public:
class MyBasic : public StarBASIC
{
SbError nError;
- virtual BOOL ErrorHdl();
- virtual USHORT BreakHdl();
+ virtual sal_Bool ErrorHdl();
+ virtual sal_uInt16 BreakHdl();
protected:
::std::vector< BasicError* > aErrors;
@@ -73,7 +73,7 @@ public:
TYPEINFO();
MyBasic();
virtual ~MyBasic();
- virtual BOOL Compile( SbModule* );
+ virtual sal_Bool Compile( SbModule* );
void Reset();
SbError GetErrors() { return nError; }
size_t GetCurrentError() { return CurrentError; }
@@ -87,10 +87,10 @@ public:
virtual void LoadIniFile();
// Determines the extended symbol type for syntax highlighting
- virtual SbTextType GetSymbolType( const String &Symbol, BOOL bWasTTControl );
+ virtual SbTextType GetSymbolType( const String &Symbol, sal_Bool bWasTTControl );
virtual const String GetSpechialErrorText();
virtual void ReportRuntimeError( AppBasEd *pEditWin );
- virtual void DebugFindNoErrors( BOOL bDebugFindNoErrors );
+ virtual void DebugFindNoErrors( sal_Bool bDebugFindNoErrors );
static void SetCompileModule( SbModule *pMod );
static SbModule *GetCompileModule();
diff --git a/basic/inc/basic/process.hxx b/basic/inc/basic/process.hxx
index d804ae4c722d..b88391b412ca 100644..100755
--- a/basic/inc/basic/process.hxx
+++ b/basic/inc/basic/process.hxx
@@ -46,22 +46,22 @@ class Process
rtl_uString **m_pEnvList;
rtl::OUString m_aProcessName;
oslProcess m_pProcess;
- BOOL ImplIsRunning();
+ sal_Bool ImplIsRunning();
long ImplGetExitCode();
- BOOL bWasGPF;
- BOOL bHasBeenStarted;
+ sal_Bool bWasGPF;
+ sal_Bool bHasBeenStarted;
public:
Process();
~Process();
// Methoden
void SetImage( const String &aAppPath, const String &aAppParams, const Environment *pEnv = NULL );
- BOOL Start();
- ULONG GetExitCode();
- BOOL IsRunning();
- BOOL WasGPF();
+ sal_Bool Start();
+ sal_uIntPtr GetExitCode();
+ sal_Bool IsRunning();
+ sal_Bool WasGPF();
- BOOL Terminate();
+ sal_Bool Terminate();
};
#endif
diff --git a/basic/inc/basic/sbdef.hxx b/basic/inc/basic/sbdef.hxx
index 1b0b6a3f65b4..1b0b6a3f65b4 100644..100755
--- a/basic/inc/basic/sbdef.hxx
+++ b/basic/inc/basic/sbdef.hxx
diff --git a/basic/inc/basic/sberrors.hxx b/basic/inc/basic/sberrors.hxx
index db072193d852..f2e40ac2e05c 100644..100755
--- a/basic/inc/basic/sberrors.hxx
+++ b/basic/inc/basic/sberrors.hxx
@@ -32,7 +32,7 @@
#include <basic/sbxdef.hxx>
#ifndef __RSC
-typedef ULONG SbError;
+typedef sal_uIntPtr SbError;
#endif
// Mapping to SbxError
diff --git a/basic/inc/basic/sbmeth.hxx b/basic/inc/basic/sbmeth.hxx
index 8b1c9a9ce77f..4c8deafef29c 100644..100755
--- a/basic/inc/basic/sbmeth.hxx
+++ b/basic/inc/basic/sbmeth.hxx
@@ -49,15 +49,15 @@ class SbMethod : public SbxMethod
SbMethodImpl* mpSbMethodImpl; // Impl data
SbxVariable* mCaller; // caller
SbModule* pMod;
- USHORT nDebugFlags;
- USHORT nLine1, nLine2;
- UINT32 nStart;
- BOOL bInvalid;
+ sal_uInt16 nDebugFlags;
+ sal_uInt16 nLine1, nLine2;
+ sal_uInt32 nStart;
+ sal_Bool bInvalid;
SbxArrayRef refStatics;
SbMethod( const String&, SbxDataType, SbModule* );
SbMethod( const SbMethod& );
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
virtual ~SbMethod();
public:
@@ -68,14 +68,14 @@ public:
SbxArray* GetStatics();
void ClearStatics();
SbModule* GetModule() { return pMod; }
- UINT32 GetId() const { return nStart; }
- USHORT GetDebugFlags() { return nDebugFlags; }
- void SetDebugFlags( USHORT n ) { nDebugFlags = n; }
- void GetLineRange( USHORT&, USHORT& );
+ sal_uInt32 GetId() const { return nStart; }
+ sal_uInt16 GetDebugFlags() { return nDebugFlags; }
+ void SetDebugFlags( sal_uInt16 n ) { nDebugFlags = n; }
+ void GetLineRange( sal_uInt16&, sal_uInt16& );
// Interface to execute a method from the applications
virtual ErrCode Call( SbxValue* pRet = NULL, SbxVariable* pCaller = NULL );
- virtual void Broadcast( ULONG nHintId );
+ virtual void Broadcast( sal_uIntPtr nHintId );
};
#ifndef __SB_SBMETHODREF_HXX
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index 94fd9d845e12..cba5714b9c36 100644..100755
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -36,15 +36,18 @@
#include <rtl/ustring.hxx>
#include <vector>
+#include <deque>
+
class SbMethod;
class SbProperty;
class SbiRuntime;
-class SbiBreakpoints;
+typedef std::deque< sal_uInt16 > SbiBreakpoints;
class SbiImage;
class SbProcedureProperty;
class SbIfaceMapperMethod;
class SbClassModuleObject;
+class ModuleInitDependencyMap;
struct ClassModuleRunInitItem;
struct SbClassData;
class SbModuleImpl;
@@ -63,6 +66,8 @@ class SbModule : public SbxObject
SbModule();
SbModule(const SbModule&);
+ void implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC* pDeletedBasic );
+
protected:
com::sun::star::uno::Reference< com::sun::star::script::XInvocation > mxWrapper;
::rtl::OUString aOUSource;
@@ -70,36 +75,38 @@ protected:
SbiImage* pImage; // the Image
SbiBreakpoints* pBreaks; // Breakpoints
SbClassData* pClassData;
- BOOL mbVBACompat;
- INT32 mnType;
+ sal_Bool mbVBACompat;
+ sal_Int32 mnType;
SbxObjectRef pDocObject; // an impl object ( used by Document Modules )
bool bIsProxyModule;
- static void implProcessModuleRunInit( ClassModuleRunInitItem& rItem );
+ static void implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassModuleRunInitItem& rItem );
void StartDefinitions();
SbMethod* GetMethod( const String&, SbxDataType );
SbProperty* GetProperty( const String&, SbxDataType );
SbProcedureProperty* GetProcedureProperty( const String&, SbxDataType );
SbIfaceMapperMethod* GetIfaceMapperMethod( const String&, SbMethod* );
- void EndDefinitions( BOOL=FALSE );
- USHORT Run( SbMethod* );
+ void EndDefinitions( sal_Bool=sal_False );
+ sal_uInt16 Run( SbMethod* );
void RunInit();
void ClearPrivateVars();
- void GlobalRunInit( BOOL bBasicStart ); // for all modules
+ void ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic );
+ void GlobalRunInit( sal_Bool bBasicStart ); // for all modules
void GlobalRunDeInit( void );
- const BYTE* FindNextStmnt( const BYTE*, USHORT&, USHORT& ) const;
- const BYTE* FindNextStmnt( const BYTE*, USHORT&, USHORT&,
- BOOL bFollowJumps, const SbiImage* pImg=NULL ) const;
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
- virtual BOOL LoadCompleted();
+ const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16& ) const;
+ const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16&,
+ sal_Bool bFollowJumps, const SbiImage* pImg=NULL ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
+ virtual sal_Bool LoadCompleted();
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
+ void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint );
virtual ~SbModule();
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2);
TYPEINFO();
- SbModule( const String&, BOOL bCompat = FALSE );
+ SbModule( const String&, sal_Bool bCompat = sal_False );
virtual void SetParent( SbxObject* );
virtual void Clear();
@@ -112,34 +119,34 @@ public:
void SetSource32( const ::rtl::OUString& r );
void SetComment( const String& r );
- virtual BOOL Compile();
- BOOL Disassemble( String& rText );
- virtual BOOL IsCompiled() const;
+ virtual sal_Bool Compile();
+ sal_Bool Disassemble( String& rText );
+ virtual sal_Bool IsCompiled() const;
const SbxObject* FindType( String aTypeName ) const;
- virtual BOOL IsBreakable( USHORT nLine ) const;
- virtual USHORT GetBPCount() const;
- virtual USHORT GetBP( USHORT n ) const;
- virtual BOOL IsBP( USHORT nLine ) const;
- virtual BOOL SetBP( USHORT nLine );
- virtual BOOL ClearBP( USHORT nLine );
+ virtual sal_Bool IsBreakable( sal_uInt16 nLine ) const;
+ virtual size_t GetBPCount() const;
+ virtual sal_uInt16 GetBP( size_t n ) const;
+ virtual sal_Bool IsBP( sal_uInt16 nLine ) const;
+ virtual sal_Bool SetBP( sal_uInt16 nLine );
+ virtual sal_Bool ClearBP( sal_uInt16 nLine );
virtual void ClearAllBP();
// Lines of Subs
- virtual SbMethod* GetFunctionForLine( USHORT );
+ virtual SbMethod* GetFunctionForLine( sal_uInt16 );
// Store only image, no source (needed for new password protection)
- BOOL StoreBinaryData( SvStream& );
- BOOL StoreBinaryData( SvStream&, USHORT nVer );
- BOOL LoadBinaryData( SvStream&, USHORT nVer );
- BOOL LoadBinaryData( SvStream& );
- BOOL ExceedsLegacyModuleSize();
+ sal_Bool StoreBinaryData( SvStream& );
+ sal_Bool StoreBinaryData( SvStream&, sal_uInt16 nVer );
+ sal_Bool LoadBinaryData( SvStream&, sal_uInt16 nVer );
+ sal_Bool LoadBinaryData( SvStream& );
+ sal_Bool ExceedsLegacyModuleSize();
void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const;
bool HasExeCode();
- BOOL IsVBACompat() const;
- void SetVBACompat( BOOL bCompat );
- INT32 GetModuleType() { return mnType; }
- void SetModuleType( INT32 nType ) { mnType = nType; }
+ sal_Bool IsVBACompat() const;
+ void SetVBACompat( sal_Bool bCompat );
+ sal_Int32 GetModuleType() { return mnType; }
+ void SetModuleType( sal_Int32 nType ) { mnType = nType; }
bool isProxyModule() { return bIsProxyModule; }
void AddVarName( const String& aName );
void RemoveVars();
diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx
index 5db50103ae14..af602191cdd5 100644..100755
--- a/basic/inc/basic/sbobjmod.hxx
+++ b/basic/inc/basic/sbobjmod.hxx
@@ -47,10 +47,18 @@ class SbObjModule : public SbModule
{
SbObjModule( const SbObjModule& );
SbObjModule();
+
+protected:
+ virtual ~SbObjModule();
+
public:
TYPEINFO();
SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
+
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+
using SbxValue::GetObject;
SbxVariable* GetObject();
void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ;
@@ -76,7 +84,7 @@ public:
SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
virtual ~SbUserFormModule();
virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
- void ResetApiObj();
+ void ResetApiObj( bool bTriggerTerminateEvent = true );
void Unload();
void Load();
void triggerMethod( const String& );
@@ -88,6 +96,11 @@ public:
void triggerLayoutEvent();
void triggerResizeEvent();
+ bool getInitState( void )
+ { return mbInit; }
+ void setInitState( bool bInit )
+ { mbInit = bInit; }
+
class SbUserFormModuleInstance* CreateInstance();
};
@@ -99,7 +112,7 @@ public:
SbUserFormModuleInstance( SbUserFormModule* pParentModule, const String& rName,
const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
- virtual BOOL IsClass( const String& ) const;
+ virtual sal_Bool IsClass( const String& ) const;
virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
};
diff --git a/basic/inc/basic/sbprop.hxx b/basic/inc/basic/sbprop.hxx
index fc39c2e5f936..730ee6fa0aa7 100644..100755
--- a/basic/inc/basic/sbprop.hxx
+++ b/basic/inc/basic/sbprop.hxx
@@ -40,7 +40,7 @@ class SbProperty : public SbxProperty
friend class SbModule;
friend class SbProcedureProperty;
SbModule* pMod;
- BOOL bInvalid;
+ sal_Bool bInvalid;
SbProperty( const String&, SbxDataType, SbModule* );
virtual ~SbProperty();
public:
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index f25ddcf02c09..73d80a4345b7 100644..100755
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -37,16 +37,17 @@
#include <basic/sbdef.hxx>
#include <basic/sberrors.hxx>
#include <com/sun/star/script/ModuleInfo.hpp>
+#include <com/sun/star/frame/XModel.hpp>
class SbModule; // completed module
class SbiInstance; // runtime instance
class SbiRuntime; // currently running procedure
class SbiImage; // compiled image
class BasicLibInfo; // info block for basic manager
-class SbiBreakpoints;
class SbTextPortions;
class SbMethod;
class BasicManager;
+class DocBasicItem;
class StarBASICImpl;
@@ -56,6 +57,7 @@ class StarBASIC : public SbxObject
friend class SbiExpression; // Access to RTL
friend class SbiInstance;
friend class SbiRuntime;
+ friend class DocBasicItem;
StarBASICImpl* mpStarBASICImpl;
@@ -66,31 +68,33 @@ class StarBASIC : public SbxObject
// Handler-Support:
Link aErrorHdl; // Error handler
Link aBreakHdl; // Breakpoint handler
- BOOL bNoRtl; // if TRUE: do not search RTL
- BOOL bBreak; // if TRUE: Break, otherwise Step
- BOOL bDocBasic;
- BOOL bVBAEnabled;
+ sal_Bool bNoRtl; // if sal_True: do not search RTL
+ sal_Bool bBreak; // if sal_True: Break, otherwise Step
+ sal_Bool bDocBasic;
+ sal_Bool bVBAEnabled;
BasicLibInfo* pLibInfo; // Info block for basic manager
SbLanguageMode eLanguageMode; // LanguageMode of the basic object
- BOOL bQuit;
+ sal_Bool bQuit;
SbxObjectRef pVBAGlobals;
SbxObject* getVBAGlobals( );
+ void implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic );
+
protected:
- BOOL CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen );
+ sal_Bool CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen );
private:
- BOOL RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen );
- BOOL RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen );
- USHORT BreakPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
- USHORT StepPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ sal_Bool RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen );
+ sal_Bool RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen );
+ sal_uInt16 BreakPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
+ sal_uInt16 StepPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
protected:
- virtual BOOL ErrorHdl();
- virtual USHORT BreakHdl();
+ virtual sal_Bool ErrorHdl();
+ virtual sal_uInt16 BreakHdl();
virtual ~StarBASIC();
public:
@@ -98,11 +102,11 @@ public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASIC,1);
TYPEINFO();
- StarBASIC( StarBASIC* pParent = NULL, BOOL bIsDocBasic = FALSE );
+ StarBASIC( StarBASIC* pParent = NULL, sal_Bool bIsDocBasic = sal_False );
// #51727 SetModified overridden so that the Modfied-State is
// not delivered to Parent.
- virtual void SetModified( BOOL );
+ virtual void SetModified( sal_Bool );
void* operator new( size_t );
void operator delete( void* );
@@ -119,14 +123,14 @@ public:
SbModule* MakeModule( const String& rName, const String& rSrc );
SbModule* MakeModule32( const String& rName, const ::rtl::OUString& rSrc );
SbModule* MakeModule32( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, const ::rtl::OUString& rSrc );
- BOOL Compile( SbModule* );
- BOOL Disassemble( SbModule*, String& rText );
+ sal_Bool Compile( SbModule* );
+ sal_Bool Disassemble( SbModule*, String& rText );
static void Stop();
static void Error( SbError );
static void Error( SbError, const String& rMsg );
static void FatalError( SbError );
static void FatalError( SbError, const String& rMsg );
- static BOOL IsRunning();
+ static sal_Bool IsRunning();
static SbError GetErrBasic();
// #66536 make additional message accessible by RTL function Error
static String GetErrorMsg();
@@ -135,7 +139,7 @@ public:
void Highlight( const String& rSrc, SbTextPortions& rList );
virtual SbxVariable* Find( const String&, SbxClassType );
- virtual BOOL Call( const String&, SbxArray* = NULL );
+ virtual sal_Bool Call( const String&, SbxArray* = NULL );
SbxArray* GetModules() { return pModules; }
SbxObject* GetRtl() { return pRtl; }
@@ -144,26 +148,26 @@ public:
void InitAllModules( StarBASIC* pBasicNotToInit = NULL );
void DeInitAllModules( void );
void ClearAllModuleVars( void );
- void ActivateObject( const String*, BOOL );
- BOOL LoadOldModules( SvStream& );
+ void ActivateObject( const String*, sal_Bool );
+ sal_Bool LoadOldModules( SvStream& );
// #43011 For TestTool; deletes global vars
void ClearGlobalVars( void );
// Calls for error and break handler
- static USHORT GetLine();
- static USHORT GetCol1();
- static USHORT GetCol2();
- static void SetErrorData( SbError nCode, USHORT nLine,
- USHORT nCol1, USHORT nCol2 );
+ static sal_uInt16 GetLine();
+ static sal_uInt16 GetCol1();
+ static sal_uInt16 GetCol2();
+ static void SetErrorData( SbError nCode, sal_uInt16 nLine,
+ sal_uInt16 nCol1, sal_uInt16 nCol2 );
// Specific to error handler
static void MakeErrorText( SbError, const String& aMsg );
static const String& GetErrorText();
static SbError GetErrorCode();
- static BOOL IsCompilerError();
- static USHORT GetVBErrorCode( SbError nError );
- static SbError GetSfxFromVBError( USHORT nError );
+ static sal_Bool IsCompilerError();
+ static sal_uInt16 GetVBErrorCode( SbError nError );
+ static SbError GetSfxFromVBError( sal_uInt16 nError );
static void SetGlobalLanguageMode( SbLanguageMode eLangMode );
static SbLanguageMode GetGlobalLanguageMode();
// Local settings
@@ -172,7 +176,7 @@ public:
SbLanguageMode GetLanguageMode();
// Specific for break handler
- BOOL IsBreak() const { return bBreak; }
+ sal_Bool IsBreak() const { return bBreak; }
static Link GetGlobalErrorHdl();
static void SetGlobalErrorHdl( const Link& rNewHdl );
@@ -188,24 +192,27 @@ public:
static SbxBase* FindSBXInCurrentScope( const String& rName );
static SbxVariable* FindVarInCurrentScopy
- ( const String& rName, USHORT& rStatus );
- static SbMethod* GetActiveMethod( USHORT nLevel = 0 );
+ ( const String& rName, sal_uInt16& rStatus );
+ static SbMethod* GetActiveMethod( sal_uInt16 nLevel = 0 );
static SbModule* GetActiveModule();
- void SetVBAEnabled( BOOL bEnabled );
- BOOL isVBAEnabled();
+ void SetVBAEnabled( sal_Bool bEnabled );
+ sal_Bool isVBAEnabled();
- // #60175 TRUE: SFX-Resource is not displayed on basic errors
- static void StaticSuppressSfxResource( BOOL bSuppress );
+ // #60175 sal_True: SFX-Resource is not displayed on basic errors
+ static void StaticSuppressSfxResource( sal_Bool bSuppress );
- // #91147 TRUE: Reschedule is enabled (default>, FALSE: No reschedule
- static void StaticEnableReschedule( BOOL bReschedule );
+ // #91147 sal_True: Reschedule is enabled (default>, sal_False: No reschedule
+ static void StaticEnableReschedule( sal_Bool bReschedule );
SbxObjectRef getRTL( void ) { return pRtl; }
- BOOL IsDocBasic() { return bDocBasic; }
+ sal_Bool IsDocBasic() { return bDocBasic; }
SbxVariable* VBAFind( const String& rName, SbxClassType t );
bool GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut );
void QuitAndExitApplication();
- BOOL IsQuitApplication() { return bQuit; };
+ sal_Bool IsQuitApplication() { return bQuit; };
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModelFromBasic( SbxObject* pBasic );
};
#ifndef __SB_SBSTARBASICREF_HXX
diff --git a/basic/inc/basic/sbstdobj.hxx b/basic/inc/basic/sbstdobj.hxx
index a33b1c343bdc..8120e6d25631 100644..100755
--- a/basic/inc/basic/sbstdobj.hxx
+++ b/basic/inc/basic/sbstdobj.hxx
@@ -58,9 +58,9 @@ protected:
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
- void PropType( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void PropWidth( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void PropHeight( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
+ void PropType( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void PropWidth( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void PropHeight( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
public:
TYPEINFO();
@@ -78,23 +78,23 @@ public:
class SbStdFont : public SbxObject
{
protected:
- BOOL bBold;
- BOOL bItalic;
- BOOL bStrikeThrough;
- BOOL bUnderline;
- USHORT nSize;
+ sal_Bool bBold;
+ sal_Bool bItalic;
+ sal_Bool bStrikeThrough;
+ sal_Bool bUnderline;
+ sal_uInt16 nSize;
String aName;
~SbStdFont();
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
- void PropBold( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void PropItalic( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void PropUnderline( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void PropSize( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- void PropName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
+ void PropBold( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void PropItalic( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void PropUnderline( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void PropSize( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
+ void PropName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
public:
TYPEINFO();
@@ -102,16 +102,16 @@ public:
SbStdFont();
virtual SbxVariable* Find( const String&, SbxClassType );
- void SetBold( BOOL bB ) { bBold = bB; }
- BOOL IsBold() const { return bBold; }
- void SetItalic( BOOL bI ) { bItalic = bI; }
- BOOL IsItalic() const { return bItalic; }
- void SetStrikeThrough( BOOL bS ) { bStrikeThrough = bS; }
- BOOL IsStrikeThrough() const { return bStrikeThrough; }
- void SetUnderline( BOOL bU ) { bUnderline = bU; }
- BOOL IsUnderline() const { return bUnderline; }
- void SetSize( USHORT nS ) { nSize = nS; }
- USHORT GetSize() const { return nSize; }
+ void SetBold( sal_Bool bB ) { bBold = bB; }
+ sal_Bool IsBold() const { return bBold; }
+ void SetItalic( sal_Bool bI ) { bItalic = bI; }
+ sal_Bool IsItalic() const { return bItalic; }
+ void SetStrikeThrough( sal_Bool bS ) { bStrikeThrough = bS; }
+ sal_Bool IsStrikeThrough() const { return bStrikeThrough; }
+ void SetUnderline( sal_Bool bU ) { bUnderline = bU; }
+ sal_Bool IsUnderline() const { return bUnderline; }
+ void SetSize( sal_uInt16 nS ) { nSize = nS; }
+ sal_uInt16 GetSize() const { return nSize; }
void SetFontName( const String& rName ) { aName = rName; }
String GetFontName() const { return aName; }
};
@@ -127,12 +127,12 @@ protected:
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
- void MethClear( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
- void MethGetData( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
- void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
- void MethGetText( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
- void MethSetData( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
- void MethSetText( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite );
+ void MethClear( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
+ void MethGetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
+ void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
+ void MethGetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
+ void MethSetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
+ void MethSetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
public:
TYPEINFO();
diff --git a/basic/inc/basic/sbuno.hxx b/basic/inc/basic/sbuno.hxx
index 0539246e071b..0539246e071b 100644..100755
--- a/basic/inc/basic/sbuno.hxx
+++ b/basic/inc/basic/sbuno.hxx
diff --git a/basic/inc/basic/sbx.hxx b/basic/inc/basic/sbx.hxx
index b3c28ada8989..ec2f9a1b3335 100644..100755
--- a/basic/inc/basic/sbx.hxx
+++ b/basic/inc/basic/sbx.hxx
@@ -68,9 +68,9 @@ struct SbxParamInfo
const String aName; // Name of the parameter
SbxBaseRef aTypeRef; // Object, if object type
SbxDataType eType; // Data type
- UINT16 nFlags; // Flag-Bits
- UINT32 nUserData; // IDs etc.
- SbxParamInfo( const String& s, SbxDataType t, USHORT n, SbxBase* b = NULL )
+ sal_uInt16 nFlags; // Flag-Bits
+ sal_uInt32 nUserData; // IDs etc.
+ SbxParamInfo( const String& s, SbxDataType t, sal_uInt16 n, SbxBase* b = NULL )
: aName( s ), aTypeRef( b ), eType( t ), nFlags( n ), nUserData( 0 ) {}
~SbxParamInfo() {}
};
@@ -89,27 +89,27 @@ class SbxInfo : public SvRefBase
String aComment;
String aHelpFile;
- UINT32 nHelpId;
+ sal_uInt32 nHelpId;
SbxParams aParams;
protected:
- BOOL LoadData( SvStream&, USHORT );
- BOOL StoreData( SvStream& ) const;
+ sal_Bool LoadData( SvStream&, sal_uInt16 );
+ sal_Bool StoreData( SvStream& ) const;
virtual ~SbxInfo();
public:
SbxInfo();
- SbxInfo( const String&, UINT32 );
+ SbxInfo( const String&, sal_uInt32 );
- void AddParam( const String&, SbxDataType, USHORT=SBX_READ );
+ void AddParam( const String&, SbxDataType, sal_uInt16=SBX_READ );
void AddParam( const SbxParamInfo& );
- const SbxParamInfo* GetParam( USHORT n ) const; // index starts with 1!
+ const SbxParamInfo* GetParam( sal_uInt16 n ) const; // index starts with 1!
const String& GetComment() const { return aComment; }
const String& GetHelpFile() const { return aHelpFile; }
- UINT32 GetHelpId() const { return nHelpId; }
+ sal_uInt32 GetHelpId() const { return nHelpId; }
void SetComment( const String& r ) { aComment = r; }
void SetHelpFile( const String& r ) { aHelpFile = r; }
- void SetHelpId( UINT32 nId ) { nHelpId = nId; }
+ void SetHelpId( sal_uInt32 nId ) { nHelpId = nId; }
};
#endif
@@ -122,7 +122,7 @@ class SbxHint : public SfxSimpleHint
SbxVariable* pVar;
public:
TYPEINFO();
- SbxHint( ULONG n, SbxVariable* v ) : SfxSimpleHint( n ), pVar( v ) {}
+ SbxHint( sal_uIntPtr n, SbxVariable* v ) : SfxSimpleHint( n ), pVar( v ) {}
SbxVariable* GetVar() const { return pVar; }
};
@@ -136,7 +136,7 @@ class SbxAlias : public SbxVariable, public SfxListener
{
SbxVariableRef xAlias;
virtual ~SbxAlias();
- virtual void Broadcast( ULONG );
+ virtual void Broadcast( sal_uIntPtr );
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
public:
@@ -165,7 +165,7 @@ class SbxArray : public SbxBase
friend class SbMethod;
friend class SbClassModuleObject;
friend SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj );
- void PutDirect( SbxVariable* pVar, UINT32 nIdx );
+ void PutDirect( SbxVariable* pVar, sal_uInt32 nIdx );
SbxArrayImpl* mpSbxArrayImpl; // Impl data
SbxVarRefs* pData; // The variables
@@ -173,8 +173,8 @@ class SbxArray : public SbxBase
protected:
SbxDataType eType; // Data type of the array
virtual ~SbxArray();
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_ARRAY,1);
@@ -183,28 +183,28 @@ public:
SbxArray( const SbxArray& );
SbxArray& operator=( const SbxArray& );
virtual void Clear();
- USHORT Count() const;
+ sal_uInt16 Count() const;
virtual SbxDataType GetType() const;
virtual SbxClassType GetClass() const;
- SbxVariableRef& GetRef( USHORT );
- SbxVariable* Get( USHORT );
- void Put( SbxVariable*, USHORT );
- void Insert( SbxVariable*, USHORT );
- void Remove( USHORT );
+ SbxVariableRef& GetRef( sal_uInt16 );
+ SbxVariable* Get( sal_uInt16 );
+ void Put( SbxVariable*, sal_uInt16 );
+ void Insert( SbxVariable*, sal_uInt16 );
+ void Remove( sal_uInt16 );
void Remove( SbxVariable* );
void Merge( SbxArray* );
- const String& GetAlias( USHORT );
- void PutAlias( const String&, USHORT );
- SbxVariable* FindUserData( UINT32 nUserData );
+ const String& GetAlias( sal_uInt16 );
+ void PutAlias( const String&, sal_uInt16 );
+ SbxVariable* FindUserData( sal_uInt32 nUserData );
virtual SbxVariable* Find( const String&, SbxClassType );
// Additional methods for 32-bit indices
- UINT32 Count32() const;
- SbxVariableRef& GetRef32( UINT32 );
- SbxVariable* Get32( UINT32 );
- void Put32( SbxVariable*, UINT32 );
- void Insert32( SbxVariable*, UINT32 );
- void Remove32( UINT32 );
+ sal_uInt32 Count32() const;
+ SbxVariableRef& GetRef32( sal_uInt32 );
+ SbxVariable* Get32( sal_uInt32 );
+ void Put32( SbxVariable*, sal_uInt32 );
+ void Insert32( SbxVariable*, sal_uInt32 );
+ void Remove32( sal_uInt32 );
};
#endif
@@ -223,15 +223,15 @@ class SbxDimArray : public SbxArray
SbxDim* pFirst, *pLast; // Links to Dimension table
short nDim; // Number of dimensions
- void AddDimImpl32( INT32, INT32, BOOL bAllowSize0 );
+ void AddDimImpl32( sal_Int32, sal_Int32, sal_Bool bAllowSize0 );
bool mbHasFixedSize;
protected:
- USHORT Offset( const short* );
- UINT32 Offset32( const INT32* );
- USHORT Offset( SbxArray* );
- UINT32 Offset32( SbxArray* );
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ sal_uInt16 Offset( const short* );
+ sal_uInt32 Offset32( const sal_Int32* );
+ sal_uInt16 Offset( SbxArray* );
+ sal_uInt32 Offset32( SbxArray* );
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
virtual ~SbxDimArray();
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DIMARRAY,1);
@@ -253,17 +253,17 @@ public:
short GetDims() const { return nDim; }
void AddDim( short, short );
void unoAddDim( short, short );
- BOOL GetDim( short, short&, short& ) const;
+ sal_Bool GetDim( short, short&, short& ) const;
using SbxArray::GetRef32;
- SbxVariableRef& GetRef32( const INT32* );
+ SbxVariableRef& GetRef32( const sal_Int32* );
using SbxArray::Get32;
- SbxVariable* Get32( const INT32* );
+ SbxVariable* Get32( const sal_Int32* );
using SbxArray::Put32;
- void Put32( SbxVariable*, const INT32* );
- void AddDim32( INT32, INT32 );
- void unoAddDim32( INT32, INT32 );
- BOOL GetDim32( INT32, INT32&, INT32& ) const;
+ void Put32( SbxVariable*, const sal_Int32* );
+ void AddDim32( sal_Int32, sal_Int32 );
+ void unoAddDim32( sal_Int32, sal_Int32 );
+ sal_Bool GetDim32( sal_Int32, sal_Int32&, sal_Int32& ) const;
bool hasFixedSize() { return mbHasFixedSize; };
void setHasFixedSize( bool bHasFixedSize ) {mbHasFixedSize = bHasFixedSize; };
};
@@ -278,7 +278,7 @@ class SbxCollection : public SbxObject
void Initialize();
protected:
virtual ~SbxCollection();
- virtual BOOL LoadData( SvStream&, USHORT );
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
// Overridable methods (why not pure virtual?):
@@ -292,7 +292,7 @@ public:
SbxCollection( const String& rClassname );
SbxCollection( const SbxCollection& );
SbxCollection& operator=( const SbxCollection& );
- virtual SbxVariable* FindUserData( UINT32 nUserData );
+ virtual SbxVariable* FindUserData( sal_uInt32 nUserData );
virtual SbxVariable* Find( const String&, SbxClassType );
virtual void Clear();
};
@@ -306,17 +306,17 @@ class SbxStdCollection : public SbxCollection
{
protected:
String aElemClass;
- BOOL bAddRemoveOk;
+ sal_Bool bAddRemoveOk;
virtual ~SbxStdCollection();
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
virtual void CollAdd( SbxArray* pPar );
virtual void CollRemove( SbxArray* pPar );
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_FIXCOLLECTION,1);
TYPEINFO();
SbxStdCollection
- ( const String& rClassname, const String& rElemClass, BOOL=TRUE );
+ ( const String& rClassname, const String& rElemClass, sal_Bool=sal_True );
SbxStdCollection( const SbxStdCollection& );
SbxStdCollection& operator=( const SbxStdCollection& );
virtual void Insert( SbxVariable* );
diff --git a/basic/inc/basic/sbxbase.hxx b/basic/inc/basic/sbxbase.hxx
index 057b4e0a261b..057b4e0a261b 100644..100755
--- a/basic/inc/basic/sbxbase.hxx
+++ b/basic/inc/basic/sbxbase.hxx
diff --git a/basic/inc/basic/sbxcore.hxx b/basic/inc/basic/sbxcore.hxx
index 786a5213f646..f16bcde9449d 100644..100755
--- a/basic/inc/basic/sbxcore.hxx
+++ b/basic/inc/basic/sbxcore.hxx
@@ -46,30 +46,30 @@ class UniString;
// This version of the Macros does not define Load/StorePrivateData()-methods
#define SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer ) \
- virtual UINT32 GetCreator() const { return nCre; } \
- virtual UINT16 GetVersion() const { return nVer; } \
- virtual UINT16 GetSbxId() const { return nSbxId; }
+ virtual sal_uInt32 GetCreator() const { return nCre; } \
+ virtual sal_uInt16 GetVersion() const { return nVer; } \
+ virtual sal_uInt16 GetSbxId() const { return nSbxId; }
#define SBX_DECL_PERSIST_NODATA_() \
- virtual UINT32 GetCreator() const; \
- virtual UINT16 GetVersion() const; \
- virtual UINT16 GetSbxId() const;
+ virtual sal_uInt32 GetCreator() const; \
+ virtual sal_uInt16 GetVersion() const; \
+ virtual sal_uInt16 GetSbxId() const;
// This version of the macro defines Load/StorePrivateData()-methods
#define SBX_DECL_PERSIST( nCre, nSbxId, nVer ) \
- virtual BOOL LoadPrivateData( SvStream&, USHORT ); \
- virtual BOOL StorePrivateData( SvStream& ) const; \
+ virtual sal_Bool LoadPrivateData( SvStream&, sal_uInt16 ); \
+ virtual sal_Bool StorePrivateData( SvStream& ) const; \
SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer )
#define SBX_DECL_PERSIST_() \
- virtual BOOL LoadPrivateData( SvStream&, USHORT ); \
- virtual BOOL StorePrivateData( SvStream& ) const; \
+ virtual sal_Bool LoadPrivateData( SvStream&, sal_uInt16 ); \
+ virtual sal_Bool StorePrivateData( SvStream& ) const; \
SBX_DECL_PERSIST_NODATA_()
#define SBX_IMPL_PERSIST( C, nCre, nSbxId, nVer ) \
- UINT32 C::GetCreator() const { return nCre; } \
- UINT16 C::GetVersion() const { return nVer; } \
- UINT16 C::GetSbxId() const { return nSbxId; }
+ sal_uInt32 C::GetCreator() const { return nCre; } \
+ sal_uInt16 C::GetVersion() const { return nVer; } \
+ sal_uInt16 C::GetSbxId() const { return nSbxId; }
class SbxBase;
class SbxFactory;
@@ -83,10 +83,10 @@ class SbxBase : virtual public SvRefBase
{
SbxBaseImpl* mpSbxBaseImpl; // Impl data
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
protected:
- USHORT nFlags; // Flag-Bits
+ sal_uInt16 nFlags; // Flag-Bits
SbxBase();
SbxBase( const SbxBase& );
@@ -95,21 +95,21 @@ protected:
SBX_DECL_PERSIST(0,0,0);
public:
TYPEINFO();
- inline void SetFlags( USHORT n );
- inline USHORT GetFlags() const;
- inline void SetFlag( USHORT n );
- inline void ResetFlag( USHORT n );
- inline BOOL IsSet( USHORT n ) const;
- inline BOOL IsReset( USHORT n ) const;
- inline BOOL CanRead() const;
- inline BOOL CanWrite() const;
- inline BOOL IsModified() const;
- inline BOOL IsConst() const;
- inline BOOL IsHidden() const;
- inline BOOL IsVisible() const;
-
- virtual BOOL IsFixed() const;
- virtual void SetModified( BOOL );
+ inline void SetFlags( sal_uInt16 n );
+ inline sal_uInt16 GetFlags() const;
+ inline void SetFlag( sal_uInt16 n );
+ inline void ResetFlag( sal_uInt16 n );
+ inline sal_Bool IsSet( sal_uInt16 n ) const;
+ inline sal_Bool IsReset( sal_uInt16 n ) const;
+ inline sal_Bool CanRead() const;
+ inline sal_Bool CanWrite() const;
+ inline sal_Bool IsModified() const;
+ inline sal_Bool IsConst() const;
+ inline sal_Bool IsHidden() const;
+ inline sal_Bool IsVisible() const;
+
+ virtual sal_Bool IsFixed() const;
+ virtual void SetModified( sal_Bool );
virtual SbxDataType GetType() const;
virtual SbxClassType GetClass() const;
@@ -118,24 +118,24 @@ public:
static SbxBase* Load( SvStream& );
static void Skip( SvStream& );
- BOOL Store( SvStream& );
- virtual BOOL LoadCompleted();
- virtual BOOL StoreCompleted();
+ sal_Bool Store( SvStream& );
+ virtual sal_Bool LoadCompleted();
+ virtual sal_Bool StoreCompleted();
static SbxError GetError();
static void SetError( SbxError );
- static BOOL IsError();
+ static sal_Bool IsError();
static void ResetError();
// Set the factory for Load/Store/Create
static void AddFactory( SbxFactory* );
static void RemoveFactory( SbxFactory* );
- static SbxBase* Create( UINT16, UINT32=SBXCR_SBX );
+ static SbxBase* Create( sal_uInt16, sal_uInt32=SBXCR_SBX );
static SbxObject* CreateObject( const String& );
// Sbx solution as replacement for SfxBroadcaster::Enable()
- static void StaticEnableBroadcasting( BOOL bEnable );
- static BOOL StaticIsEnabledBroadcasting( void );
+ static void StaticEnableBroadcasting( sal_Bool bEnable );
+ static sal_Bool StaticIsEnabledBroadcasting( void );
};
#ifndef SBX_BASE_DECL_DEFINED
@@ -143,40 +143,40 @@ public:
SV_DECL_REF(SbxBase)
#endif
-inline void SbxBase::SetFlags( USHORT n )
+inline void SbxBase::SetFlags( sal_uInt16 n )
{ DBG_CHKTHIS( SbxBase, 0 ); nFlags = n; }
-inline USHORT SbxBase::GetFlags() const
+inline sal_uInt16 SbxBase::GetFlags() const
{ DBG_CHKTHIS( SbxBase, 0 ); return nFlags; }
-inline void SbxBase::SetFlag( USHORT n )
+inline void SbxBase::SetFlag( sal_uInt16 n )
{ DBG_CHKTHIS( SbxBase, 0 ); nFlags |= n; }
-inline void SbxBase::ResetFlag( USHORT n )
+inline void SbxBase::ResetFlag( sal_uInt16 n )
{ DBG_CHKTHIS( SbxBase, 0 ); nFlags &= ~n; }
-inline BOOL SbxBase::IsSet( USHORT n ) const
-{ DBG_CHKTHIS( SbxBase, 0 ); return BOOL( ( nFlags & n ) != 0 ); }
+inline sal_Bool SbxBase::IsSet( sal_uInt16 n ) const
+{ DBG_CHKTHIS( SbxBase, 0 ); return sal_Bool( ( nFlags & n ) != 0 ); }
-inline BOOL SbxBase::IsReset( USHORT n ) const
-{ DBG_CHKTHIS( SbxBase, 0 ); return BOOL( ( nFlags & n ) == 0 ); }
+inline sal_Bool SbxBase::IsReset( sal_uInt16 n ) const
+{ DBG_CHKTHIS( SbxBase, 0 ); return sal_Bool( ( nFlags & n ) == 0 ); }
-inline BOOL SbxBase::CanRead() const
+inline sal_Bool SbxBase::CanRead() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_READ ); }
-inline BOOL SbxBase::CanWrite() const
+inline sal_Bool SbxBase::CanWrite() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_WRITE ); }
-inline BOOL SbxBase::IsModified() const
+inline sal_Bool SbxBase::IsModified() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_MODIFIED ); }
-inline BOOL SbxBase::IsConst() const
+inline sal_Bool SbxBase::IsConst() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_CONST ); }
-inline BOOL SbxBase::IsHidden() const
+inline sal_Bool SbxBase::IsHidden() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_HIDDEN ); }
-inline BOOL SbxBase::IsVisible() const
+inline sal_Bool SbxBase::IsVisible() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsReset( SBX_INVISIBLE ); }
#endif
diff --git a/basic/inc/basic/sbxdef.hxx b/basic/inc/basic/sbxdef.hxx
index 0b6ea77c70a2..cc05e3dc1ff3 100644..100755
--- a/basic/inc/basic/sbxdef.hxx
+++ b/basic/inc/basic/sbxdef.hxx
@@ -56,15 +56,15 @@ enum SbxClassType { // SBX-class-IDs (order is important!)
enum SbxDataType {
SbxEMPTY = 0, // * Uninitialized
SbxNULL = 1, // * Contains no valid data
- SbxINTEGER = 2, // * Integer (INT16)
- SbxLONG = 3, // * Long integer (INT32)
+ SbxINTEGER = 2, // * Integer (sal_Int16)
+ SbxLONG = 3, // * Long integer (sal_Int32)
SbxSINGLE = 4, // * Single-precision floating point number (float)
SbxDOUBLE = 5, // * Double-precision floating point number (double)
- SbxCURRENCY = 6, // Currency (INT64)
+ SbxCURRENCY = 6, // Currency (sal_Int64)
SbxDATE = 7, // * Date (double)
SbxSTRING = 8, // * String (StarView)
SbxOBJECT = 9, // * SbxBase object pointer
- SbxERROR = 10, // * Error (UINT16)
+ SbxERROR = 10, // * Error (sal_uInt16)
SbxBOOL = 11, // * Boolean (0 or -1)
SbxVARIANT = 12, // * Display for variant datatype
@@ -72,8 +72,8 @@ enum SbxDataType {
SbxCHAR = 16, // * signed char
SbxBYTE = 17, // * unsigned char
- SbxUSHORT = 18, // * unsigned short (UINT16)
- SbxULONG = 19, // * unsigned long (UINT32)
+ SbxUSHORT = 18, // * unsigned short (sal_uInt16)
+ SbxULONG = 19, // * unsigned long (sal_uInt32)
//deprecated: // old 64bit types kept for backward compatibility in file I/O
SbxLONG64 = 20, // moved to SbxSALINT64 as 64bit int
@@ -111,8 +111,9 @@ enum SbxDataType {
SbxUSERn = 2047 // last user defined data type
};
-const UINT32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000;
-const UINT32 SBX_FIXED_LEN_STRING_FLAG = 0x10000; // same value as above as no conflict possible
+const sal_uInt32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000;
+const sal_uInt32 SBX_TYPE_DIM_AS_NEW_FLAG = 0x20000;
+const sal_uInt32 SBX_FIXED_LEN_STRING_FLAG = 0x10000; // same value as above as no conflict possible
#endif
#ifndef _SBX_OPERATOR
@@ -127,8 +128,8 @@ enum SbxOperator {
SbxPLUS, // this + var
SbxMINUS, // this - var
SbxNEG, // -this (var is ignored)
- SbxIDIV, // this / var (max INT32!)
-
+ SbxIDIV, // this / var (both operands max. sal_Int32!)
+ // Boolean operators (max sal_Int32!):
// Boolean operators (TODO deprecate this limit: max INT32!)
SbxAND, // this & var
SbxOR, // this | var
@@ -164,7 +165,7 @@ enum SbxNameType { // Type of the questioned name of a variable
#endif
// from 1996/3/20: New error messages
-typedef ULONG SbxError; // Preserve old type
+typedef sal_uIntPtr SbxError; // Preserve old type
#endif
@@ -258,6 +259,8 @@ typedef ULONG SbxError; // Preserve old type
#define SBX_REFERENCE 0x4000 // Parameter is Reference (DLL-call)
#define SBX_NO_MODIFY 0x8000 // SetModified is suppressed
#define SBX_WITH_EVENTS 0x0080 // Same value as unused SBX_HIDDEN
+#define SBX_DIM_AS_NEW 0x0800 // Same value as SBX_GBLSEARCH, cannot conflict as one
+ // is used for objects, the other for variables only
// Broadcaster-IDs:
#define SBX_HINT_DYING SFX_HINT_DYING
@@ -294,10 +297,10 @@ typedef ULONG SbxError; // Preserve old type
#define SbxMAXBYTE ( 255)
#define SbxMAXINT ( 32767)
#define SbxMININT (-32768)
-#define SbxMAXUINT ((UINT16) 65535)
+#define SbxMAXUINT ((sal_uInt16) 65535)
#define SbxMAXLNG ( 2147483647)
-#define SbxMINLNG ((INT32)(-2147483647-1))
-#define SbxMAXULNG ((UINT32) 0xffffffff)
+#define SbxMINLNG ((sal_Int32)(-2147483647-1))
+#define SbxMAXULNG ((sal_uInt32) 0xffffffff)
#define SbxMAXSALUINT64 SAL_MAX_UINT64
#define SbxMAXSALINT64 SAL_MAX_INT64
@@ -323,7 +326,7 @@ typedef ULONG SbxError; // Preserve old type
#define SBX_MAXINDEX 0x3FF0
#define SBX_MAXINDEX32 SbxMAXLNG
-
+// The numeric values of sal_True and FALSE
enum SbxBOOL { SbxFALSE = 0, SbxTRUE = -1 };
#endif //ifndef __RSC
diff --git a/basic/inc/basic/sbxfac.hxx b/basic/inc/basic/sbxfac.hxx
index 986339d48aac..8597458c5ec2 100644..100755
--- a/basic/inc/basic/sbxfac.hxx
+++ b/basic/inc/basic/sbxfac.hxx
@@ -38,11 +38,11 @@ class UniString;
class SbxFactory
{
- BOOL bHandleLast; // TRUE: Factory is asked at last because of its expensiveness
+ sal_Bool bHandleLast; // sal_True: Factory is asked at last because of its expensiveness
public:
- SbxFactory( BOOL bLast=FALSE ) { bHandleLast = bLast; }
- BOOL IsHandleLast( void ) { return bHandleLast; }
- virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
+ SbxFactory( sal_Bool bLast=sal_False ) { bHandleLast = bLast; }
+ sal_Bool IsHandleLast( void ) { return bHandleLast; }
+ virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
virtual SbxObject* CreateObject( const String& );
};
diff --git a/basic/inc/basic/sbxform.hxx b/basic/inc/basic/sbxform.hxx
index 0e20dbfd0279..77921a0ce77e 100644..100755
--- a/basic/inc/basic/sbxform.hxx
+++ b/basic/inc/basic/sbxform.hxx
@@ -112,16 +112,16 @@ class SbxBasicFormater {
String BasicFormat( double dNumber, String sFormatStrg );
String BasicFormatNull( String sFormatStrg );
- static BOOL isBasicFormat( String sFormatStrg );
+ static sal_Bool isBasicFormat( String sFormatStrg );
private:
//*** some helper methods ***
//void ShowError( char *sErrMsg );
- inline void ShiftString( String& sStrg, USHORT nStartPos );
+ inline void ShiftString( String& sStrg, sal_uInt16 nStartPos );
inline void StrAppendChar( String& sStrg, sal_Unicode ch );
void AppendDigit( String& sStrg, short nDigit );
void LeftShiftDecimalPoint( String& sStrg );
- void StrRoundDigit( String& sStrg, short nPos, BOOL& bOverflow );
+ void StrRoundDigit( String& sStrg, short nPos, sal_Bool& bOverflow );
void StrRoundDigit( String& sStrg, short nPos );
void ParseBack( String& sStrg, const String& sFormatStrg,
short nFormatPos );
@@ -129,30 +129,30 @@ class SbxBasicFormater {
// Methods for string conversion with sprintf():
void InitScan( double _dNum );
void InitExp( double _dNewExp );
- short GetDigitAtPosScan( short nPos, BOOL& bFoundFirstDigit );
+ short GetDigitAtPosScan( short nPos, sal_Bool& bFoundFirstDigit );
short GetDigitAtPosExpScan( double dNewExponent, short nPos,
- BOOL& bFoundFirstDigit );
- short GetDigitAtPosExpScan( short nPos, BOOL& bFoundFirstDigit );
+ sal_Bool& bFoundFirstDigit );
+ short GetDigitAtPosExpScan( short nPos, sal_Bool& bFoundFirstDigit );
#else
// Methods for direct 'calculation' with log10() and pow():
short GetDigitAtPos( double dNumber, short nPos, double& dNextNumber,
- BOOL& bFoundFirstDigit );
+ sal_Bool& bFoundFirstDigit );
short RoundDigit( double dNumber );
#endif
- String GetPosFormatString( const String& sFormatStrg, BOOL & bFound );
- String GetNegFormatString( const String& sFormatStrg, BOOL & bFound );
- String Get0FormatString( const String& sFormatStrg, BOOL & bFound );
- String GetNullFormatString( const String& sFormatStrg, BOOL & bFound );
+ String GetPosFormatString( const String& sFormatStrg, sal_Bool & bFound );
+ String GetNegFormatString( const String& sFormatStrg, sal_Bool & bFound );
+ String Get0FormatString( const String& sFormatStrg, sal_Bool & bFound );
+ String GetNullFormatString( const String& sFormatStrg, sal_Bool & bFound );
short AnalyseFormatString( const String& sFormatStrg,
short& nNoOfDigitsLeft, short& nNoOfDigitsRight,
short& nNoOfOptionalDigitsLeft,
short& nNoOfExponentDigits,
short& nNoOfOptionalExponentDigits,
- BOOL& bPercent, BOOL& bCurrency, BOOL& bScientific,
- BOOL& bGenerateThousandSeparator,
+ sal_Bool& bPercent, sal_Bool& bCurrency, sal_Bool& bScientific,
+ sal_Bool& bGenerateThousandSeparator,
short& nMultipleThousandSeparators );
void ScanFormatString( double dNumber, const String& sFormatStrg,
- String& sReturnStrg, BOOL bCreateSign );
+ String& sReturnStrg, sal_Bool bCreateSign );
//*** Data ***
sal_Unicode cDecPoint; // sign for the decimal point
diff --git a/basic/inc/basic/sbxmeth.hxx b/basic/inc/basic/sbxmeth.hxx
index d508d1c3e11e..31b07fdca18d 100644..100755
--- a/basic/inc/basic/sbxmeth.hxx
+++ b/basic/inc/basic/sbxmeth.hxx
@@ -45,7 +45,7 @@ public:
SbxMethod( const SbxMethod& r ) : SvRefBase( r ), SbxVariable( r ) {}
SbxMethod& operator=( const SbxMethod& r )
{ SbxVariable::operator=( r ); return *this; }
- BOOL Run( SbxValues* pValues = NULL );
+ sal_Bool Run( SbxValues* pValues = NULL );
virtual SbxClassType GetClass() const;
};
diff --git a/basic/inc/basic/sbxmstrm.hxx b/basic/inc/basic/sbxmstrm.hxx
index f4c6fd7c5ad5..d3197bff883d 100644..100755
--- a/basic/inc/basic/sbxmstrm.hxx
+++ b/basic/inc/basic/sbxmstrm.hxx
@@ -38,7 +38,7 @@ SV_DECL_REF(SbxMemoryStream)
class SbxMemoryStream : public SbxBase, public SvMemoryStream
{
public:
- SbxMemoryStream(ULONG nInitSize_=512, ULONG nResize_=64) :
+ SbxMemoryStream(sal_uIntPtr nInitSize_=512, sal_uIntPtr nResize_=64) :
SvMemoryStream(nInitSize_,nResize_) {}
~SbxMemoryStream();
diff --git a/basic/inc/basic/sbxobj.hxx b/basic/inc/basic/sbxobj.hxx
index 387dc4c7caa5..867cf6e2bd07 100644..100755
--- a/basic/inc/basic/sbxobj.hxx
+++ b/basic/inc/basic/sbxobj.hxx
@@ -43,9 +43,9 @@ class SbxObject : public SbxVariable, public SfxListener
{
SbxObjectImpl* mpSbxObjectImpl; // Impl data
- SbxArray* FindVar( SbxVariable*, USHORT& );
+ SbxArray* FindVar( SbxVariable*, sal_uInt16& );
// AB 23.3.1997, special method for VCPtrRemove (see below)
- SbxArray* VCPtrFindVar( SbxVariable*, USHORT& );
+ SbxArray* VCPtrFindVar( SbxVariable*, sal_uInt16& );
protected:
SbxArrayRef pMethods; // Methods
SbxArrayRef pProps; // Properties
@@ -53,8 +53,8 @@ protected:
SbxProperty* pDfltProp; // Default-Property
String aClassName; // Classname
String aDfltPropName;
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
virtual ~SbxObject();
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
@@ -68,7 +68,7 @@ public:
virtual SbxClassType GetClass() const;
virtual void Clear();
- virtual BOOL IsClass( const String& ) const;
+ virtual sal_Bool IsClass( const String& ) const;
const String& GetClassName() const { return aClassName; }
void SetClassName( const String &rNew ) { aClassName = rNew; }
// Default-Property
@@ -76,15 +76,15 @@ public:
void SetDfltProperty( const String& r );
void SetDfltProperty( SbxProperty* );
// Search for an element
- virtual SbxVariable* FindUserData( UINT32 nUserData );
+ virtual SbxVariable* FindUserData( sal_uInt32 nUserData );
virtual SbxVariable* Find( const String&, SbxClassType );
SbxVariable* FindQualified( const String&, SbxClassType );
// Quick-Call-Interface for Methods
- virtual BOOL Call( const String&, SbxArray* = NULL );
+ virtual sal_Bool Call( const String&, SbxArray* = NULL );
// Execution of DDE-Commands
SbxVariable* Execute( const String& );
// Manage elements
- virtual BOOL GetAll( SbxClassType ) { return TRUE; }
+ virtual sal_Bool GetAll( SbxClassType ) { return sal_True; }
SbxVariable* Make( const String&, SbxClassType, SbxDataType );
virtual SbxObject* MakeObject( const String&, const String& );
virtual void Insert( SbxVariable* );
@@ -97,7 +97,7 @@ public:
virtual void Remove( SbxVariable* );
// AB 23.3.1997, deletion per pointer for controls (duplicate names!)
void VCPtrRemove( SbxVariable* );
- void SetPos( SbxVariable*, USHORT );
+ void SetPos( SbxVariable*, sal_uInt16 );
// Macro-Recording
virtual String GenerateSource( const String &rLinePrefix,
@@ -109,9 +109,9 @@ public:
// Hooks
virtual SvDispatch* GetSvDispatch();
// Debugging
- void Dump( SvStream&, BOOL bDumpAll=FALSE );
+ void Dump( SvStream&, sal_Bool bDumpAll=sal_False );
- static void GarbageCollection( ULONG nObjects = 0 /* ::= all */ );
+ static void GarbageCollection( sal_uIntPtr nObjects = 0 /* ::= all */ );
};
#ifndef __SBX_SBXOBJECTREF_HXX
diff --git a/basic/inc/basic/sbxprop.hxx b/basic/inc/basic/sbxprop.hxx
index 25c875df9222..25c875df9222 100644..100755
--- a/basic/inc/basic/sbxprop.hxx
+++ b/basic/inc/basic/sbxprop.hxx
diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx
index 1e7840950fd7..7f0e5d878225 100644..100755
--- a/basic/inc/basic/sbxvar.hxx
+++ b/basic/inc/basic/sbxvar.hxx
@@ -42,12 +42,12 @@ class SbxDecimal;
struct SbxValues
{
union {
- BYTE nByte;
- UINT16 nUShort;
+ sal_uInt8 nByte;
+ sal_uInt16 nUShort;
sal_Unicode nChar;
- INT16 nInteger;
- UINT32 nULong;
- INT32 nLong;
+ sal_Int16 nInteger;
+ sal_uInt32 nULong;
+ sal_Int32 nLong;
unsigned int nUInt;
int nInt;
sal_uInt64 uInt64;
@@ -61,12 +61,12 @@ struct SbxValues
SbxBase* pObj;
- BYTE* pByte;
- UINT16* pUShort;
+ sal_uInt8* pByte;
+ sal_uInt16* pUShort;
sal_Unicode* pChar;
- INT16* pInteger;
- UINT32* pULong;
- INT32* pLong;
+ sal_Int16* pInteger;
+ sal_uInt32* pULong;
+ sal_Int32* pLong;
unsigned int* pUInt;
int* pInt;
sal_uInt64* puInt64;
@@ -82,11 +82,11 @@ struct SbxValues
SbxValues(): pData( NULL ), eType(SbxEMPTY) {}
SbxValues( SbxDataType e ): eType(e) {}
SbxValues( char _nChar ): nChar( _nChar ), eType(SbxCHAR) {}
- SbxValues( BYTE _nByte ): nByte( _nByte ), eType(SbxBYTE) {}
+ SbxValues( sal_uInt8 _nByte ): nByte( _nByte ), eType(SbxBYTE) {}
SbxValues( short _nInteger ): nInteger( _nInteger ), eType(SbxINTEGER ) {}
SbxValues( long _nLong ): nLong( _nLong ), eType(SbxLONG) {}
- SbxValues( USHORT _nUShort ): nUShort( _nUShort ), eType(SbxUSHORT) {}
- SbxValues( ULONG _nULong ): nULong( _nULong ), eType(SbxULONG) {}
+ SbxValues( sal_uInt16 _nUShort ): nUShort( _nUShort ), eType(SbxUSHORT) {}
+ SbxValues( sal_uIntPtr _nULong ): nULong( _nULong ), eType(SbxULONG) {}
SbxValues( int _nInt ): nInt( _nInt ), eType(SbxINT) {}
SbxValues( unsigned int _nUInt ): nUInt( _nUInt ), eType(SbxUINT) {}
SbxValues( float _nSingle ): nSingle( _nSingle ), eType(SbxSINGLE) {}
@@ -112,17 +112,17 @@ class SbxValue : public SbxBase
SbxValueImpl* mpSbxValueImplImpl; // Impl data
// #55226 Transport additional infos
- SbxValue* TheRealValue( BOOL bObjInObjError ) const;
+ SbxValue* TheRealValue( sal_Bool bObjInObjError ) const;
SbxValue* TheRealValue() const;
protected:
SbxValues aData; // Data
::rtl::OUString aPic; // Picture-String
String aToolString; // tool string copy
- virtual void Broadcast( ULONG ); // Broadcast-Call
+ virtual void Broadcast( sal_uIntPtr ); // Broadcast-Call
virtual ~SbxValue();
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VALUE,1);
TYPEINFO();
@@ -131,54 +131,47 @@ public:
SbxValue( const SbxValue& );
SbxValue& operator=( const SbxValue& );
virtual void Clear();
- virtual BOOL IsFixed() const;
-
- BOOL IsInteger() const { return BOOL( GetType() == SbxINTEGER ); }
- BOOL IsLong() const { return BOOL( GetType() == SbxLONG ); }
- BOOL IsSingle() const { return BOOL( GetType() == SbxSINGLE ); }
- BOOL IsDouble() const { return BOOL( GetType() == SbxDOUBLE ); }
- BOOL IsString() const { return BOOL( GetType() == SbxSTRING ); }
- BOOL IsDate() const { return BOOL( GetType() == SbxDATE ); }
- BOOL IsCurrency() const { return BOOL( GetType() == SbxCURRENCY ); }
- BOOL IsObject() const { return BOOL( GetType() == SbxOBJECT ); }
- BOOL IsDataObject() const { return BOOL( GetType() == SbxDATAOBJECT);}
- BOOL IsBool() const { return BOOL( GetType() == SbxBOOL ); }
- BOOL IsErr() const { return BOOL( GetType() == SbxERROR ); }
- BOOL IsEmpty() const { return BOOL( GetType() == SbxEMPTY ); }
- BOOL IsNull() const { return BOOL( GetType() == SbxNULL ); }
- BOOL IsChar() const { return BOOL( GetType() == SbxCHAR ); }
- BOOL IsByte() const { return BOOL( GetType() == SbxBYTE ); }
- BOOL IsUShort() const { return BOOL( GetType() == SbxUSHORT ); }
- BOOL IsULong() const { return BOOL( GetType() == SbxULONG ); }
- BOOL IsInt() const { return BOOL( GetType() == SbxINT ); }
- BOOL IsUInt() const { return BOOL( GetType() == SbxUINT ); }
- BOOL IspChar() const { return BOOL( GetType() == SbxLPSTR ); }
- BOOL IsNumeric() const;
- BOOL IsNumericRTL() const; // #41692 Interface for Basic
- BOOL ImpIsNumeric( BOOL bOnlyIntntl ) const; // Implementation
+ virtual sal_Bool IsFixed() const;
+
+ sal_Bool IsInteger() const { return sal_Bool( GetType() == SbxINTEGER ); }
+ sal_Bool IsLong() const { return sal_Bool( GetType() == SbxLONG ); }
+ sal_Bool IsSingle() const { return sal_Bool( GetType() == SbxSINGLE ); }
+ sal_Bool IsDouble() const { return sal_Bool( GetType() == SbxDOUBLE ); }
+ sal_Bool IsString() const { return sal_Bool( GetType() == SbxSTRING ); }
+ sal_Bool IsDate() const { return sal_Bool( GetType() == SbxDATE ); }
+ sal_Bool IsCurrency()const { return sal_Bool( GetType() == SbxCURRENCY ); }
+ sal_Bool IsObject() const { return sal_Bool( GetType() == SbxOBJECT ); }
+ sal_Bool IsDataObject()const{return sal_Bool( GetType() == SbxDATAOBJECT);}
+ sal_Bool IsBool() const { return sal_Bool( GetType() == SbxBOOL ); }
+ sal_Bool IsErr() const { return sal_Bool( GetType() == SbxERROR ); }
+ sal_Bool IsEmpty() const { return sal_Bool( GetType() == SbxEMPTY ); }
+ sal_Bool IsNull() const { return sal_Bool( GetType() == SbxNULL ); }
+ sal_Bool IsChar() const { return sal_Bool( GetType() == SbxCHAR ); }
+ sal_Bool IsByte() const { return sal_Bool( GetType() == SbxBYTE ); }
+ sal_Bool IsUShort() const { return sal_Bool( GetType() == SbxUSHORT ); }
+ sal_Bool IsULong() const { return sal_Bool( GetType() == SbxULONG ); }
+ sal_Bool IsInt() const { return sal_Bool( GetType() == SbxINT ); }
+ sal_Bool IsUInt() const { return sal_Bool( GetType() == SbxUINT ); }
+ sal_Bool IspChar() const { return sal_Bool( GetType() == SbxLPSTR ); }
+ sal_Bool IsNumeric() const;
+ sal_Bool IsNumericRTL() const; // #41692 Interface for Basic
+ sal_Bool ImpIsNumeric( sal_Bool bOnlyIntntl ) const; // Implementation
virtual SbxClassType GetClass() const;
virtual SbxDataType GetType() const;
SbxDataType GetFullType() const;
- BOOL SetType( SbxDataType );
+ sal_Bool SetType( SbxDataType );
- virtual BOOL Get( SbxValues& ) const;
- BOOL GetNoBroadcast( SbxValues& );
+ virtual sal_Bool Get( SbxValues& ) const;
+ sal_Bool GetNoBroadcast( SbxValues& );
const SbxValues& GetValues_Impl() const { return aData; }
- virtual BOOL Put( const SbxValues& );
+ virtual sal_Bool Put( const SbxValues& );
inline SbxValues * data() { return &aData; }
- UINT16 GetErr() const;
-
- BOOL GetBool() const;
- BYTE GetByte() const;
sal_Unicode GetChar() const;
- UINT16 GetUShort() const;
- UINT32 GetULong() const;
- int GetInt() const;
- INT16 GetInteger() const;
- INT32 GetLong() const;
+ sal_Int16 GetInteger() const;
+ sal_Int32 GetLong() const;
sal_Int64 GetInt64() const;
sal_uInt64 GetUInt64() const;
@@ -189,55 +182,56 @@ public:
double GetDouble() const;
double GetDate() const;
+ sal_Bool GetBool() const;
+ sal_uInt16 GetErr() const;
const String& GetString() const;
const String& GetCoreString() const;
rtl::OUString GetOUString() const;
SbxBase* GetObject() const;
- BOOL HasObject() const;
+ sal_Bool HasObject() const;
void* GetData() const;
-
-
- BOOL PutEmpty();
- BOOL PutNull();
- BOOL PutErr( USHORT );
-
- BOOL PutBool( BOOL );
- BOOL PutByte( BYTE );
- BOOL PutChar( sal_Unicode );
- BOOL PutUShort( UINT16 );
- BOOL PutULong( UINT32 );
- BOOL PutInt( int );
- BOOL PutInteger( INT16 );
- BOOL PutLong( INT32 );
- BOOL PutInt64( sal_Int64 );
- BOOL PutUInt64( sal_uInt64 );
-
- BOOL PutSingle( float );
- BOOL PutDouble( double );
- BOOL PutDate( double );
-
- // with extended analysis (International, "TRUE"/"FALSE")
- BOOL PutStringExt( const ::rtl::OUString& );
- BOOL PutString( const ::rtl::OUString& );
- BOOL PutString( const sal_Unicode* ); // Type = SbxSTRING
- BOOL PutpChar( const sal_Unicode* ); // Type = SbxLPSTR
+ sal_uInt8 GetByte() const;
+ sal_uInt16 GetUShort() const;
+ sal_uInt32 GetULong() const;
+ int GetInt() const;
+
+ sal_Bool PutInteger( sal_Int16 );
+ sal_Bool PutLong( sal_Int32 );
+ sal_Bool PutSingle( float );
+ sal_Bool PutDouble( double );
+ sal_Bool PutDate( double );
+ sal_Bool PutBool( sal_Bool );
+ sal_Bool PutErr( sal_uInt16 );
+ sal_Bool PutStringExt( const ::rtl::OUString& ); // with extended analysis (International, "sal_True"/"sal_False")
+ sal_Bool PutInt64( sal_Int64 );
+ sal_Bool PutUInt64( sal_uInt64 );
+ sal_Bool PutString( const ::rtl::OUString& );
+ sal_Bool PutString( const sal_Unicode* ); // Type = SbxSTRING
+ sal_Bool PutpChar( const sal_Unicode* ); // Type = SbxLPSTR
+ sal_Bool PutChar( sal_Unicode );
+ sal_Bool PutByte( sal_uInt8 );
+ sal_Bool PutUShort( sal_uInt16 );
+ sal_Bool PutULong( sal_uInt32 );
+ sal_Bool PutInt( int );
+ sal_Bool PutEmpty();
+ sal_Bool PutNull();
// Special methods
- BOOL PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
- BOOL fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
- BOOL PutDecimal( SbxDecimal* pDecimal );
- BOOL PutCurrency( const sal_Int64& );
+ sal_Bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
+ sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
+ sal_Bool PutDecimal( SbxDecimal* pDecimal );
+ sal_Bool PutCurrency( const sal_Int64& );
// Interface for CDbl in Basic
- static SbxError ScanNumIntnl( const String& rSrc, double& nVal, BOOL bSingle=FALSE );
+ static SbxError ScanNumIntnl( const String& rSrc, double& nVal, sal_Bool bSingle = sal_False );
- BOOL PutObject( SbxBase* );
- BOOL PutData( void* );
+ sal_Bool PutObject( SbxBase* );
+ sal_Bool PutData( void* );
- virtual BOOL Convert( SbxDataType );
- virtual BOOL Compute( SbxOperator, const SbxValue& );
- virtual BOOL Compare( SbxOperator, const SbxValue& ) const;
- BOOL Scan( const String&, USHORT* = NULL );
+ virtual sal_Bool Convert( SbxDataType );
+ virtual sal_Bool Compute( SbxOperator, const SbxValue& );
+ virtual sal_Bool Compare( SbxOperator, const SbxValue& ) const;
+ sal_Bool Scan( const String&, sal_uInt16* = NULL );
void Format( String&, const String* = NULL ) const;
// The following operators are definied for easier handling.
@@ -324,6 +318,7 @@ SV_DECL_REF(SbxInfo)
class SfxBroadcaster;
class SbxVariableImpl;
+class StarBASIC;
class SbxVariable : public SbxValue
{
@@ -333,7 +328,7 @@ class SbxVariable : public SbxValue
SfxBroadcaster* pCst; // Broadcaster, if needed
String maName; // Name, if available
SbxArrayRef mpPar; // Parameter-Array, if set
- USHORT nHash; // Hash-ID for search
+ sal_uInt16 nHash; // Hash-ID for search
SbxVariableImpl* getImpl( void );
@@ -342,8 +337,8 @@ protected:
sal_uIntPtr nUserData; // User data for Call()
SbxObject* pParent; // Currently attached object
virtual ~SbxVariable();
- virtual BOOL LoadData( SvStream&, USHORT );
- virtual BOOL StoreData( SvStream& ) const;
+ virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
+ virtual sal_Bool StoreData( SvStream& ) const;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VARIABLE,2);
TYPEINFO();
@@ -352,13 +347,13 @@ public:
SbxVariable( const SbxVariable& );
SbxVariable& operator=( const SbxVariable& );
- void Dump( SvStream&, BOOL bDumpAll=FALSE );
+ void Dump( SvStream&, sal_Bool bDumpAll=sal_False );
virtual void SetName( const String& );
virtual const String& GetName( SbxNameType = SbxNAME_NONE ) const;
- USHORT GetHashCode() const { return nHash; }
+ sal_uInt16 GetHashCode() const { return nHash; }
- virtual void SetModified( BOOL );
+ virtual void SetModified( sal_Bool );
sal_uIntPtr GetUserData() const { return nUserData; }
void SetUserData( sal_uIntPtr n ) { nUserData = n; }
@@ -375,8 +370,8 @@ public:
// Sfx-Broadcasting-Support:
// Due to data reduction and better DLL-hierarchie currently via casting
SfxBroadcaster& GetBroadcaster();
- BOOL IsBroadcaster() const { return BOOL( pCst != NULL ); }
- virtual void Broadcast( ULONG nHintId );
+ sal_Bool IsBroadcaster() const { return sal_Bool( pCst != NULL ); }
+ virtual void Broadcast( sal_uIntPtr nHintId );
inline const SbxObject* GetParent() const { return pParent; }
inline SbxObject* GetParent() { return pParent; }
@@ -384,9 +379,11 @@ public:
const String& GetDeclareClassName( void );
void SetDeclareClassName( const String& );
- void SetComListener( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xComListener );
+ void SetComListener( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xComListener,
+ StarBASIC* pParentBasic );
+ void ClearComListener( void );
- static USHORT MakeHashCode( const String& rName );
+ static sal_uInt16 MakeHashCode( const String& rName );
};
#ifndef SBX_VARIABLE_DECL_DEFINED
diff --git a/basic/inc/basic/svtmsg.hrc b/basic/inc/basic/svtmsg.hrc
new file mode 100755
index 000000000000..ff215d3fc9cb
--- /dev/null
+++ b/basic/inc/basic/svtmsg.hrc
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "basic/ttglobal.hrc"
+
+
+// Here are the messages of /basic/source/app included
+
+///////////////////////////////
+// Error message that go to the Resultfile.
+// *********************
+// *** !!ATTENTION!! ***
+// *********************
+// Theses numbers MUST NOT change ever!
+// Because they are stored in the Resultfiles and if you showed them again
+// the appropriate new or no Strings are viewed.
+///////////////////////////////
+
+#define S_GPF_ABORT ( SVT_START + 0 )
+#define S_APP_SHUTDOWN ( SVT_START + 1 )
+#define S_SID_EXECUTE_FAILED_NO_DISPATCHER ( SVT_START + 2 )
+#define S_SID_EXECUTE_FAILED ( SVT_START + 3 )
+#define S_UNO_PROPERTY_NITIALIZE_FAILED ( SVT_START + 4 )
+#define S_RESETAPPLICATION_FAILED_COMPLEX ( SVT_START + 5 )
+#define S_RESETAPPLICATION_FAILED_UNKNOWN ( SVT_START + 6 )
+#define S_NO_ACTIVE_WINDOW ( SVT_START + 7 )
+#define S_NO_DIALOG_IN_GETACTIVE ( SVT_START + 8 )
+#define S_NO_POPUP ( SVT_START + 9 )
+#define S_NO_SUBMENU ( SVT_START + 10 )
+#define S_CONTROLTYPE_NOT_SUPPORTED ( SVT_START + 11 )
+#define S_SELECTION_BY_ATTRIBUTE_ONLY_DIRECTORIES ( SVT_START + 12 )
+#define S_NO_MORE_FILES ( SVT_START + 13 )
+#define S_UNKNOWN_METHOD ( SVT_START + 14 )
+#define S_INVALID_PARAMETERS ( SVT_START + 15 )
+#define S_POINTER_OUTSIDE_APPWIN ( SVT_START + 16 )
+#define S_UNKNOWN_COMMAND ( SVT_START + 17 )
+#define S_WIN_NOT_FOUND ( SVT_START + 18 )
+#define S_WIN_INVISIBLE ( SVT_START + 19 )
+#define S_WIN_DISABLED ( SVT_START + 20 )
+#define S_NUMBER_TOO_BIG ( SVT_START + 21 )
+#define S_NUMBER_TOO_SMALL ( SVT_START + 22 )
+#define S_WINDOW_DISAPPEARED ( SVT_START + 23 )
+#define S_ERROR_SAVING_IMAGE ( SVT_START + 24 )
+#define S_INVALID_POSITION ( SVT_START + 25 )
+#define S_SPLITWIN_NOT_FOUND ( SVT_START + 26 )
+#define S_INTERNAL_ERROR ( SVT_START + 27 )
+#define S_NO_STATUSBAR ( SVT_START + 28 )
+#define S_ITEMS_INVISIBLE ( SVT_START + 29 )
+#define S_TABPAGE_NOT_FOUND ( SVT_START + 30 )
+#define S_TRISTATE_NOT_ALLOWED ( SVT_START + 31 )
+#define S_ERROR_IN_SET_TEXT ( SVT_START + 32 )
+#define S_ATTEMPT_TO_WRITE_READONLY ( SVT_START + 33 )
+#define S_NO_SELECT_FALSE ( SVT_START + 34 )
+#define S_ENTRY_NOT_FOUND ( SVT_START + 35 )
+#define S_METHOD_FAILED ( SVT_START + 36 )
+#define S_HELPID_ON_TOOLBOX_NOT_FOUND ( SVT_START + 37 )
+#define S_BUTTON_DISABLED_ON_TOOLBOX ( SVT_START + 38 )
+#define S_BUTTON_HIDDEN_ON_TOOLBOX ( SVT_START + 39 )
+#define S_CANNOT_MAKE_BUTTON_VISIBLE_IN_TOOLBOX ( SVT_START + 40 )
+#define S_TEAROFF_FAILED ( SVT_START + 41 )
+#define S_NO_SELECTED_ENTRY_DEPRECATED ( SVT_START + 42 ) // Has to stay in for old res files
+#define S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED ( SVT_START + 43 )
+#define S_ALLOWED_ONLY_IN_FLOATING_MODE ( SVT_START + 44 )
+#define S_ALLOWED_ONLY_IN_DOCKING_MODE ( SVT_START + 45 )
+#define S_SIZE_NOT_CHANGEABLE ( SVT_START + 46 )
+#define S_NO_OK_BUTTON ( SVT_START + 47 )
+#define S_NO_CANCEL_BUTTON ( SVT_START + 48 )
+#define S_NO_YES_BUTTON ( SVT_START + 49 )
+#define S_NO_NO_BUTTON ( SVT_START + 50 )
+#define S_NO_RETRY_BUTTON ( SVT_START + 51 )
+#define S_NO_HELP_BUTTON ( SVT_START + 52 )
+#define S_NO_DEFAULT_BUTTON ( SVT_START + 53 )
+#define S_BUTTON_ID_NOT_THERE ( SVT_START + 54 )
+#define S_BUTTONID_REQUIRED ( SVT_START + 55 )
+#define S_UNKNOWN_TYPE ( SVT_START + 56 )
+#define S_UNPACKING_STORAGE_FAILED ( SVT_START + 57 )
+#define S_NO_LIST_BOX_BUTTON ( SVT_START + 58 )
+#define S_UNO_URL_EXECUTE_FAILED_NO_DISPATCHER ( SVT_START + 59 )
+#define S_UNO_URL_EXECUTE_FAILED_NO_FRAME ( SVT_START + 60 )
+#define S_NO_MENU ( SVT_START + 61 )
+#define S_NO_SELECTED_ENTRY ( SVT_START + 62 )
+#define S_UNO_URL_EXECUTE_FAILED_DISABLED ( SVT_START + 63 )
+#define S_NO_SCROLLBAR ( SVT_START + 64 )
+#define S_NO_SAX_PARSER ( SVT_START + 65 )
+#define S_CANNOT_CREATE_DIRECTORY ( SVT_START + 66 )
+#define S_DIRECTORY_NOT_EMPTY ( SVT_START + 67 )
+#define S_DEPRECATED ( SVT_START + 68 )
+#define S_SIZE_BELOW_MINIMUM ( SVT_START + 69 )
+#define S_CANNOT_FIND_FLOATING_WIN ( SVT_START + 70 )
+#define S_NO_LIST_BOX_STRING ( SVT_START + 71 )
+#define S_SLOT_IN_EXECUTE ( SVT_START + 72 )
+#define S_MENU_NOT_CLOSING ( SVT_START + 73 )
diff --git a/basic/inc/basic/testtool.hrc b/basic/inc/basic/testtool.hrc
new file mode 100755
index 000000000000..075b462944c9
--- /dev/null
+++ b/basic/inc/basic/testtool.hrc
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define S_INVALID_KEYCODE 257
+#define S_MANDATORY_FILE 258
+#define S_READING_LONGNAMES 259
+#define S_READING_SLOT_IDS 260
+#define S_READING_CONTROLS 261
+#define S_READING_BASIC_MODULE 262
+#define S_STARTING_APPLICATION 263
+
+
+
diff --git a/basic/inc/basic/testtool.hxx b/basic/inc/basic/testtool.hxx
index 81570d3f60c8..ee0bd25f8ab4 100644..100755
--- a/basic/inc/basic/testtool.hxx
+++ b/basic/inc/basic/testtool.hxx
@@ -41,7 +41,7 @@
// #94145# Due to a tab in TT_SIGNATURE_FOR_UNICODE_TEXTFILES which is changed to blanks by some editors
// this routine became necessary
-BOOL IsTTSignatureForUnicodeTextfile( String aLine );
+sal_Bool IsTTSignatureForUnicodeTextfile( String aLine );
#define ADD_ERROR_QUIET(nNr, aStr) \
{ \
@@ -101,9 +101,9 @@ public:
String aKurzname;
String aSlotname;
String aLangname;
- USHORT nRType;
+ sal_uInt16 nRType;
String aRName;
- BOOL bIsReset;
+ sal_Bool bIsReset;
};
// Defines for syntax Highlighting
@@ -132,20 +132,20 @@ public:
class TTExecutionStatusHint : public SfxSimpleHint
{
private:
- USHORT mnType;
+ sal_uInt16 mnType;
String maExecutionStatus;
String maAdditionalExecutionStatus;
public:
TYPEINFO();
- TTExecutionStatusHint( USHORT nType, sal_Char *pExecutionStatus, const sal_Char *pAdditionalExecutionStatus = "" )
+ TTExecutionStatusHint( sal_uInt16 nType, sal_Char *pExecutionStatus, const sal_Char *pAdditionalExecutionStatus = "" )
: SfxSimpleHint(SBX_HINT_EXECUTION_STATUS_INFORMATION)
, mnType( nType )
, maExecutionStatus( pExecutionStatus, RTL_TEXTENCODING_ASCII_US )
, maAdditionalExecutionStatus( pAdditionalExecutionStatus, RTL_TEXTENCODING_ASCII_US )
{;}
- TTExecutionStatusHint( USHORT nType, const String &aExecutionStatus = String(), const String &aAdditionalExecutionStatus = String() )
+ TTExecutionStatusHint( sal_uInt16 nType, const String &aExecutionStatus = String(), const String &aAdditionalExecutionStatus = String() )
: SfxSimpleHint(SBX_HINT_EXECUTION_STATUS_INFORMATION)
, mnType( nType )
, maExecutionStatus( aExecutionStatus )
@@ -154,7 +154,7 @@ public:
const String& GetExecutionStatus() const { return maExecutionStatus; }
const String& GetAdditionalExecutionStatus() const { return maAdditionalExecutionStatus; }
- USHORT GetType(){ return mnType; }
+ sal_uInt16 GetType(){ return mnType; }
};
#endif // _BASIC_TESTTOOL_HXX_
diff --git a/basic/inc/basic/ttglobal.hrc b/basic/inc/basic/ttglobal.hrc
index 0248a06c7247..0248a06c7247 100644..100755
--- a/basic/inc/basic/ttglobal.hrc
+++ b/basic/inc/basic/ttglobal.hrc
diff --git a/basic/inc/basic/ttmsg.hrc b/basic/inc/basic/ttmsg.hrc
new file mode 100755
index 000000000000..26f250bc6a6a
--- /dev/null
+++ b/basic/inc/basic/ttmsg.hrc
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "basic/ttglobal.hrc"
+
+
+// Here are the messages of directory /basic/source/testtool included
+
+///////////////////////////////
+// Error message that go to the Resultfile.
+// *********************
+// *** !!ATTENTION!! ***
+// *********************
+// Theses numbers MUST NOT change ever!
+// Because they are stored in the Resultfiles and if you showed them again
+// the appropriate new or no Strings are viewed.
+///////////////////////////////
+
+#define S_NAME_NOT_THERE ( TT_START + 0 )
+#define S_DOUBLE_NAME ( TT_START + 1 )
+#define S_READING_FILE ( TT_START + 2 )
+#define S_CANNOT_OPEN_FILE ( TT_START + 3 )
+#define S_INVALID_LINE ( TT_START + 4 )
+#define S_SHORTNAME_UNKNOWN ( TT_START + 5 )
+#define S_LONGNAME_UNKNOWN ( TT_START + 6 )
+#define S_FIRST_SHORTNAME_REQ_ASTRX ( TT_START + 7 )
+#define S_TIMOUT_WAITING ( TT_START + 8 )
+#define S_APPLICATION_RESTARTED ( TT_START + 9 )
+#define S_APPLICATION_START_FAILED ( TT_START + 10 )
+#define S_TIMOUT_SENDING ( TT_START + 11 )
+#define S_NO_CONNECTION ( TT_START + 12 )
+#define S_NO_FILES_FOUND ( TT_START + 13 ) // Not used anymore. needed only for old *.res files
+#define S_ERRORS_DETECTED ( TT_START + 14 )
+#define S_NO_ERRORS_DETECTED ( TT_START + 15 )
+#define S_WARNINGS_DETECTED ( TT_START + 16 )
+#define S_NO_WARNINGS_DETECTED ( TT_START + 17 )
+#define S_UNKNOWN_SLOT_CONTROL ( TT_START + 18 )
+#define S_RETURN_SEQUENCE_MISSMATCH ( TT_START + 19 )
+#define S_RETURNED_VALUE_ID_MISSMATCH ( TT_START + 20 )
+#define S_RETURNED_VALUE_NO_RECEIVER ( TT_START + 21 )
+#define S_UNKNOWN_METHOD ( TT_START + 22 )
+#define S_INCLUDE_FILE_WARNINGS_DETECTED ( TT_START + 23 )
+#define S_NO_INCLUDE_FILE_WARNINGS_DETECTED ( TT_START + 24 )
+
+// Strings
+
+
+/*
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+#define S_ ( TT_START + 0 )
+*/
diff --git a/basic/inc/basic/ttstrhlp.hxx b/basic/inc/basic/ttstrhlp.hxx
index be65e0ed3092..adf9068fbdf7 100644..100755
--- a/basic/inc/basic/ttstrhlp.hxx
+++ b/basic/inc/basic/ttstrhlp.hxx
@@ -32,6 +32,8 @@
#define CByteString( constAsciiStr ) ByteString( RTL_CONSTASCII_STRINGPARAM ( constAsciiStr ) )
#define CUniString( constAsciiStr ) UniString( RTL_CONSTASCII_USTRINGPARAM ( constAsciiStr ) )
+#define Str2Id( Str ) rtl::OUStringToOString( Str, RTL_TEXTENCODING_ASCII_US )
+#define Id2Str( Id ) String( rtl::OStringToOUString( Id, RTL_TEXTENCODING_ASCII_US ) )
#define StartKenn CUniString("%")
#define EndKenn CUniString("%")
@@ -43,7 +45,7 @@
#define TabKenn ( StartKenn.AppendAscii("Tab") )
#define MakeStringParam(Type,aText) ( Type.AppendAscii("=").Append( aText ).Append( EndKenn ) )
#define MakeStringNumber(Type,nNumber) MakeStringParam (Type, UniString::CreateFromInt32(nNumber))
-#define UIdString(aID) MakeStringParam(UIdKenn,aID.GetText())
+#define UIdString(aID) MakeStringParam(UIdKenn,String(rtl::OStringToOUString( aID, RTL_TEXTENCODING_ASCII_US )))
#define MethodString(nNumber) MakeStringNumber(MethodKenn,nNumber)
#define TypeString(nNumber) MakeStringNumber(TypeKenn,nNumber)
#define SlotString(nNumber) MakeStringNumber(SlotKenn,nNumber)
@@ -56,20 +58,20 @@
#define ResString(nNumber) MakeStringNumber(ResKenn,nNumber)
#define ArgString(nNumber, aText) MakeStringParam(ArgKenn(nNumber),aText)
-UniString GEN_RES_STR0( ULONG nResId );
-UniString GEN_RES_STR1( ULONG nResId, const String &Text1 );
-UniString GEN_RES_STR2( ULONG nResId, const String &Text1, const String &Text2 );
-UniString GEN_RES_STR3( ULONG nResId, const String &Text1, const String &Text2, const String &Text3 );
+UniString GEN_RES_STR0( sal_uIntPtr nResId );
+UniString GEN_RES_STR1( sal_uIntPtr nResId, const String &Text1 );
+UniString GEN_RES_STR2( sal_uIntPtr nResId, const String &Text1, const String &Text2 );
+UniString GEN_RES_STR3( sal_uIntPtr nResId, const String &Text1, const String &Text2, const String &Text3 );
#define GEN_RES_STR1c( nResId, Text1 ) GEN_RES_STR1( nResId, CUniString(Text1) )
#define GEN_RES_STR2c2( nResId, Text1, Text2 ) GEN_RES_STR2( nResId, Text1, CUniString(Text2) )
#define GEN_RES_STR3c3( nResId, Text1, Text2, Text3 ) GEN_RES_STR3( nResId, Text1, Text2, CUniString(Text3) )
#define IMPL_GEN_RES_STR \
-UniString GEN_RES_STR0( ULONG nResId ) { return ResString( nResId ); } \
-UniString GEN_RES_STR1( ULONG nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } \
-UniString GEN_RES_STR2( ULONG nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } \
-UniString GEN_RES_STR3( ULONG nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );}
+UniString GEN_RES_STR0( sal_uIntPtr nResId ) { return ResString( nResId ); } \
+UniString GEN_RES_STR1( sal_uIntPtr nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } \
+UniString GEN_RES_STR2( sal_uIntPtr nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } \
+UniString GEN_RES_STR3( sal_uIntPtr nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );}
#endif
diff --git a/basic/inc/basic/vbahelper.hxx b/basic/inc/basic/vbahelper.hxx
new file mode 100755
index 000000000000..0d99387965fe
--- /dev/null
+++ b/basic/inc/basic/vbahelper.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef BASIC_VBAHELPR_HXX
+#define BASIC_VBAHELPR_HXX
+
+#include <com/sun/star/frame/XModel.hpp>
+
+namespace basic {
+namespace vba {
+
+/* This header contains public helper functions for VBA used from this module
+ and from other VBA implementation modules such as vbahelper.
+ */
+
+// ============================================================================
+
+/** Locks or unlocks the controllers of all documents that have the same type
+ as the specified document.
+
+ First, the global module manager (com.sun.star.frame.ModuleManager) is
+ asked for the type of the passed model, and all open documents with the
+ same type will be locked or unlocked.
+
+ @param rxModel
+ A document model determining the type of the documents to be locked or
+ unlocked.
+
+ @param bLockControllers
+ Passing true will lock all controllers, passing false will unlock them.
+ */
+void lockControllersOfAllDocuments(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel,
+ sal_Bool bLockControllers );
+
+// ============================================================================
+
+/** Enables or disables the container windows of all controllers of all
+ documents that have the same type as the specified document.
+
+ First, the global module manager (com.sun.star.frame.ModuleManager) is
+ asked for the type of the passed model, and the container windows of all
+ open documents with the same type will be enabled or disabled.
+
+ @param rxModel
+ A document model determining the type of the documents to be enabled or
+ disabled.
+
+ @param bEnableWindows
+ Passing true will enable all container windows of all controllers,
+ passing false will disable them.
+ */
+void enableContainerWindowsOfAllDocuments(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel,
+ sal_Bool bEnableWindows );
+
+// ============================================================================
+
+} // namespace vba
+} // namespace basic
+
+#endif