removetooltypes01: #i112600# adjust basic and scaddins
This commit is contained in:
@@ -44,8 +44,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();
|
||||
};
|
||||
|
||||
@@ -67,12 +67,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
|
||||
|
||||
+32
-32
@@ -68,21 +68,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; }
|
||||
};
|
||||
|
||||
@@ -146,33 +146,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(); // Nur zum anpassen von Pfaden bei 'Speichern unter'.
|
||||
~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
|
||||
|
||||
@@ -189,12 +189,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
|
||||
|
||||
@@ -208,14 +208,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 wird nur beim Speichern zurueckgesetzt.
|
||||
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,14 +238,14 @@ public:
|
||||
bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& _out_rModuleNames );
|
||||
|
||||
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 >&
|
||||
|
||||
@@ -38,8 +38,8 @@ private:
|
||||
ResMgr* pSttResMgr;
|
||||
ResMgr* pBasResMgr;
|
||||
|
||||
BOOL bDebugMode;
|
||||
BOOL bBreakEnabled;
|
||||
sal_Bool bDebugMode;
|
||||
sal_Bool bBreakEnabled;
|
||||
|
||||
public:
|
||||
BasicDLL();
|
||||
@@ -50,8 +50,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 ) )
|
||||
|
||||
@@ -36,10 +36,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();
|
||||
};
|
||||
|
||||
@@ -51,8 +51,8 @@ DECLARE_LIST( ErrorList, BasicError* )
|
||||
class MyBasic : public StarBASIC
|
||||
{
|
||||
SbError nError;
|
||||
virtual BOOL ErrorHdl();
|
||||
virtual USHORT BreakHdl();
|
||||
virtual sal_Bool ErrorHdl();
|
||||
virtual sal_uInt16 BreakHdl();
|
||||
|
||||
protected:
|
||||
Link GenLogHdl();
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
ErrorList aErrors;
|
||||
MyBasic();
|
||||
virtual ~MyBasic();
|
||||
virtual BOOL Compile( SbModule* );
|
||||
virtual sal_Bool Compile( SbModule* );
|
||||
void Reset();
|
||||
SbError GetErrors() { return nError; }
|
||||
|
||||
@@ -80,10 +80,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();
|
||||
|
||||
@@ -42,22 +42,22 @@ class Process
|
||||
vos::OArgumentList *pArgumentList;
|
||||
vos::OEnvironment *pEnvList;
|
||||
vos::OProcess *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
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <basic/sbxdef.hxx>
|
||||
|
||||
#ifndef __RSC
|
||||
typedef ULONG SbError;
|
||||
typedef sal_uIntPtr SbError;
|
||||
#endif
|
||||
|
||||
// Mapping to SbxError
|
||||
|
||||
+11
-11
@@ -47,15 +47,15 @@ class SbMethod : public SbxMethod
|
||||
|
||||
SbMethodImpl* mpSbMethodImpl; // Impl data
|
||||
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:
|
||||
@@ -66,14 +66,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& );
|
||||
|
||||
// Schnittstelle zum Ausfuehren einer Methode aus den Applikationen
|
||||
virtual ErrCode Call( SbxValue* pRet = NULL );
|
||||
virtual void Broadcast( ULONG nHintId );
|
||||
virtual void Broadcast( sal_uIntPtr nHintId );
|
||||
};
|
||||
|
||||
#ifndef __SB_SBMETHODREF_HXX
|
||||
|
||||
+31
-31
@@ -40,7 +40,7 @@
|
||||
class SbMethod;
|
||||
class SbProperty;
|
||||
class SbiRuntime;
|
||||
typedef std::deque< USHORT > SbiBreakpoints;
|
||||
typedef std::deque< sal_uInt16 > SbiBreakpoints;
|
||||
class SbiImage;
|
||||
class SbProcedureProperty;
|
||||
class SbIfaceMapperMethod;
|
||||
@@ -72,8 +72,8 @@ 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;
|
||||
|
||||
@@ -83,19 +83,19 @@ protected:
|
||||
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 ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic );
|
||||
void GlobalRunInit( BOOL bBasicStart ); // for all modules
|
||||
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 );
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
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();
|
||||
|
||||
@@ -116,33 +116,33 @@ 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 sal_Bool IsBreakable( sal_uInt16 nLine ) const;
|
||||
virtual size_t GetBPCount() const;
|
||||
virtual USHORT GetBP( size_t n ) const;
|
||||
virtual BOOL IsBP( USHORT nLine ) const;
|
||||
virtual BOOL SetBP( USHORT nLine );
|
||||
virtual BOOL ClearBP( USHORT nLine );
|
||||
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 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();
|
||||
|
||||
@@ -117,7 +117,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 );
|
||||
};
|
||||
|
||||
|
||||
@@ -39,7 +39,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:
|
||||
|
||||
+41
-41
@@ -67,13 +67,13 @@ 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( );
|
||||
@@ -81,19 +81,19 @@ class StarBASIC : public SbxObject
|
||||
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:
|
||||
@@ -101,11 +101,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* );
|
||||
@@ -122,14 +122,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();
|
||||
@@ -138,7 +138,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; }
|
||||
@@ -147,26 +147,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
|
||||
@@ -175,7 +175,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 );
|
||||
@@ -191,24 +191,24 @@ 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 );
|
||||
|
||||
@@ -59,9 +59,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();
|
||||
@@ -79,23 +79,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();
|
||||
@@ -103,16 +103,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; }
|
||||
};
|
||||
@@ -128,12 +128,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();
|
||||
|
||||
+51
-51
@@ -72,9 +72,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() {}
|
||||
};
|
||||
@@ -97,27 +97,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
|
||||
@@ -130,7 +130,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; }
|
||||
};
|
||||
|
||||
@@ -144,7 +144,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:
|
||||
@@ -173,7 +173,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
|
||||
@@ -181,8 +181,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);
|
||||
@@ -191,28 +191,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
|
||||
@@ -231,15 +231,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);
|
||||
@@ -261,17 +261,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; };
|
||||
};
|
||||
@@ -286,7 +286,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?):
|
||||
@@ -300,7 +300,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();
|
||||
};
|
||||
@@ -314,17 +314,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* );
|
||||
|
||||
+51
-51
@@ -45,30 +45,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;
|
||||
@@ -82,10 +82,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& );
|
||||
@@ -94,21 +94,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;
|
||||
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 BOOL IsFixed() const;
|
||||
virtual void SetModified( BOOL );
|
||||
virtual sal_Bool IsFixed() const;
|
||||
virtual void SetModified( sal_Bool );
|
||||
|
||||
virtual SbxDataType GetType() const;
|
||||
virtual SbxClassType GetClass() const;
|
||||
@@ -117,24 +117,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
|
||||
@@ -142,40 +142,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
|
||||
|
||||
+16
-16
@@ -57,23 +57,23 @@ 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, // * Anzeige fuer varianten Datentyp
|
||||
SbxDATAOBJECT = 13, // * Common data object w/o ref count
|
||||
|
||||
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)
|
||||
SbxLONG64 = 20, // signed 64-bit int
|
||||
SbxULONG64 = 21, // unsigned 64-bit int
|
||||
SbxINT = 22, // * signed machine-dependent int
|
||||
@@ -105,9 +105,9 @@ enum SbxDataType {
|
||||
SbxUSERn = 2047 // last user defined data type
|
||||
};
|
||||
|
||||
const UINT32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000;
|
||||
const UINT32 SBX_TYPE_DIM_AS_NEW_FLAG = 0x20000;
|
||||
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
|
||||
|
||||
@@ -123,8 +123,8 @@ enum SbxOperator {
|
||||
SbxPLUS, // this + var
|
||||
SbxMINUS, // this - var
|
||||
SbxNEG, // -this (var is ignored)
|
||||
SbxIDIV, // this / var (both operands max. INT32!)
|
||||
// Boolean operators (max INT32!):
|
||||
SbxIDIV, // this / var (both operands max. sal_Int32!)
|
||||
// Boolean operators (max sal_Int32!):
|
||||
SbxAND, // this & var
|
||||
SbxOR, // this | var
|
||||
SbxXOR, // this ^ var
|
||||
@@ -157,7 +157,7 @@ enum SbxNameType { // Type of the questioned name of a variable
|
||||
#endif
|
||||
|
||||
// AB: 20.3.96: New error messages
|
||||
typedef ULONG SbxError; // Preserve old type
|
||||
typedef sal_uIntPtr SbxError; // Preserve old type
|
||||
|
||||
#endif
|
||||
// von #ifndef __RSC
|
||||
@@ -356,10 +356,10 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion
|
||||
#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 SbxMAXSALINT64 SAL_MAX_INT64
|
||||
#define SbxMINSALINT64 SAL_MIN_INT64
|
||||
@@ -379,7 +379,7 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion
|
||||
#define SBX_MAXINDEX 0x3FF0
|
||||
#define SBX_MAXINDEX32 SbxMAXLNG
|
||||
|
||||
// The numeric values of TRUE and FALSE
|
||||
// The numeric values of sal_True and FALSE
|
||||
enum SbxBOOL { SbxFALSE = 0, SbxTRUE = -1 };
|
||||
|
||||
#endif // __RSC
|
||||
|
||||
@@ -37,11 +37,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& );
|
||||
};
|
||||
|
||||
|
||||
+14
-14
@@ -111,16 +111,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 );
|
||||
@@ -128,30 +128,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
|
||||
|
||||
@@ -44,7 +44,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;
|
||||
};
|
||||
|
||||
|
||||
@@ -37,7 +37,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();
|
||||
|
||||
|
||||
+11
-11
@@ -42,9 +42,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
|
||||
@@ -52,8 +52,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 );
|
||||
@@ -67,7 +67,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
|
||||
@@ -75,15 +75,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* );
|
||||
@@ -96,7 +96,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,
|
||||
@@ -108,9 +108,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
|
||||
|
||||
+112
-112
@@ -38,17 +38,17 @@
|
||||
|
||||
struct SbxINT64
|
||||
{
|
||||
INT32 nHigh; UINT32 nLow;
|
||||
sal_Int32 nHigh; sal_uInt32 nLow;
|
||||
|
||||
#if FALSE
|
||||
SbxINT64() : nHigh( 0 ), nLow( 0 ) {}
|
||||
SbxINT64( UINT8 n ) : nHigh( 0 ), nLow( n ) {}
|
||||
SbxINT64( UINT16 n ) : nHigh( 0 ), nLow( n ) {}
|
||||
SbxINT64( UINT32 n ) : nHigh( 0 ), nLow( n ) {}
|
||||
SbxINT64( sal_uInt8 n ) : nHigh( 0 ), nLow( n ) {}
|
||||
SbxINT64( sal_uInt16 n ) : nHigh( 0 ), nLow( n ) {}
|
||||
SbxINT64( sal_uInt32 n ) : nHigh( 0 ), nLow( n ) {}
|
||||
SbxINT64( unsigned int n ) : nHigh( 0 ), nLow( n ) {}
|
||||
SbxINT64( INT8 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
|
||||
SbxINT64( INT16 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
|
||||
SbxINT64( INT32 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
|
||||
SbxINT64( sal_Int8 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
|
||||
SbxINT64( sal_Int16 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
|
||||
SbxINT64( sal_Int32 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
|
||||
SbxINT64( int n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
|
||||
SbxINT64( SbxINT64 &r ) : nHigh( r.nHigh ), nLow( r.nLow ) {}
|
||||
|
||||
@@ -57,7 +57,7 @@ struct SbxINT64
|
||||
#endif
|
||||
void CHS()
|
||||
{
|
||||
nLow ^= (UINT32)-1;
|
||||
nLow ^= (sal_uInt32)-1;
|
||||
nHigh ^= -1;
|
||||
nLow++;
|
||||
if( !nLow )
|
||||
@@ -69,16 +69,16 @@ struct SbxINT64
|
||||
{
|
||||
if( n >= 0 )
|
||||
{
|
||||
nHigh = (INT32)(n / (double)4294967296.0);
|
||||
nLow = (UINT32)(n - ((double)nHigh * (double)4294967296.0) + 0.5);
|
||||
nHigh = (sal_Int32)(n / (double)4294967296.0);
|
||||
nLow = (sal_uInt32)(n - ((double)nHigh * (double)4294967296.0) + 0.5);
|
||||
}
|
||||
else {
|
||||
nHigh = (INT32)(-n / (double)4294967296.0);
|
||||
nLow = (UINT32)(-n - ((double)nHigh * (double)4294967296.0) + 0.5);
|
||||
nHigh = (sal_Int32)(-n / (double)4294967296.0);
|
||||
nLow = (sal_uInt32)(-n - ((double)nHigh * (double)4294967296.0) + 0.5);
|
||||
CHS();
|
||||
}
|
||||
}
|
||||
void Set(INT32 n) { nHigh = n < 0 ? -1 : 0; nLow = n; }
|
||||
void Set(sal_Int32 n) { nHigh = n < 0 ? -1 : 0; nLow = n; }
|
||||
|
||||
void SetMax() { nHigh = 0x7FFFFFFF; nLow = 0xFFFFFFFF; }
|
||||
void SetMin() { nHigh = 0x80000000; nLow = 0x00000000; }
|
||||
@@ -117,14 +117,14 @@ struct SbxINT64
|
||||
|
||||
struct SbxUINT64
|
||||
{
|
||||
UINT32 nHigh; UINT32 nLow;
|
||||
sal_uInt32 nHigh; sal_uInt32 nLow;
|
||||
void Set(double n)
|
||||
{
|
||||
nHigh = (UINT32)(n / (double)4294967296.0);
|
||||
nLow = (UINT32)(n - ((double)nHigh * (double)4294967296.0));
|
||||
nHigh = (sal_uInt32)(n / (double)4294967296.0);
|
||||
nLow = (sal_uInt32)(n - ((double)nHigh * (double)4294967296.0));
|
||||
}
|
||||
|
||||
void Set(UINT32 n) { nHigh = 0; nLow = n; }
|
||||
void Set(sal_uInt32 n) { nHigh = 0; nLow = n; }
|
||||
|
||||
void SetMax() { nHigh = 0xFFFFFFFF; nLow = 0xFFFFFFFF; }
|
||||
void SetMin() { nHigh = 0x00000000; nLow = 0x00000000; }
|
||||
@@ -165,11 +165,11 @@ struct SbxValues
|
||||
{
|
||||
union {
|
||||
sal_Unicode nChar;
|
||||
BYTE nByte;
|
||||
INT16 nInteger;
|
||||
INT32 nLong;
|
||||
UINT16 nUShort;
|
||||
UINT32 nULong;
|
||||
sal_uInt8 nByte;
|
||||
sal_Int16 nInteger;
|
||||
sal_Int32 nLong;
|
||||
sal_uInt16 nUShort;
|
||||
sal_uInt32 nULong;
|
||||
float nSingle;
|
||||
double nDouble;
|
||||
SbxINT64 nLong64;
|
||||
@@ -183,11 +183,11 @@ struct SbxValues
|
||||
|
||||
SbxBase* pObj;
|
||||
sal_Unicode* pChar;
|
||||
BYTE* pByte;
|
||||
INT16* pInteger;
|
||||
INT32* pLong;
|
||||
UINT16* pUShort;
|
||||
UINT32* pULong;
|
||||
sal_uInt8* pByte;
|
||||
sal_Int16* pInteger;
|
||||
sal_Int32* pLong;
|
||||
sal_uInt16* pUShort;
|
||||
sal_uInt32* pULong;
|
||||
float* pSingle;
|
||||
double* pDouble;
|
||||
SbxINT64* pLong64;
|
||||
@@ -203,11 +203,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( float _nSingle ): nSingle( _nSingle ), eType(SbxSINGLE) {}
|
||||
SbxValues( double _nDouble ): nDouble( _nDouble ), eType(SbxDOUBLE) {}
|
||||
SbxValues( int _nInt ): nInt( _nInt ), eType(SbxINT) {}
|
||||
@@ -233,17 +233,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();
|
||||
@@ -252,41 +252,41 @@ public:
|
||||
SbxValue( const SbxValue& );
|
||||
SbxValue& operator=( const SbxValue& );
|
||||
virtual void Clear();
|
||||
virtual BOOL IsFixed() const;
|
||||
virtual sal_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
|
||||
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; }
|
||||
|
||||
@@ -295,65 +295,65 @@ public:
|
||||
SbxUINT64 GetULong64() const;
|
||||
sal_Int64 GetInt64() const;
|
||||
sal_uInt64 GetUInt64() const;
|
||||
INT16 GetInteger() const;
|
||||
INT32 GetLong() const;
|
||||
sal_Int16 GetInteger() const;
|
||||
sal_Int32 GetLong() const;
|
||||
float GetSingle() const;
|
||||
double GetDouble() const;
|
||||
double GetDate() const;
|
||||
BOOL GetBool() const;
|
||||
UINT16 GetErr() const;
|
||||
sal_Bool GetBool() const;
|
||||
sal_uInt16 GetErr() const;
|
||||
const String& GetString() const;
|
||||
const String& GetCoreString() const;
|
||||
::rtl::OUString GetOUString() const;
|
||||
SbxDecimal* GetDecimal() const;
|
||||
SbxBase* GetObject() const;
|
||||
BOOL HasObject() const;
|
||||
sal_Bool HasObject() const;
|
||||
void* GetData() const;
|
||||
sal_Unicode GetChar() const;
|
||||
BYTE GetByte() const;
|
||||
UINT16 GetUShort() const;
|
||||
UINT32 GetULong() const;
|
||||
sal_uInt8 GetByte() const;
|
||||
sal_uInt16 GetUShort() const;
|
||||
sal_uInt32 GetULong() const;
|
||||
int GetInt() const;
|
||||
|
||||
BOOL PutCurrency( const SbxINT64& );
|
||||
BOOL PutLong64( const SbxINT64& );
|
||||
BOOL PutULong64( const SbxUINT64& );
|
||||
BOOL PutInt64( sal_Int64 );
|
||||
BOOL PutUInt64( sal_uInt64 );
|
||||
BOOL PutInteger( INT16 );
|
||||
BOOL PutLong( INT32 );
|
||||
BOOL PutSingle( float );
|
||||
BOOL PutDouble( double );
|
||||
BOOL PutDate( double );
|
||||
BOOL PutBool( BOOL );
|
||||
BOOL PutErr( USHORT );
|
||||
BOOL PutStringExt( const ::rtl::OUString& ); // with extended analysis (International, "TRUE"/"FALSE")
|
||||
BOOL PutString( const ::rtl::OUString& );
|
||||
BOOL PutString( const sal_Unicode* ); // Type = SbxSTRING
|
||||
BOOL PutpChar( const sal_Unicode* ); // Type = SbxLPSTR
|
||||
BOOL PutDecimal( SbxDecimal* pDecimal );
|
||||
BOOL PutObject( SbxBase* );
|
||||
BOOL PutData( void* );
|
||||
BOOL PutChar( sal_Unicode );
|
||||
BOOL PutByte( BYTE );
|
||||
BOOL PutUShort( UINT16 );
|
||||
BOOL PutULong( UINT32 );
|
||||
BOOL PutInt( int );
|
||||
BOOL PutEmpty();
|
||||
BOOL PutNull();
|
||||
sal_Bool PutCurrency( const SbxINT64& );
|
||||
sal_Bool PutLong64( const SbxINT64& );
|
||||
sal_Bool PutULong64( const SbxUINT64& );
|
||||
sal_Bool PutInt64( sal_Int64 );
|
||||
sal_Bool PutUInt64( sal_uInt64 );
|
||||
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 PutString( const ::rtl::OUString& );
|
||||
sal_Bool PutString( const sal_Unicode* ); // Type = SbxSTRING
|
||||
sal_Bool PutpChar( const sal_Unicode* ); // Type = SbxLPSTR
|
||||
sal_Bool PutDecimal( SbxDecimal* pDecimal );
|
||||
sal_Bool PutObject( SbxBase* );
|
||||
sal_Bool PutData( void* );
|
||||
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 decimal methods
|
||||
BOOL PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
|
||||
BOOL fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
|
||||
sal_Bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
|
||||
sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
|
||||
|
||||
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;
|
||||
|
||||
// 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 );
|
||||
|
||||
// The following operators are definied for easier handling.
|
||||
// Error conditions (overflow, conversions) are not
|
||||
@@ -449,7 +449,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 );
|
||||
|
||||
@@ -458,8 +458,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();
|
||||
@@ -468,13 +468,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; }
|
||||
@@ -491,8 +491,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; }
|
||||
@@ -504,7 +504,7 @@ public:
|
||||
StarBASIC* pParentBasic );
|
||||
void ClearComListener( void );
|
||||
|
||||
static USHORT MakeHashCode( const String& rName );
|
||||
static sal_uInt16 MakeHashCode( const String& rName );
|
||||
};
|
||||
|
||||
#ifndef SBX_VARIABLE_DECL_DEFINED
|
||||
|
||||
@@ -40,7 +40,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 );
|
||||
|
||||
//#include "testapp.hxx"
|
||||
#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_
|
||||
|
||||
@@ -57,20 +57,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
|
||||
|
||||
|
||||
+126
-126
@@ -94,52 +94,52 @@ IMPL_GEN_RES_STR;
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
// filter Messages generated due to missing configuration Bug:#83887#
|
||||
void TestToolDebugMessageFilter( const sal_Char *pString, BOOL bIsOsl )
|
||||
void TestToolDebugMessageFilter( const sal_Char *pString, sal_Bool bIsOsl )
|
||||
{
|
||||
static BOOL static_bInsideFilter = FALSE;
|
||||
static sal_Bool static_bInsideFilter = sal_False;
|
||||
|
||||
// Ignore messages during filtering to avoid endless recursions
|
||||
if ( static_bInsideFilter )
|
||||
return;
|
||||
|
||||
static_bInsideFilter = TRUE;
|
||||
static_bInsideFilter = sal_True;
|
||||
|
||||
ByteString aMessage( pString );
|
||||
|
||||
BOOL bIgnore = FALSE;
|
||||
sal_Bool bIgnore = sal_False;
|
||||
|
||||
if ( bIsOsl )
|
||||
{
|
||||
// OSL
|
||||
if ( aMessage.Search( CByteString("Cannot open Configuration: Connector: unknown delegatee com.sun.star.connection.Connector.portal") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
// DBG
|
||||
#if ! (OSL_DEBUG_LEVEL > 1)
|
||||
if ( aMessage.Search( CByteString("SelectAppIconPixmap") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
#endif
|
||||
if ( aMessage.Search( CByteString("PropertySetRegistry::") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
if ( aMessage.Search( CByteString("property value missing") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
if ( aMessage.Search( CByteString("getDateFormatsImpl") ) != STRING_NOTFOUND
|
||||
&& aMessage.Search( CByteString("no date formats") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
if ( aMessage.Search( CByteString("ucb::configureUcb(): Bad arguments") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
if ( aMessage.Search( CByteString("CreateInstance with arguments exception") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
if ( aMessage.Search( CByteString("AcquireTree failed") ) != STRING_NOTFOUND )
|
||||
bIgnore = TRUE;
|
||||
bIgnore = sal_True;
|
||||
}
|
||||
|
||||
|
||||
if ( bIgnore )
|
||||
{
|
||||
static_bInsideFilter = FALSE;
|
||||
static_bInsideFilter = sal_False;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -164,22 +164,22 @@ void TestToolDebugMessageFilter( const sal_Char *pString, BOOL bIsOsl )
|
||||
/* DBG_INSTOUTERROR( DBG_OUT_MSGBOX )
|
||||
DBG_ERROR( pString );
|
||||
DBG_INSTOUTERROR( DBG_OUT_TESTTOOL )*/
|
||||
static_bInsideFilter = FALSE;
|
||||
static_bInsideFilter = sal_False;
|
||||
}
|
||||
void SAL_CALL DBG_TestToolDebugMessageFilter( const sal_Char *pString )
|
||||
{
|
||||
TestToolDebugMessageFilter( pString, FALSE );
|
||||
TestToolDebugMessageFilter( pString, sal_False );
|
||||
}
|
||||
extern "C" void SAL_CALL osl_TestToolDebugMessageFilter( const sal_Char *pString )
|
||||
{
|
||||
if ( !getenv( "DISABLE_SAL_DBGBOX" ) )
|
||||
TestToolDebugMessageFilter( pString, TRUE );
|
||||
TestToolDebugMessageFilter( pString, sal_True );
|
||||
}
|
||||
#endif
|
||||
|
||||
// #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 )
|
||||
{
|
||||
aLine.SearchAndReplace( '\t', ' ' );
|
||||
String ThreeBlanks = CUniString(" ");
|
||||
@@ -304,7 +304,7 @@ void BasicApp::Main( )
|
||||
if ( aDefIniPath.Exists() )
|
||||
{
|
||||
aDefIniPath.CopyTo( aIniPath, FSYS_ACTION_COPYFILE );
|
||||
FileStat::SetReadOnlyFlag( aIniPath, FALSE );
|
||||
FileStat::SetReadOnlyFlag( aIniPath, sal_False );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@ void BasicApp::Main( )
|
||||
}
|
||||
|
||||
// ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt ), )
|
||||
//const char* ResMgr::GetLang( LanguageType& nType, USHORT nPrio )
|
||||
//const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio )
|
||||
|
||||
// ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt )
|
||||
// ResMgr *pRes = new ResMgr( "testtool.res" );
|
||||
@@ -406,7 +406,7 @@ void BasicApp::SetFocus()
|
||||
IMPL_LINK( BasicApp, LateInit, void *, pDummy )
|
||||
{
|
||||
(void) pDummy; /* avoid warning about unused parameter */
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
|
||||
{
|
||||
if ( Application::GetCommandLineParam( i ).Copy(0,4).CompareIgnoreCaseToAscii("-run") == COMPARE_EQUAL
|
||||
@@ -414,7 +414,7 @@ IMPL_LINK( BasicApp, LateInit, void *, pDummy )
|
||||
|| Application::GetCommandLineParam( i ).Copy(0,4).CompareIgnoreCaseToAscii("/run") == COMPARE_EQUAL
|
||||
#endif
|
||||
)
|
||||
pFrame->SetAutoRun( TRUE );
|
||||
pFrame->SetAutoRun( sal_True );
|
||||
else if ( Application::GetCommandLineParam( i ).Copy(0,7).CompareIgnoreCaseToAscii("-result") == COMPARE_EQUAL
|
||||
#ifndef UNX
|
||||
|| Application::GetCommandLineParam( i ).Copy(0,7).CompareIgnoreCaseToAscii("/result") == COMPARE_EQUAL
|
||||
@@ -425,7 +425,7 @@ IMPL_LINK( BasicApp, LateInit, void *, pDummy )
|
||||
{
|
||||
if ( ByteString( Application::GetCommandLineParam( i+1 ), osl_getThreadTextEncoding() ).IsNumericAscii() )
|
||||
{
|
||||
MsgEdit::SetMaxLogLen( sal::static_int_cast< USHORT >( Application::GetCommandLineParam( i+1 ).ToInt32() ) );
|
||||
MsgEdit::SetMaxLogLen( sal::static_int_cast< sal_uInt16 >( Application::GetCommandLineParam( i+1 ).ToInt32() ) );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -497,7 +497,7 @@ FloatingExecutionStatus::FloatingExecutionStatus( Window * pParent )
|
||||
|
||||
void FloatingExecutionStatus::SetStatus( String aW )
|
||||
{
|
||||
Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
|
||||
Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
|
||||
ToTop( TOTOP_NOGRABFOCUS );
|
||||
aAusblend.Start();
|
||||
aStatus.SetText( aW );
|
||||
@@ -505,7 +505,7 @@ void FloatingExecutionStatus::SetStatus( String aW )
|
||||
|
||||
void FloatingExecutionStatus::SetAdditionalInfo( String aF )
|
||||
{
|
||||
Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
|
||||
Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
|
||||
ToTop( TOTOP_NOGRABFOCUS );
|
||||
aAusblend.Start();
|
||||
aAdditionalInfo.SetText( aF );
|
||||
@@ -524,11 +524,11 @@ TYPEINIT1(TTExecutionStatusHint, SfxSimpleHint);
|
||||
|
||||
BasicFrame::BasicFrame() : WorkWindow( NULL,
|
||||
WinBits( WB_APP | WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) )
|
||||
, bIsAutoRun( FALSE )
|
||||
, bIsAutoRun( sal_False )
|
||||
, pDisplayHidDlg( NULL )
|
||||
, pEditVar ( 0 )
|
||||
, bAutoReload( FALSE )
|
||||
, bAutoSave( TRUE )
|
||||
, bAutoReload( sal_False )
|
||||
, bAutoSave( sal_True )
|
||||
, pBasic( NULL )
|
||||
, pExecutionStatus( NULL )
|
||||
, pStatus( NULL )
|
||||
@@ -538,10 +538,10 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
|
||||
{
|
||||
|
||||
Application::SetDefDialogParent( this );
|
||||
AlwaysEnableInput( TRUE );
|
||||
AlwaysEnableInput( sal_True );
|
||||
pBasic = TTBasic::CreateMyBasic(); // depending on what was linked to the executable
|
||||
bInBreak = FALSE;
|
||||
bDisas = FALSE;
|
||||
bInBreak = sal_False;
|
||||
bDisas = sal_False;
|
||||
nFlags = 0;
|
||||
// Icon aAppIcon;
|
||||
|
||||
@@ -653,11 +653,11 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
|
||||
}
|
||||
|
||||
const ByteString ProfilePrefix("_profile_");
|
||||
const USHORT ProfilePrefixLen = ProfilePrefix.Len();
|
||||
const sal_uInt16 ProfilePrefixLen = ProfilePrefix.Len();
|
||||
|
||||
void BasicFrame::LoadIniFile()
|
||||
{
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
|
||||
|
||||
for ( i = 0 ; i < aConf.GetGroupCount() ; i++ )
|
||||
@@ -777,12 +777,12 @@ IMPL_LINK( BasicFrame, CheckAllFiles, Timer*, pTimer )
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL BasicFrame::IsAutoRun()
|
||||
sal_Bool BasicFrame::IsAutoRun()
|
||||
{
|
||||
return bIsAutoRun;
|
||||
}
|
||||
|
||||
void BasicFrame::SetAutoRun( BOOL bAuto )
|
||||
void BasicFrame::SetAutoRun( sal_Bool bAuto )
|
||||
{
|
||||
bIsAutoRun = bAuto;
|
||||
}
|
||||
@@ -849,7 +849,7 @@ void BasicFrame::Resize()
|
||||
|
||||
|
||||
// Resize possibly maximized window
|
||||
ULONG i;
|
||||
sal_uIntPtr i;
|
||||
for( i = pList->Count(); i > 0 ; i-- )
|
||||
{
|
||||
if ( pList->GetObject( i-1 )->GetWinState() == TT_WIN_STATE_MAX )
|
||||
@@ -877,7 +877,7 @@ IMPL_LINK( BasicFrame, CloseButtonClick, void*, EMPTYARG )
|
||||
{};
|
||||
if ( p )
|
||||
p->GrabFocus();
|
||||
return Command( RID_FILECLOSE, FALSE );
|
||||
return Command( RID_FILECLOSE, sal_False );
|
||||
}
|
||||
|
||||
IMPL_LINK( BasicFrame, FloatButtonClick, void*, EMPTYARG )
|
||||
@@ -906,7 +906,7 @@ void BasicFrame::WinShow_Hide()
|
||||
return;
|
||||
|
||||
AppWin* p;
|
||||
BOOL bWasFullscreen = FALSE;
|
||||
sal_Bool bWasFullscreen = sal_False;
|
||||
for ( p = pList->Last() ; p ; p = pList->Prev() )
|
||||
{
|
||||
if ( p->pDataEdit )
|
||||
@@ -916,7 +916,7 @@ void BasicFrame::WinShow_Hide()
|
||||
)
|
||||
p->Hide( SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
|
||||
else
|
||||
p->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
|
||||
p->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
|
||||
}
|
||||
bWasFullscreen |= p->GetWinState() == TT_WIN_STATE_MAX;
|
||||
}
|
||||
@@ -926,10 +926,10 @@ void BasicFrame::WinMax_Restore()
|
||||
{
|
||||
// The application buttons
|
||||
AppWin* p;
|
||||
BOOL bHasFullscreenWin = FALSE;
|
||||
sal_Bool bHasFullscreenWin = sal_False;
|
||||
for( p = pList->First(); p && !bHasFullscreenWin ; p = pList->Next() )
|
||||
bHasFullscreenWin |= ( p->GetWinState() == TT_WIN_STATE_MAX );
|
||||
GetMenuBar()->ShowButtons( bHasFullscreenWin, FALSE, FALSE );
|
||||
GetMenuBar()->ShowButtons( bHasFullscreenWin, sal_False, sal_False );
|
||||
WinShow_Hide();
|
||||
}
|
||||
|
||||
@@ -948,9 +948,9 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
|
||||
|
||||
Menu* pMenu = GetMenuBar();
|
||||
if( pList->Count() == 0 ) {
|
||||
pMenu->EnableItem( RID_APPEDIT, FALSE );
|
||||
pMenu->EnableItem( RID_APPRUN, FALSE );
|
||||
pMenu->EnableItem( RID_APPWINDOW, FALSE );
|
||||
pMenu->EnableItem( RID_APPEDIT, sal_False );
|
||||
pMenu->EnableItem( RID_APPRUN, sal_False );
|
||||
pMenu->EnableItem( RID_APPWINDOW, sal_False );
|
||||
}
|
||||
|
||||
PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW );
|
||||
@@ -974,20 +974,20 @@ void BasicFrame::AddWindow( AppWin *pWin )
|
||||
// Enable main menu
|
||||
MenuBar* pMenu = GetMenuBar();
|
||||
if( pList->Count() > 0 ) {
|
||||
pMenu->EnableItem( RID_APPEDIT, TRUE );
|
||||
pMenu->EnableItem( RID_APPRUN, TRUE );
|
||||
pMenu->EnableItem( RID_APPWINDOW, TRUE );
|
||||
pMenu->EnableItem( RID_APPEDIT, sal_True );
|
||||
pMenu->EnableItem( RID_APPRUN, sal_True );
|
||||
pMenu->EnableItem( RID_APPWINDOW, sal_True );
|
||||
}
|
||||
|
||||
PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW );
|
||||
USHORT nLastID = pWinMenu->GetItemId( pWinMenu->GetItemCount() - 1 );
|
||||
sal_uInt16 nLastID = pWinMenu->GetItemId( pWinMenu->GetItemCount() - 1 );
|
||||
|
||||
// Separator necessary
|
||||
if ( nLastID < RID_WIN_FILE1 && pWinMenu->GetItemType( pWinMenu->GetItemCount() - 1 ) != MENUITEM_SEPARATOR )
|
||||
pWinMenu->InsertSeparator();
|
||||
|
||||
// Find free ID
|
||||
USHORT nFreeID = RID_WIN_FILE1;
|
||||
sal_uInt16 nFreeID = RID_WIN_FILE1;
|
||||
while ( pWinMenu->GetItemPos( nFreeID ) != MENU_ITEM_NOTFOUND && nFreeID < RID_WIN_FILEn )
|
||||
nFreeID++;
|
||||
|
||||
@@ -1013,7 +1013,7 @@ void BasicFrame::FocusWindow( AppWin *pWin )
|
||||
pWork = pWin;
|
||||
pList->Remove( pWin );
|
||||
pList->Insert( pWin, LIST_APPEND );
|
||||
pWin->Minimize( FALSE );
|
||||
pWin->Minimize( sal_False );
|
||||
|
||||
aAppFile = pWin->GetText();
|
||||
UpdateTitle();
|
||||
@@ -1022,14 +1022,14 @@ void BasicFrame::FocusWindow( AppWin *pWin )
|
||||
pStatus->LoadTaskToolBox();
|
||||
}
|
||||
|
||||
BOOL BasicFrame::Close()
|
||||
sal_Bool BasicFrame::Close()
|
||||
{
|
||||
if( bInBreak || Basic().IsRunning() )
|
||||
if( RET_NO == QueryBox( this, SttResId( IDS_RUNNING ) ).Execute() )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
StarBASIC::Stop();
|
||||
bInBreak = FALSE;
|
||||
bInBreak = sal_False;
|
||||
if( CloseAll() )
|
||||
{
|
||||
aLineNum.Stop();
|
||||
@@ -1043,30 +1043,30 @@ BOOL BasicFrame::Close()
|
||||
Application::SetDefDialogParent( NULL );
|
||||
WorkWindow::Close();
|
||||
|
||||
return TRUE;
|
||||
} else return FALSE;
|
||||
return sal_True;
|
||||
} else return sal_False;
|
||||
}
|
||||
|
||||
BOOL BasicFrame::CloseAll()
|
||||
sal_Bool BasicFrame::CloseAll()
|
||||
{
|
||||
while ( pList->Count() )
|
||||
if ( !pList->Last()->Close() )
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return sal_False;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL BasicFrame::CompileAll()
|
||||
sal_Bool BasicFrame::CompileAll()
|
||||
{
|
||||
AppWin* p;
|
||||
for( p = pList->First(); p; p = pList->Next() )
|
||||
if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return FALSE;
|
||||
return TRUE;
|
||||
if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return sal_False;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
// Setup menu
|
||||
#define MENU2FILENAME( Name ) Name.Copy( Name.SearchAscii(" ") +1).EraseAllChars( '~' )
|
||||
#define LRUNr( nNr ) CByteString("LRU").Append( ByteString::CreateFromInt32( nNr ) )
|
||||
String FILENAME2MENU( USHORT nNr, String aName )
|
||||
String FILENAME2MENU( sal_uInt16 nNr, String aName )
|
||||
{
|
||||
String aRet;
|
||||
if ( nNr <= 9 )
|
||||
@@ -1085,9 +1085,9 @@ void BasicFrame::AddToLRU(String const& aFile)
|
||||
PopupMenu *pPopup = GetMenuBar()->GetPopupMenu(RID_APPFILE);
|
||||
|
||||
aConfig.SetGroup("LRU");
|
||||
USHORT nMaxLRU = (USHORT)aConfig.ReadKey("MaxLRU","4").ToInt32();
|
||||
sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32();
|
||||
DirEntry aFileEntry( aFile );
|
||||
USHORT i,nLastMove = nMaxLRU;
|
||||
sal_uInt16 i,nLastMove = nMaxLRU;
|
||||
|
||||
for ( i = 1 ; i<nMaxLRU && nLastMove == nMaxLRU ; i++ )
|
||||
{
|
||||
@@ -1119,15 +1119,15 @@ void BasicFrame::LoadLRU()
|
||||
{
|
||||
Config aConfig(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
|
||||
PopupMenu *pPopup = GetMenuBar()->GetPopupMenu(RID_APPFILE);
|
||||
BOOL bAddSep = TRUE;
|
||||
sal_Bool bAddSep = sal_True;
|
||||
|
||||
aConfig.SetGroup("LRU");
|
||||
USHORT nMaxLRU = (USHORT)aConfig.ReadKey("MaxLRU","4").ToInt32();
|
||||
sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32();
|
||||
|
||||
if ( pPopup )
|
||||
bAddSep = pPopup->GetItemPos( IDM_FILE_LRU1 ) == MENU_ITEM_NOTFOUND;
|
||||
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for ( i = 1; i <= nMaxLRU && pPopup != NULL; i++)
|
||||
{
|
||||
String aFile = UniString( aConfig.ReadKey(LRUNr(i)), RTL_TEXTENCODING_UTF8 );
|
||||
@@ -1137,7 +1137,7 @@ void BasicFrame::LoadLRU()
|
||||
if (bAddSep)
|
||||
{
|
||||
pPopup->InsertSeparator();
|
||||
bAddSep = FALSE;
|
||||
bAddSep = sal_False;
|
||||
}
|
||||
|
||||
if ( pPopup->GetItemPos( IDM_FILE_LRU1 + i-1 ) == MENU_ITEM_NOTFOUND )
|
||||
@@ -1156,10 +1156,10 @@ void BasicFrame::LoadLRU()
|
||||
|
||||
IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
|
||||
{
|
||||
BOOL bNormal = BOOL( !bInBreak );
|
||||
sal_Bool bNormal = sal_Bool( !bInBreak );
|
||||
pMenu->EnableItem( RID_RUNCOMPILE, bNormal );
|
||||
|
||||
BOOL bHasEdit = BOOL( /*bNormal &&*/ pWork != NULL );
|
||||
sal_Bool bHasEdit = sal_Bool( /*bNormal &&*/ pWork != NULL );
|
||||
|
||||
// pMenu->EnableItem( RID_FILENEW, bNormal ); // always possible
|
||||
// pMenu->EnableItem( RID_FILEOPEN, bNormal );
|
||||
@@ -1171,16 +1171,16 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
|
||||
pMenu->EnableItem( RID_FILELOADLIB, bNormal );
|
||||
pMenu->EnableItem( RID_FILESAVELIB, bHasEdit );
|
||||
|
||||
BOOL bHasErr = BOOL( bNormal && pBasic->GetErrors() != 0 );
|
||||
BOOL bNext = bHasErr & bNormal;
|
||||
BOOL bPrev = bHasErr & bNormal;
|
||||
sal_Bool bHasErr = sal_Bool( bNormal && pBasic->GetErrors() != 0 );
|
||||
sal_Bool bNext = bHasErr & bNormal;
|
||||
sal_Bool bPrev = bHasErr & bNormal;
|
||||
if( bHasErr )
|
||||
{
|
||||
ULONG n = pBasic->aErrors.GetCurPos();
|
||||
sal_uIntPtr n = pBasic->aErrors.GetCurPos();
|
||||
if( n == 0 )
|
||||
bPrev = FALSE;
|
||||
if( USHORT(n+1) == pBasic->GetErrors() )
|
||||
bNext = FALSE;
|
||||
bPrev = sal_False;
|
||||
if( sal_uInt16(n+1) == pBasic->GetErrors() )
|
||||
bNext = sal_False;
|
||||
}
|
||||
pMenu->EnableItem( RID_RUNNEXTERR, bNext );
|
||||
pMenu->EnableItem( RID_RUNPREVERR, bPrev );
|
||||
@@ -1188,7 +1188,7 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
|
||||
if( pWork )
|
||||
pWork->InitMenu( pMenu );
|
||||
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu )
|
||||
@@ -1208,7 +1208,7 @@ IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu )
|
||||
pMenu->EnableItem( RID_RUNPREVERR );
|
||||
if( pWork ) pWork->DeInitMenu( pMenu );
|
||||
*/
|
||||
SetAutoRun( FALSE );
|
||||
SetAutoRun( sal_False );
|
||||
String aString;
|
||||
pStatus->Message( aString );
|
||||
return 0L;
|
||||
@@ -1225,15 +1225,15 @@ IMPL_LINK_INLINE_END( BasicFrame, HighlightMenu, Menu *, pMenu )
|
||||
|
||||
IMPL_LINK_INLINE_START( BasicFrame, MenuCommand, Menu *, pMenu )
|
||||
{
|
||||
USHORT nId = pMenu->GetCurItemId();
|
||||
BOOL bChecked = pMenu->IsItemChecked( nId );
|
||||
sal_uInt16 nId = pMenu->GetCurItemId();
|
||||
sal_Bool bChecked = pMenu->IsItemChecked( nId );
|
||||
return Command( nId, bChecked );
|
||||
}
|
||||
IMPL_LINK_INLINE_END( BasicFrame, MenuCommand, Menu *, pMenu )
|
||||
|
||||
IMPL_LINK_INLINE_START( BasicFrame, Accel, Accelerator*, pAcc )
|
||||
{
|
||||
SetAutoRun( FALSE );
|
||||
SetAutoRun( sal_False );
|
||||
return Command( pAcc->GetCurItemId() );
|
||||
}
|
||||
IMPL_LINK_INLINE_END( BasicFrame, Accel, Accelerator*, pAcc )
|
||||
@@ -1298,14 +1298,14 @@ AppBasEd* BasicFrame::CreateModuleWin( SbModule* pMod )
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOL BasicFrame::LoadFile( String aFilename )
|
||||
sal_Bool BasicFrame::LoadFile( String aFilename )
|
||||
{
|
||||
BOOL bIsResult = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("RES") == COMPARE_EQUAL;
|
||||
BOOL bIsBasic = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("BAS") == COMPARE_EQUAL;
|
||||
sal_Bool bIsResult = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("RES") == COMPARE_EQUAL;
|
||||
sal_Bool bIsBasic = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("BAS") == COMPARE_EQUAL;
|
||||
bIsBasic |= DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("INC") == COMPARE_EQUAL;
|
||||
|
||||
AppWin* p;
|
||||
BOOL bSuccess = TRUE;
|
||||
sal_Bool bSuccess = sal_True;
|
||||
if ( bIsResult )
|
||||
{
|
||||
p = new AppError( this, aFilename );
|
||||
@@ -1332,7 +1332,7 @@ BOOL BasicFrame::LoadFile( String aFilename )
|
||||
}
|
||||
|
||||
// Execute command
|
||||
long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
long BasicFrame::Command( short nID, sal_Bool bChecked )
|
||||
{
|
||||
BasicError* pErr;
|
||||
|
||||
@@ -1346,7 +1346,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
case RID_FILEOPEN:
|
||||
{
|
||||
String s;
|
||||
if( QueryFileName( s, FT_BASIC_SOURCE | FT_RESULT_FILE, FALSE ) ) {
|
||||
if( QueryFileName( s, FT_BASIC_SOURCE | FT_RESULT_FILE, sal_False ) ) {
|
||||
AddToLRU( s );
|
||||
LoadFile( s );
|
||||
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
|
||||
@@ -1387,7 +1387,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
{
|
||||
SbModule *pModule = ((AppBasEd*)pWork)->GetModule();
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
USHORT x;
|
||||
sal_uInt16 x;
|
||||
x = pWork->GetLineNr();
|
||||
x = ((AppBasEd*)pWork)->GetModule()->GetBPCount();
|
||||
if ( !x )
|
||||
@@ -1395,7 +1395,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
x = pModule->GetBPCount();
|
||||
#endif
|
||||
|
||||
for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
|
||||
for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
|
||||
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
|
||||
@@ -1417,7 +1417,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
else
|
||||
{
|
||||
AppWin *w = NULL;
|
||||
for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : FALSE ; w = pList->Prev() ) ;
|
||||
for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : sal_False ; w = pList->Prev() ) ;
|
||||
if ( w )
|
||||
{
|
||||
p = ((AppBasEd*)w);
|
||||
@@ -1430,7 +1430,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
|
||||
if( bInBreak )
|
||||
// Reset the flag
|
||||
bInBreak = FALSE;
|
||||
bInBreak = sal_False;
|
||||
else
|
||||
{
|
||||
if( IsAutoSave() && !SaveAll() ) break;
|
||||
@@ -1439,12 +1439,12 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
pStatus->Message( aString );
|
||||
if( p )
|
||||
{
|
||||
BasicDLL::SetDebugMode( TRUE );
|
||||
BasicDLL::SetDebugMode( sal_True );
|
||||
Basic().ClearGlobalVars();
|
||||
p->Run();
|
||||
BasicDLL::SetDebugMode( FALSE );
|
||||
BasicDLL::SetDebugMode( sal_False );
|
||||
// If cancelled during Interactive=FALSE
|
||||
// BasicDLL::EnableBreak( TRUE );
|
||||
// BasicDLL::EnableBreak( sal_True );
|
||||
}
|
||||
}}
|
||||
}
|
||||
@@ -1459,7 +1459,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
}
|
||||
break;
|
||||
case RID_RUNDISAS:
|
||||
bDisas = BOOL( !bChecked );
|
||||
bDisas = sal_Bool( !bChecked );
|
||||
break;
|
||||
case RID_RUNBREAK:
|
||||
if ( Basic().IsRunning() && !bInBreak )
|
||||
@@ -1470,7 +1470,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
break;
|
||||
case RID_RUNSTOP:
|
||||
Basic().Stop();
|
||||
bInBreak = FALSE;
|
||||
bInBreak = sal_False;
|
||||
break;
|
||||
case RID_RUNNEXTERR:
|
||||
pErr = pBasic->aErrors.Next();
|
||||
@@ -1494,7 +1494,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
case RID_WINTILE:
|
||||
{
|
||||
WindowArrange aArange;
|
||||
for ( ULONG i = 0 ; i < pList->Count() ; i++ )
|
||||
for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
|
||||
{
|
||||
aArange.AddWindow( pList->GetObject( i ) );
|
||||
pList->GetObject( i )->Restore();
|
||||
@@ -1518,7 +1518,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
case RID_WINTILEHORZ:
|
||||
{
|
||||
WindowArrange aArange;
|
||||
for ( ULONG i = 0 ; i < pList->Count() ; i++ )
|
||||
for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
|
||||
{
|
||||
aArange.AddWindow( pList->GetObject( i ) );
|
||||
pList->GetObject( i )->Restore();
|
||||
@@ -1546,7 +1546,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
//#define WINDOWARRANGE_CASCADE 4
|
||||
{
|
||||
WindowArrange aArange;
|
||||
for ( ULONG i = 0 ; i < pList->Count() ; i++ )
|
||||
for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
|
||||
{
|
||||
aArange.AddWindow( pList->GetObject( i ) );
|
||||
pList->GetObject( i )->Restore();
|
||||
@@ -1569,7 +1569,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
break;
|
||||
case RID_WINCASCADE:
|
||||
{
|
||||
for ( USHORT i = 0 ; i < pList->Count() ; i++ )
|
||||
for ( sal_uInt16 i = 0 ; i < pList->Count() ; i++ )
|
||||
{
|
||||
pList->GetObject( i )->Cascade( i );
|
||||
}
|
||||
@@ -1631,22 +1631,22 @@ long BasicFrame::Command( short nID, BOOL bChecked )
|
||||
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPEDIT )); // So daß Delete richtig ist
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL BasicFrame::SaveAll()
|
||||
sal_Bool BasicFrame::SaveAll()
|
||||
{
|
||||
AppWin* p, *q = pWork;
|
||||
for( p = pList->First(); p; p = pList->Next() )
|
||||
{
|
||||
USHORT nRes = p->QuerySave( QUERY_DISK_CHANGED );
|
||||
sal_uInt16 nRes = p->QuerySave( QUERY_DISK_CHANGED );
|
||||
if( (( nRes == SAVE_RES_ERROR ) && QueryBox(this,SttResId(IDS_ASKSAVEERROR)).Execute() == RET_NO )
|
||||
|| ( nRes == SAVE_RES_CANCEL ) )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
if ( q )
|
||||
q->ToTop();
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
IMPL_LINK( BasicFrame, ModuleWinExists, String*, pFilename )
|
||||
@@ -1687,7 +1687,7 @@ AppWin* BasicFrame::FindWin( const String& rName )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AppWin* BasicFrame::FindWin( USHORT nWinId )
|
||||
AppWin* BasicFrame::FindWin( sal_uInt16 nWinId )
|
||||
{
|
||||
AppWin* p;
|
||||
for( p = pList->First(); p; p = pList->Next() )
|
||||
@@ -1714,10 +1714,10 @@ IMPL_LINK( BasicFrame, WriteString, String*, pString )
|
||||
if ( pList->Last() )
|
||||
{
|
||||
pList->Last()->pDataEdit->ReplaceSelected( *pString );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
class NewFileDialog : public FileDialog
|
||||
@@ -1740,7 +1740,7 @@ void NewFileDialog::FilterSelect()
|
||||
return; // User decides after he has changed the path
|
||||
|
||||
String aCurFilter = GetCurFilter();
|
||||
USHORT nFilterNr = 0;
|
||||
sal_uInt16 nFilterNr = 0;
|
||||
while ( nFilterNr < GetFilterCount() && aCurFilter != GetFilterName( nFilterNr ) )
|
||||
{
|
||||
nFilterNr++;
|
||||
@@ -1759,7 +1759,7 @@ void NewFileDialog::FilterSelect()
|
||||
|
||||
short NewFileDialog::Execute()
|
||||
{
|
||||
BOOL bRet = (BOOL)FileDialog::Execute();
|
||||
sal_Bool bRet = (sal_Bool)FileDialog::Execute();
|
||||
if ( bRet )
|
||||
{
|
||||
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
|
||||
@@ -1772,8 +1772,8 @@ short NewFileDialog::Execute()
|
||||
return bRet;
|
||||
}
|
||||
|
||||
BOOL BasicFrame::QueryFileName
|
||||
(String& rName, FileType nFileType, BOOL bSave )
|
||||
sal_Bool BasicFrame::QueryFileName
|
||||
(String& rName, FileType nFileType, sal_Bool bSave )
|
||||
{
|
||||
NewFileDialog aDlg( this, bSave ? WinBits( WB_SAVEAS ) :
|
||||
WinBits( WB_OPEN ) );
|
||||
@@ -1826,21 +1826,21 @@ BOOL BasicFrame::QueryFileName
|
||||
if ( rExtension == aDlg.GetFilterName( i ) )
|
||||
rExtension = aDlg.GetFilterType( i );
|
||||
*/
|
||||
return TRUE;
|
||||
} else return FALSE;
|
||||
return sal_True;
|
||||
} else return sal_False;
|
||||
}
|
||||
|
||||
USHORT BasicFrame::BreakHandler()
|
||||
sal_uInt16 BasicFrame::BreakHandler()
|
||||
{
|
||||
bInBreak = TRUE;
|
||||
bInBreak = sal_True;
|
||||
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
|
||||
// MenuBar aBar( ResId( RID_APPMENUBAR ) );
|
||||
// aBar.EnableItem( RID_APPEDIT, FALSE );
|
||||
// aBar.EnableItem( RID_APPEDIT, sal_False );
|
||||
SetAppMode( String( SttResId ( IDS_APPMODE_BREAK ) ) );
|
||||
while( bInBreak )
|
||||
GetpApp()->Yield();
|
||||
SetAppMode( String( SttResId ( IDS_APPMODE_RUN ) ) );
|
||||
// aBar.EnableItem( RID_APPEDIT, TRUE );
|
||||
// aBar.EnableItem( RID_APPEDIT, sal_True );
|
||||
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
|
||||
return nFlags;
|
||||
}
|
||||
@@ -1848,7 +1848,7 @@ USHORT BasicFrame::BreakHandler()
|
||||
void BasicFrame::LoadLibrary()
|
||||
{
|
||||
String s;
|
||||
if( QueryFileName( s, FT_BASIC_LIBRARY, FALSE ) )
|
||||
if( QueryFileName( s, FT_BASIC_LIBRARY, sal_False ) )
|
||||
{
|
||||
CloseAll();
|
||||
SvFileStream aStrm( s, STREAM_STD_READ );
|
||||
@@ -1858,7 +1858,7 @@ void BasicFrame::LoadLibrary()
|
||||
pBasic = pNew;
|
||||
// Show all contents if existing
|
||||
SbxArray* pMods = pBasic->GetModules();
|
||||
for( USHORT i = 0; i < pMods->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pMods->Count(); i++ )
|
||||
{
|
||||
SbModule* pMod = (SbModule*) pMods->Get( i );
|
||||
AppWin* p = new AppBasEd( this, pMod );
|
||||
@@ -1876,7 +1876,7 @@ void BasicFrame::LoadLibrary()
|
||||
void BasicFrame::SaveLibrary()
|
||||
{
|
||||
String s;
|
||||
if( QueryFileName( s, FT_BASIC_LIBRARY, TRUE ) )
|
||||
if( QueryFileName( s, FT_BASIC_LIBRARY, sal_True ) )
|
||||
{
|
||||
SvFileStream aStrm( s, STREAM_STD_WRITE );
|
||||
if( !Basic().Store( aStrm ) )
|
||||
@@ -1890,8 +1890,8 @@ String BasicFrame::GenRealString( const String &aResString )
|
||||
String aType,aValue,aResult(aResString);
|
||||
String aString;
|
||||
xub_StrLen nInsertPos = 0;
|
||||
BOOL bFound;
|
||||
bFound = FALSE;
|
||||
sal_Bool bFound;
|
||||
bFound = sal_False;
|
||||
|
||||
while ( (nStart = aResult.Search(StartKenn,nStartPos)) != STRING_NOTFOUND &&
|
||||
(nGleich = aResult.SearchAscii("=",nStart+StartKenn.Len())) != STRING_NOTFOUND &&
|
||||
@@ -1911,7 +1911,7 @@ String BasicFrame::GenRealString( const String &aResString )
|
||||
aString.Erase();
|
||||
}
|
||||
// if ( Resource::GetResManager()->IsAvailable( ResId( aValue ) ) )
|
||||
aString = String( SttResId( (USHORT)(aValue.ToInt32()) ) );
|
||||
aString = String( SttResId( (sal_uInt16)(aValue.ToInt32()) ) );
|
||||
// else
|
||||
{
|
||||
// DBG_ERROR( "Could not load resource!" );
|
||||
@@ -1920,12 +1920,12 @@ String BasicFrame::GenRealString( const String &aResString )
|
||||
nInsertPos = nStart;
|
||||
nStartPos = nStart;
|
||||
aResult.Erase( nStart, nEnd-nStart+1 );
|
||||
bFound = TRUE;
|
||||
bFound = sal_True;
|
||||
}
|
||||
else if ( aType.Search(BaseArgKenn) == 0 ) // Starts with BaseArgKenn
|
||||
{
|
||||
// TODO: What the hell is that for??
|
||||
USHORT nArgNr = USHORT( aType.Copy( BaseArgKenn.Len() ).ToInt32() );
|
||||
sal_uInt16 nArgNr = sal_uInt16( aType.Copy( BaseArgKenn.Len() ).ToInt32() );
|
||||
DBG_ASSERT( aString.Search( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")") ) != STRING_NOTFOUND, "Extra Argument given in String");
|
||||
aString.SearchAndReplace( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")"), aValue );
|
||||
nStartPos = nStart;
|
||||
|
||||
+22
-22
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
void LoadIniFile();
|
||||
void SetFocus();
|
||||
void Wait( BOOL );
|
||||
void Wait( sal_Bool );
|
||||
DECL_LINK( LateInit, void * );
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
typedef USHORT FileType;
|
||||
typedef sal_uInt16 FileType;
|
||||
|
||||
#define FT_NO_FILE (FileType)0x00 // An error has occurred ...
|
||||
#define FT_BASIC_SOURCE (FileType)0x01
|
||||
@@ -95,16 +95,16 @@ class BasicFrame : public WorkWindow, public SfxBroadcaster, public SfxListener
|
||||
using SystemWindow::Notify;
|
||||
using Window::Command;
|
||||
|
||||
virtual BOOL Close();
|
||||
BOOL CloseAll(); // Close all windows
|
||||
BOOL CompileAll(); // Compile all texts
|
||||
virtual sal_Bool Close();
|
||||
sal_Bool CloseAll(); // Close all windows
|
||||
sal_Bool CompileAll(); // Compile all texts
|
||||
AutoTimer aLineNum; // Show the line numbers
|
||||
virtual void Resize();
|
||||
virtual void Move();
|
||||
virtual void GetFocus();
|
||||
void LoadLibrary();
|
||||
void SaveLibrary();
|
||||
BOOL bIsAutoRun;
|
||||
sal_Bool bIsAutoRun;
|
||||
DisplayHidDlg* pDisplayHidDlg;
|
||||
|
||||
// BreakPoint *pRunToCursorBP;
|
||||
@@ -114,8 +114,8 @@ virtual void GetFocus();
|
||||
|
||||
|
||||
Timer aCheckFiles; // Checks the files for changes
|
||||
BOOL bAutoReload;
|
||||
BOOL bAutoSave;
|
||||
sal_Bool bAutoReload;
|
||||
sal_Bool bAutoSave;
|
||||
DECL_LINK( CheckAllFiles, Timer* );
|
||||
|
||||
MyBasicRef pBasic; // BASIC-Engine
|
||||
@@ -131,16 +131,16 @@ virtual void GetFocus();
|
||||
FloatingExecutionStatus *pExecutionStatus;
|
||||
|
||||
public:
|
||||
BOOL IsAutoRun();
|
||||
void SetAutoRun( BOOL bAuto );
|
||||
BOOL bInBreak; // TRUE if in Break-Handler
|
||||
sal_Bool IsAutoRun();
|
||||
void SetAutoRun( sal_Bool bAuto );
|
||||
sal_Bool bInBreak; // sal_True if in Break-Handler
|
||||
StatusLine* pStatus; // Status line
|
||||
EditList* pList; // List of edit windows
|
||||
AppWin* pWork; // Current edit window
|
||||
BasicPrinter* pPrn; // Printer
|
||||
BOOL bDisas; // TRUE: disassemble
|
||||
USHORT nFlags; // Debugging-Flags
|
||||
USHORT nMaximizedWindows; // Number of maximized windows
|
||||
sal_Bool bDisas; // sal_True: disassemble
|
||||
sal_uInt16 nFlags; // Debugging-Flags
|
||||
sal_uInt16 nMaximizedWindows; // Number of maximized windows
|
||||
void FocusWindow( AppWin *pWin );
|
||||
void WinMax_Restore();
|
||||
void WinShow_Hide();
|
||||
@@ -162,25 +162,25 @@ public:
|
||||
MsgEdit* GetMsgTree( String aLogFileName );
|
||||
DECL_LINK( Log, TTLogMsg * );
|
||||
DECL_LINK( WinInfo, WinInfoRec * );
|
||||
BOOL LoadFile( String aFilename );
|
||||
long Command( short,BOOL=FALSE ); // Command handler
|
||||
sal_Bool LoadFile( String aFilename );
|
||||
long Command( short,sal_Bool=sal_False ); // Command handler
|
||||
virtual void Command( const CommandEvent& rCEvt ); // Command handler
|
||||
BOOL SaveAll(); // Save all windows
|
||||
BOOL QueryFileName( String& rName, FileType nFileType, BOOL bSave ); // Query for filename
|
||||
sal_Bool SaveAll(); // Save all windows
|
||||
sal_Bool QueryFileName( String& rName, FileType nFileType, sal_Bool bSave ); // Query for filename
|
||||
DECL_LINK( ModuleWinExists, String* );
|
||||
DECL_LINK( WriteString, String* );
|
||||
AppBasEd* CreateModuleWin( SbModule* pMod );
|
||||
AppBasEd* FindModuleWin( const String& );
|
||||
AppError* FindErrorWin( const String& );
|
||||
AppWin* FindWin( const String& );
|
||||
AppWin* FindWin( USHORT nWinId );
|
||||
AppWin* FindWin( sal_uInt16 nWinId );
|
||||
AppWin* IsWinValid( AppWin* pMaybeWin );
|
||||
USHORT BreakHandler(); // Break-Handler-Callback
|
||||
sal_uInt16 BreakHandler(); // Break-Handler-Callback
|
||||
|
||||
void SetEditVar( SbxVariable *pVar ){ pEditVar = pVar;}
|
||||
SbxVariable* GetEditVar(){ return pEditVar;}
|
||||
BOOL IsAutoReload() { return bAutoReload; }
|
||||
BOOL IsAutoSave() { return bAutoSave; }
|
||||
sal_Bool IsAutoReload() { return bAutoReload; }
|
||||
sal_Bool IsAutoSave() { return bAutoSave; }
|
||||
void LoadIniFile();
|
||||
|
||||
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
|
||||
|
||||
@@ -60,11 +60,11 @@ AppBasEd::AppBasEd( BasicFrame* pParent, SbModule* p )
|
||||
pBreakpoints->Show();
|
||||
|
||||
|
||||
((TextEdit*)pDataEdit)->GetTextEditImp().pTextView->SetAutoIndentMode( TRUE );
|
||||
((TextEdit*)pDataEdit)->GetTextEditImp().pTextView->SetAutoIndentMode( sal_True );
|
||||
((TextEdit*)pDataEdit)->GetTextEditImp().pTextEngine->SetMaxTextLen( STRING_MAXLEN );
|
||||
// ((TextEdit*)pDataEdit)->GetTextEditImp().pTextEngine->SetWordDelimiters( CUniString(" ,.;:(){}[]\"'+-*/<>^\\") );
|
||||
((TextEdit*)pDataEdit)->GetTextEditImp().SyntaxHighlight( TRUE );
|
||||
((TextEdit*)pDataEdit)->SaveAsUTF8( TRUE );
|
||||
((TextEdit*)pDataEdit)->GetTextEditImp().SyntaxHighlight( sal_True );
|
||||
((TextEdit*)pDataEdit)->SaveAsUTF8( sal_True );
|
||||
|
||||
String aEmpty;
|
||||
|
||||
@@ -110,7 +110,7 @@ void AppBasEd::Notify( SfxBroadcaster&, const SfxHint& rHint )
|
||||
const SfxSimpleHint* p = PTR_CAST(SfxSimpleHint,&rHint);
|
||||
if( p )
|
||||
{
|
||||
ULONG nHintId = p->GetId();
|
||||
sal_uIntPtr nHintId = p->GetId();
|
||||
if( nHintId == SBX_HINT_LANGUAGE_EXTENSION_LOADED )
|
||||
{
|
||||
((TextEdit*)pDataEdit)->GetTextEditImp().InvalidateSyntaxHighlight();
|
||||
@@ -126,8 +126,8 @@ FileType AppBasEd::GetFileType()
|
||||
IMPL_LINK_INLINE_START( AppBasEd, EditChange, void *, p )
|
||||
{
|
||||
(void) p; /* avoid warning about unused parameter */
|
||||
bCompiled = FALSE;
|
||||
return TRUE;
|
||||
bCompiled = sal_False;
|
||||
return sal_True;
|
||||
}
|
||||
IMPL_LINK_INLINE_END( AppBasEd, EditChange, void *, p )
|
||||
|
||||
@@ -135,16 +135,16 @@ IMPL_LINK_INLINE_END( AppBasEd, EditChange, void *, p )
|
||||
long AppBasEd::InitMenu( Menu* pMenu )
|
||||
{
|
||||
AppEdit::InitMenu (pMenu );
|
||||
BOOL bRunning = pFrame->Basic().IsRunning();
|
||||
sal_Bool bRunning = pFrame->Basic().IsRunning();
|
||||
pMenu->EnableItem( RID_RUNCOMPILE, !bCompiled && !bRunning );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
long AppBasEd::DeInitMenu( Menu* pMenu )
|
||||
{
|
||||
AppEdit::DeInitMenu (pMenu );
|
||||
pMenu->EnableItem( RID_RUNCOMPILE );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
// Menu Handler
|
||||
@@ -186,13 +186,13 @@ void AppBasEd::PostLoad()
|
||||
pMod->SetName( GetText() );
|
||||
pMod->Clear();
|
||||
pMod->SetSource( pDataEdit->GetText() );
|
||||
bCompiled = FALSE; // because the code might have changed in the meantime
|
||||
bCompiled = sal_False; // because the code might have changed in the meantime
|
||||
AppEdit::PostLoad();
|
||||
|
||||
pBreakpoints->LoadBreakpoints( GetText() );
|
||||
}
|
||||
|
||||
USHORT AppBasEd::ImplSave()
|
||||
sal_uInt16 AppBasEd::ImplSave()
|
||||
{
|
||||
pBreakpoints->SaveBreakpoints( GetText() );
|
||||
return AppEdit::ImplSave();
|
||||
@@ -208,7 +208,7 @@ void AppBasEd::Reload()
|
||||
// Reload source code file after change
|
||||
void AppBasEd::LoadSource()
|
||||
{
|
||||
BOOL bErr;
|
||||
sal_Bool bErr;
|
||||
|
||||
// if( pDataEdit->GetText().Len() != 0 ) return;
|
||||
String aName = pMod->GetName();
|
||||
@@ -218,7 +218,7 @@ void AppBasEd::LoadSource()
|
||||
ErrorBox( this, SttResId( IDS_READERROR ) ).Execute();
|
||||
else
|
||||
UpdateFileInfo( HAS_BEEN_LOADED );
|
||||
bCompiled = FALSE; // because the code might have changed in the meantime
|
||||
bCompiled = sal_False; // because the code might have changed in the meantime
|
||||
}
|
||||
|
||||
// Save as (new name)
|
||||
@@ -229,15 +229,15 @@ void AppBasEd::PostSaveAs()
|
||||
}
|
||||
|
||||
// Compile
|
||||
BOOL AppBasEd::Compile()
|
||||
sal_Bool AppBasEd::Compile()
|
||||
{
|
||||
if( !pDataEdit->HasText() || bCompiled )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
pMod->SetSource( pDataEdit->GetText() );
|
||||
BOOL bRes = FALSE;
|
||||
sal_Bool bRes = sal_False;
|
||||
if( pFrame->Basic().Compile( pMod ) )
|
||||
{
|
||||
bRes = TRUE;
|
||||
bRes = sal_True;
|
||||
if( pFrame->bDisas )
|
||||
Disassemble();
|
||||
TextSelection aSel( pDataEdit->GetSelection() );
|
||||
@@ -267,7 +267,7 @@ void AppBasEd::Run()
|
||||
{
|
||||
pFrame->Basic().Reset();
|
||||
SbxArray* pAllModules = pFrame->Basic().GetModules();
|
||||
for (USHORT i = 0; i < pAllModules->Count(); i++)
|
||||
for (sal_uInt16 i = 0; i < pAllModules->Count(); i++)
|
||||
{
|
||||
if ( (pAllModules->Get(i)->GetName()).Copy(0,2).CompareToAscii( "--" ) == COMPARE_EQUAL )
|
||||
{
|
||||
|
||||
@@ -43,12 +43,12 @@ class AppBasEd : public AppEdit { // Editor-Window:
|
||||
using DockingWindow::Notify;
|
||||
|
||||
SbModuleRef pMod; // compile module
|
||||
BOOL bCompiled; // TRUE if compiled
|
||||
sal_Bool bCompiled; // sal_True if compiled
|
||||
protected:
|
||||
DECL_LINK( EditChange, void * );
|
||||
#define BREAKPOINTSWIDTH 15
|
||||
BreakpointWindow *pBreakpoints;
|
||||
virtual USHORT ImplSave(); // Save file
|
||||
virtual sal_uInt16 ImplSave(); // Save file
|
||||
|
||||
public:
|
||||
TYPEINFO();
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
virtual void PostSaveAs(); // Postprocess of module...
|
||||
void Reload();
|
||||
void LoadSource(); // Load source for object
|
||||
BOOL Compile(); // Compile text
|
||||
sal_Bool Compile(); // Compile text
|
||||
void Run(); // Run image
|
||||
void Disassemble(); // Disassemble image
|
||||
const String& GetModName() const { return pMod->GetName(); }
|
||||
|
||||
@@ -83,8 +83,8 @@ AppEdit::~AppEdit()
|
||||
void AppEdit::LoadIniFile()
|
||||
{
|
||||
TextView *pTextView = ((TextEdit*)pDataEdit)->aEdit.pTextView;
|
||||
BOOL bWasModified = pTextView->GetTextEngine()->IsModified();
|
||||
pTextView->GetTextEngine()->SetModified( FALSE );
|
||||
sal_Bool bWasModified = pTextView->GetTextEngine()->IsModified();
|
||||
pTextView->GetTextEngine()->SetModified( sal_False );
|
||||
|
||||
FontList aFontList( pFrame ); // Just some Window is needed
|
||||
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
|
||||
@@ -93,8 +93,8 @@ void AppEdit::LoadIniFile()
|
||||
String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 );
|
||||
String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 );
|
||||
Font aFont = aFontList.Get( aFontName, aFontStyle );
|
||||
// ULONG nFontSize = aFontSize.GetValue( FUNIT_POINT );
|
||||
ULONG nFontSize = aFontSize.ToInt32();
|
||||
// sal_uIntPtr nFontSize = aFontSize.GetValue( FUNIT_POINT );
|
||||
sal_uIntPtr nFontSize = aFontSize.ToInt32();
|
||||
// aFont.SetSize( Size( nFontSize, nFontSize ) );
|
||||
aFont.SetHeight( nFontSize );
|
||||
|
||||
@@ -103,7 +103,7 @@ void AppEdit::LoadIniFile()
|
||||
Font aFont2( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguage(), 0, pFrame ));
|
||||
}
|
||||
#endif
|
||||
aFont.SetTransparent( FALSE );
|
||||
aFont.SetTransparent( sal_False );
|
||||
// aFont.SetAlign( ALIGN_BOTTOM );
|
||||
// aFont.SetHeight( aFont.GetHeight()+2 );
|
||||
pDataEdit->SetFont( aFont );
|
||||
@@ -184,7 +184,7 @@ void AppEdit::SetScrollBarRanges()
|
||||
|
||||
|
||||
|
||||
USHORT AppEdit::GetLineNr()
|
||||
sal_uInt16 AppEdit::GetLineNr()
|
||||
{
|
||||
return pDataEdit->GetLineNr();
|
||||
}
|
||||
@@ -201,14 +201,14 @@ long AppEdit::InitMenu( Menu* pMenu )
|
||||
|
||||
if( pDataEdit )
|
||||
{
|
||||
USHORT UndoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetUndoActionCount();
|
||||
USHORT RedoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetRedoActionCount();
|
||||
sal_uInt16 UndoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetUndoActionCount();
|
||||
sal_uInt16 RedoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetRedoActionCount();
|
||||
|
||||
pMenu->EnableItem( RID_EDITUNDO, UndoCount > 0 );
|
||||
pMenu->EnableItem( RID_EDITREDO, RedoCount > 0 );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
long AppEdit::DeInitMenu( Menu* pMenu )
|
||||
@@ -218,7 +218,7 @@ long AppEdit::DeInitMenu( Menu* pMenu )
|
||||
pMenu->EnableItem( RID_EDITUNDO );
|
||||
pMenu->EnableItem( RID_EDITREDO );
|
||||
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
void AppEdit::Resize()
|
||||
@@ -233,7 +233,7 @@ void AppEdit::Resize()
|
||||
if ( pHScroll )
|
||||
{
|
||||
rHSize = pHScroll->GetSizePixel();
|
||||
ULONG nHieght = rHSize.Height();
|
||||
sal_uIntPtr nHieght = rHSize.Height();
|
||||
rNewSize.Height() -= nHieght;
|
||||
rHStart.Y() = rNewSize.Height();
|
||||
}
|
||||
@@ -241,7 +241,7 @@ void AppEdit::Resize()
|
||||
if ( pVScroll )
|
||||
{
|
||||
rVSize = pVScroll->GetSizePixel();
|
||||
ULONG nWidth = rVSize.Width();
|
||||
sal_uIntPtr nWidth = rVSize.Width();
|
||||
rNewSize.Width() -= nWidth;
|
||||
rVStart.X() = rNewSize.Width();
|
||||
}
|
||||
@@ -293,7 +293,7 @@ void AppEdit::PostSaveAs()
|
||||
{
|
||||
}
|
||||
|
||||
void AppEdit::Highlight( USHORT nLine, USHORT nCol1, USHORT nCol2 )
|
||||
void AppEdit::Highlight( sal_uInt16 nLine, sal_uInt16 nCol1, sal_uInt16 nCol2 )
|
||||
{
|
||||
((TextEdit*)pDataEdit)->Highlight( nLine, nCol1, nCol2 );
|
||||
ToTop();
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
ScrollBar *pVScroll;
|
||||
ScrollBar *pHScroll;
|
||||
void SetScrollBarRanges();
|
||||
ULONG nCurTextWidth;
|
||||
sal_uIntPtr nCurTextWidth;
|
||||
private:
|
||||
void InitScrollBars();
|
||||
protected:
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
TYPEINFO();
|
||||
AppEdit( BasicFrame* );
|
||||
~AppEdit();
|
||||
USHORT GetLineNr(); // Current line number
|
||||
sal_uInt16 GetLineNr(); // Current line number
|
||||
FileType GetFileType(); // Returns the file type
|
||||
virtual long InitMenu( Menu* ); // Inits the menu
|
||||
virtual long DeInitMenu( Menu* ); // Reset to enable all Shortcuts
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
void PostLoad();
|
||||
void PostSaveAs();
|
||||
void Mark( short, short, short ); // Select text
|
||||
void Highlight( USHORT nLine, USHORT nCol1, USHORT nCol2 );
|
||||
virtual BOOL ReloadAllowed(){ return !StarBASIC::IsRunning(); }
|
||||
void Highlight( sal_uInt16 nLine, sal_uInt16 nCol1, sal_uInt16 nCol2 );
|
||||
virtual sal_Bool ReloadAllowed(){ return !StarBASIC::IsRunning(); }
|
||||
virtual void LoadIniFile(); // (re)load ini file after change
|
||||
};
|
||||
|
||||
|
||||
@@ -65,10 +65,10 @@ long AppError::InitMenu( Menu* pMenu )
|
||||
{
|
||||
AppWin::InitMenu (pMenu );
|
||||
|
||||
pMenu->EnableItem( RID_EDITUNDO, FALSE );
|
||||
pMenu->EnableItem( RID_EDITREDO, FALSE );
|
||||
pMenu->EnableItem( RID_EDITUNDO, sal_False );
|
||||
pMenu->EnableItem( RID_EDITREDO, sal_False );
|
||||
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
long AppError::DeInitMenu( Menu* pMenu )
|
||||
@@ -78,10 +78,10 @@ long AppError::DeInitMenu( Menu* pMenu )
|
||||
pMenu->EnableItem( RID_EDITUNDO );
|
||||
pMenu->EnableItem( RID_EDITREDO );
|
||||
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
USHORT AppError::GetLineNr(){ return pDataEdit->GetLineNr(); }
|
||||
sal_uInt16 AppError::GetLineNr(){ return pDataEdit->GetLineNr(); }
|
||||
|
||||
FileType AppError::GetFileType()
|
||||
{
|
||||
@@ -103,12 +103,12 @@ void AppError::LoadIniFile()
|
||||
String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 );
|
||||
String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 );
|
||||
Font aFont = aFontList.Get( aFontName, aFontStyle );
|
||||
// ULONG nFontSize = aFontSize.GetValue( FUNIT_POINT );
|
||||
ULONG nFontSize = aFontSize.ToInt32();
|
||||
// sal_uIntPtr nFontSize = aFontSize.GetValue( FUNIT_POINT );
|
||||
sal_uIntPtr nFontSize = aFontSize.ToInt32();
|
||||
// aFont.SetSize( Size( nFontSize, nFontSize ) );
|
||||
aFont.SetHeight( nFontSize );
|
||||
|
||||
aFont.SetTransparent( FALSE );
|
||||
aFont.SetTransparent( sal_False );
|
||||
// aFont.SetAlign( ALIGN_BOTTOM );
|
||||
// aFont.SetHeight( aFont.GetHeight()+2 );
|
||||
pDataEdit->SetFont( aFont );
|
||||
|
||||
@@ -39,10 +39,10 @@ public:
|
||||
// long Command( short nID );
|
||||
virtual long InitMenu( Menu* );
|
||||
virtual long DeInitMenu( Menu* );
|
||||
USHORT GetLineNr();
|
||||
sal_uInt16 GetLineNr();
|
||||
FileType GetFileType();
|
||||
MsgEdit* GetMsgTree() { return ((MsgEdit*)pDataEdit); }
|
||||
virtual BOOL ReloadAllowed(){ return !StarBASIC::IsRunning(); }
|
||||
virtual sal_Bool ReloadAllowed(){ return !StarBASIC::IsRunning(); }
|
||||
virtual void LoadIniFile(); // (re)load ini file after change
|
||||
DirEntry aBaseDir;
|
||||
};
|
||||
|
||||
+59
-59
@@ -52,10 +52,10 @@ TYPEINIT0(AppWin);
|
||||
AppWin::AppWin( BasicFrame* pParent )
|
||||
: DockingWindow( pParent, WB_SIZEMOVE | WB_CLOSEABLE | WB_PINABLE )
|
||||
, nSkipReload(0)
|
||||
, bHasFile( FALSE )
|
||||
, bReloadAborted( FALSE )
|
||||
, bHasFile( sal_False )
|
||||
, bReloadAborted( sal_False )
|
||||
, pFrame( pParent )
|
||||
, bFind( TRUE )
|
||||
, bFind( sal_True )
|
||||
, pDataEdit(NULL)
|
||||
{
|
||||
// Load the Untitled string if not yet loaded
|
||||
@@ -64,7 +64,7 @@ AppWin::AppWin( BasicFrame* pParent )
|
||||
nCount++;
|
||||
|
||||
// Get maximized state from current window
|
||||
USHORT nInitialWinState;
|
||||
sal_uInt16 nInitialWinState;
|
||||
if ( pFrame->pWork )
|
||||
{
|
||||
nInitialWinState = pFrame->pWork->GetWinState();
|
||||
@@ -98,7 +98,7 @@ void AppWin::SetText( const XubString& rStr )
|
||||
pFrame->WindowRenamed( this );
|
||||
}
|
||||
|
||||
void AppWin::TitleButtonClick( USHORT nButton )
|
||||
void AppWin::TitleButtonClick( sal_uInt16 nButton )
|
||||
{
|
||||
if ( TITLE_BUTTON_DOCKING == nButton )
|
||||
if ( TT_WIN_STATE_MAX != nWinState )
|
||||
@@ -106,7 +106,7 @@ void AppWin::TitleButtonClick( USHORT nButton )
|
||||
else
|
||||
Restore();
|
||||
else // if ( TITLE_BUTTON_HIDE == nButton )
|
||||
Minimize( TRUE );
|
||||
Minimize( sal_True );
|
||||
}
|
||||
|
||||
void AppWin::Maximize()
|
||||
@@ -116,7 +116,7 @@ void AppWin::Maximize()
|
||||
nNormalPos = GetPosPixel();
|
||||
nNormalSize = GetSizePixel();
|
||||
|
||||
SetFloatingMode( FALSE );
|
||||
SetFloatingMode( sal_False );
|
||||
|
||||
pFrame->nMaximizedWindows++;
|
||||
nWinState = TT_WIN_STATE_MAX;
|
||||
@@ -138,7 +138,7 @@ void AppWin::Maximize()
|
||||
|
||||
void AppWin::Restore()
|
||||
{
|
||||
SetFloatingMode( TRUE );
|
||||
SetFloatingMode( sal_True );
|
||||
SetPosSizePixel( nNormalPos, nNormalSize );
|
||||
|
||||
if ( TT_WIN_STATE_MAX == nWinState )
|
||||
@@ -148,7 +148,7 @@ void AppWin::Restore()
|
||||
pFrame->WinMax_Restore();
|
||||
}
|
||||
|
||||
void AppWin::Minimize( BOOL bMinimize )
|
||||
void AppWin::Minimize( sal_Bool bMinimize )
|
||||
{
|
||||
if ( bMinimize )
|
||||
nWinState |= TT_WIN_STATE_HIDE;
|
||||
@@ -157,7 +157,7 @@ void AppWin::Minimize( BOOL bMinimize )
|
||||
pFrame->WinMax_Restore();
|
||||
}
|
||||
|
||||
void AppWin::Cascade( USHORT nNr )
|
||||
void AppWin::Cascade( sal_uInt16 nNr )
|
||||
{
|
||||
Restore();
|
||||
|
||||
@@ -229,7 +229,7 @@ long AppWin::PreNotify( NotifyEvent& rNEvt )
|
||||
if ( rNEvt.GetType() == EVENT_GETFOCUS )
|
||||
if ( pFrame->pList->Last() != this )
|
||||
Activate();
|
||||
return FALSE; // Der event soll weiter verarbeitet werden
|
||||
return sal_False; // Der event soll weiter verarbeitet werden
|
||||
}
|
||||
|
||||
void AppWin::Activate()
|
||||
@@ -242,14 +242,14 @@ long AppWin::InitMenu( Menu* pMenu )
|
||||
{
|
||||
|
||||
::rtl::OUString aTemp;
|
||||
BOOL bMarked;
|
||||
sal_Bool bMarked;
|
||||
if( pDataEdit )
|
||||
{
|
||||
TextSelection r = pDataEdit->GetSelection();
|
||||
bMarked = r.HasRange();
|
||||
}
|
||||
else
|
||||
bMarked = FALSE;
|
||||
bMarked = sal_False;
|
||||
pMenu->EnableItem( RID_EDITREPEAT, (aFind.Len() != 0 ) );
|
||||
pMenu->EnableItem( RID_EDITCUT, bMarked );
|
||||
pMenu->EnableItem( RID_EDITCOPY, bMarked );
|
||||
@@ -257,20 +257,20 @@ long AppWin::InitMenu( Menu* pMenu )
|
||||
pMenu->EnableItem( RID_EDITDEL, bMarked );
|
||||
// pMenu->EnableItem( RID_HELPTOPIC, bMarked );
|
||||
|
||||
BOOL bHasText;
|
||||
sal_Bool bHasText;
|
||||
if( pDataEdit )
|
||||
bHasText = pDataEdit->HasText();
|
||||
else
|
||||
bHasText = FALSE;
|
||||
BOOL bRunning = pFrame->Basic().IsRunning();
|
||||
BOOL bCanExecute = BOOL( (!bRunning && bHasText) || pFrame->bInBreak );
|
||||
bHasText = sal_False;
|
||||
sal_Bool bRunning = pFrame->Basic().IsRunning();
|
||||
sal_Bool bCanExecute = sal_Bool( (!bRunning && bHasText) || pFrame->bInBreak );
|
||||
pMenu->EnableItem( RID_RUNSTART, bCanExecute );
|
||||
pMenu->EnableItem( RID_RUNBREAK, bRunning && !pFrame->bInBreak);
|
||||
pMenu->EnableItem( RID_RUNSTOP, bRunning );
|
||||
pMenu->EnableItem( RID_RUNTOCURSOR, bCanExecute );
|
||||
pMenu->EnableItem( RID_RUNSTEPINTO, bCanExecute );
|
||||
pMenu->EnableItem( RID_RUNSTEPOVER, bCanExecute );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
long AppWin::DeInitMenu( Menu* pMenu )
|
||||
@@ -287,7 +287,7 @@ long AppWin::DeInitMenu( Menu* pMenu )
|
||||
pMenu->EnableItem( RID_RUNTOCURSOR );
|
||||
pMenu->EnableItem( RID_RUNSTEPINTO );
|
||||
pMenu->EnableItem( RID_RUNSTEPOVER );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
// Menu Handler
|
||||
@@ -295,7 +295,7 @@ long AppWin::DeInitMenu( Menu* pMenu )
|
||||
void AppWin::Command( const CommandEvent& rCEvt )
|
||||
{
|
||||
TextSelection r = pDataEdit->GetSelection();
|
||||
BOOL bHasMark = r.HasRange();
|
||||
sal_Bool bHasMark = r.HasRange();
|
||||
switch( rCEvt.GetCommand() ) {
|
||||
case RID_FILESAVE:
|
||||
QuerySave( QUERY_DISK_CHANGED | SAVE_NOT_DIRTY ); break;
|
||||
@@ -337,7 +337,7 @@ void AppWin::Command( const CommandEvent& rCEvt )
|
||||
pDataEdit->BuildKontextMenu( pKontext );
|
||||
if ( pKontext )
|
||||
{
|
||||
USHORT nRes = pKontext->Execute( this, GetPointerPosPixel() );
|
||||
sal_uInt16 nRes = pKontext->Execute( this, GetPointerPosPixel() );
|
||||
if ( nRes )
|
||||
pFrame->Command( nRes );
|
||||
delete pKontext;
|
||||
@@ -348,12 +348,12 @@ void AppWin::Command( const CommandEvent& rCEvt )
|
||||
}
|
||||
|
||||
|
||||
BOOL AppWin::IsSkipReload()
|
||||
sal_Bool AppWin::IsSkipReload()
|
||||
{
|
||||
return nSkipReload != 0;
|
||||
}
|
||||
|
||||
void AppWin::SkipReload( BOOL bSkip )
|
||||
void AppWin::SkipReload( sal_Bool bSkip )
|
||||
{
|
||||
DBG_ASSERT( bSkip || nSkipReload, "SkipReload aufgehoben ohne es zu aktivieren");
|
||||
if ( bSkip )
|
||||
@@ -362,17 +362,17 @@ void AppWin::SkipReload( BOOL bSkip )
|
||||
nSkipReload--;
|
||||
}
|
||||
|
||||
BOOL AppWin::DiskFileChanged( USHORT nWhat )
|
||||
sal_Bool AppWin::DiskFileChanged( sal_uInt16 nWhat )
|
||||
{
|
||||
if ( !bHasFile )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
switch ( nWhat )
|
||||
{
|
||||
case SINCE_LAST_LOAD:
|
||||
{
|
||||
if ( bReloadAborted )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
else
|
||||
return DiskFileChanged( SINCE_LAST_ASK_RELOAD );
|
||||
}
|
||||
@@ -393,16 +393,16 @@ BOOL AppWin::DiskFileChanged( USHORT nWhat )
|
||||
default:
|
||||
DBG_ERROR("Not Implemented in AppWin::DiskFileChanged");
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
void AppWin::UpdateFileInfo( USHORT nWhat )
|
||||
void AppWin::UpdateFileInfo( sal_uInt16 nWhat )
|
||||
{
|
||||
switch ( nWhat )
|
||||
{
|
||||
case HAS_BEEN_LOADED:
|
||||
{
|
||||
bReloadAborted = FALSE;
|
||||
bReloadAborted = sal_False;
|
||||
UpdateFileInfo( ASKED_RELOAD );
|
||||
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void AppWin::CheckReload()
|
||||
}
|
||||
else
|
||||
{
|
||||
bReloadAborted = TRUE;
|
||||
bReloadAborted = sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,14 +458,14 @@ void AppWin::Reload()
|
||||
TextSelection aSelMemo = pDataEdit->GetSelection();
|
||||
Load( GetText() );
|
||||
pDataEdit->SetSelection( aSelMemo );
|
||||
SkipReload( FALSE );
|
||||
SkipReload( sal_False );
|
||||
}
|
||||
|
||||
// Load file
|
||||
BOOL AppWin::Load( const String& aName )
|
||||
sal_Bool AppWin::Load( const String& aName )
|
||||
{
|
||||
SkipReload();
|
||||
BOOL bErr;
|
||||
sal_Bool bErr;
|
||||
|
||||
// if( !QuerySave() )
|
||||
// return;
|
||||
@@ -494,17 +494,17 @@ BOOL AppWin::Load( const String& aName )
|
||||
SetText( aModName );
|
||||
UpdateFileInfo( HAS_BEEN_LOADED );
|
||||
PostLoad();
|
||||
bHasFile = TRUE;
|
||||
bHasFile = sal_True;
|
||||
}
|
||||
SkipReload( FALSE );
|
||||
SkipReload( sal_False );
|
||||
return !bErr;
|
||||
}
|
||||
|
||||
// Save file
|
||||
USHORT AppWin::ImplSave()
|
||||
sal_uInt16 AppWin::ImplSave()
|
||||
{
|
||||
SkipReload();
|
||||
USHORT nResult = SAVE_RES_NOT_SAVED;
|
||||
sal_uInt16 nResult = SAVE_RES_NOT_SAVED;
|
||||
String s1 = *pNoName;
|
||||
String s2 = GetText().Copy( 0, s1.Len() );
|
||||
if( s1 == s2 )
|
||||
@@ -514,7 +514,7 @@ USHORT AppWin::ImplSave()
|
||||
if ( pDataEdit->Save( aName ) )
|
||||
{
|
||||
nResult = SAVE_RES_SAVED;
|
||||
bHasFile = TRUE;
|
||||
bHasFile = sal_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -523,38 +523,38 @@ USHORT AppWin::ImplSave()
|
||||
}
|
||||
UpdateFileInfo( HAS_BEEN_LOADED );
|
||||
}
|
||||
SkipReload( FALSE );
|
||||
SkipReload( sal_False );
|
||||
return nResult;
|
||||
}
|
||||
|
||||
// Save to new file name
|
||||
USHORT AppWin::SaveAs()
|
||||
sal_uInt16 AppWin::SaveAs()
|
||||
{
|
||||
SkipReload();
|
||||
String s1 = *pNoName;
|
||||
String s2 = GetText().Copy( 0, s1.Len() );
|
||||
if( s1 == s2 ) s2.Erase();
|
||||
else s2 = GetText();
|
||||
if( pFrame->QueryFileName( s2, GetFileType(), TRUE ) )
|
||||
if( pFrame->QueryFileName( s2, GetFileType(), sal_True ) )
|
||||
{
|
||||
SetText( s2 );
|
||||
PostSaveAs();
|
||||
SkipReload( FALSE );
|
||||
SkipReload( sal_False );
|
||||
return ImplSave();
|
||||
}
|
||||
else
|
||||
{
|
||||
SkipReload( FALSE );
|
||||
SkipReload( sal_False );
|
||||
return SAVE_RES_CANCEL;
|
||||
}
|
||||
}
|
||||
|
||||
// Should we save the file?
|
||||
USHORT AppWin::QuerySave( QueryBits nBits )
|
||||
sal_uInt16 AppWin::QuerySave( QueryBits nBits )
|
||||
{
|
||||
BOOL bQueryDirty = ( nBits & QUERY_DIRTY ) != 0;
|
||||
BOOL bQueryDiskChanged = ( nBits & QUERY_DISK_CHANGED ) != 0;
|
||||
BOOL bSaveNotDirty = ( nBits & SAVE_NOT_DIRTY ) != 0;
|
||||
sal_Bool bQueryDirty = ( nBits & QUERY_DIRTY ) != 0;
|
||||
sal_Bool bQueryDiskChanged = ( nBits & QUERY_DISK_CHANGED ) != 0;
|
||||
sal_Bool bSaveNotDirty = ( nBits & SAVE_NOT_DIRTY ) != 0;
|
||||
|
||||
SkipReload();
|
||||
short nResult;
|
||||
@@ -563,8 +563,8 @@ USHORT AppWin::QuerySave( QueryBits nBits )
|
||||
else
|
||||
nResult = RET_NO;
|
||||
|
||||
BOOL bAlwaysEnableInput = pFrame->IsAlwaysEnableInput();
|
||||
pFrame->AlwaysEnableInput( FALSE );
|
||||
sal_Bool bAlwaysEnableInput = pFrame->IsAlwaysEnableInput();
|
||||
pFrame->AlwaysEnableInput( sal_False );
|
||||
if( ( ( IsModified() || bSaveNotDirty ) && bQueryDirty ) || ( DiskFileChanged( SINCE_LAST_LOAD ) && bQueryDiskChanged ) )
|
||||
{
|
||||
ToTop();
|
||||
@@ -578,7 +578,7 @@ USHORT AppWin::QuerySave( QueryBits nBits )
|
||||
}
|
||||
pFrame->AlwaysEnableInput( bAlwaysEnableInput );
|
||||
|
||||
USHORT nReturn;
|
||||
sal_uInt16 nReturn;
|
||||
switch( nResult )
|
||||
{
|
||||
case RET_YES:
|
||||
@@ -594,11 +594,11 @@ USHORT AppWin::QuerySave( QueryBits nBits )
|
||||
DBG_ERROR("switch default where no default should be: Internal error");
|
||||
nReturn = SAVE_RES_CANCEL;
|
||||
}
|
||||
SkipReload( FALSE );
|
||||
SkipReload( sal_False );
|
||||
return nReturn;
|
||||
}
|
||||
|
||||
BOOL AppWin::Close()
|
||||
sal_Bool AppWin::Close()
|
||||
{
|
||||
switch ( QuerySave( QUERY_DIRTY ) )
|
||||
{
|
||||
@@ -607,21 +607,21 @@ BOOL AppWin::Close()
|
||||
{
|
||||
DockingWindow::Close();
|
||||
delete this;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
// uncomment to avoid compiler warning
|
||||
// break;
|
||||
case SAVE_RES_ERROR:
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
// uncomment to avoid compiler warning
|
||||
// break;
|
||||
case SAVE_RES_CANCEL:
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
// uncomment to avoid compiler warning
|
||||
// break;
|
||||
default:
|
||||
DBG_ERROR("Not Implemented in AppWin::Close");
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -631,7 +631,7 @@ void AppWin::Find()
|
||||
SttResId aResId( IDD_FIND_DIALOG );
|
||||
FindDialog aDlg( this, aResId, aFind );
|
||||
if( aDlg.Execute() ) {
|
||||
bFind = TRUE;
|
||||
bFind = sal_True;
|
||||
Repeat();
|
||||
}
|
||||
}
|
||||
@@ -643,7 +643,7 @@ void AppWin::Replace()
|
||||
ReplaceDialog* pDlg = new ReplaceDialog
|
||||
(this, aResId, aFind, aReplace );
|
||||
if( pDlg->Execute() ) {
|
||||
bFind = FALSE;
|
||||
bFind = sal_False;
|
||||
Repeat();
|
||||
}
|
||||
}
|
||||
@@ -651,7 +651,7 @@ void AppWin::Replace()
|
||||
// Repeat search/replace operation
|
||||
void AppWin::Repeat()
|
||||
{
|
||||
if( (aFind.Len() != 0 ) && ( pDataEdit->Find( aFind ) || (ErrorBox(this,SttResId(IDS_PATTERNNOTFOUND)).Execute() && FALSE) ) && !bFind )
|
||||
if( (aFind.Len() != 0 ) && ( pDataEdit->Find( aFind ) || (ErrorBox(this,SttResId(IDS_PATTERNNOTFOUND)).Execute() && sal_False) ) && !bFind )
|
||||
pDataEdit->ReplaceSelected( aReplace );
|
||||
}
|
||||
|
||||
|
||||
+27
-27
@@ -35,15 +35,15 @@
|
||||
#include "app.hxx"
|
||||
#include "dataedit.hxx"
|
||||
|
||||
typedef USHORT QueryBits;
|
||||
typedef sal_uInt16 QueryBits;
|
||||
#define QUERY_NONE ( QueryBits ( 0x00 ) )
|
||||
#define QUERY_DIRTY ( QueryBits ( 0x01 ) )
|
||||
#define QUERY_DISK_CHANGED ( QueryBits ( 0x02 ) )
|
||||
#define QUERY_ALL ( QUERY_DIRTY | QUERY_DISK_CHANGED )
|
||||
#define SAVE_NOT_DIRTY ( QueryBits ( 0x04 ) )
|
||||
|
||||
#define SAVE_RES_SAVED TRUE
|
||||
#define SAVE_RES_NOT_SAVED FALSE
|
||||
#define SAVE_RES_SAVED sal_True
|
||||
#define SAVE_RES_NOT_SAVED sal_False
|
||||
#define SAVE_RES_ERROR 3
|
||||
#define SAVE_RES_CANCEL 4
|
||||
|
||||
@@ -69,68 +69,68 @@ protected:
|
||||
static short nCount; // number of edit windows
|
||||
static String *pNoName; // "Untitled"
|
||||
FileStat aLastAccess; // Last access time of loaded file
|
||||
USHORT nSkipReload; // Sometimes there must not be a reload
|
||||
BOOL bHasFile; // Otherwise reload does not make sense
|
||||
BOOL bReloadAborted; // Is set if reload was cancelled so that we can ask again wehn closing
|
||||
sal_uInt16 nSkipReload; // Sometimes there must not be a reload
|
||||
sal_Bool bHasFile; // Otherwise reload does not make sense
|
||||
sal_Bool bReloadAborted; // Is set if reload was cancelled so that we can ask again wehn closing
|
||||
|
||||
short nId; // ID-Nummer( "Unnamed n" )
|
||||
BasicFrame* pFrame; // Parent-Window
|
||||
// Icon* pIcon; // Document icon
|
||||
String aFind; // Search string
|
||||
String aReplace; // Replace string
|
||||
BOOL bFind; // TRUE if search not replace
|
||||
sal_Bool bFind; // sal_True if search not replace
|
||||
void RequestHelp( const HelpEvent& ); // Help handler
|
||||
void GetFocus(); // activate
|
||||
virtual USHORT ImplSave(); // Save file
|
||||
USHORT nWinState; // Maximized, Iconized or Normal
|
||||
virtual sal_uInt16 ImplSave(); // Save file
|
||||
sal_uInt16 nWinState; // Maximized, Iconized or Normal
|
||||
Point nNormalPos; // Position if normal
|
||||
Size nNormalSize; // Size if Normal
|
||||
virtual long PreNotify( NotifyEvent& rNEvt );
|
||||
USHORT nWinId;
|
||||
sal_uInt16 nWinId;
|
||||
|
||||
public:
|
||||
TYPEINFO();
|
||||
AppWin( BasicFrame* );
|
||||
~AppWin();
|
||||
DataEdit* pDataEdit; // Data area
|
||||
virtual USHORT GetLineNr()=0; // Current line number
|
||||
virtual sal_uInt16 GetLineNr()=0; // Current line number
|
||||
virtual long InitMenu( Menu* ); // Init of the menu
|
||||
virtual long DeInitMenu( Menu* ); // reset to enable all shortcuts
|
||||
virtual void Command( const CommandEvent& rCEvt ); // Command handler
|
||||
virtual void Resize();
|
||||
virtual void Help();
|
||||
virtual BOOL Load( const String& ); // Load file
|
||||
virtual sal_Bool Load( const String& ); // Load file
|
||||
virtual void PostLoad(){} // Set source at module
|
||||
virtual USHORT SaveAs(); // Save file as
|
||||
virtual sal_uInt16 SaveAs(); // Save file as
|
||||
virtual void PostSaveAs(){}
|
||||
virtual void Find(); // find text
|
||||
virtual void Replace(); // replace text
|
||||
virtual void Repeat(); // repeat find/replace
|
||||
virtual BOOL Close(); // close window
|
||||
virtual sal_Bool Close(); // close window
|
||||
virtual void Activate(); // window was activated
|
||||
virtual FileType GetFileType()=0; // returns the filetype
|
||||
virtual BOOL ReloadAllowed(){ return TRUE; }
|
||||
virtual sal_Bool ReloadAllowed(){ return sal_True; }
|
||||
virtual void Reload(); // Reload after change on disk
|
||||
virtual void LoadIniFile(){;} // (re)load ini file after change
|
||||
void CheckReload(); // Checks and asks if reload should performed
|
||||
BOOL DiskFileChanged( USHORT nWhat ); // Checks file for changes
|
||||
void UpdateFileInfo( USHORT nWhat ); // Remembers last file state
|
||||
BOOL IsSkipReload(); // Should we test reload?
|
||||
void SkipReload( BOOL bSkip = TRUE );
|
||||
USHORT GetWinState(){ return nWinState; }
|
||||
sal_Bool DiskFileChanged( sal_uInt16 nWhat ); // Checks file for changes
|
||||
void UpdateFileInfo( sal_uInt16 nWhat ); // Remembers last file state
|
||||
sal_Bool IsSkipReload(); // Should we test reload?
|
||||
void SkipReload( sal_Bool bSkip = sal_True );
|
||||
sal_uInt16 GetWinState(){ return nWinState; }
|
||||
void Maximize();
|
||||
void Restore();
|
||||
void Minimize( BOOL bMinimize );
|
||||
void Cascade( USHORT nNr );
|
||||
void Minimize( sal_Bool bMinimize );
|
||||
void Cascade( sal_uInt16 nNr );
|
||||
|
||||
USHORT QuerySave( QueryBits nBits = QUERY_ALL );
|
||||
BOOL IsModified() { return pDataEdit->IsModified(); }
|
||||
sal_uInt16 QuerySave( QueryBits nBits = QUERY_ALL );
|
||||
sal_Bool IsModified() { return pDataEdit->IsModified(); }
|
||||
BasicFrame* GetBasicFrame() { return pFrame; }
|
||||
virtual void TitleButtonClick( USHORT nButton );
|
||||
virtual void TitleButtonClick( sal_uInt16 nButton );
|
||||
virtual void SetText( const XubString& rStr );
|
||||
|
||||
USHORT GetWinId() { return nWinId; }
|
||||
void SetWinId( USHORT nWId ) { nWinId = nWId; }
|
||||
sal_uInt16 GetWinId() { return nWinId; }
|
||||
void SetWinId( sal_uInt16 nWId ) { nWinId = nWId; }
|
||||
};
|
||||
|
||||
DECLARE_LIST( EditList, AppWin* )
|
||||
|
||||
@@ -63,7 +63,7 @@ xub_StrLen BasicRuntime::GetCol2()
|
||||
return pRun->nCol2;
|
||||
}
|
||||
|
||||
BOOL BasicRuntime::IsRun()
|
||||
sal_Bool BasicRuntime::IsRun()
|
||||
{
|
||||
return pRun->IsRun();
|
||||
}
|
||||
@@ -117,17 +117,17 @@ bool BasicRuntimeAccess::HasRuntime()
|
||||
return pINST && pINST->pRun != NULL;
|
||||
}
|
||||
|
||||
USHORT BasicRuntimeAccess::GetStackEntryCount()
|
||||
sal_uInt16 BasicRuntimeAccess::GetStackEntryCount()
|
||||
{
|
||||
return GetSbData()->pErrStack->Count();
|
||||
}
|
||||
|
||||
BasicErrorStackEntry BasicRuntimeAccess::GetStackEntry( USHORT nIndex )
|
||||
BasicErrorStackEntry BasicRuntimeAccess::GetStackEntry( sal_uInt16 nIndex )
|
||||
{
|
||||
return BasicErrorStackEntry( GetSbData()->pErrStack->GetObject( nIndex ) );
|
||||
}
|
||||
|
||||
BOOL BasicRuntimeAccess::HasStack()
|
||||
sal_Bool BasicRuntimeAccess::HasStack()
|
||||
{
|
||||
return GetSbData()->pErrStack != NULL;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ void BasicRuntimeAccess::DeleteStack()
|
||||
GetSbData()->pErrStack = NULL;
|
||||
}
|
||||
|
||||
BOOL BasicRuntimeAccess::IsRunInit()
|
||||
sal_Bool BasicRuntimeAccess::IsRunInit()
|
||||
{
|
||||
return GetSbData()->bRunInit;
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
|
||||
struct Breakpoint
|
||||
{
|
||||
USHORT nLine;
|
||||
sal_uInt16 nLine;
|
||||
|
||||
Breakpoint( USHORT nL ) { nLine = nL; }
|
||||
Breakpoint( sal_uInt16 nL ) { nLine = nL; }
|
||||
};
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ BreakpointWindow::BreakpointWindow( Window *pParent )
|
||||
, nCurYOffset( 0 )
|
||||
, nMarkerPos( MARKER_NOMARKER )
|
||||
, pModule( NULL )
|
||||
, bErrorMarker( FALSE )
|
||||
, bErrorMarker( sal_False )
|
||||
{
|
||||
if ( !pImages )
|
||||
pImages = new ImageList( SttResId( RID_IMGLST_LAYOUT ) );
|
||||
@@ -90,7 +90,7 @@ void BreakpointWindow::Reset()
|
||||
void BreakpointWindow::SetModule( SbModule *pMod )
|
||||
{
|
||||
pModule = pMod;
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for ( i=0 ; i < pModule->GetBPCount() ; i++ )
|
||||
{
|
||||
InsertBreakpoint( pModule->GetBP( i ) );
|
||||
@@ -106,13 +106,13 @@ void BreakpointWindow::SetBPsInModule()
|
||||
Breakpoint* pBrk = First();
|
||||
while ( pBrk )
|
||||
{
|
||||
pModule->SetBP( (USHORT)pBrk->nLine );
|
||||
pModule->SetBP( (sal_uInt16)pBrk->nLine );
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
|
||||
#endif
|
||||
pBrk = Next();
|
||||
}
|
||||
for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
|
||||
for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
|
||||
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
|
||||
@@ -121,7 +121,7 @@ void BreakpointWindow::SetBPsInModule()
|
||||
}
|
||||
|
||||
|
||||
void BreakpointWindow::InsertBreakpoint( USHORT nLine )
|
||||
void BreakpointWindow::InsertBreakpoint( sal_uInt16 nLine )
|
||||
{
|
||||
Breakpoint* pNewBrk = new Breakpoint( nLine );
|
||||
Breakpoint* pBrk = First();
|
||||
@@ -152,7 +152,7 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine )
|
||||
#endif
|
||||
if ( StarBASIC::IsRunning() )
|
||||
{
|
||||
for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
|
||||
for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
|
||||
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
|
||||
@@ -166,7 +166,7 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine )
|
||||
}
|
||||
|
||||
|
||||
Breakpoint* BreakpointWindow::FindBreakpoint( ULONG nLine )
|
||||
Breakpoint* BreakpointWindow::FindBreakpoint( sal_uIntPtr nLine )
|
||||
{
|
||||
Breakpoint* pBrk = First();
|
||||
while ( pBrk )
|
||||
@@ -181,20 +181,20 @@ Breakpoint* BreakpointWindow::FindBreakpoint( ULONG nLine )
|
||||
}
|
||||
|
||||
|
||||
void BreakpointWindow::AdjustBreakpoints( ULONG nLine, BOOL bInserted )
|
||||
void BreakpointWindow::AdjustBreakpoints( sal_uIntPtr nLine, sal_Bool bInserted )
|
||||
{
|
||||
if ( nLine == 0 ) //TODO: nLine == TEXT_PARA_ALL+1
|
||||
return;
|
||||
Breakpoint* pBrk = First();
|
||||
while ( pBrk )
|
||||
{
|
||||
BOOL bDelBrk = FALSE;
|
||||
sal_Bool bDelBrk = sal_False;
|
||||
if ( pBrk->nLine == nLine )
|
||||
{
|
||||
if ( bInserted )
|
||||
pBrk->nLine++;
|
||||
else
|
||||
bDelBrk = TRUE;
|
||||
bDelBrk = sal_True;
|
||||
}
|
||||
else if ( pBrk->nLine > nLine )
|
||||
{
|
||||
@@ -206,7 +206,7 @@ void BreakpointWindow::AdjustBreakpoints( ULONG nLine, BOOL bInserted )
|
||||
|
||||
if ( bDelBrk )
|
||||
{
|
||||
ULONG n = GetCurPos();
|
||||
sal_uIntPtr n = GetCurPos();
|
||||
delete Remove( pBrk );
|
||||
pBrk = Seek( n );
|
||||
}
|
||||
@@ -232,7 +232,7 @@ void BreakpointWindow::LoadBreakpoints( String aFilename )
|
||||
|
||||
for ( i = 0 ; i < aBreakpoints.GetTokenCount( ';' ) ; i++ )
|
||||
{
|
||||
InsertBreakpoint( (USHORT)aBreakpoints.GetToken( i, ';' ).ToInt32() );
|
||||
InsertBreakpoint( (sal_uInt16)aBreakpoints.GetToken( i, ';' ).ToInt32() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,12 +280,12 @@ void BreakpointWindow::Paint( const Rectangle& )
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
|
||||
#endif
|
||||
ULONG nLine = pBrk->nLine-1;
|
||||
ULONG nY = nLine*nLineHeight - nCurYOffset;
|
||||
sal_uIntPtr nLine = pBrk->nLine-1;
|
||||
sal_uIntPtr nY = nLine*nLineHeight - nCurYOffset;
|
||||
DrawImage( Point( 0, nY ) + aBmpOff, aBrk );
|
||||
pBrk = Next();
|
||||
}
|
||||
ShowMarker( TRUE );
|
||||
ShowMarker( sal_True );
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ Breakpoint* BreakpointWindow::FindBreakpoint( const Point& rMousePos )
|
||||
Breakpoint* pBrk = First();
|
||||
while ( pBrk )
|
||||
{
|
||||
ULONG nLine = pBrk->nLine-1;
|
||||
sal_uIntPtr nLine = pBrk->nLine-1;
|
||||
long nY = nLine*nLineHeight;
|
||||
if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) )
|
||||
return pBrk;
|
||||
@@ -307,7 +307,7 @@ Breakpoint* BreakpointWindow::FindBreakpoint( const Point& rMousePos )
|
||||
}
|
||||
|
||||
|
||||
void BreakpointWindow::ToggleBreakpoint( USHORT nLine )
|
||||
void BreakpointWindow::ToggleBreakpoint( sal_uInt16 nLine )
|
||||
{
|
||||
Breakpoint* pBrk = FindBreakpoint( nLine );
|
||||
if ( pBrk ) // remove
|
||||
@@ -323,7 +323,7 @@ void BreakpointWindow::ToggleBreakpoint( USHORT nLine )
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
void BreakpointWindow::ShowMarker( BOOL bShow )
|
||||
void BreakpointWindow::ShowMarker( sal_Bool bShow )
|
||||
{
|
||||
if ( nMarkerPos == MARKER_NOMARKER )
|
||||
return;
|
||||
@@ -343,7 +343,7 @@ void BreakpointWindow::ShowMarker( BOOL bShow )
|
||||
aMarkerOff.X() = ( aOutSz.Width() - aMarkerSz.Width() ) / 2;
|
||||
aMarkerOff.Y() = ( nLineHeight - aMarkerSz.Height() ) / 2;
|
||||
|
||||
ULONG nY = nMarkerPos*nLineHeight - nCurYOffset;
|
||||
sal_uIntPtr nY = nMarkerPos*nLineHeight - nCurYOffset;
|
||||
Point aPos( 0, nY );
|
||||
aPos += aMarkerOff;
|
||||
if ( bShow )
|
||||
@@ -361,23 +361,23 @@ void BreakpointWindow::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
long nLineHeight = GetTextHeight();
|
||||
long nYPos = aMousePos.Y() + nCurYOffset;
|
||||
long nLine = nYPos / nLineHeight + 1;
|
||||
ToggleBreakpoint( sal::static_int_cast< USHORT >(nLine) );
|
||||
ToggleBreakpoint( sal::static_int_cast< sal_uInt16 >(nLine) );
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BreakpointWindow::SetMarkerPos( USHORT nLine, BOOL bError )
|
||||
void BreakpointWindow::SetMarkerPos( sal_uInt16 nLine, sal_Bool bError )
|
||||
{
|
||||
ShowMarker( FALSE ); // Remove old one
|
||||
ShowMarker( sal_False ); // Remove old one
|
||||
nMarkerPos = nLine;
|
||||
bErrorMarker = bError;
|
||||
ShowMarker( TRUE ); // Draw new one
|
||||
ShowMarker( sal_True ); // Draw new one
|
||||
Update();
|
||||
}
|
||||
|
||||
|
||||
void BreakpointWindow::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags )
|
||||
void BreakpointWindow::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags )
|
||||
{
|
||||
(void) nFlags; /* avoid warning about unused parameter */
|
||||
nCurYOffset -= nVertScroll;
|
||||
|
||||
@@ -50,27 +50,27 @@ public:
|
||||
void SetModule( SbModule *pMod );
|
||||
void SetBPsInModule();
|
||||
|
||||
void InsertBreakpoint( USHORT nLine );
|
||||
void ToggleBreakpoint( USHORT nLine );
|
||||
void AdjustBreakpoints( ULONG nLine, BOOL bInserted );
|
||||
void InsertBreakpoint( sal_uInt16 nLine );
|
||||
void ToggleBreakpoint( sal_uInt16 nLine );
|
||||
void AdjustBreakpoints( sal_uIntPtr nLine, sal_Bool bInserted );
|
||||
|
||||
void LoadBreakpoints( String aFilename );
|
||||
void SaveBreakpoints( String aFilename );
|
||||
|
||||
protected:
|
||||
Breakpoint* FindBreakpoint( ULONG nLine );
|
||||
Breakpoint* FindBreakpoint( sal_uIntPtr nLine );
|
||||
|
||||
private:
|
||||
long nCurYOffset;
|
||||
USHORT nMarkerPos;
|
||||
sal_uInt16 nMarkerPos;
|
||||
SbModule* pModule;
|
||||
BOOL bErrorMarker;
|
||||
sal_Bool bErrorMarker;
|
||||
static ImageList *pImages;
|
||||
|
||||
protected:
|
||||
virtual void Paint( const Rectangle& );
|
||||
Breakpoint* FindBreakpoint( const Point& rMousePos );
|
||||
void ShowMarker( BOOL bShow );
|
||||
void ShowMarker( sal_Bool bShow );
|
||||
virtual void MouseButtonDown( const MouseEvent& rMEvt );
|
||||
|
||||
public:
|
||||
@@ -78,10 +78,10 @@ public:
|
||||
// void SetModulWindow( ModulWindow* pWin )
|
||||
// { pModulWindow = pWin; }
|
||||
|
||||
void SetMarkerPos( USHORT nLine, BOOL bErrorMarker = FALSE );
|
||||
void SetMarkerPos( sal_uInt16 nLine, sal_Bool bErrorMarker = sal_False );
|
||||
|
||||
virtual void Scroll( long nHorzScroll, long nVertScroll,
|
||||
USHORT nFlags = 0 );
|
||||
sal_uInt16 nFlags = 0 );
|
||||
long& GetCurYOffset() { return nCurYOffset; }
|
||||
};
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ class Font;
|
||||
#define DATA_FUNC_DEF( MemberName, MemberType ) \
|
||||
public: \
|
||||
MemberType MemberName; \
|
||||
BOOL Find( const String& rStr ); \
|
||||
BOOL Load( const String& rStr ); \
|
||||
BOOL Save( const String& rStr ); \
|
||||
sal_Bool Find( const String& rStr ); \
|
||||
sal_Bool Load( const String& rStr ); \
|
||||
sal_Bool Save( const String& rStr ); \
|
||||
\
|
||||
void GrabFocus(){ MemberName.GrabFocus(); } \
|
||||
void Show(){ MemberName.Show(); } \
|
||||
@@ -62,13 +62,13 @@ public:
|
||||
void Redo(); \
|
||||
String GetText() const; \
|
||||
void SetText( const String& rStr ); \
|
||||
BOOL HasText() const; \
|
||||
sal_Bool HasText() const; \
|
||||
String GetSelected(); \
|
||||
TextSelection GetSelection() const; \
|
||||
void SetSelection( const TextSelection& rSelection ); \
|
||||
USHORT GetLineNr() const; \
|
||||
sal_uInt16 GetLineNr() const; \
|
||||
void ReplaceSelected( const String& rStr ); \
|
||||
BOOL IsModified(); \
|
||||
sal_Bool IsModified(); \
|
||||
void SetModifyHdl( Link l );
|
||||
|
||||
|
||||
@@ -85,19 +85,19 @@ public:
|
||||
virtual void Undo()=0;
|
||||
virtual void Redo()=0;
|
||||
|
||||
virtual BOOL Find( const String& )=0; // Find and select text
|
||||
virtual BOOL Load( const String& )=0; // Load text from file
|
||||
virtual BOOL Save( const String& )=0; // Save text to file
|
||||
virtual sal_Bool Find( const String& )=0; // Find and select text
|
||||
virtual sal_Bool Load( const String& )=0; // Load text from file
|
||||
virtual sal_Bool Save( const String& )=0; // Save text to file
|
||||
virtual String GetSelected()=0;
|
||||
virtual void GrabFocus()=0;
|
||||
virtual TextSelection GetSelection() const=0;
|
||||
virtual void SetSelection( const TextSelection& rSelection )=0;
|
||||
virtual USHORT GetLineNr() const=0;
|
||||
virtual sal_uInt16 GetLineNr() const=0;
|
||||
virtual String GetText() const=0;
|
||||
virtual void SetText( const String& rStr )=0;
|
||||
virtual BOOL HasText() const=0; // to avoid GetText.Len()
|
||||
virtual sal_Bool HasText() const=0; // to avoid GetText.Len()
|
||||
virtual void ReplaceSelected( const String& rStr )=0;
|
||||
virtual BOOL IsModified()=0;
|
||||
virtual sal_Bool IsModified()=0;
|
||||
virtual void SetModifyHdl( Link )=0;
|
||||
virtual void Show()=0;
|
||||
virtual void SetPosPixel( const Point& rNewPos )=0;
|
||||
|
||||
@@ -108,9 +108,9 @@ IMPL_LINK_INLINE_START( FindDialog, ButtonClick, Button *, pB )
|
||||
{
|
||||
if( pB == &aOk ) {
|
||||
*pFind = aFind.GetText();
|
||||
EndDialog( TRUE );
|
||||
} else EndDialog( FALSE );
|
||||
return TRUE;
|
||||
EndDialog( sal_True );
|
||||
} else EndDialog( sal_False );
|
||||
return sal_True;
|
||||
}
|
||||
IMPL_LINK_INLINE_END( FindDialog, ButtonClick, Button *, pB )
|
||||
|
||||
@@ -138,9 +138,9 @@ IMPL_LINK( ReplaceDialog, ButtonClick, Button *, pB )
|
||||
if( pB == &aOk ) {
|
||||
*pFind = aFind.GetText();
|
||||
*pReplace = aReplace.GetText();
|
||||
EndDialog( TRUE );
|
||||
} else EndDialog( FALSE );
|
||||
return TRUE;
|
||||
EndDialog( sal_True );
|
||||
} else EndDialog( sal_False );
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@@ -163,7 +163,7 @@ void ConfEdit::Init( Config &aConf )
|
||||
aEdit.SetText( aTemp );
|
||||
}
|
||||
|
||||
ConfEdit::ConfEdit( Window* pParent, USHORT nResText, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf )
|
||||
ConfEdit::ConfEdit( Window* pParent, sal_uInt16 nResText, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf )
|
||||
: PushButton( pParent, SttResId(nResButton) )
|
||||
, aText( pParent, SttResId(nResText) )
|
||||
, aEdit( pParent, SttResId(nResEdit) )
|
||||
@@ -172,7 +172,7 @@ ConfEdit::ConfEdit( Window* pParent, USHORT nResText, USHORT nResEdit, USHORT nR
|
||||
Init( aConf );
|
||||
}
|
||||
|
||||
ConfEdit::ConfEdit( Window* pParent, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf )
|
||||
ConfEdit::ConfEdit( Window* pParent, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf )
|
||||
: PushButton( pParent, SttResId(nResButton) )
|
||||
, aText( pParent )
|
||||
, aEdit( pParent, SttResId(nResEdit) )
|
||||
@@ -210,7 +210,7 @@ void ConfEdit::Click()
|
||||
}
|
||||
}
|
||||
|
||||
OptConfEdit::OptConfEdit( Window* pParent, USHORT nResCheck, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf )
|
||||
OptConfEdit::OptConfEdit( Window* pParent, sal_uInt16 nResCheck, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf )
|
||||
: ConfEdit( pParent, nResEdit, nResButton, aKN, aConf )
|
||||
, aCheck( pParent, SttResId( nResCheck ) )
|
||||
, rBase( rBaseEdit )
|
||||
@@ -260,7 +260,7 @@ OptionsDialog::OptionsDialog( Window* pParent, const ResId& aResId )
|
||||
, aCancel( this )
|
||||
, aConfig( Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ) )
|
||||
{
|
||||
aConfig.EnablePersistence( FALSE );
|
||||
aConfig.EnablePersistence( sal_False );
|
||||
FreeResource();
|
||||
aTabCtrl.SetActivatePageHdl( LINK( this, OptionsDialog, ActivatePageHdl ) );
|
||||
aTabCtrl.SetCurPageId( RID_TP_PRO );
|
||||
@@ -274,25 +274,25 @@ OptionsDialog::OptionsDialog( Window* pParent, const ResId& aResId )
|
||||
|
||||
OptionsDialog::~OptionsDialog()
|
||||
{
|
||||
for ( USHORT i = 0; i < aTabCtrl.GetPageCount(); i++ )
|
||||
for ( sal_uInt16 i = 0; i < aTabCtrl.GetPageCount(); i++ )
|
||||
delete aTabCtrl.GetTabPage( aTabCtrl.GetPageId( i ) );
|
||||
};
|
||||
|
||||
BOOL OptionsDialog::Close()
|
||||
sal_Bool OptionsDialog::Close()
|
||||
{
|
||||
if ( TabDialog::Close() )
|
||||
{
|
||||
delete this;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
|
||||
IMPL_LINK( OptionsDialog, ActivatePageHdl, TabControl *, pTabCtrl )
|
||||
{
|
||||
USHORT nId = pTabCtrl->GetCurPageId();
|
||||
sal_uInt16 nId = pTabCtrl->GetCurPageId();
|
||||
// If TabPage was not yet created, do it
|
||||
if ( !pTabCtrl->GetTabPage( nId ) )
|
||||
{
|
||||
@@ -362,7 +362,7 @@ IMPL_LINK( OptionsDialog, OKClick, Button *, pButton )
|
||||
}
|
||||
|
||||
const ByteString ProfilePrefix("_profile_");
|
||||
const USHORT ProfilePrefixLen = ProfilePrefix.Len();
|
||||
const sal_uInt16 ProfilePrefixLen = ProfilePrefix.Len();
|
||||
|
||||
ProfileOptions::ProfileOptions( Window* pParent, Config &rConfig )
|
||||
: TabPage( pParent, SttResId( RID_TP_PROFILE ) )
|
||||
@@ -384,7 +384,7 @@ ProfileOptions::ProfileOptions( Window* pParent, Config &rConfig )
|
||||
{
|
||||
FreeResource();
|
||||
|
||||
aCbProfile.EnableAutocomplete( TRUE );
|
||||
aCbProfile.EnableAutocomplete( sal_True );
|
||||
|
||||
aCbProfile.SetSelectHdl( LINK( this, ProfileOptions, Select ) );
|
||||
|
||||
@@ -399,7 +399,7 @@ ProfileOptions::ProfileOptions( Window* pParent, Config &rConfig )
|
||||
void ProfileOptions::LoadData()
|
||||
{
|
||||
// collect all profiles (all groups starting with the ProfilePrefix)
|
||||
for ( USHORT i = 0 ; i < rConf.GetGroupCount() ; i++ )
|
||||
for ( sal_uInt16 i = 0 ; i < rConf.GetGroupCount() ; i++ )
|
||||
{
|
||||
ByteString aProfile = rConf.GetGroupName( i );
|
||||
if ( aProfile.Match( ProfilePrefix ) )
|
||||
@@ -520,7 +520,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
|
||||
{
|
||||
FreeResource();
|
||||
|
||||
aNFCRPort.SetUseThousandSep( FALSE );
|
||||
aNFCRPort.SetUseThousandSep( sal_False );
|
||||
|
||||
ByteString aTemp;
|
||||
|
||||
@@ -530,7 +530,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
|
||||
if ( aTemp.EqualsIgnoreCaseAscii( "true" ) || aTemp.Equals( "1" ) )
|
||||
aCBUseProxy.Check();
|
||||
else
|
||||
aCBUseProxy.Check( FALSE );
|
||||
aCBUseProxy.Check( sal_False );
|
||||
|
||||
aCBUseProxy.SetToggleHdl( LINK( this, CrashreportOptions, CheckProxy ) );
|
||||
LINK( this, CrashreportOptions, CheckProxy ).Call( NULL ); // call once to initialize
|
||||
@@ -545,7 +545,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
|
||||
if ( aTemp.EqualsIgnoreCaseAscii( "true" ) || aTemp.Equals( "1" ) )
|
||||
aCBAllowContact.Check();
|
||||
else
|
||||
aCBAllowContact.Check( FALSE );
|
||||
aCBAllowContact.Check( sal_False );
|
||||
|
||||
aCBAllowContact.SetToggleHdl( LINK( this, CrashreportOptions, CheckResponse ) );
|
||||
LINK( this, CrashreportOptions, CheckResponse ).Call( NULL ); // call once to initialize
|
||||
@@ -611,9 +611,9 @@ MiscOptions::MiscOptions( Window* pParent, Config &aConfig )
|
||||
{
|
||||
FreeResource();
|
||||
|
||||
aNFTTPort.SetUseThousandSep( FALSE );
|
||||
aNFUNOPort.SetUseThousandSep( FALSE );
|
||||
aTFMaxLRU.SetUseThousandSep( FALSE );
|
||||
aNFTTPort.SetUseThousandSep( sal_False );
|
||||
aNFUNOPort.SetUseThousandSep( sal_False );
|
||||
aTFMaxLRU.SetUseThousandSep( sal_False );
|
||||
|
||||
ByteString aTemp;
|
||||
|
||||
@@ -661,8 +661,8 @@ void MiscOptions::Save( Config &aConfig )
|
||||
|
||||
aConfig.SetGroup("LRU");
|
||||
ByteString aTemp = aConfig.ReadKey( "MaxLRU", "4" );
|
||||
USHORT nOldMaxLRU = (USHORT)aTemp.ToInt32();
|
||||
USHORT n;
|
||||
sal_uInt16 nOldMaxLRU = (sal_uInt16)aTemp.ToInt32();
|
||||
sal_uInt16 n;
|
||||
for ( n = nOldMaxLRU ; n > aTFMaxLRU.GetValue() ; n-- )
|
||||
aConfig.DeleteKey( ByteString("LRU").Append( ByteString::CreateFromInt32( n ) ) );
|
||||
aConfig.WriteKey( "MaxLRU", ByteString::CreateFromInt64( aTFMaxLRU.GetValue() ) );
|
||||
@@ -735,8 +735,8 @@ IMPL_LINK( FontOptions, FontSizeChanged, void*, EMPTYARG )
|
||||
void FontOptions::UpdatePreview()
|
||||
{
|
||||
Font aFont = aFontList.Get( aFontName.GetText(), aFontStyle.GetText() );
|
||||
// ULONG nFontSize = aFontSize.GetValue( FUNIT_POINT );
|
||||
ULONG nFontSize = static_cast<ULONG>((aFontSize.GetValue() + 5) / 10);
|
||||
// sal_uIntPtr nFontSize = aFontSize.GetValue( FUNIT_POINT );
|
||||
sal_uIntPtr nFontSize = static_cast<sal_uIntPtr>((aFontSize.GetValue() + 5) / 10);
|
||||
aFont.SetHeight( nFontSize );
|
||||
aFTPreview.SetFont( aFont );
|
||||
aFTPreview.SetText( aFontName.GetText() );
|
||||
@@ -770,13 +770,13 @@ GenericOptions::GenericOptions( Window* pParent, Config &aConfig )
|
||||
, aPbDelValue( this, SttResId( RID_PB_DEL_VALUE ) )
|
||||
|
||||
, nMoveButtons( 0 )
|
||||
, bShowSelectPath( FALSE )
|
||||
, bShowSelectPath( sal_False )
|
||||
{
|
||||
FreeResource();
|
||||
LoadData();
|
||||
|
||||
aCbArea.EnableAutocomplete( TRUE );
|
||||
aCbValue.EnableAutocomplete( TRUE );
|
||||
aCbArea.EnableAutocomplete( sal_True );
|
||||
aCbValue.EnableAutocomplete( sal_True );
|
||||
|
||||
aCbArea.SetSelectHdl( LINK( this, GenericOptions, LoadGroup ) );
|
||||
|
||||
@@ -802,7 +802,7 @@ GenericOptions::~GenericOptions()
|
||||
StringList* GenericOptions::GetAllGroups()
|
||||
{
|
||||
StringList* pGroups = new StringList();
|
||||
for ( USHORT i = 0 ; i < aConf.GetGroupCount() ; i++ )
|
||||
for ( sal_uInt16 i = 0 ; i < aConf.GetGroupCount() ; i++ )
|
||||
{
|
||||
String *pGroup = new String( aConf.GetGroupName( i ), RTL_TEXTENCODING_UTF8 );
|
||||
pGroups->Insert( pGroup );
|
||||
@@ -841,16 +841,16 @@ void GenericOptions::ShowSelectPath( const String aType )
|
||||
{ // Show Path button
|
||||
nMoveButtons += nDelta;
|
||||
aMoveTimer.Start();
|
||||
bShowSelectPath = TRUE;
|
||||
aPbSelectPath.Show( TRUE );
|
||||
aPbSelectPath.Enable( TRUE );
|
||||
bShowSelectPath = sal_True;
|
||||
aPbSelectPath.Show( sal_True );
|
||||
aPbSelectPath.Enable( sal_True );
|
||||
}
|
||||
else if ( !aType.EqualsIgnoreCaseAscii( "PATH" ) && bShowSelectPath )
|
||||
{ // Hide Path button
|
||||
nMoveButtons -= nDelta;
|
||||
aMoveTimer.Start();
|
||||
bShowSelectPath = FALSE;
|
||||
aPbSelectPath.Enable( FALSE );
|
||||
bShowSelectPath = sal_False;
|
||||
aPbSelectPath.Enable( sal_False );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -903,7 +903,7 @@ IMPL_LINK( GenericOptions, LoadGroup, ComboBox*, EMPTYARG )
|
||||
|
||||
aConf.SetGroup( aLastGroupName );
|
||||
aConf.WriteKey( C_KEY_AKTUELL, ByteString( aCurrentValue, RTL_TEXTENCODING_UTF8 ) );
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for ( i=0 ; i < aCbValue.GetEntryCount() ; i++ )
|
||||
{
|
||||
if ( i > 0 )
|
||||
@@ -1021,16 +1021,16 @@ class TextAndWin : public DockingWindow
|
||||
Window* pFtOriginalParent;
|
||||
Window* pWinOriginalParent;
|
||||
long nSpace; // default space
|
||||
BOOL bAlignTop;
|
||||
sal_Bool bAlignTop;
|
||||
|
||||
public:
|
||||
TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, BOOL bAlignTopP );
|
||||
TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, sal_Bool bAlignTopP );
|
||||
~TextAndWin();
|
||||
|
||||
virtual void Resize();
|
||||
};
|
||||
|
||||
TextAndWin::TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, BOOL bAlignTopP )
|
||||
TextAndWin::TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, sal_Bool bAlignTopP )
|
||||
: DockingWindow( pParent )
|
||||
, pFt( pFtP )
|
||||
, pWin( pWinP )
|
||||
@@ -1112,8 +1112,8 @@ DisplayHidDlg::DisplayHidDlg( Window * pParent )
|
||||
#endif
|
||||
|
||||
pSplit = new SplitWindow( this );
|
||||
pControls = new TextAndWin( pSplit, &aFtControls, &aMlbControls, aMlbControls.GetPosPixel().X(), TRUE );
|
||||
pSlots = new TextAndWin( pSplit, &aFtSlots, &aMlbSlots, aMlbControls.GetPosPixel().X(), FALSE );
|
||||
pControls = new TextAndWin( pSplit, &aFtControls, &aMlbControls, aMlbControls.GetPosPixel().X(), sal_True );
|
||||
pSlots = new TextAndWin( pSplit, &aFtSlots, &aMlbSlots, aMlbControls.GetPosPixel().X(), sal_False );
|
||||
|
||||
pSplit->SetPosPixel( aFtControls.GetPosPixel() );
|
||||
pSplit->InsertItem( 1, pControls, 70, SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE );
|
||||
@@ -1139,7 +1139,7 @@ DisplayHidDlg::~DisplayHidDlg()
|
||||
IMPL_LINK( DisplayHidDlg, CopyToClipboard, void*, EMPTYARG )
|
||||
{
|
||||
String aSammel;
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
|
||||
for ( i=0 ; i < aMlbControls.GetSelectEntryCount() ; i++ )
|
||||
{
|
||||
@@ -1161,7 +1161,7 @@ IMPL_LINK( DisplayHidDlg, SelectAll, PushButton*, pButton )
|
||||
{
|
||||
if ( pButton->GetState() != STATE_CHECK )
|
||||
{
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for ( i=0 ; i < aMlbControls.GetEntryCount() ; i++ )
|
||||
aMlbControls.SelectEntryPos( i );
|
||||
for ( i=0 ; i < aMlbSlots.GetEntryCount() ; i++ )
|
||||
@@ -1266,7 +1266,7 @@ void DisplayHidDlg::Resize()
|
||||
}
|
||||
else
|
||||
{
|
||||
// SetUpdateMode( FALSE );
|
||||
// SetUpdateMode( sal_False );
|
||||
|
||||
// Minimum size
|
||||
Size aSize( GetOutputSizePixel() );
|
||||
@@ -1322,7 +1322,7 @@ void DisplayHidDlg::Resize()
|
||||
aPos.Move( pSplit->GetSizePixel().Width(), pSplit->GetSizePixel().Height() );
|
||||
aOKClose.SetPosPixel( aPos );
|
||||
|
||||
// SetUpdateMode( TRUE );
|
||||
// SetUpdateMode( sal_True );
|
||||
// Invalidate();
|
||||
}
|
||||
FloatingWindow::Resize();
|
||||
@@ -1402,7 +1402,7 @@ VarEditDialog::VarEditDialog( Window * pParent, SbxVariable *pPVar )
|
||||
IMPL_LINK( VarEditDialog, OKClick, Button *, pButton )
|
||||
{
|
||||
(void) pButton; /* avoid warning about unused parameter */
|
||||
BOOL bWasError = SbxBase::IsError(); // Probably an error is thrown
|
||||
sal_Bool bWasError = SbxBase::IsError(); // Probably an error is thrown
|
||||
|
||||
|
||||
SbxDataType eType = pVar->GetType();
|
||||
@@ -1445,7 +1445,7 @@ SvNumberformat::
|
||||
|
||||
|
||||
String aContent( aEditRID_ED_NEW_STRING.GetText() );
|
||||
BOOL bError = FALSE;
|
||||
sal_Bool bError = sal_False;
|
||||
switch ( eType )
|
||||
{
|
||||
case SbxBOOL:
|
||||
@@ -1458,10 +1458,10 @@ SvNumberformat::
|
||||
// pVar->PutDate( aContent );
|
||||
// break;
|
||||
case SbxINTEGER:
|
||||
pVar->PutInteger( (INT16)aNumericFieldRID_NF_NEW_INTEGER.GetValue() );
|
||||
pVar->PutInteger( (sal_Int16)aNumericFieldRID_NF_NEW_INTEGER.GetValue() );
|
||||
break;
|
||||
case SbxLONG:
|
||||
pVar->PutLong( static_cast<INT32>(aNumericFieldRID_NF_NEW_LONG.GetValue()) );
|
||||
pVar->PutLong( static_cast<sal_Int32>(aNumericFieldRID_NF_NEW_LONG.GetValue()) );
|
||||
break;
|
||||
case SbxDOUBLE:
|
||||
case SbxSINGLE:
|
||||
@@ -1482,7 +1482,7 @@ SvNumberformat::
|
||||
// pVar->PutStringExt( aEditRID_ED_NEW_STRING.GetText() );
|
||||
if ( !bWasError && SbxBase::IsError() )
|
||||
{
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
SbxBase::ResetError();
|
||||
}
|
||||
|
||||
|
||||
@@ -104,8 +104,8 @@ protected:
|
||||
void Init( Config &aConf );
|
||||
|
||||
public:
|
||||
ConfEdit( Window* pParent, USHORT nResText, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf );
|
||||
ConfEdit( Window* pParent, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf );
|
||||
ConfEdit( Window* pParent, sal_uInt16 nResText, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf );
|
||||
ConfEdit( Window* pParent, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf );
|
||||
void Save( Config &aConf );
|
||||
void Reload( Config &aConf );
|
||||
void Click();
|
||||
@@ -121,7 +121,7 @@ protected:
|
||||
ConfEdit& rBase;
|
||||
DECL_LINK( ToggleHdl, CheckBox* );
|
||||
public:
|
||||
OptConfEdit( Window* pParent, USHORT nResCheck, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf );
|
||||
OptConfEdit( Window* pParent, sal_uInt16 nResCheck, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf );
|
||||
void Reload( Config &aConf );
|
||||
DECL_LINK( BaseModifyHdl, Edit* );
|
||||
};
|
||||
@@ -141,7 +141,7 @@ private:
|
||||
public:
|
||||
OptionsDialog( Window* pParent, const ResId& );
|
||||
~OptionsDialog();
|
||||
virtual BOOL Close();
|
||||
virtual sal_Bool Close();
|
||||
|
||||
|
||||
DECL_LINK( ActivatePageHdl, TabControl * );
|
||||
@@ -273,7 +273,7 @@ class GenericOptions : public TabPage
|
||||
PushButton aPbDelValue;
|
||||
|
||||
int nMoveButtons;
|
||||
BOOL bShowSelectPath;
|
||||
sal_Bool bShowSelectPath;
|
||||
AutoTimer aMoveTimer;
|
||||
DECL_LINK( MoveButtons, AutoTimer* );
|
||||
|
||||
@@ -321,7 +321,7 @@ protected:
|
||||
DockingWindow* pSlots;
|
||||
SplitWindow *pSplit;
|
||||
|
||||
ULONG nDisplayMode;
|
||||
sal_uIntPtr nDisplayMode;
|
||||
|
||||
DECL_LINK( Select, void* );
|
||||
DECL_LINK( SelectAll, PushButton* );
|
||||
@@ -360,7 +360,7 @@ protected:
|
||||
|
||||
DECL_LINK( OKClick, Button * );
|
||||
|
||||
// BOOL bCompare = FALSE;
|
||||
// sal_Bool bCompare = sal_False;
|
||||
// String aCompareString;
|
||||
|
||||
public:
|
||||
|
||||
@@ -57,10 +57,10 @@ Version 3 Changed Charset from CHARSET_IBMPC to RTL_TEXTENCODING_UTF8
|
||||
#include "basmsg.hrc"
|
||||
#include "basrid.hxx"
|
||||
|
||||
USHORT MsgEdit::nMaxLogLen = 0;
|
||||
BOOL MsgEdit::bLimitLogLen = FALSE;
|
||||
BOOL MsgEdit::bPrintLogToStdout = FALSE;
|
||||
BOOL MsgEdit::bPrintLogToStdoutSet = FALSE;
|
||||
sal_uInt16 MsgEdit::nMaxLogLen = 0;
|
||||
sal_Bool MsgEdit::bLimitLogLen = sal_False;
|
||||
sal_Bool MsgEdit::bPrintLogToStdout = sal_False;
|
||||
sal_Bool MsgEdit::bPrintLogToStdoutSet = sal_False;
|
||||
|
||||
#define WARNING_PREFIX String( SttResId( S_WARNING_PREFIX ) )
|
||||
#define VERSION_STRING CUniString("File Format Version: ")
|
||||
@@ -74,8 +74,8 @@ MsgEdit::MsgEdit( AppError* pParent, BasicFrame *pBF, const WinBits& aBits )
|
||||
, pCurrentTestCase(NULL)
|
||||
, pCurrentAssertion( NULL )
|
||||
, pCurrentError(NULL)
|
||||
, bModified(FALSE)
|
||||
, bFileLoading(FALSE)
|
||||
, bModified(sal_False)
|
||||
, bFileLoading(sal_False)
|
||||
, nVersion(0)
|
||||
, pAppError( pParent )
|
||||
, aEditTree( pParent, pBF, aBits | WB_HASBUTTONS | WB_HASLINES | WB_HASBUTTONSATROOT )
|
||||
@@ -88,15 +88,15 @@ MsgEdit::MsgEdit( AppError* pParent, BasicFrame *pBF, const WinBits& aBits )
|
||||
|
||||
if ( !bPrintLogToStdoutSet )
|
||||
{
|
||||
bPrintLogToStdoutSet = TRUE;
|
||||
for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
|
||||
bPrintLogToStdoutSet = sal_True;
|
||||
for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
|
||||
{
|
||||
if ( Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("-printlog") == COMPARE_EQUAL
|
||||
#ifndef UNX
|
||||
|| Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("/printlog") == COMPARE_EQUAL
|
||||
#endif
|
||||
)
|
||||
bPrintLogToStdout = TRUE;
|
||||
bPrintLogToStdout = sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,11 +177,11 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg )
|
||||
|
||||
if ( !bFileLoading )
|
||||
{ // Comes from Testtool and must be written immediately
|
||||
BOOL bFileWasChanged = pAppError->DiskFileChanged( SINCE_LAST_LOAD );
|
||||
sal_Bool bFileWasChanged = pAppError->DiskFileChanged( SINCE_LAST_LOAD );
|
||||
|
||||
DBG_ASSERT( aLogFileName == LogMsg->aLogFileName, "Logging to different logfile as before" );
|
||||
DirEntry aEntry( LogMsg->aLogFileName );
|
||||
BOOL bNewFile = !aEntry.Exists();
|
||||
sal_Bool bNewFile = !aEntry.Exists();
|
||||
SvFileStream aStrm( LogMsg->aLogFileName, STREAM_STD_WRITE );
|
||||
if ( bNewFile )
|
||||
{
|
||||
@@ -229,7 +229,7 @@ void MsgEdit::AddRun( String aMsg, TTDebugData aDebugData )
|
||||
{
|
||||
if ( !bFileLoading && bLimitLogLen )
|
||||
{
|
||||
USHORT nSkip = nMaxLogLen;
|
||||
sal_uInt16 nSkip = nMaxLogLen;
|
||||
SvLBoxEntry *pRun = aEditTree.First();
|
||||
while ( nSkip-- && pRun )
|
||||
pRun = aEditTree.NextSibling( pRun );
|
||||
@@ -240,7 +240,7 @@ void MsgEdit::AddRun( String aMsg, TTDebugData aDebugData )
|
||||
aEditTree.GetModel()->Remove( aEditTree.NextSibling( pRun ) );
|
||||
|
||||
aEditTree.GetModel()->Remove( pRun );
|
||||
bModified = TRUE;
|
||||
bModified = sal_True;
|
||||
lModify.Call( NULL );
|
||||
Save( aLogFileName );
|
||||
pAppError->UpdateFileInfo( HAS_BEEN_LOADED );
|
||||
@@ -249,9 +249,9 @@ void MsgEdit::AddRun( String aMsg, TTDebugData aDebugData )
|
||||
|
||||
COPY_TTDEBUGDATA( LOG_RUN );
|
||||
if ( !bFileLoading || ( bFileLoading && nVersion >= 2 ) )
|
||||
pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, FALSE, 0, pTTDebugData );
|
||||
pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, sal_False, 0, pTTDebugData );
|
||||
else // First file format
|
||||
pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, FALSE, LIST_APPEND, pTTDebugData ); // and therefor at the end
|
||||
pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, sal_False, LIST_APPEND, pTTDebugData ); // and therefor at the end
|
||||
|
||||
aEditTree.ShowEntry( pCurrentRun );
|
||||
pCurrentTestCase = NULL;
|
||||
@@ -270,7 +270,7 @@ void MsgEdit::AddTestCase( String aMsg, TTDebugData aDebugData )
|
||||
else
|
||||
{
|
||||
COPY_TTDEBUGDATA( LOG_TEST_CASE );
|
||||
pCurrentTestCase = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pCurrentTestCase = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pCurrentTestCase );
|
||||
}
|
||||
}
|
||||
@@ -292,7 +292,7 @@ void MsgEdit::AddError( String aMsg, TTDebugData aDebugData )
|
||||
if ( pCurrentTestCase )
|
||||
{
|
||||
COPY_TTDEBUGDATA( LOG_ERROR );
|
||||
pCurrentError = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pCurrentError = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pCurrentError );
|
||||
}
|
||||
}
|
||||
@@ -303,7 +303,7 @@ void MsgEdit::AddCallStack( String aMsg, TTDebugData aDebugData )
|
||||
if ( pCurrentError )
|
||||
{
|
||||
COPY_TTDEBUGDATA( LOG_CALL_STACK );
|
||||
aEditTree.InsertEntry( aMsg, pCurrentError, FALSE, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.InsertEntry( aMsg, pCurrentError, sal_False, LIST_APPEND, pTTDebugData );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,16 +312,16 @@ void MsgEdit::AddMessage( String aMsg, TTDebugData aDebugData )
|
||||
SvLBoxEntry *pThisEntry = NULL;
|
||||
COPY_TTDEBUGDATA( LOG_MESSAGE );
|
||||
if ( pCurrentTestCase )
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData );
|
||||
else if ( pCurrentRun )
|
||||
{
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddRun( aMsg, aDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
}
|
||||
@@ -334,16 +334,16 @@ void MsgEdit::AddWarning( String aMsg, TTDebugData aDebugData )
|
||||
COPY_TTDEBUGDATA( LOG_WARNING );
|
||||
|
||||
if ( pCurrentTestCase )
|
||||
pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData );
|
||||
else if ( pCurrentRun )
|
||||
{
|
||||
pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddRun( aMsg, aDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
|
||||
@@ -362,16 +362,16 @@ void MsgEdit::AddAssertion( String aMsg, TTDebugData aDebugData )
|
||||
SvLBoxEntry *pThisEntry = NULL;
|
||||
COPY_TTDEBUGDATA( LOG_ASSERTION );
|
||||
if ( pCurrentTestCase )
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData );
|
||||
else if ( pCurrentRun )
|
||||
{
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddRun( aMsg, aDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
|
||||
@@ -386,18 +386,18 @@ void MsgEdit::AddAssertionStack( String aMsg, TTDebugData aDebugData )
|
||||
SvLBoxEntry *pThisEntry = NULL;
|
||||
COPY_TTDEBUGDATA( LOG_ASSERTION_STACK );
|
||||
if ( pCurrentAssertion )
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentAssertion, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentAssertion, sal_False, LIST_APPEND, pTTDebugData );
|
||||
else if ( pCurrentTestCase )
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData );
|
||||
else if ( pCurrentRun )
|
||||
{
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddRun( aMsg, aDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
|
||||
@@ -410,16 +410,16 @@ void MsgEdit::AddQAError( String aMsg, TTDebugData aDebugData )
|
||||
SvLBoxEntry *pThisEntry = NULL;
|
||||
COPY_TTDEBUGDATA( LOG_QA_ERROR );
|
||||
if ( pCurrentTestCase )
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData );
|
||||
else if ( pCurrentRun )
|
||||
{
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddRun( aMsg, aDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData );
|
||||
pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData );
|
||||
aEditTree.ShowEntry( pThisEntry );
|
||||
}
|
||||
|
||||
@@ -428,8 +428,8 @@ void MsgEdit::AddQAError( String aMsg, TTDebugData aDebugData )
|
||||
}
|
||||
|
||||
/*
|
||||
SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return SvLBox::GetEntry(pParent,nPos); }
|
||||
SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return SvLBox::GetEntry(nRootPos);}
|
||||
SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uIntPtr nPos ) const { return SvLBox::GetEntry(pParent,nPos); }
|
||||
SvLBoxEntry* GetEntry( sal_uIntPtr nRootPos ) const { return SvLBox::GetEntry(nRootPos);}
|
||||
|
||||
|
||||
|
||||
@@ -442,16 +442,16 @@ void MsgEdit::AddQAError( String aMsg, TTDebugData aDebugData )
|
||||
SvLBoxEntry* PrevSelected( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(SvListView::PrevSelected(pEntry)); }
|
||||
SvLBoxEntry* LastSelected() const { return (SvLBoxEntry*)(SvListView::LastSelected()); }
|
||||
|
||||
SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
|
||||
SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
|
||||
SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uIntPtr nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
|
||||
SvLBoxEntry* GetEntry( sal_uIntPtr nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
|
||||
|
||||
SvLBoxEntry* GetParent( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetParent(pEntry)); }
|
||||
SvLBoxEntry* GetRootLevelParent(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetRootLevelParent( pEntry ));}
|
||||
|
||||
BOOL IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const;
|
||||
SvListEntry* GetEntry( SvListEntry* pParent, ULONG nPos ) const;
|
||||
SvListEntry* GetEntry( ULONG nRootPos ) const;
|
||||
SvListEntry* GetEntryAtAbsPos( ULONG nAbsPos ) const;
|
||||
sal_Bool IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const;
|
||||
SvListEntry* GetEntry( SvListEntry* pParent, sal_uIntPtr nPos ) const;
|
||||
SvListEntry* GetEntry( sal_uIntPtr nRootPos ) const;
|
||||
SvListEntry* GetEntryAtAbsPos( sal_uIntPtr nAbsPos ) const;
|
||||
SvListEntry* GetParent( SvListEntry* pEntry ) const;
|
||||
SvListEntry* GetRootLevelParent( SvListEntry* pEntry ) const;
|
||||
*/
|
||||
@@ -465,11 +465,11 @@ void MsgEdit::Delete()
|
||||
CHECK( pCurrentTestCase );
|
||||
CHECK( pCurrentAssertion );
|
||||
CHECK( pCurrentError );
|
||||
bModified = TRUE;
|
||||
bModified = sal_True;
|
||||
lModify.Call( NULL );
|
||||
}
|
||||
|
||||
void MsgEdit::Cut(){ Copy(); Delete(); bModified = TRUE; lModify.Call( NULL ); }
|
||||
void MsgEdit::Cut(){ Copy(); Delete(); bModified = sal_True; lModify.Call( NULL ); }
|
||||
void MsgEdit::Copy(){ ::svt::OStringTransfer::CopyString( GetSelected(), &aEditTree ); }
|
||||
/**/void MsgEdit::Paste(){ Sound::Beep(); }
|
||||
void MsgEdit::Undo(){ Sound::Beep(); }
|
||||
@@ -548,7 +548,7 @@ String MsgEdit::GetSelected()
|
||||
|
||||
TextSelection MsgEdit::GetSelection() const
|
||||
{
|
||||
ULONG nStart=0,nEnd=0;
|
||||
sal_uIntPtr nStart=0,nEnd=0;
|
||||
|
||||
if ( aEditTree.FirstSelected() )
|
||||
{
|
||||
@@ -563,25 +563,25 @@ TextSelection MsgEdit::GetSelection() const
|
||||
|
||||
void MsgEdit::SetSelection( const TextSelection& rSelection )
|
||||
{
|
||||
ULONG nStart,nEnd;
|
||||
sal_uIntPtr nStart,nEnd;
|
||||
|
||||
while ( aEditTree.GetSelectionCount() )
|
||||
aEditTree.Select( aEditTree.FirstSelected(), FALSE );
|
||||
aEditTree.Select( aEditTree.FirstSelected(), sal_False );
|
||||
|
||||
if ( rSelection.HasRange() )
|
||||
{
|
||||
nStart = rSelection.GetStart().GetPara();
|
||||
nEnd = rSelection.GetEnd().GetPara();
|
||||
|
||||
for ( ULONG i = nStart ; i <= nEnd ; i++ )
|
||||
aEditTree.Select( aEditTree.GetModel()->GetEntryAtAbsPos( i ), TRUE );
|
||||
for ( sal_uIntPtr i = nStart ; i <= nEnd ; i++ )
|
||||
aEditTree.Select( aEditTree.GetModel()->GetEntryAtAbsPos( i ), sal_True );
|
||||
}
|
||||
}
|
||||
|
||||
USHORT MsgEdit::GetLineNr() const
|
||||
sal_uInt16 MsgEdit::GetLineNr() const
|
||||
{
|
||||
if ( aEditTree.GetCurEntry() )
|
||||
return (USHORT)aEditTree.GetModel()->GetAbsPos(aEditTree.GetCurEntry() ) + 1;
|
||||
return (sal_uInt16)aEditTree.GetModel()->GetAbsPos(aEditTree.GetCurEntry() ) + 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@@ -593,7 +593,7 @@ void MsgEdit::ReplaceSelected( const String& rStr )
|
||||
DBG_ERROR("Not Implemented");
|
||||
}
|
||||
|
||||
BOOL MsgEdit::IsModified(){ return bModified; }
|
||||
sal_Bool MsgEdit::IsModified(){ return bModified; }
|
||||
void MsgEdit::SetModifyHdl( Link l ){ lModify = l; }
|
||||
|
||||
String MsgEdit::GetText() const
|
||||
@@ -617,16 +617,16 @@ void MsgEdit::SetText( const String& rStr )
|
||||
DBG_ERROR("Not Implemented");
|
||||
}
|
||||
|
||||
BOOL MsgEdit::HasText() const
|
||||
sal_Bool MsgEdit::HasText() const
|
||||
{
|
||||
return aEditTree.First() != NULL;
|
||||
}
|
||||
|
||||
// Search from the beginning or mark start + 1
|
||||
BOOL MsgEdit::Find( const String& s )
|
||||
sal_Bool MsgEdit::Find( const String& s )
|
||||
{
|
||||
TextSelection r = GetSelection();
|
||||
USHORT bgn = (USHORT) r.GetStart().GetPara() + 1;
|
||||
sal_uInt16 bgn = (sal_uInt16) r.GetStart().GetPara() + 1;
|
||||
if ( r.GetStart().GetPara() == 0 )
|
||||
bgn = 0; // Search from the beginning
|
||||
|
||||
@@ -636,11 +636,11 @@ BOOL MsgEdit::Find( const String& s )
|
||||
if( aEditTree.GetEntryText( pEntry ).Search( s, 0 ) != STRING_NOTFOUND )
|
||||
{
|
||||
aEditTree.SetCurEntry( pEntry );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
pEntry = aEditTree.Next( pEntry );
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
@@ -653,17 +653,17 @@ BOOL MsgEdit::Find( const String& s )
|
||||
|
||||
******************************************************************/
|
||||
|
||||
BOOL MsgEdit::Load( const String& aName )
|
||||
sal_Bool MsgEdit::Load( const String& aName )
|
||||
{
|
||||
aLogFileName = aName;
|
||||
BOOL bOk = TRUE, bFirstLine = TRUE;
|
||||
BOOL bLoadError = FALSE;
|
||||
sal_Bool bOk = sal_True, bFirstLine = sal_True;
|
||||
sal_Bool bLoadError = sal_False;
|
||||
SvFileStream aStrm( aName, STREAM_STD_READ );
|
||||
if( aStrm.IsOpen() )
|
||||
{
|
||||
aEditTree.Clear();
|
||||
String aLine;
|
||||
bFileLoading = TRUE; // To avoid logging to disk
|
||||
bFileLoading = sal_True; // To avoid logging to disk
|
||||
TTLogMsg *pLogMsg = new TTLogMsg;
|
||||
while( !aStrm.IsEof() && bOk )
|
||||
{
|
||||
@@ -673,7 +673,7 @@ BOOL MsgEdit::Load( const String& aName )
|
||||
aStrm.ReadByteStringLine( aLine, RTL_TEXTENCODING_IBM_850 );
|
||||
|
||||
if( aStrm.GetError() != SVSTREAM_OK )
|
||||
bOk = FALSE;
|
||||
bOk = sal_False;
|
||||
|
||||
#define TOKEN( n ) aLine.GetToken( n )
|
||||
|
||||
@@ -683,9 +683,9 @@ BOOL MsgEdit::Load( const String& aName )
|
||||
TTDebugData aDebugData;
|
||||
aDebugData.aLogType = TTLogType( TOKEN(0).ToInt32() );
|
||||
aDebugData.aFilename = TOKEN(1);
|
||||
aDebugData.nLine = USHORT( TOKEN(2).ToInt32() );
|
||||
aDebugData.nCol1 = USHORT( TOKEN(3).ToInt32() );
|
||||
aDebugData.nCol2 = USHORT( TOKEN(4).ToInt32() );
|
||||
aDebugData.nLine = sal_uInt16( TOKEN(2).ToInt32() );
|
||||
aDebugData.nCol1 = sal_uInt16( TOKEN(3).ToInt32() );
|
||||
aDebugData.nCol2 = sal_uInt16( TOKEN(4).ToInt32() );
|
||||
aDebugData.aMsg = aLine.GetQuotedToken( 5, CUniString("\"\"") );
|
||||
|
||||
// Remove leading and trailing quotes
|
||||
@@ -698,13 +698,13 @@ BOOL MsgEdit::Load( const String& aName )
|
||||
AddAnyMsg( pLogMsg );
|
||||
}
|
||||
else if ( bFirstLine && (aLine.Search( VERSION_STRING ) == 0) )
|
||||
nVersion = USHORT( aLine.Copy( VERSION_STRING.Len() ).ToInt32() );
|
||||
nVersion = sal_uInt16( aLine.Copy( VERSION_STRING.Len() ).ToInt32() );
|
||||
else if ( aLine.Len() )
|
||||
bLoadError = TRUE;
|
||||
bLoadError = sal_True;
|
||||
|
||||
bFirstLine = FALSE;
|
||||
bFirstLine = sal_False;
|
||||
}
|
||||
bFileLoading = FALSE;
|
||||
bFileLoading = sal_False;
|
||||
delete pLogMsg;
|
||||
aStrm.Close();
|
||||
if ( nVersion < 2 && !bLoadError )
|
||||
@@ -712,16 +712,16 @@ BOOL MsgEdit::Load( const String& aName )
|
||||
|
||||
}
|
||||
else
|
||||
bOk = FALSE;
|
||||
bOk = sal_False;
|
||||
return bOk;
|
||||
}
|
||||
|
||||
BOOL MsgEdit::Save( const String& aName )
|
||||
sal_Bool MsgEdit::Save( const String& aName )
|
||||
{
|
||||
BOOL bOk = TRUE;
|
||||
BOOL bIsText = DirEntry( aName ).GetExtension().CompareIgnoreCaseToAscii("TXT") == COMPARE_EQUAL;
|
||||
sal_Bool bOk = sal_True;
|
||||
sal_Bool bIsText = DirEntry( aName ).GetExtension().CompareIgnoreCaseToAscii("TXT") == COMPARE_EQUAL;
|
||||
if ( bIsText && !QueryBox( NULL, SttResId( IDS_LOSS_OF_INFORMATION ) ).Execute() )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
SvFileStream aStrm( aName, STREAM_STD_WRITE | STREAM_TRUNC );
|
||||
if( aStrm.IsOpen() )
|
||||
{
|
||||
@@ -759,16 +759,16 @@ BOOL MsgEdit::Save( const String& aName )
|
||||
}
|
||||
}
|
||||
if( aStrm.GetError() != SVSTREAM_OK )
|
||||
bOk = FALSE;
|
||||
bOk = sal_False;
|
||||
else
|
||||
{
|
||||
bModified = FALSE;
|
||||
bModified = sal_False;
|
||||
lModify.Call( NULL );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
bOk = FALSE;
|
||||
bOk = sal_False;
|
||||
return bOk;
|
||||
}
|
||||
|
||||
@@ -780,7 +780,7 @@ TTTreeListBox::TTTreeListBox( AppError* pParent, BasicFrame* pBF, WinBits nWinSt
|
||||
//, nDeselectParent(0)
|
||||
{}
|
||||
|
||||
BOOL TTTreeListBox::JumpToSourcecode( SvLBoxEntry *pThisEntry )
|
||||
sal_Bool TTTreeListBox::JumpToSourcecode( SvLBoxEntry *pThisEntry )
|
||||
{
|
||||
if ( pThisEntry && pThisEntry->GetUserData() && ((TTDebugData*)pThisEntry->GetUserData())->aFilename.Len() > 0 )
|
||||
{
|
||||
@@ -816,20 +816,20 @@ BOOL TTTreeListBox::JumpToSourcecode( SvLBoxEntry *pThisEntry )
|
||||
|
||||
if ( pBasicFrame->pWork && pBasicFrame->pWork->ISA(AppEdit) )
|
||||
((AppEdit*)pBasicFrame->pWork)->Highlight( aData->nLine, aData->nCol1, aData->nCol2 );
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL TTTreeListBox::DoubleClickHdl()
|
||||
sal_Bool TTTreeListBox::DoubleClickHdl()
|
||||
{
|
||||
return JumpToSourcecode( GetHdlEntry() );
|
||||
}
|
||||
|
||||
/*ULONG TTTreeListBox::SelectChildren( SvLBoxEntry* pParent, BOOL bSelect )
|
||||
/*sal_uIntPtr TTTreeListBox::SelectChildren( SvLBoxEntry* pParent, sal_Bool bSelect )
|
||||
{
|
||||
SvLBoxEntry *pEntry = FirstChild( pParent );
|
||||
ULONG nRet = 0;
|
||||
sal_uIntPtr nRet = 0;
|
||||
while ( pEntry )
|
||||
{
|
||||
nRet++;
|
||||
@@ -844,8 +844,8 @@ void TTTreeListBox::SelectHdl()
|
||||
{
|
||||
SvLBoxEntry* pHdlEntry = GetHdlEntry();
|
||||
|
||||
SelectChildren( pHdlEntry, TRUE );
|
||||
Select( pHdlEntry, TRUE );
|
||||
SelectChildren( pHdlEntry, sal_True );
|
||||
Select( pHdlEntry, sal_True );
|
||||
// InitMenu(pApp->GetAppMenu()->GetPopupMenu( RID_APPEDIT )); // So daß Delete richtig ist
|
||||
}
|
||||
|
||||
@@ -855,13 +855,13 @@ void TTTreeListBox::DeselectHdl()
|
||||
if ( GetParent( pHdlEntry ) )
|
||||
{
|
||||
nDeselectParent++;
|
||||
Select( GetParent( pHdlEntry ), FALSE );
|
||||
Select( GetParent( pHdlEntry ), sal_False );
|
||||
nDeselectParent--;
|
||||
}
|
||||
if ( !nDeselectParent )
|
||||
{
|
||||
SelectChildren( pHdlEntry, FALSE );
|
||||
Select( pHdlEntry, FALSE );
|
||||
SelectChildren( pHdlEntry, sal_False );
|
||||
Select( pHdlEntry, sal_False );
|
||||
}
|
||||
Invalidate();
|
||||
} */
|
||||
@@ -932,15 +932,15 @@ class TTLBoxString : public SvLBoxString
|
||||
{
|
||||
public:
|
||||
|
||||
TTLBoxString( SvLBoxEntry* pEntry, USHORT nFlags,
|
||||
TTLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags,
|
||||
const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr) {}
|
||||
|
||||
virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
|
||||
virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
|
||||
SvLBoxEntry* pEntry);
|
||||
};
|
||||
|
||||
|
||||
void TTLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
|
||||
void TTLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
|
||||
SvLBoxEntry* pEntry )
|
||||
{
|
||||
TTFeatures aFeatures = ((TTTreeListBox*)&rDev)->GetFeatures( pEntry );
|
||||
@@ -964,7 +964,7 @@ void TTLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
|
||||
else
|
||||
{
|
||||
aFont.SetFillColor( aCol );
|
||||
aFont.SetTransparent( FALSE );
|
||||
aFont.SetTransparent( sal_False );
|
||||
Color aCol2( COL_BLACK );
|
||||
aFont.SetColor( aCol2 );
|
||||
}
|
||||
@@ -990,7 +990,7 @@ void TTTreeListBox::InitEntry(SvLBoxEntry* pEntry,
|
||||
const String& rStr ,const Image& rImg1, const Image& rImg2,
|
||||
SvLBoxButtonKind eButtonKind )
|
||||
{
|
||||
USHORT nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2"
|
||||
sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2"
|
||||
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
|
||||
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
|
||||
TTLBoxString* pStr = new TTLBoxString( pEntry, 0, pCol->GetText() );
|
||||
|
||||
@@ -37,7 +37,7 @@ class AppError;
|
||||
|
||||
#define SelectChildren SelectChilds // Sonst wird mir schlecht
|
||||
|
||||
typedef USHORT TTFeatures; // Bitfield for features of the entries
|
||||
typedef sal_uInt16 TTFeatures; // Bitfield for features of the entries
|
||||
#define HasNothing TTFeatures(0x00)
|
||||
#define HasError TTFeatures(0x01)
|
||||
#define HasWarning TTFeatures(0x02)
|
||||
@@ -49,13 +49,13 @@ class TTTreeListBox : public SvTreeListBox
|
||||
{
|
||||
protected:
|
||||
// virtual void Command( const CommandEvent& rCEvt );
|
||||
// USHORT nDeselectParent;
|
||||
// sal_uInt16 nDeselectParent;
|
||||
BasicFrame *pBasicFrame;
|
||||
void InitEntry( SvLBoxEntry*, const String&, const Image&,
|
||||
const Image&, SvLBoxButtonKind eButtonKind );
|
||||
AppError *pAppError;
|
||||
|
||||
BOOL JumpToSourcecode( SvLBoxEntry *pThisEntry );
|
||||
sal_Bool JumpToSourcecode( SvLBoxEntry *pThisEntry );
|
||||
|
||||
public:
|
||||
TTTreeListBox( AppError* pParent, BasicFrame* pBF, WinBits nWinStyle=0 );
|
||||
@@ -63,11 +63,11 @@ public:
|
||||
|
||||
// virtual void SelectHdl();
|
||||
// virtual void DeselectHdl();
|
||||
virtual BOOL DoubleClickHdl();
|
||||
virtual sal_Bool DoubleClickHdl();
|
||||
|
||||
virtual void KeyInput( const KeyEvent& rKEvt );
|
||||
|
||||
// ULONG SelectChildren( SvLBoxEntry* pParent, BOOL bSelect );
|
||||
// sal_uIntPtr SelectChildren( SvLBoxEntry* pParent, sal_Bool bSelect );
|
||||
TTFeatures GetFeatures( SvLBoxEntry* );
|
||||
};
|
||||
|
||||
@@ -79,20 +79,20 @@ class MsgEdit : public DataEdit
|
||||
SvLBoxEntry *pCurrentTestCase;
|
||||
SvLBoxEntry *pCurrentAssertion;
|
||||
SvLBoxEntry *pCurrentError;
|
||||
BOOL bModified;
|
||||
sal_Bool bModified;
|
||||
Link lModify;
|
||||
BOOL bFileLoading; // TRUE while loading a file
|
||||
sal_Bool bFileLoading; // sal_True while loading a file
|
||||
String Impl_MakeText( SvLBoxEntry *pEntry ) const;
|
||||
String Impl_MakeSaveText( SvLBoxEntry *pEntry ) const;
|
||||
String Impl_MakeSaveText( TTDebugData aData ) const;
|
||||
USHORT nVersion; // Stores file version
|
||||
sal_uInt16 nVersion; // Stores file version
|
||||
AppError* pAppError;
|
||||
String aLogFileName;
|
||||
|
||||
static USHORT nMaxLogLen;
|
||||
static BOOL bLimitLogLen;
|
||||
static BOOL bPrintLogToStdout;
|
||||
static BOOL bPrintLogToStdoutSet; // has it been initialized yet
|
||||
static sal_uInt16 nMaxLogLen;
|
||||
static sal_Bool bLimitLogLen;
|
||||
static sal_Bool bPrintLogToStdout;
|
||||
static sal_Bool bPrintLogToStdoutSet; // has it been initialized yet
|
||||
public:
|
||||
MsgEdit( AppError*, BasicFrame *pBF, const WinBits& );
|
||||
~MsgEdit();
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
void AddAssertionStack( String aMsg, TTDebugData aDebugData );
|
||||
void AddQAError( String aMsg, TTDebugData aDebugData );
|
||||
|
||||
static void SetMaxLogLen( USHORT nLen ) { nMaxLogLen = nLen; bLimitLogLen = TRUE; }
|
||||
static void SetMaxLogLen( sal_uInt16 nLen ) { nMaxLogLen = nLen; bLimitLogLen = sal_True; }
|
||||
DATA_FUNC_DEF( aEditTree, TTTreeListBox )
|
||||
};
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ TYPEINIT1(MyBasic,StarBASIC)
|
||||
class MyFactory : public SbxFactory
|
||||
{
|
||||
public:
|
||||
virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
|
||||
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
|
||||
};
|
||||
|
||||
static SampleObjectFac aFac1;
|
||||
@@ -73,7 +73,7 @@ static MyFactory aFac2;
|
||||
static ProcessFactory aProcessFac;
|
||||
static short nInst = 0;
|
||||
|
||||
SbxBase* MyFactory::Create( UINT16 nSbxId, UINT32 nCr )
|
||||
SbxBase* MyFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCr )
|
||||
{
|
||||
if( nCr == SBXCR_TEST && nSbxId == SBXID_MYBASIC )
|
||||
return new MyBasic;
|
||||
@@ -156,7 +156,7 @@ void MyBasic::LoadIniFile()
|
||||
{
|
||||
}
|
||||
|
||||
SbTextType MyBasic::GetSymbolType( const String &rSymbol, BOOL bWasTTControl )
|
||||
SbTextType MyBasic::GetSymbolType( const String &rSymbol, sal_Bool bWasTTControl )
|
||||
{
|
||||
(void) rSymbol; /* avoid warning about unused parameter */
|
||||
(void) bWasTTControl; /* avoid warning about unused parameter */
|
||||
@@ -181,13 +181,13 @@ void MyBasic::Reset()
|
||||
nError = 0;
|
||||
}
|
||||
|
||||
BOOL MyBasic::Compile( SbModule* p )
|
||||
sal_Bool MyBasic::Compile( SbModule* p )
|
||||
{
|
||||
Reset();
|
||||
return StarBASIC::Compile( p );
|
||||
}
|
||||
|
||||
BOOL MyBasic::ErrorHdl()
|
||||
sal_Bool MyBasic::ErrorHdl()
|
||||
{
|
||||
AppBasEd* pWin = aBasicApp.pFrame->FindModuleWin( GetActiveModule()->GetName() );
|
||||
if( !pWin )
|
||||
@@ -204,12 +204,12 @@ BOOL MyBasic::ErrorHdl()
|
||||
0, StarBASIC::GetErrorText(), GetLine(), GetCol1(), GetCol2() ),
|
||||
LIST_APPEND );
|
||||
nError++;
|
||||
return BOOL( nError < 20 ); // Cancel after 20 errors
|
||||
return sal_Bool( nError < 20 ); // Cancel after 20 errors
|
||||
}
|
||||
else
|
||||
{
|
||||
ReportRuntimeError( pWin );
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ void MyBasic::ReportRuntimeError( AppBasEd *pEditWin )
|
||||
GetCol1(), GetCol2() ).Show();
|
||||
}
|
||||
|
||||
void MyBasic::DebugFindNoErrors( BOOL bDebugFindNoErrors )
|
||||
void MyBasic::DebugFindNoErrors( sal_Bool bDebugFindNoErrors )
|
||||
{
|
||||
(void) bDebugFindNoErrors; /* avoid warning about unused parameter */
|
||||
}
|
||||
@@ -236,7 +236,7 @@ const String MyBasic::GetSpechialErrorText()
|
||||
return GetErrorText();
|
||||
}
|
||||
|
||||
USHORT MyBasic::BreakHdl()
|
||||
sal_uInt16 MyBasic::BreakHdl()
|
||||
{
|
||||
SbModule* pMod = GetActiveModule();
|
||||
if( pMod )
|
||||
@@ -270,7 +270,7 @@ USHORT MyBasic::BreakHdl()
|
||||
***************************************************************************/
|
||||
|
||||
BasicError::BasicError
|
||||
( AppBasEd* w, USHORT nE, const String& r, USHORT nL, USHORT nC1, USHORT nC2 )
|
||||
( AppBasEd* w, sal_uInt16 nE, const String& r, sal_uInt16 nL, sal_uInt16 nC1, sal_uInt16 nC2 )
|
||||
: aText( SttResId( IDS_ERROR1 ) )
|
||||
{
|
||||
pWin = w;
|
||||
|
||||
@@ -97,7 +97,7 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame *
|
||||
// Disable PRINT-Menu
|
||||
MenuBar* pBar = pFrame->GetMenuBar();
|
||||
Menu* pFileMenu = pBar->GetPopupMenu( RID_APPFILE );
|
||||
pFileMenu->EnableItem( RID_FILEPRINT, FALSE );
|
||||
pFileMenu->EnableItem( RID_FILEPRINT, sal_False );
|
||||
|
||||
mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) );
|
||||
mpListener->StartPage();
|
||||
@@ -116,7 +116,7 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame *
|
||||
|
||||
Printer::PrintJob( mpListener, mpPrinter->GetJobSetup() );
|
||||
nPage = 1;
|
||||
pFileMenu->EnableItem( RID_FILEPRINT, TRUE );
|
||||
pFileMenu->EnableItem( RID_FILEPRINT, sal_True );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ Process::Process()
|
||||
: pArgumentList( NULL )
|
||||
, pEnvList( NULL )
|
||||
, pProcess( NULL )
|
||||
, bWasGPF( FALSE )
|
||||
, bHasBeenStarted( FALSE )
|
||||
, bWasGPF( sal_False )
|
||||
, bHasBeenStarted( sal_False )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -68,19 +68,19 @@ Process::~Process()
|
||||
}
|
||||
|
||||
|
||||
BOOL Process::ImplIsRunning()
|
||||
sal_Bool Process::ImplIsRunning()
|
||||
{
|
||||
if ( pProcess && bHasBeenStarted )
|
||||
{
|
||||
vos::OProcess::TProcessInfo aProcessInfo;
|
||||
pProcess->getInfo( vos::OProcess::TData_ExitCode, &aProcessInfo );
|
||||
if ( !(aProcessInfo.Fields & vos::OProcess::TData_ExitCode) )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
else
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
long Process::ImplGetExitCode()
|
||||
@@ -149,19 +149,19 @@ void Process::SetImage( const String &aAppPath, const String &aAppParams, const
|
||||
::rtl::OUString aNormalizedAppPath;
|
||||
osl::FileBase::getFileURLFromSystemPath( ::rtl::OUString(aAppPath), aNormalizedAppPath );
|
||||
pProcess = new vos::OProcess( aNormalizedAppPath );
|
||||
bHasBeenStarted = FALSE;
|
||||
bHasBeenStarted = sal_False;
|
||||
|
||||
delete [] pParamList;
|
||||
delete [] pEnvArray;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Process::Start()
|
||||
sal_Bool Process::Start()
|
||||
{ // Start program
|
||||
BOOL bSuccess=FALSE;
|
||||
sal_Bool bSuccess=sal_False;
|
||||
if ( pProcess && !ImplIsRunning() )
|
||||
{
|
||||
bWasGPF = FALSE;
|
||||
bWasGPF = sal_False;
|
||||
#ifdef WNT
|
||||
// sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
|
||||
sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX);
|
||||
@@ -189,7 +189,7 @@ BOOL Process::Start()
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
bWasGPF = TRUE;
|
||||
bWasGPF = sal_True;
|
||||
// TODO: Output debug message !!
|
||||
}
|
||||
nErrorMode = SetErrorMode(nErrorMode);
|
||||
@@ -201,17 +201,17 @@ BOOL Process::Start()
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
ULONG Process::GetExitCode()
|
||||
sal_uIntPtr Process::GetExitCode()
|
||||
{ // ExitCode of program after execution
|
||||
return ImplGetExitCode();
|
||||
}
|
||||
|
||||
BOOL Process::IsRunning()
|
||||
sal_Bool Process::IsRunning()
|
||||
{
|
||||
return ImplIsRunning();
|
||||
}
|
||||
|
||||
BOOL Process::WasGPF()
|
||||
sal_Bool Process::WasGPF()
|
||||
{ // Did the process fail?
|
||||
#ifdef WNT
|
||||
return ImplGetExitCode() == 3221225477;
|
||||
@@ -220,10 +220,10 @@ BOOL Process::WasGPF()
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL Process::Terminate()
|
||||
sal_Bool Process::Terminate()
|
||||
{
|
||||
if ( ImplIsRunning() )
|
||||
return pProcess->terminate() == vos::OProcess::E_None;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
// none
|
||||
// 2) Methods:
|
||||
// SetImage( Filename )
|
||||
// BOOL Start
|
||||
// USHORT GetExitCode
|
||||
// BOOL IsRunning
|
||||
// BOOL WasGPF
|
||||
// sal_Bool Start
|
||||
// sal_uInt16 GetExitCode
|
||||
// sal_Bool IsRunning
|
||||
// sal_Bool WasGPF
|
||||
|
||||
|
||||
// This implementation is a sample for a table driven version that
|
||||
@@ -67,7 +67,7 @@
|
||||
#define _BWRITE 0x0200 // can be used as Lvaluen
|
||||
#define _LVALUE _BWRITE
|
||||
#define _READWRITE 0x0300 // can read and written
|
||||
#define _OPT 0x0400 // TRUE: optional parameter
|
||||
#define _OPT 0x0400 // sal_True: optional parameter
|
||||
#define _METHOD 0x1000 // Mask-Bit for a method
|
||||
#define _PROPERTY 0x2000 // Mask-Bit for a property
|
||||
#define _COLL 0x4000 // Mask-Bit for a collection
|
||||
@@ -128,12 +128,12 @@ SbxVariable* ProcessWrapper::Find( const String& rName, SbxClassType t )
|
||||
// otherwise search
|
||||
Methods* p = pMethods;
|
||||
short nIndex = 0;
|
||||
BOOL bFound = FALSE;
|
||||
sal_Bool bFound = sal_False;
|
||||
while( p->nArgs != -1 )
|
||||
{
|
||||
if( rName.EqualsIgnoreCaseAscii( p->pName ) )
|
||||
{
|
||||
bFound = TRUE; break;
|
||||
bFound = sal_True; break;
|
||||
}
|
||||
nIndex += ( p->nArgs & _ARGSMASK ) + 1;
|
||||
p = pMethods + nIndex;
|
||||
@@ -168,22 +168,22 @@ void ProcessWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
|
||||
{
|
||||
SbxVariable* pVar = pHint->GetVar();
|
||||
SbxArray* pNotifyPar = pVar->GetParameters();
|
||||
USHORT nIndex = (USHORT) pVar->GetUserData();
|
||||
sal_uInt16 nIndex = (sal_uInt16) pVar->GetUserData();
|
||||
// No index: put through
|
||||
if( nIndex )
|
||||
{
|
||||
ULONG t = pHint->GetId();
|
||||
sal_uIntPtr t = pHint->GetId();
|
||||
if( t == SBX_HINT_INFOWANTED )
|
||||
pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) );
|
||||
else
|
||||
{
|
||||
BOOL bWrite = FALSE;
|
||||
sal_Bool bWrite = sal_False;
|
||||
if( t == SBX_HINT_DATACHANGED )
|
||||
bWrite = TRUE;
|
||||
bWrite = sal_True;
|
||||
if( t == SBX_HINT_DATAWANTED || bWrite )
|
||||
{
|
||||
// Parameter-Test for methods:
|
||||
USHORT nPar = pMethods[ --nIndex ].nArgs & 0x00FF;
|
||||
sal_uInt16 nPar = pMethods[ --nIndex ].nArgs & 0x00FF;
|
||||
// Element 0 is the return value
|
||||
if( ( !pNotifyPar && nPar )
|
||||
|| ( pNotifyPar && pNotifyPar->Count() < nPar+1 ) )
|
||||
@@ -212,7 +212,7 @@ SbxInfo* ProcessWrapper::GetInfo( short nIdx )
|
||||
{
|
||||
p++;
|
||||
String aMethodName( p->pName, RTL_TEXTENCODING_ASCII_US );
|
||||
USHORT nInfoFlags = ( p->nArgs >> 8 ) & 0x03;
|
||||
sal_uInt16 nInfoFlags = ( p->nArgs >> 8 ) & 0x03;
|
||||
if( p->nArgs & _OPT )
|
||||
nInfoFlags |= SBX_OPTIONAL;
|
||||
pResultInfo->AddParam( aMethodName, p->eType, nInfoFlags );
|
||||
@@ -226,10 +226,10 @@ SbxInfo* ProcessWrapper::GetInfo( short nIdx )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Properties and methods save the return value in argv[0] (Get, bPut = FALSE)
|
||||
// and store the value from argv[0] (Put, bPut = TRUE)
|
||||
// Properties and methods save the return value in argv[0] (Get, bPut = sal_False)
|
||||
// and store the value from argv[0] (Put, bPut = sal_True)
|
||||
|
||||
void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
|
||||
void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt )
|
||||
{ // Imagefile of the executable
|
||||
(void) pVar; /* avoid warning about unused parameter */
|
||||
(void) bWriteIt; /* avoid warning about unused parameter */
|
||||
@@ -239,28 +239,28 @@ void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, BOOL b
|
||||
pProcess->SetImage(pMethodePar->Get( 1 )->GetString(), String() );
|
||||
}
|
||||
|
||||
void ProcessWrapper::PStart( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
|
||||
void ProcessWrapper::PStart( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt )
|
||||
{ // Program is started
|
||||
(void) pMethodePar; /* avoid warning about unused parameter */
|
||||
(void) bWriteIt; /* avoid warning about unused parameter */
|
||||
pVar->PutBool( pProcess->Start() );
|
||||
}
|
||||
|
||||
void ProcessWrapper::PGetExitCode( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
|
||||
void ProcessWrapper::PGetExitCode( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt )
|
||||
{ // ExitCode of the program after it was finished
|
||||
(void) pMethodePar; /* avoid warning about unused parameter */
|
||||
(void) bWriteIt; /* avoid warning about unused parameter */
|
||||
pVar->PutULong( pProcess->GetExitCode() );
|
||||
}
|
||||
|
||||
void ProcessWrapper::PIsRunning( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
|
||||
void ProcessWrapper::PIsRunning( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt )
|
||||
{ // Program is still running
|
||||
(void) pMethodePar; /* avoid warning about unused parameter */
|
||||
(void) bWriteIt; /* avoid warning about unused parameter */
|
||||
pVar->PutBool( pProcess->IsRunning() );
|
||||
}
|
||||
|
||||
void ProcessWrapper::PWasGPF( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
|
||||
void ProcessWrapper::PWasGPF( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt )
|
||||
{ // Program faulted with GPF etc.
|
||||
(void) pMethodePar; /* avoid warning about unused parameter */
|
||||
(void) bWriteIt; /* avoid warning about unused parameter */
|
||||
|
||||
@@ -44,7 +44,7 @@ using SbxVariable::GetInfo;
|
||||
public:
|
||||
#endif
|
||||
typedef void( ProcessWrapper::*pMeth )
|
||||
( SbxVariable* pThis, SbxArray* pArgs, BOOL bWrite );
|
||||
( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite );
|
||||
#if defined ( ICC ) || defined ( HPUX )
|
||||
private:
|
||||
#endif
|
||||
@@ -58,11 +58,11 @@ private:
|
||||
static Methods aProcessMethods[]; // Method table
|
||||
Methods *pMethods; // Current method table
|
||||
|
||||
void PSetImage( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
|
||||
void PStart( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
|
||||
void PGetExitCode( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
|
||||
void PIsRunning( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
|
||||
void PWasGPF( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
|
||||
void PSetImage( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
|
||||
void PStart( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
|
||||
void PGetExitCode( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
|
||||
void PIsRunning( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
|
||||
void PWasGPF( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
|
||||
|
||||
// Internal members and methods
|
||||
Process *pProcess;
|
||||
|
||||
@@ -72,7 +72,7 @@ void StatusLine::SetProfileName( const String& s )
|
||||
|
||||
IMPL_LINK( StatusLine, ActivateTask, TaskToolBox*, pTTB )
|
||||
{
|
||||
USHORT nFirstWinPos=0;
|
||||
sal_uInt16 nFirstWinPos=0;
|
||||
MenuBar* pMenu = pFrame->GetMenuBar();
|
||||
PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW );
|
||||
|
||||
@@ -81,14 +81,14 @@ IMPL_LINK( StatusLine, ActivateTask, TaskToolBox*, pTTB )
|
||||
|
||||
nFirstWinPos += pTTB->GetItemPos( pTTB->GetCurItemId() ) / 2;
|
||||
|
||||
USHORT x;
|
||||
sal_uInt16 x;
|
||||
x = pTTB->GetItemPos( pTTB->GetCurItemId() );
|
||||
x = pWinMenu->GetItemId( nFirstWinPos );
|
||||
x = pWinMenu->GetItemCount();
|
||||
AppWin* pWin = pFrame->FindWin( pWinMenu->GetItemText( pWinMenu->GetItemId( nFirstWinPos ) ).EraseAllChars( L'~' ) );
|
||||
if ( pWin )
|
||||
{
|
||||
pWin->Minimize( FALSE );
|
||||
pWin->Minimize( sal_False );
|
||||
pWin->ToTop();
|
||||
}
|
||||
return 0;
|
||||
@@ -96,7 +96,7 @@ IMPL_LINK( StatusLine, ActivateTask, TaskToolBox*, pTTB )
|
||||
|
||||
void StatusLine::LoadTaskToolBox()
|
||||
{
|
||||
USHORT nFirstWinPos=0;
|
||||
sal_uInt16 nFirstWinPos=0;
|
||||
MenuBar* pMenu = pFrame->GetMenuBar();
|
||||
PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW );
|
||||
|
||||
|
||||
@@ -45,19 +45,19 @@
|
||||
TextEditImp::TextEditImp( AppEdit* pParent, const WinBits& aBits )
|
||||
: Window( pParent, aBits )
|
||||
, pAppEdit( pParent )
|
||||
, bHighlightning( FALSE )
|
||||
, bDoSyntaxHighlight( FALSE )
|
||||
, bDelayHighlight( TRUE )
|
||||
, bHighlightning( sal_False )
|
||||
, bDoSyntaxHighlight( sal_False )
|
||||
, bDelayHighlight( sal_True )
|
||||
, nTipId( 0 )
|
||||
, bViewMoved( FALSE )
|
||||
, bViewMoved( sal_False )
|
||||
{
|
||||
pTextEngine = new TextEngine();
|
||||
pTextEngine->SetMaxTextLen( STRING_MAXLEN );
|
||||
pTextEngine->EnableUndo( TRUE );
|
||||
pTextEngine->EnableUndo( sal_True );
|
||||
|
||||
pTextView = new TextView( pTextEngine, this );
|
||||
pTextEngine->InsertView( pTextView );
|
||||
pTextEngine->SetModified( FALSE );
|
||||
pTextEngine->SetModified( sal_False );
|
||||
|
||||
aSyntaxIdleTimer.SetTimeout( 200 );
|
||||
aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, TextEditImp, SyntaxTimerHdl ) );
|
||||
@@ -80,10 +80,10 @@ TextEditImp::~TextEditImp()
|
||||
delete pTextEngine;
|
||||
}
|
||||
|
||||
BOOL TextEditImp::ViewMoved()
|
||||
sal_Bool TextEditImp::ViewMoved()
|
||||
{
|
||||
BOOL bOld = bViewMoved;
|
||||
bViewMoved = FALSE;
|
||||
sal_Bool bOld = bViewMoved;
|
||||
bViewMoved = sal_False;
|
||||
return bOld;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
||||
pAppEdit->pVScroll->SetThumbPos( pTextView->GetStartDocPos().Y() );
|
||||
if ( ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow() )
|
||||
((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->Scroll( 0, ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->GetCurYOffset() - pTextView->GetStartDocPos().Y() );
|
||||
bViewMoved = TRUE;
|
||||
bViewMoved = sal_True;
|
||||
}
|
||||
else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED )
|
||||
{
|
||||
@@ -115,8 +115,8 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
||||
}
|
||||
else if( rTextHint.GetId() == TEXT_HINT_TEXTFORMATTED )
|
||||
{
|
||||
ULONG nWidth = pTextEngine->CalcTextWidth();
|
||||
if ( (ULONG)nWidth != pAppEdit->nCurTextWidth )
|
||||
sal_uIntPtr nWidth = pTextEngine->CalcTextWidth();
|
||||
if ( (sal_uIntPtr)nWidth != pAppEdit->nCurTextWidth )
|
||||
{
|
||||
pAppEdit->nCurTextWidth = nWidth;
|
||||
if ( pAppEdit->pHScroll )
|
||||
@@ -129,12 +129,12 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
||||
else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED )
|
||||
{
|
||||
if ( ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow() )
|
||||
((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, TRUE );
|
||||
((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, sal_True );
|
||||
}
|
||||
else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED )
|
||||
{
|
||||
if ( ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow() )
|
||||
((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, FALSE );
|
||||
((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, sal_False );
|
||||
|
||||
// Itchy adaption for two signs at line ends instead of one (hard coded default)
|
||||
pTextEngine->SetMaxTextLen( STRING_MAXLEN - pTextEngine->GetParagraphCount() );
|
||||
@@ -189,12 +189,12 @@ int TextAttribSpechial::operator==( const TextAttrib& rAttr ) const
|
||||
( maFontWeight == ((const TextAttribSpechial&)rAttr).maFontWeight ) );
|
||||
}
|
||||
|
||||
void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
|
||||
void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
|
||||
{
|
||||
SbTextPortions aPortionList;
|
||||
pAppEdit->GetBasicFrame()->Basic().Highlight( rSource, aPortionList );
|
||||
|
||||
USHORT nCount = aPortionList.Count();
|
||||
sal_uInt16 nCount = aPortionList.Count();
|
||||
if ( !nCount )
|
||||
return;
|
||||
|
||||
@@ -211,8 +211,8 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
|
||||
}
|
||||
|
||||
// here is the postprocessing for types for the TestTool
|
||||
USHORT i;
|
||||
BOOL bWasTTControl = FALSE;
|
||||
sal_uInt16 i;
|
||||
sal_Bool bWasTTControl = sal_False;
|
||||
for ( i = 0; i < aPortionList.Count(); i++ )
|
||||
{
|
||||
SbTextPortion& r = aPortionList[i];
|
||||
@@ -230,20 +230,20 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
|
||||
r.eType = pAppEdit->GetBasicFrame()->Basic().GetSymbolType( aSymbol, bWasTTControl );
|
||||
|
||||
if ( r.eType == TT_CONTROL )
|
||||
bWasTTControl = TRUE;
|
||||
bWasTTControl = sal_True;
|
||||
else
|
||||
bWasTTControl = FALSE;
|
||||
bWasTTControl = sal_False;
|
||||
}
|
||||
break;
|
||||
case SB_PUNCTUATION:
|
||||
{
|
||||
String aPunctuation = rSource.Copy( r.nStart, r.nEnd - r.nStart +1 );
|
||||
if ( aPunctuation.CompareToAscii( "." ) != COMPARE_EQUAL )
|
||||
bWasTTControl = FALSE;
|
||||
bWasTTControl = sal_False;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bWasTTControl = FALSE;
|
||||
bWasTTControl = sal_False;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
|
||||
r.nEnd = rSource.Len()-1;
|
||||
}
|
||||
|
||||
BOOL bWasModified = pTextEngine->IsModified();
|
||||
sal_Bool bWasModified = pTextEngine->IsModified();
|
||||
for ( i = 0; i < aPortionList.Count(); i++ )
|
||||
{
|
||||
SbTextPortion& r = aPortionList[i];
|
||||
@@ -283,7 +283,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
|
||||
|
||||
SbTextType eCol = r.eType;
|
||||
Color aColor;
|
||||
ULONG nLine = nLineOff+r.nLine-1; // -1, because BASIC starts with 1
|
||||
sal_uIntPtr nLine = nLineOff+r.nLine-1; // -1, because BASIC starts with 1
|
||||
switch ( +eCol )
|
||||
{
|
||||
case SB_KEYWORD:
|
||||
@@ -336,7 +336,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
|
||||
pTextEngine->SetModified( bWasModified );
|
||||
}
|
||||
|
||||
void TextEditImp::DoSyntaxHighlight( ULONG nPara )
|
||||
void TextEditImp::DoSyntaxHighlight( sal_uIntPtr nPara )
|
||||
{
|
||||
// Due to delayed syntax highlight it can happend that the
|
||||
// paragraph does no longer exist
|
||||
@@ -362,7 +362,7 @@ void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara )
|
||||
{
|
||||
if ( bDelayHighlight )
|
||||
{
|
||||
aSyntaxLineTable.Insert( nPara, (void*)(ULONG)1 );
|
||||
aSyntaxLineTable.Insert( nPara, (void*)(sal_uIntPtr)1 );
|
||||
aSyntaxIdleTimer.Start();
|
||||
}
|
||||
else
|
||||
@@ -373,38 +373,38 @@ void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara )
|
||||
IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
|
||||
{
|
||||
DBG_ASSERT( pTextView, "Not yet a View but Syntax-Highlight ?!" );
|
||||
pTextEngine->SetUpdateMode( FALSE );
|
||||
pTextEngine->SetUpdateMode( sal_False );
|
||||
|
||||
bHighlightning = TRUE;
|
||||
USHORT nLine;
|
||||
bHighlightning = sal_True;
|
||||
sal_uInt16 nLine;
|
||||
while ( aSyntaxLineTable.First() && !Application::AnyInput( INPUT_MOUSEANDKEYBOARD ) )
|
||||
{
|
||||
nLine = (USHORT)aSyntaxLineTable.GetCurKey();
|
||||
nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
|
||||
DoSyntaxHighlight( nLine );
|
||||
aSyntaxLineTable.Remove( nLine );
|
||||
/* if ( Application::AnyInput() )
|
||||
{
|
||||
aSyntaxIdleTimer.Start(); // Starten, falls wir in einem Dialog landen
|
||||
pTextView->ShowCursor( TRUE, TRUE );
|
||||
pTextEngine->SetUpdateMode( TRUE );
|
||||
bHighlightning = FALSE;
|
||||
pTextView->ShowCursor( sal_True, sal_True );
|
||||
pTextEngine->SetUpdateMode( sal_True );
|
||||
bHighlightning = sal_False;
|
||||
GetpApp()->Reschedule();
|
||||
bHighlightning = TRUE;
|
||||
pTextEngine->SetUpdateMode( FALSE );
|
||||
bHighlightning = sal_True;
|
||||
pTextEngine->SetUpdateMode( sal_False );
|
||||
}*/
|
||||
}
|
||||
|
||||
BOOL bWasModified = pTextEngine->IsModified();
|
||||
sal_Bool bWasModified = pTextEngine->IsModified();
|
||||
if ( aSyntaxLineTable.Count() > 3 ) // Without VDev
|
||||
{
|
||||
pTextEngine->SetUpdateMode( TRUE );
|
||||
pTextView->ShowCursor( TRUE, TRUE );
|
||||
pTextEngine->SetUpdateMode( sal_True );
|
||||
pTextView->ShowCursor( sal_True, sal_True );
|
||||
}
|
||||
else
|
||||
pTextEngine->SetUpdateMode( TRUE ); // ! With VDev
|
||||
pTextEngine->SetUpdateMode( sal_True ); // ! With VDev
|
||||
// pTextView->ForceUpdate();
|
||||
|
||||
// SetUpdateMode( TRUE ) soll kein Modify setzen
|
||||
// SetUpdateMode( sal_True ) soll kein Modify setzen
|
||||
pTextEngine->SetModified( bWasModified );
|
||||
|
||||
// SyntaxTimerHdl wird gerufen, wenn Text-Aenderung
|
||||
@@ -413,7 +413,7 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
|
||||
// nCurTextWidth = pTextEngine->CalcTextWidth();
|
||||
// if ( nCurTextWidth != nPrevTextWidth )
|
||||
// SetScrollBarRanges();
|
||||
bHighlightning = FALSE;
|
||||
bHighlightning = sal_False;
|
||||
|
||||
if ( aSyntaxLineTable.First() )
|
||||
aImplSyntaxIdleTimer.Start();
|
||||
@@ -430,7 +430,7 @@ void TextEditImp::InvalidateSyntaxHighlight()
|
||||
DoDelayedSyntaxHighlight( i );
|
||||
}
|
||||
|
||||
void TextEditImp::SyntaxHighlight( BOOL bNew )
|
||||
void TextEditImp::SyntaxHighlight( sal_Bool bNew )
|
||||
{
|
||||
if ( ( bNew && bDoSyntaxHighlight ) || ( !bNew && !bDoSyntaxHighlight ) )
|
||||
return;
|
||||
@@ -447,13 +447,13 @@ void TextEditImp::SyntaxHighlight( BOOL bNew )
|
||||
else
|
||||
{
|
||||
aSyntaxIdleTimer.Stop();
|
||||
pTextEngine->SetUpdateMode( FALSE );
|
||||
for ( ULONG i = 0; i < pTextEngine->GetParagraphCount(); i++ )
|
||||
pTextEngine->SetUpdateMode( sal_False );
|
||||
for ( sal_uIntPtr i = 0; i < pTextEngine->GetParagraphCount(); i++ )
|
||||
pTextEngine->RemoveAttribs( i );
|
||||
|
||||
// pTextEngine->QuickFormatDoc();
|
||||
pTextEngine->SetUpdateMode( TRUE );
|
||||
pTextView->ShowCursor(TRUE, TRUE );
|
||||
pTextEngine->SetUpdateMode( sal_True );
|
||||
pTextView->ShowCursor(sal_True, sal_True );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,15 +463,15 @@ void TextEditImp::SetFont( const Font& rNewFont )
|
||||
pTextEngine->SetFont(rNewFont);
|
||||
}
|
||||
|
||||
BOOL TextEditImp::IsModified()
|
||||
sal_Bool TextEditImp::IsModified()
|
||||
{
|
||||
return pTextEngine->IsModified();
|
||||
}
|
||||
|
||||
void TextEditImp::KeyInput( const KeyEvent& rKeyEvent )
|
||||
{
|
||||
BOOL bWasModified = pTextView->GetTextEngine()->IsModified();
|
||||
pTextView->GetTextEngine()->SetModified( FALSE );
|
||||
sal_Bool bWasModified = pTextView->GetTextEngine()->IsModified();
|
||||
pTextView->GetTextEngine()->SetModified( sal_False );
|
||||
|
||||
if ( !pTextView->KeyInput( rKeyEvent ) )
|
||||
Window::KeyInput( rKeyEvent );
|
||||
@@ -487,8 +487,8 @@ void TextEditImp::MouseButtonUp( const MouseEvent& rMouseEvent ){ pTextView->Mou
|
||||
//void TextEditImp::MouseButtonDown( const MouseEvent& rMouseEvent ){ pTextView->MouseButtonDown( rMouseEvent );}
|
||||
//void TextEditImp::MouseMove( const MouseEvent& rMouseEvent ){ pTextView->MouseMove( rMouseEvent );}
|
||||
//void TextEditImp::Command( const CommandEvent& rCEvt ){ pTextView->Command( rCEvt );}
|
||||
//BOOL TextEditImp::Drop( const DropEvent& rEvt ){ return FALSE /*pTextView->Drop( rEvt )*/;}
|
||||
//BOOL TextEditImp::QueryDrop( DropEvent& rEvt ){ return FALSE /*pTextView->QueryDrop( rEvt )*/;}
|
||||
//sal_Bool TextEditImp::Drop( const DropEvent& rEvt ){ return sal_False /*pTextView->Drop( rEvt )*/;}
|
||||
//sal_Bool TextEditImp::QueryDrop( DropEvent& rEvt ){ return sal_False /*pTextView->QueryDrop( rEvt )*/;}
|
||||
|
||||
|
||||
void TextEditImp::Command( const CommandEvent& rCEvt )
|
||||
@@ -550,10 +550,10 @@ SbxBase* TextEditImp::GetSbxAtMousePos( String &aWord )
|
||||
if ( aSuffixes.Search( aWord.GetChar(nLastChar) ) != STRING_NOTFOUND )
|
||||
aWord.Erase( nLastChar, 1 );
|
||||
// because perhaps TestTools throws an error
|
||||
BOOL bWasError = SbxBase::IsError();
|
||||
pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( TRUE );
|
||||
sal_Bool bWasError = SbxBase::IsError();
|
||||
pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( sal_True );
|
||||
SbxBase* pSBX = StarBASIC::FindSBXInCurrentScope( aWord );
|
||||
pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( FALSE );
|
||||
pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( sal_False );
|
||||
DBG_ASSERT( !( !bWasError && SbxBase::IsError()), "Error generated while retrieving Variable data for viewing" );
|
||||
if ( !bWasError && SbxBase::IsError() )
|
||||
SbxBase::ResetError();
|
||||
@@ -679,8 +679,8 @@ DBG_NAME(TextEdit)
|
||||
|
||||
TextEdit::TextEdit( AppEdit* pParent, const WinBits& aBits )
|
||||
: pBreakpointWindow( NULL )
|
||||
, bFileWasUTF8( FALSE )
|
||||
, bSaveAsUTF8( FALSE )
|
||||
, bFileWasUTF8( sal_False )
|
||||
, bSaveAsUTF8( sal_False )
|
||||
, aEdit( pParent, aBits | WB_NOHIDESELECTION )
|
||||
{
|
||||
DBG_CTOR(TextEdit,0);
|
||||
@@ -689,7 +689,7 @@ DBG_CTOR(TextEdit,0);
|
||||
TextEdit::~TextEdit()
|
||||
{DBG_DTOR(TextEdit,0);}
|
||||
|
||||
void TextEdit::Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 )
|
||||
void TextEdit::Highlight( sal_uIntPtr nLine, xub_StrLen nCol1, xub_StrLen nCol2 )
|
||||
{
|
||||
if ( nLine ) // Should not occure but at 'Sub expected' in first line
|
||||
nLine--;
|
||||
@@ -715,7 +715,7 @@ void TextEdit::Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 )
|
||||
// Because nCol2 *may* point after the current statement
|
||||
// (because the next one starts there) there are space
|
||||
// that must be removed
|
||||
BOOL bColon = FALSE;
|
||||
sal_Bool bColon = sal_False;
|
||||
|
||||
while ( s.GetChar( nCol2 ) == ' ' && nCol2 > nCol1 && !bColon )
|
||||
{
|
||||
@@ -723,7 +723,7 @@ void TextEdit::Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 )
|
||||
if ( s.GetChar( nCol2 ) == ':' )
|
||||
{
|
||||
nCol2--;
|
||||
bColon = TRUE;
|
||||
bColon = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,31 +748,31 @@ String TextEdit::GetSelected(){ return aEdit.pTextView->GetSelected(); }
|
||||
TextSelection TextEdit::GetSelection() const{ return aEdit.pTextView->GetSelection(); }
|
||||
void TextEdit::SetSelection( const TextSelection& rSelection ){ aEdit.pTextView->SetSelection( rSelection ); }
|
||||
|
||||
USHORT TextEdit::GetLineNr() const
|
||||
sal_uInt16 TextEdit::GetLineNr() const
|
||||
{
|
||||
return sal::static_int_cast< USHORT >(
|
||||
return sal::static_int_cast< sal_uInt16 >(
|
||||
aEdit.pTextView->GetSelection().GetEnd().GetPara()+1);
|
||||
}
|
||||
|
||||
void TextEdit::ReplaceSelected( const String& rStr ){ aEdit.pTextView->InsertText(rStr); }
|
||||
BOOL TextEdit::IsModified(){ return aEdit.IsModified(); }
|
||||
sal_Bool TextEdit::IsModified(){ return aEdit.IsModified(); }
|
||||
|
||||
String TextEdit::GetText() const
|
||||
{
|
||||
return aEdit.pTextEngine->GetText( GetSystemLineEnd() );
|
||||
}
|
||||
|
||||
void TextEdit::SetText( const String& rStr ){ aEdit.pTextEngine->SetText(rStr); aEdit.pTextEngine->SetModified( FALSE ); }
|
||||
void TextEdit::SetText( const String& rStr ){ aEdit.pTextEngine->SetText(rStr); aEdit.pTextEngine->SetModified( sal_False ); }
|
||||
void TextEdit::SetModifyHdl( Link l ){ aEdit.SetModifyHdl(l); }
|
||||
BOOL TextEdit::HasText() const { return aEdit.pTextEngine->GetTextLen() > 0; }
|
||||
sal_Bool TextEdit::HasText() const { return aEdit.pTextEngine->GetTextLen() > 0; }
|
||||
|
||||
// Search from the beginning or at mark + 1
|
||||
BOOL TextEdit::Find( const String& s )
|
||||
sal_Bool TextEdit::Find( const String& s )
|
||||
{
|
||||
DBG_CHKTHIS(TextEdit,0);
|
||||
|
||||
TextSelection aSelection = aEdit.pTextView->GetSelection();
|
||||
ULONG nPara = aSelection.GetStart().GetPara();
|
||||
sal_uIntPtr nPara = aSelection.GetStart().GetPara();
|
||||
xub_StrLen nIndex = aSelection.GetStart().GetIndex();
|
||||
|
||||
if ( aSelection.HasRange() )
|
||||
@@ -786,23 +786,23 @@ BOOL TextEdit::Find( const String& s )
|
||||
if( nIndex != STRING_NOTFOUND )
|
||||
{
|
||||
aEdit.pTextView->SetSelection( TextSelection( TextPaM( nPara, nIndex ), TextPaM( nPara, nIndex + s.Len() ) ) );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
nIndex = 0;
|
||||
nPara++;
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
BOOL TextEdit::Load( const String& aName )
|
||||
sal_Bool TextEdit::Load( const String& aName )
|
||||
{
|
||||
DBG_CHKTHIS(TextEdit,0);
|
||||
BOOL bOk = TRUE;
|
||||
sal_Bool bOk = sal_True;
|
||||
SvFileStream aStrm( aName, STREAM_STD_READ );
|
||||
if( aStrm.IsOpen() )
|
||||
{
|
||||
String aText, aLine, aLineBreak;
|
||||
BOOL bIsFirstLine = TRUE;
|
||||
sal_Bool bIsFirstLine = sal_True;
|
||||
aLineBreak += '\n';
|
||||
aLineBreak.ConvertLineEnd();
|
||||
rtl_TextEncoding aFileEncoding = RTL_TEXTENCODING_IBM_850;
|
||||
@@ -812,29 +812,29 @@ DBG_CHKTHIS(TextEdit,0);
|
||||
if ( bIsFirstLine && IsTTSignatureForUnicodeTextfile( aLine ) )
|
||||
{
|
||||
aFileEncoding = RTL_TEXTENCODING_UTF8;
|
||||
bFileWasUTF8 = TRUE;
|
||||
bFileWasUTF8 = sal_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !bIsFirstLine )
|
||||
aText += aLineBreak;
|
||||
aText += aLine;
|
||||
bIsFirstLine = FALSE;
|
||||
bIsFirstLine = sal_False;
|
||||
}
|
||||
if( aStrm.GetError() != SVSTREAM_OK )
|
||||
bOk = FALSE;
|
||||
bOk = sal_False;
|
||||
}
|
||||
SetText( aText );
|
||||
}
|
||||
else
|
||||
bOk = FALSE;
|
||||
bOk = sal_False;
|
||||
return bOk;
|
||||
}
|
||||
|
||||
BOOL TextEdit::Save( const String& aName )
|
||||
sal_Bool TextEdit::Save( const String& aName )
|
||||
{
|
||||
DBG_CHKTHIS(TextEdit,0);
|
||||
BOOL bOk = TRUE;
|
||||
sal_Bool bOk = sal_True;
|
||||
SvFileStream aStrm( aName, STREAM_STD_WRITE | STREAM_TRUNC );
|
||||
rtl_TextEncoding aFileEncoding = RTL_TEXTENCODING_IBM_850;
|
||||
if( aStrm.IsOpen() )
|
||||
@@ -849,10 +849,10 @@ DBG_CHKTHIS(TextEdit,0);
|
||||
aSave.ConvertLineEnd(LINEEND_LF);
|
||||
aStrm << ByteString( aSave, aFileEncoding ).GetBuffer();
|
||||
if( aStrm.GetError() != SVSTREAM_OK )
|
||||
bOk = FALSE;
|
||||
bOk = sal_False;
|
||||
else
|
||||
aEdit.pTextEngine->SetModified(FALSE);
|
||||
} else bOk = FALSE;
|
||||
aEdit.pTextEngine->SetModified(sal_False);
|
||||
} else bOk = sal_False;
|
||||
return bOk;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class TextEditImp : public Window, public SfxListener
|
||||
using Window::Notify;
|
||||
|
||||
protected:
|
||||
void DoSyntaxHighlight( ULONG nPara );
|
||||
void DoSyntaxHighlight( sal_uIntPtr nPara );
|
||||
|
||||
|
||||
private:
|
||||
@@ -63,10 +63,10 @@ private:
|
||||
|
||||
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
|
||||
|
||||
void ImpDoHighlight( const String& rSource, ULONG nLineOff );
|
||||
BOOL bHighlightning;
|
||||
BOOL bDoSyntaxHighlight;
|
||||
BOOL bDelayHighlight;
|
||||
void ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff );
|
||||
sal_Bool bHighlightning;
|
||||
sal_Bool bDoSyntaxHighlight;
|
||||
sal_Bool bDelayHighlight;
|
||||
|
||||
|
||||
SbxBase* GetSbxAtMousePos( String &aWord );
|
||||
@@ -75,12 +75,12 @@ private:
|
||||
DECL_LINK( ShowVarContents, void* );
|
||||
Point aTipPos;
|
||||
String aTipWord;
|
||||
ULONG nTipId;
|
||||
sal_uIntPtr nTipId;
|
||||
|
||||
Timer HideTipTimer;
|
||||
Timer ShowTipTimer;
|
||||
|
||||
BOOL bViewMoved;
|
||||
sal_Bool bViewMoved;
|
||||
|
||||
public:
|
||||
TextEditImp( AppEdit *pParent, const WinBits& aBits );
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
TextView *pTextView;
|
||||
|
||||
void SetFont( const Font& rNewFont );
|
||||
BOOL IsModified();
|
||||
sal_Bool IsModified();
|
||||
void SetModifyHdl( Link l ){ ModifyHdl = l; }
|
||||
|
||||
void KeyInput( const KeyEvent& rKeyEvent );
|
||||
@@ -99,14 +99,14 @@ public:
|
||||
void MouseButtonDown( const MouseEvent& rMouseEvent );
|
||||
// void MouseMove( const MouseEvent& rMouseEvent );
|
||||
void Command( const CommandEvent& rCEvt );
|
||||
//BOOL Drop( const DropEvent& rEvt );
|
||||
//BOOL QueryDrop( DropEvent& rEvt );
|
||||
//sal_Bool Drop( const DropEvent& rEvt );
|
||||
//sal_Bool QueryDrop( DropEvent& rEvt );
|
||||
|
||||
BOOL ViewMoved();
|
||||
sal_Bool ViewMoved();
|
||||
|
||||
void DoDelayedSyntaxHighlight( xub_StrLen nPara );
|
||||
void InvalidateSyntaxHighlight();
|
||||
void SyntaxHighlight( BOOL bNew );
|
||||
void SyntaxHighlight( sal_Bool bNew );
|
||||
void BuildKontextMenu( PopupMenu *&pMenu );
|
||||
};
|
||||
|
||||
@@ -116,13 +116,13 @@ DBG_NAMEEX(TextEdit)
|
||||
class TextEdit : public DataEdit {
|
||||
|
||||
BreakpointWindow *pBreakpointWindow;
|
||||
BOOL bFileWasUTF8;
|
||||
BOOL bSaveAsUTF8;
|
||||
sal_Bool bFileWasUTF8;
|
||||
sal_Bool bSaveAsUTF8;
|
||||
|
||||
public:
|
||||
TextEdit( AppEdit*, const WinBits& );
|
||||
~TextEdit();
|
||||
void Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
|
||||
void Highlight( sal_uIntPtr nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
|
||||
TextEditImp& GetTextEditImp() { return aEdit; }
|
||||
|
||||
void SetBreakpointWindow( BreakpointWindow *pBPWindow ){ pBreakpointWindow = pBPWindow; }
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
|
||||
virtual void BuildKontextMenu( PopupMenu *&pMenu );
|
||||
|
||||
void SaveAsUTF8( BOOL bUTF8 ) { bSaveAsUTF8 = bUTF8; }
|
||||
void SaveAsUTF8( sal_Bool bUTF8 ) { bSaveAsUTF8 = bUTF8; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -169,11 +169,11 @@ namespace basic
|
||||
|
||||
@param _out_rStorage
|
||||
takes the storage upon successful return. Note that this might be <NULL/> even
|
||||
if <TRUE/> is returned. In this case, the document has not yet been saved.
|
||||
if <sal_True/> is returned. In this case, the document has not yet been saved.
|
||||
|
||||
@return
|
||||
<TRUE/> if the storage could be successfully retrieved (in which case
|
||||
<arg>_out_rStorage</arg> might or might not be <NULL/>), <FALSE/> otherwise.
|
||||
<sal_True/> if the storage could be successfully retrieved (in which case
|
||||
<arg>_out_rStorage</arg> might or might not be <NULL/>), <sal_False/> otherwise.
|
||||
In the latter case, processing this document should stop.
|
||||
*/
|
||||
bool impl_getDocumentStorage_nothrow( const Reference< XModel >& _rxDocument, Reference< XStorage >& _out_rStorage );
|
||||
@@ -190,7 +190,7 @@ namespace basic
|
||||
takes the dialog library container upon successful return
|
||||
|
||||
@return
|
||||
<TRUE/> if and only if both containers exist, and could successfully be retrieved
|
||||
<sal_True/> if and only if both containers exist, and could successfully be retrieved
|
||||
*/
|
||||
bool impl_getDocumentLibraryContainers_nothrow(
|
||||
const Reference< XModel >& _rxDocument,
|
||||
@@ -451,7 +451,7 @@ namespace basic
|
||||
SotStorageRef xDummyStor = new SotStorage( ::rtl::OUString() );
|
||||
_out_rpBasicManager = new BasicManager( *xDummyStor, String() /* TODO/LATER: xStorage */,
|
||||
pAppBasic,
|
||||
&aAppBasicDir, TRUE );
|
||||
&aAppBasicDir, sal_True );
|
||||
if ( _out_rpBasicManager->HasErrors() )
|
||||
{
|
||||
// handle errors
|
||||
@@ -477,7 +477,7 @@ namespace basic
|
||||
// create new BASIC-manager
|
||||
StarBASIC* pBasic = new StarBASIC( pAppBasic );
|
||||
pBasic->SetFlag( SBX_EXTSEARCH );
|
||||
_out_rpBasicManager = new BasicManager( pBasic, NULL, TRUE );
|
||||
_out_rpBasicManager = new BasicManager( pBasic, NULL, sal_True );
|
||||
}
|
||||
|
||||
// knit the containers with the BasicManager
|
||||
|
||||
+149
-149
@@ -90,15 +90,15 @@ typedef WeakImplHelper1< XStarBasicAccess > StarBasicAccessHelper;
|
||||
#define CURR_VER 2
|
||||
|
||||
// Version 1
|
||||
// ULONG nEndPos
|
||||
// USHORT nId
|
||||
// USHORT nVer
|
||||
// BOOL bDoLoad
|
||||
// sal_uIntPtr nEndPos
|
||||
// sal_uInt16 nId
|
||||
// sal_uInt16 nVer
|
||||
// sal_Bool bDoLoad
|
||||
// String LibName
|
||||
// String AbsStorageName
|
||||
// String RelStorageName
|
||||
// Version 2
|
||||
// + BOOL bReference
|
||||
// + sal_Bool bReference
|
||||
|
||||
static const char* szStdLibName = "Standard";
|
||||
static const char szBasicStorage[] = "StarBASIC";
|
||||
@@ -252,7 +252,7 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
|
||||
}
|
||||
}
|
||||
|
||||
pLib->SetModified( FALSE );
|
||||
pLib->SetModified( sal_False );
|
||||
}
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent
|
||||
}
|
||||
else
|
||||
pLib->MakeModule32( aName, aMod );
|
||||
pLib->SetModified( FALSE );
|
||||
pLib->SetModified( sal_False );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -344,7 +344,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const ContainerEvent
|
||||
else
|
||||
pLib->MakeModule32( aName, aMod );
|
||||
|
||||
pLib->SetModified( FALSE );
|
||||
pLib->SetModified( sal_False );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,8 +364,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent&
|
||||
StarBASIC* pLib = mpMgr->GetLib( aName );
|
||||
if( pLib )
|
||||
{
|
||||
USHORT nLibId = mpMgr->GetLibId( aName );
|
||||
mpMgr->RemoveLib( nLibId, FALSE );
|
||||
sal_uInt16 nLibId = mpMgr->GetLibId( aName );
|
||||
mpMgr->RemoveLib( nLibId, sal_False );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -375,7 +375,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent&
|
||||
if( pMod )
|
||||
{
|
||||
pLib->Remove( pMod );
|
||||
pLib->SetModified( FALSE );
|
||||
pLib->SetModified( sal_False );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,7 +394,7 @@ public:
|
||||
void Reset();
|
||||
void InsertError( const BasicError& rError );
|
||||
|
||||
BOOL HasErrors() { return (BOOL)aErrorList.Count(); }
|
||||
sal_Bool HasErrors() { return (sal_Bool)aErrorList.Count(); }
|
||||
BasicError* GetFirstError() { return aErrorList.First(); }
|
||||
BasicError* GetNextError() { return aErrorList.Next(); }
|
||||
};
|
||||
@@ -428,7 +428,7 @@ BasicError::BasicError()
|
||||
nReason = 0;
|
||||
}
|
||||
|
||||
BasicError::BasicError( ULONG nId, USHORT nR, const String& rErrStr ) :
|
||||
BasicError::BasicError( sal_uIntPtr nId, sal_uInt16 nR, const String& rErrStr ) :
|
||||
aErrStr( rErrStr )
|
||||
{
|
||||
nErrorId = nId;
|
||||
@@ -452,10 +452,10 @@ private:
|
||||
String aRelStorageName;
|
||||
String aPassword;
|
||||
|
||||
BOOL bDoLoad;
|
||||
BOOL bReference;
|
||||
BOOL bPasswordVerified;
|
||||
BOOL bFoundInPath; // Must not relativated again!
|
||||
sal_Bool bDoLoad;
|
||||
sal_Bool bReference;
|
||||
sal_Bool bPasswordVerified;
|
||||
sal_Bool bFoundInPath; // Must not relativated again!
|
||||
|
||||
// Lib represents library in new UNO library container
|
||||
Reference< XLibraryContainer > mxScriptCont;
|
||||
@@ -464,10 +464,10 @@ public:
|
||||
BasicLibInfo();
|
||||
BasicLibInfo( const String& rStorageName );
|
||||
|
||||
BOOL IsReference() const { return bReference; }
|
||||
BOOL& IsReference() { return bReference; }
|
||||
sal_Bool IsReference() const { return bReference; }
|
||||
sal_Bool& IsReference() { return bReference; }
|
||||
|
||||
BOOL IsExtern() const { return ! aStorageName.EqualsAscii(szImbedded); }
|
||||
sal_Bool IsExtern() const { return ! aStorageName.EqualsAscii(szImbedded); }
|
||||
|
||||
void SetStorageName( const String& rName ) { aStorageName = rName; }
|
||||
const String& GetStorageName() const { return aStorageName; }
|
||||
@@ -490,19 +490,19 @@ public:
|
||||
void SetLibName( const String& rName ) { aLibName = rName; }
|
||||
|
||||
// Only temporary for Load/Save
|
||||
BOOL DoLoad() { return bDoLoad; }
|
||||
sal_Bool DoLoad() { return bDoLoad; }
|
||||
|
||||
BOOL HasPassword() const { return aPassword.Len() != 0; }
|
||||
sal_Bool HasPassword() const { return aPassword.Len() != 0; }
|
||||
const String& GetPassword() const { return aPassword; }
|
||||
void SetPassword( const String& rNewPassword )
|
||||
{ aPassword = rNewPassword; }
|
||||
BOOL IsPasswordVerified() const { return bPasswordVerified; }
|
||||
void SetPasswordVerified() { bPasswordVerified = TRUE; }
|
||||
sal_Bool IsPasswordVerified() const { return bPasswordVerified; }
|
||||
void SetPasswordVerified() { bPasswordVerified = sal_True; }
|
||||
|
||||
BOOL IsFoundInPath() const { return bFoundInPath; }
|
||||
void SetFoundInPath( BOOL bInPath ) { bFoundInPath = bInPath; }
|
||||
sal_Bool IsFoundInPath() const { return bFoundInPath; }
|
||||
void SetFoundInPath( sal_Bool bInPath ) { bFoundInPath = bInPath; }
|
||||
|
||||
void Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, BOOL bUseOldReloadInfo );
|
||||
void Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, sal_Bool bUseOldReloadInfo );
|
||||
static BasicLibInfo* Create( SotStorageStream& rSStream );
|
||||
|
||||
Reference< XLibraryContainer > GetLibraryContainer( void )
|
||||
@@ -521,10 +521,10 @@ public:
|
||||
|
||||
BasicLibInfo::BasicLibInfo()
|
||||
{
|
||||
bReference = FALSE;
|
||||
bPasswordVerified = FALSE;
|
||||
bDoLoad = FALSE;
|
||||
bFoundInPath = FALSE;
|
||||
bReference = sal_False;
|
||||
bPasswordVerified = sal_False;
|
||||
bDoLoad = sal_False;
|
||||
bFoundInPath = sal_False;
|
||||
mxScriptCont = NULL;
|
||||
aStorageName = String::CreateFromAscii(szImbedded);
|
||||
aRelStorageName = String::CreateFromAscii(szImbedded);
|
||||
@@ -532,20 +532,20 @@ BasicLibInfo::BasicLibInfo()
|
||||
|
||||
BasicLibInfo::BasicLibInfo( const String& rStorageName )
|
||||
{
|
||||
bReference = TRUE;
|
||||
bPasswordVerified = FALSE;
|
||||
bDoLoad = FALSE;
|
||||
bReference = sal_True;
|
||||
bPasswordVerified = sal_False;
|
||||
bDoLoad = sal_False;
|
||||
mxScriptCont = NULL;
|
||||
aStorageName = rStorageName;
|
||||
}
|
||||
|
||||
void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, BOOL bUseOldReloadInfo )
|
||||
void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, sal_Bool bUseOldReloadInfo )
|
||||
{
|
||||
ULONG nStartPos = rSStream.Tell();
|
||||
sal_uIntPtr nStartPos = rSStream.Tell();
|
||||
sal_uInt32 nEndPos = 0;
|
||||
|
||||
USHORT nId = LIBINFO_ID;
|
||||
USHORT nVer = CURR_VER;
|
||||
sal_uInt16 nId = LIBINFO_ID;
|
||||
sal_uInt16 nVer = CURR_VER;
|
||||
|
||||
rSStream << nEndPos;
|
||||
rSStream << nId;
|
||||
@@ -559,7 +559,7 @@ void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStora
|
||||
aStorageName = aCurStorageName;
|
||||
|
||||
// Load again?
|
||||
BOOL bDoLoad_ = xLib.Is();
|
||||
sal_Bool bDoLoad_ = xLib.Is();
|
||||
if ( bUseOldReloadInfo )
|
||||
bDoLoad_ = DoLoad();
|
||||
rSStream << bDoLoad_;
|
||||
@@ -612,8 +612,8 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
|
||||
BasicLibInfo* pInfo = new BasicLibInfo;
|
||||
|
||||
sal_uInt32 nEndPos;
|
||||
USHORT nId;
|
||||
USHORT nVer;
|
||||
sal_uInt16 nId;
|
||||
sal_uInt16 nVer;
|
||||
|
||||
rSStream >> nEndPos;
|
||||
rSStream >> nId;
|
||||
@@ -623,7 +623,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
|
||||
if( nId == LIBINFO_ID )
|
||||
{
|
||||
// Reload?
|
||||
BOOL bDoLoad;
|
||||
sal_Bool bDoLoad;
|
||||
rSStream >> bDoLoad;
|
||||
pInfo->bDoLoad = bDoLoad;
|
||||
|
||||
@@ -644,7 +644,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
|
||||
|
||||
if ( nVer >= 2 )
|
||||
{
|
||||
BOOL bReferenz;
|
||||
sal_Bool bReferenz;
|
||||
rSStream >> bReferenz;
|
||||
pInfo->IsReference() = bReferenz;
|
||||
}
|
||||
@@ -667,7 +667,7 @@ void BasicLibInfo::CalcRelStorageName( const String& rMgrStorageName )
|
||||
else
|
||||
SetRelStorageName( String() );
|
||||
}
|
||||
BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib, String* pLibPath, BOOL bDocMgr ) : mbDocMgr( bDocMgr )
|
||||
BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib, String* pLibPath, sal_Bool bDocMgr ) : mbDocMgr( bDocMgr )
|
||||
{
|
||||
DBG_CTOR( BasicManager, 0 );
|
||||
|
||||
@@ -704,13 +704,13 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
|
||||
xStdLib->SetName( String::CreateFromAscii(szStdLibName) );
|
||||
pStdLibInfo->SetLibName( String::CreateFromAscii(szStdLibName) );
|
||||
xStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
|
||||
xStdLib->SetModified( FALSE );
|
||||
xStdLib->SetModified( sal_False );
|
||||
}
|
||||
else
|
||||
{
|
||||
pStdLib->SetParent( pParentFromStdLib );
|
||||
// The other get StdLib as parent:
|
||||
for ( USHORT nBasic = 1; nBasic < GetLibCount(); nBasic++ )
|
||||
for ( sal_uInt16 nBasic = 1; nBasic < GetLibCount(); nBasic++ )
|
||||
{
|
||||
StarBASIC* pBasic = GetLib( nBasic );
|
||||
if ( pBasic )
|
||||
@@ -721,7 +721,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
|
||||
}
|
||||
}
|
||||
// Modified through insert
|
||||
pStdLib->SetModified( FALSE );
|
||||
pStdLib->SetModified( sal_False );
|
||||
}
|
||||
|
||||
// #91626 Save all stream data to save it unmodified if basic isn't modified
|
||||
@@ -732,12 +732,12 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
|
||||
*static_cast<SvStream*>(&xManagerStream) >> *mpImpl->mpManagerStream;
|
||||
|
||||
SotStorageRef xBasicStorage = rStorage.OpenSotStorage
|
||||
( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, FALSE );
|
||||
( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, sal_False );
|
||||
if( xBasicStorage.Is() && !xBasicStorage->GetError() )
|
||||
{
|
||||
USHORT nLibs = GetLibCount();
|
||||
sal_uInt16 nLibs = GetLibCount();
|
||||
mpImpl->mppLibStreams = new SvMemoryStream*[ nLibs ];
|
||||
for( USHORT nL = 0; nL < nLibs; nL++ )
|
||||
for( sal_uInt16 nL = 0; nL < nLibs; nL++ )
|
||||
{
|
||||
BasicLibInfo* pInfo = pLibs->GetObject( nL );
|
||||
DBG_ASSERT( pInfo, "pInfo?!" );
|
||||
@@ -756,7 +756,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
|
||||
LoadOldBasicManager( rStorage );
|
||||
}
|
||||
|
||||
bBasMgrModified = FALSE;
|
||||
bBasMgrModified = sal_False;
|
||||
}
|
||||
|
||||
void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInfo )
|
||||
@@ -775,8 +775,8 @@ void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInf
|
||||
if ( !xLib.is() )
|
||||
return;
|
||||
|
||||
USHORT nModCount = pBasic->GetModules()->Count();
|
||||
for ( USHORT nMod = 0 ; nMod < nModCount ; nMod++ )
|
||||
sal_uInt16 nModCount = pBasic->GetModules()->Count();
|
||||
for ( sal_uInt16 nMod = 0 ; nMod < nModCount ; nMod++ )
|
||||
{
|
||||
SbModule* pModule = (SbModule*)pBasic->GetModules()->Get( nMod );
|
||||
DBG_ASSERT( pModule, "Modul nicht erhalten!" );
|
||||
@@ -840,14 +840,14 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
|
||||
else
|
||||
{
|
||||
// No libs? Maybe an 5.2 document already loaded
|
||||
USHORT nLibs = GetLibCount();
|
||||
for( USHORT nL = 0; nL < nLibs; nL++ )
|
||||
sal_uInt16 nLibs = GetLibCount();
|
||||
for( sal_uInt16 nL = 0; nL < nLibs; nL++ )
|
||||
{
|
||||
BasicLibInfo* pBasLibInfo = pLibs->GetObject( nL );
|
||||
StarBASIC* pLib = pBasLibInfo->GetLib();
|
||||
if( !pLib )
|
||||
{
|
||||
BOOL bLoaded = ImpLoadLibary( pBasLibInfo, NULL, FALSE );
|
||||
sal_Bool bLoaded = ImpLoadLibary( pBasLibInfo, NULL, sal_False );
|
||||
if( bLoaded )
|
||||
pLib = pBasLibInfo->GetLib();
|
||||
}
|
||||
@@ -876,7 +876,7 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
|
||||
SetGlobalUNOConstant( "DialogLibraries", makeAny( mpImpl->maContainerInfo.mxDialogCont ) );
|
||||
}
|
||||
|
||||
BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, BOOL bDocMgr ) : mbDocMgr( bDocMgr )
|
||||
BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, sal_Bool bDocMgr ) : mbDocMgr( bDocMgr )
|
||||
{
|
||||
DBG_CTOR( BasicManager, 0 );
|
||||
Init();
|
||||
@@ -893,8 +893,8 @@ BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, BOOL bDocMgr ) :
|
||||
pSLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
|
||||
|
||||
// Save is only necessary if basic has changed
|
||||
xStdLib->SetModified( FALSE );
|
||||
bBasMgrModified = FALSE;
|
||||
xStdLib->SetModified( sal_False );
|
||||
bBasMgrModified = sal_False;
|
||||
}
|
||||
|
||||
BasicManager::BasicManager()
|
||||
@@ -919,7 +919,7 @@ void BasicManager::ImpMgrNotLoaded( const String& rStorageName )
|
||||
xStdLib->SetName( String::CreateFromAscii(szStdLibName) );
|
||||
pStdLibInfo->SetLibName( String::CreateFromAscii(szStdLibName) );
|
||||
xStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
|
||||
xStdLib->SetModified( FALSE );
|
||||
xStdLib->SetModified( sal_False );
|
||||
}
|
||||
|
||||
|
||||
@@ -934,7 +934,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
|
||||
}
|
||||
|
||||
|
||||
void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, BOOL bLoadLibs )
|
||||
void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, sal_Bool bLoadLibs )
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -972,7 +972,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
|
||||
sal_uInt32 nEndPos;
|
||||
*xManagerStream >> nEndPos;
|
||||
|
||||
USHORT nLibs;
|
||||
sal_uInt16 nLibs;
|
||||
*xManagerStream >> nLibs;
|
||||
// Plausi!
|
||||
if( nLibs & 0xF000 )
|
||||
@@ -980,7 +980,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
|
||||
DBG_ASSERT( !this, "BasicManager-Stream defect!" );
|
||||
return;
|
||||
}
|
||||
for ( USHORT nL = 0; nL < nLibs; nL++ )
|
||||
for ( sal_uInt16 nL = 0; nL < nLibs; nL++ )
|
||||
{
|
||||
BasicLibInfo* pInfo = BasicLibInfo::Create( *xManagerStream );
|
||||
|
||||
@@ -990,7 +990,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
|
||||
{
|
||||
INetURLObject aObj( aRealStorageName, INET_PROT_FILE );
|
||||
aObj.removeSegment();
|
||||
bool bWasAbsolute = FALSE;
|
||||
bool bWasAbsolute = sal_False;
|
||||
aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute );
|
||||
|
||||
//*** TODO: Replace if still necessary
|
||||
@@ -1006,7 +1006,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
|
||||
if( aPathCFG.SearchFile( aSearchFile, SvtPathOptions::PATH_BASIC ) )
|
||||
{
|
||||
pInfo->SetStorageName( aSearchFile );
|
||||
pInfo->SetFoundInPath( TRUE );
|
||||
pInfo->SetFoundInPath( sal_True );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1071,8 +1071,8 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
|
||||
{
|
||||
String aCurStorageName( aStorName );
|
||||
INetURLObject aCurStorage( aCurStorageName, INET_PROT_FILE );
|
||||
USHORT nLibs = aLibs.GetTokenCount( LIB_SEP );
|
||||
for ( USHORT nLib = 0; nLib < nLibs; nLib++ )
|
||||
sal_uInt16 nLibs = aLibs.GetTokenCount( LIB_SEP );
|
||||
for ( sal_uInt16 nLib = 0; nLib < nLibs; nLib++ )
|
||||
{
|
||||
String aLibInfo( aLibs.GetToken( nLib, LIB_SEP ) );
|
||||
// TODO: Remove == 2
|
||||
@@ -1084,7 +1084,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
|
||||
|
||||
INetURLObject aLibRelStorage( aStorName );
|
||||
aLibRelStorage.removeSegment();
|
||||
bool bWasAbsolute = FALSE;
|
||||
bool bWasAbsolute = sal_False;
|
||||
aLibRelStorage = aLibRelStorage.smartRel2Abs( aLibRelStorageName, bWasAbsolute);
|
||||
DBG_ASSERT(!bWasAbsolute, "RelStorageName was absolute!" );
|
||||
|
||||
@@ -1093,14 +1093,14 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
|
||||
xStorageRef = &rStorage;
|
||||
else
|
||||
{
|
||||
xStorageRef = new SotStorage( FALSE, aLibAbsStorage.GetMainURL
|
||||
( INetURLObject::NO_DECODE ), eStorageReadMode, TRUE );
|
||||
xStorageRef = new SotStorage( sal_False, aLibAbsStorage.GetMainURL
|
||||
( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True );
|
||||
if ( xStorageRef->GetError() != ERRCODE_NONE )
|
||||
xStorageRef = new SotStorage( FALSE, aLibRelStorage.
|
||||
GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, TRUE );
|
||||
xStorageRef = new SotStorage( sal_False, aLibRelStorage.
|
||||
GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True );
|
||||
}
|
||||
if ( xStorageRef.Is() )
|
||||
AddLib( *xStorageRef, aLibName, FALSE );
|
||||
AddLib( *xStorageRef, aLibName, sal_False );
|
||||
else
|
||||
{
|
||||
// String aErrorText( BasicResId( IDS_SBERR_LIBLOAD ) );
|
||||
@@ -1143,7 +1143,7 @@ void BasicManager::Init()
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
bBasMgrModified = FALSE;
|
||||
bBasMgrModified = sal_False;
|
||||
pErrorMgr = new BasicErrorManager;
|
||||
pLibs = new BasicLibs;
|
||||
mpImpl = new BasicManagerImpl();
|
||||
@@ -1158,7 +1158,7 @@ BasicLibInfo* BasicManager::CreateLibInfo()
|
||||
return pInf;
|
||||
}
|
||||
|
||||
BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, BOOL bInfosOnly ) const
|
||||
sal_Bool BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, sal_Bool bInfosOnly ) const
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1186,10 +1186,10 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
|
||||
}
|
||||
|
||||
if ( !xStorage.Is() )
|
||||
xStorage = new SotStorage( FALSE, aStorageName, eStorageReadMode );
|
||||
xStorage = new SotStorage( sal_False, aStorageName, eStorageReadMode );
|
||||
|
||||
SotStorageRef xBasicStorage = xStorage->OpenSotStorage
|
||||
( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, FALSE );
|
||||
( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, sal_False );
|
||||
|
||||
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
|
||||
{
|
||||
@@ -1207,7 +1207,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL bLoaded = FALSE;
|
||||
sal_Bool bLoaded = sal_False;
|
||||
if ( xBasicStream->Seek( STREAM_SEEK_TO_END ) != 0 )
|
||||
{
|
||||
if ( !bInfosOnly )
|
||||
@@ -1220,7 +1220,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
|
||||
xBasicStream->SetBufferSize( 0 );
|
||||
StarBASICRef xStdLib = pLibInfo->GetLib();
|
||||
xStdLib->SetName( pLibInfo->GetLibName() );
|
||||
xStdLib->SetModified( FALSE );
|
||||
xStdLib->SetModified( sal_False );
|
||||
xStdLib->SetFlag( SBX_DONTSTORE );
|
||||
}
|
||||
else
|
||||
@@ -1229,7 +1229,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
|
||||
xBasicStream->Seek( STREAM_SEEK_TO_BEGIN );
|
||||
ImplEncryptStream( *xBasicStream );
|
||||
SbxBase::Skip( *xBasicStream );
|
||||
bLoaded = TRUE;
|
||||
bLoaded = sal_True;
|
||||
}
|
||||
}
|
||||
if ( !bLoaded )
|
||||
@@ -1256,20 +1256,20 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
|
||||
return bLoaded;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
BOOL BasicManager::ImplEncryptStream( SvStream& rStrm ) const
|
||||
sal_Bool BasicManager::ImplEncryptStream( SvStream& rStrm ) const
|
||||
{
|
||||
ULONG nPos = rStrm.Tell();
|
||||
UINT32 nCreator;
|
||||
sal_uIntPtr nPos = rStrm.Tell();
|
||||
sal_uInt32 nCreator;
|
||||
rStrm >> nCreator;
|
||||
rStrm.Seek( nPos );
|
||||
BOOL bProtected = FALSE;
|
||||
sal_Bool bProtected = sal_False;
|
||||
if ( nCreator != SBXCR_SBX )
|
||||
{
|
||||
// Should only be the case for encrypted Streams
|
||||
bProtected = TRUE;
|
||||
bProtected = sal_True;
|
||||
rStrm.SetKey( szCryptingKey );
|
||||
rStrm.RefreshBuffer();
|
||||
}
|
||||
@@ -1278,11 +1278,11 @@ BOOL BasicManager::ImplEncryptStream( SvStream& rStrm ) const
|
||||
|
||||
// This code is necessary to load the BASIC of Beta 1
|
||||
// TODO: Which Beta 1?
|
||||
BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const
|
||||
sal_Bool BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const
|
||||
{
|
||||
BOOL bProtected = ImplEncryptStream( rStrm );
|
||||
sal_Bool bProtected = ImplEncryptStream( rStrm );
|
||||
SbxBaseRef xNew = SbxBase::Load( rStrm );
|
||||
BOOL bLoaded = FALSE;
|
||||
sal_Bool bLoaded = sal_False;
|
||||
if( xNew.Is() )
|
||||
{
|
||||
if( xNew->IsA( TYPE(StarBASIC) ) )
|
||||
@@ -1308,8 +1308,8 @@ BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con
|
||||
rOldBasic->SetFlag( SBX_EXTSEARCH );
|
||||
}
|
||||
*/
|
||||
pNew->SetModified( FALSE );
|
||||
bLoaded = TRUE;
|
||||
pNew->SetModified( sal_False );
|
||||
bLoaded = sal_True;
|
||||
}
|
||||
}
|
||||
if ( bProtected )
|
||||
@@ -1317,14 +1317,14 @@ BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con
|
||||
return bLoaded;
|
||||
}
|
||||
|
||||
void BasicManager::CheckModules( StarBASIC* pLib, BOOL bReference ) const
|
||||
void BasicManager::CheckModules( StarBASIC* pLib, sal_Bool bReference ) const
|
||||
{
|
||||
if ( !pLib )
|
||||
return;
|
||||
|
||||
BOOL bModified = pLib->IsModified();
|
||||
sal_Bool bModified = pLib->IsModified();
|
||||
|
||||
for ( USHORT nMod = 0; nMod < pLib->GetModules()->Count(); nMod++ )
|
||||
for ( sal_uInt16 nMod = 0; nMod < pLib->GetModules()->Count(); nMod++ )
|
||||
{
|
||||
SbModule* pModule = (SbModule*)pLib->GetModules()->Get( nMod );
|
||||
DBG_ASSERT( pModule, "Modul nicht erhalten!" );
|
||||
@@ -1337,11 +1337,11 @@ void BasicManager::CheckModules( StarBASIC* pLib, BOOL bReference ) const
|
||||
if( !bModified && bReference )
|
||||
{
|
||||
DBG_ERROR( "Per Reference eingebundene Basic-Library ist nicht compiliert!" );
|
||||
pLib->SetModified( FALSE );
|
||||
pLib->SetModified( sal_False );
|
||||
}
|
||||
}
|
||||
|
||||
StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, BOOL bReference )
|
||||
StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, sal_Bool bReference )
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1359,12 +1359,12 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B
|
||||
// Use original name otherwise ImpLoadLibary failes...
|
||||
pLibInfo->SetLibName( rLibName );
|
||||
// Funktioniert so aber nicht, wenn Name doppelt
|
||||
// USHORT nLibId = GetLibId( rLibName );
|
||||
USHORT nLibId = (USHORT) pLibs->GetPos( pLibInfo );
|
||||
// sal_uInt16 nLibId = GetLibId( rLibName );
|
||||
sal_uInt16 nLibId = (sal_uInt16) pLibs->GetPos( pLibInfo );
|
||||
|
||||
// Set StorageName before load because it is compared with pCurStorage
|
||||
pLibInfo->SetStorageName( aStorageName );
|
||||
BOOL bLoaded = ImpLoadLibary( pLibInfo, &rStorage );
|
||||
sal_Bool bLoaded = ImpLoadLibary( pLibInfo, &rStorage );
|
||||
|
||||
if ( bLoaded )
|
||||
{
|
||||
@@ -1373,21 +1373,21 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B
|
||||
|
||||
if ( bReference )
|
||||
{
|
||||
pLibInfo->GetLib()->SetModified( FALSE ); // Don't save in this case
|
||||
pLibInfo->GetLib()->SetModified( sal_False ); // Don't save in this case
|
||||
pLibInfo->SetRelStorageName( String() );
|
||||
// pLibInfo->CalcRelStorageName( GetStorageName() );
|
||||
pLibInfo->IsReference() = TRUE;
|
||||
pLibInfo->IsReference() = sal_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
pLibInfo->GetLib()->SetModified( TRUE ); // Must be saved after Add!
|
||||
pLibInfo->GetLib()->SetModified( sal_True ); // Must be saved after Add!
|
||||
pLibInfo->SetStorageName( String::CreateFromAscii(szImbedded) ); // Save in BasicManager-Storage
|
||||
}
|
||||
bBasMgrModified = TRUE;
|
||||
bBasMgrModified = sal_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveLib( nLibId, FALSE );
|
||||
RemoveLib( nLibId, sal_False );
|
||||
pLibInfo = 0;
|
||||
}
|
||||
|
||||
@@ -1397,7 +1397,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL BasicManager::IsReference( USHORT nLib )
|
||||
sal_Bool BasicManager::IsReference( sal_uInt16 nLib )
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1406,16 +1406,16 @@ BOOL BasicManager::IsReference( USHORT nLib )
|
||||
if ( pLibInfo )
|
||||
return pLibInfo->IsReference();
|
||||
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
BOOL BasicManager::RemoveLib( USHORT nLib )
|
||||
sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib )
|
||||
{
|
||||
// Only pyhsical deletion if no reference
|
||||
return RemoveLib( nLib, !IsReference( nLib ) );
|
||||
}
|
||||
|
||||
BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
|
||||
sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage )
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
DBG_ASSERT( nLib, "Standard-Lib cannot be removed!" );
|
||||
@@ -1428,7 +1428,7 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
|
||||
// String aErrorText( BasicResId( IDS_SBERR_REMOVELIB ) );
|
||||
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, String(), ERRCODE_BUTTON_OK );
|
||||
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_STDLIB, pLibInfo->GetLibName() ) );
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
// If one of the streams cannot be opened, this is not an error,
|
||||
@@ -1438,14 +1438,14 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
|
||||
{
|
||||
SotStorageRef xStorage;
|
||||
if ( !pLibInfo->IsExtern() )
|
||||
xStorage = new SotStorage( FALSE, GetStorageName() );
|
||||
xStorage = new SotStorage( sal_False, GetStorageName() );
|
||||
else
|
||||
xStorage = new SotStorage( FALSE, pLibInfo->GetStorageName() );
|
||||
xStorage = new SotStorage( sal_False, pLibInfo->GetStorageName() );
|
||||
|
||||
if ( xStorage->IsStorage( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)) ) )
|
||||
{
|
||||
SotStorageRef xBasicStorage = xStorage->OpenSotStorage
|
||||
( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), STREAM_STD_READWRITE, FALSE );
|
||||
( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), STREAM_STD_READWRITE, sal_False );
|
||||
|
||||
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
|
||||
{
|
||||
@@ -1483,20 +1483,20 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
|
||||
}
|
||||
}
|
||||
}
|
||||
bBasMgrModified = TRUE;
|
||||
bBasMgrModified = sal_True;
|
||||
if ( pLibInfo->GetLib().Is() )
|
||||
GetStdLib()->Remove( pLibInfo->GetLib() );
|
||||
delete pLibs->Remove( pLibInfo );
|
||||
return TRUE; // Remove was successful, del unimportant
|
||||
return sal_True; // Remove was successful, del unimportant
|
||||
}
|
||||
|
||||
USHORT BasicManager::GetLibCount() const
|
||||
sal_uInt16 BasicManager::GetLibCount() const
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
return (USHORT)pLibs->Count();
|
||||
return (sal_uInt16)pLibs->Count();
|
||||
}
|
||||
|
||||
StarBASIC* BasicManager::GetLib( USHORT nLib ) const
|
||||
StarBASIC* BasicManager::GetLib( sal_uInt16 nLib ) const
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
BasicLibInfo* pInf = pLibs->GetObject( nLib );
|
||||
@@ -1528,7 +1528,7 @@ StarBASIC* BasicManager::GetLib( const String& rName ) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
USHORT BasicManager::GetLibId( const String& rName ) const
|
||||
sal_uInt16 BasicManager::GetLibId( const String& rName ) const
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1536,14 +1536,14 @@ USHORT BasicManager::GetLibId( const String& rName ) const
|
||||
while ( pInf )
|
||||
{
|
||||
if ( pInf->GetLibName().CompareIgnoreCaseToAscii( rName ) == COMPARE_EQUAL )
|
||||
return (USHORT)pLibs->GetCurPos();
|
||||
return (sal_uInt16)pLibs->GetCurPos();
|
||||
|
||||
pInf = pLibs->Next();
|
||||
}
|
||||
return LIB_NOTFOUND;
|
||||
}
|
||||
|
||||
BOOL BasicManager::HasLib( const String& rName ) const
|
||||
sal_Bool BasicManager::HasLib( const String& rName ) const
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1551,14 +1551,14 @@ BOOL BasicManager::HasLib( const String& rName ) const
|
||||
while ( pInf )
|
||||
{
|
||||
if ( pInf->GetLibName().CompareIgnoreCaseToAscii( rName ) == COMPARE_EQUAL )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
|
||||
pInf = pLibs->Next();
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
BOOL BasicManager::SetLibName( USHORT nLib, const String& rName )
|
||||
sal_Bool BasicManager::SetLibName( sal_uInt16 nLib, const String& rName )
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1571,15 +1571,15 @@ BOOL BasicManager::SetLibName( USHORT nLib, const String& rName )
|
||||
{
|
||||
StarBASICRef xStdLib = pLibInfo->GetLib();
|
||||
xStdLib->SetName( rName );
|
||||
xStdLib->SetModified( TRUE );
|
||||
xStdLib->SetModified( sal_True );
|
||||
}
|
||||
bBasMgrModified = TRUE;
|
||||
return TRUE;
|
||||
bBasMgrModified = sal_True;
|
||||
return sal_True;
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
String BasicManager::GetLibName( USHORT nLib )
|
||||
String BasicManager::GetLibName( sal_uInt16 nLib )
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1590,11 +1590,11 @@ String BasicManager::GetLibName( USHORT nLib )
|
||||
return String();
|
||||
}
|
||||
|
||||
BOOL BasicManager::LoadLib( USHORT nLib )
|
||||
sal_Bool BasicManager::LoadLib( sal_uInt16 nLib )
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
BOOL bDone = FALSE;
|
||||
sal_Bool bDone = sal_False;
|
||||
BasicLibInfo* pLibInfo = pLibs->GetObject( nLib );
|
||||
DBG_ASSERT( pLibInfo, "Lib?!" );
|
||||
if ( pLibInfo )
|
||||
@@ -1608,7 +1608,7 @@ BOOL BasicManager::LoadLib( USHORT nLib )
|
||||
}
|
||||
else
|
||||
{
|
||||
bDone = ImpLoadLibary( pLibInfo, NULL, FALSE );
|
||||
bDone = ImpLoadLibary( pLibInfo, NULL, sal_False );
|
||||
StarBASIC* pLib = GetLib( nLib );
|
||||
if ( pLib )
|
||||
{
|
||||
@@ -1654,17 +1654,17 @@ StarBASIC* BasicManager::CreateLib
|
||||
{
|
||||
if( LinkTargetURL.Len() != 0 )
|
||||
{
|
||||
SotStorageRef xStorage = new SotStorage( FALSE, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE );
|
||||
SotStorageRef xStorage = new SotStorage( sal_False, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE );
|
||||
if( !xStorage->GetError() )
|
||||
{
|
||||
pLib = AddLib( *xStorage, rLibName, TRUE );
|
||||
pLib = AddLib( *xStorage, rLibName, sal_True );
|
||||
|
||||
//if( !pLibInfo )
|
||||
//pLibInfo = FindLibInfo( pLib );
|
||||
//pLibInfo->SetStorageName( LinkTargetURL );
|
||||
//pLibInfo->GetLib()->SetModified( FALSE ); // Dann nicht speichern
|
||||
//pLibInfo->GetLib()->SetModified( sal_False ); // Dann nicht speichern
|
||||
//pLibInfo->SetRelStorageName( String() );
|
||||
//pLibInfo->IsReference() = TRUE;
|
||||
//pLibInfo->IsReference() = sal_True;
|
||||
}
|
||||
//else
|
||||
//Message?
|
||||
@@ -1720,16 +1720,16 @@ BasicLibInfo* BasicManager::FindLibInfo( StarBASIC* pBasic ) const
|
||||
}
|
||||
|
||||
|
||||
BOOL BasicManager::IsModified() const
|
||||
sal_Bool BasicManager::IsModified() const
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
if ( bBasMgrModified )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
return IsBasicModified();
|
||||
}
|
||||
|
||||
BOOL BasicManager::IsBasicModified() const
|
||||
sal_Bool BasicManager::IsBasicModified() const
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
|
||||
@@ -1737,17 +1737,17 @@ BOOL BasicManager::IsBasicModified() const
|
||||
while ( pInf )
|
||||
{
|
||||
if ( pInf->GetLib().Is() && pInf->GetLib()->IsModified() )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
|
||||
pInf = pLibs->Next();
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
void BasicManager::SetFlagToAllLibs( short nFlag, BOOL bSet ) const
|
||||
void BasicManager::SetFlagToAllLibs( short nFlag, sal_Bool bSet ) const
|
||||
{
|
||||
USHORT nLibs = GetLibCount();
|
||||
for ( USHORT nL = 0; nL < nLibs; nL++ )
|
||||
sal_uInt16 nLibs = GetLibCount();
|
||||
for ( sal_uInt16 nL = 0; nL < nLibs; nL++ )
|
||||
{
|
||||
BasicLibInfo* pInfo = pLibs->GetObject( nL );
|
||||
DBG_ASSERT( pInfo, "Info?!" );
|
||||
@@ -1762,7 +1762,7 @@ void BasicManager::SetFlagToAllLibs( short nFlag, BOOL bSet ) const
|
||||
}
|
||||
}
|
||||
|
||||
BOOL BasicManager::HasErrors()
|
||||
sal_Bool BasicManager::HasErrors()
|
||||
{
|
||||
DBG_CHKTHIS( BasicManager, 0 );
|
||||
return pErrorMgr->HasErrors();
|
||||
@@ -2021,10 +2021,10 @@ Sequence< ::rtl::OUString > ModuleContainer_Impl::getElementNames()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
SbxArray* pMods = mpLib ? mpLib->GetModules() : NULL;
|
||||
USHORT nMods = pMods ? pMods->Count() : 0;
|
||||
sal_uInt16 nMods = pMods ? pMods->Count() : 0;
|
||||
Sequence< ::rtl::OUString > aRetSeq( nMods );
|
||||
::rtl::OUString* pRetSeq = aRetSeq.getArray();
|
||||
for( USHORT i = 0 ; i < nMods ; i++ )
|
||||
for( sal_uInt16 i = 0 ; i < nMods ; i++ )
|
||||
{
|
||||
SbxVariable* pMod = pMods->Get( i );
|
||||
pRetSeq[i] = ::rtl::OUString( pMod->GetName() );
|
||||
@@ -2351,10 +2351,10 @@ Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
|
||||
Sequence< ::rtl::OUString > LibraryContainer_Impl::getElementNames()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
USHORT nLibs = mpMgr->GetLibCount();
|
||||
sal_uInt16 nLibs = mpMgr->GetLibCount();
|
||||
Sequence< ::rtl::OUString > aRetSeq( nLibs );
|
||||
::rtl::OUString* pRetSeq = aRetSeq.getArray();
|
||||
for( USHORT i = 0 ; i < nLibs ; i++ )
|
||||
for( sal_uInt16 i = 0 ; i < nLibs ; i++ )
|
||||
{
|
||||
pRetSeq[i] = ::rtl::OUString( mpMgr->GetLibName( i ) );
|
||||
}
|
||||
@@ -2391,7 +2391,7 @@ void LibraryContainer_Impl::removeByName( const ::rtl::OUString& Name )
|
||||
StarBASIC* pLib = mpMgr->GetLib( Name );
|
||||
if( !pLib )
|
||||
throw NoSuchElementException();
|
||||
USHORT nLibId = mpMgr->GetLibId( Name );
|
||||
sal_uInt16 nLibId = mpMgr->GetLibId( Name );
|
||||
mpMgr->RemoveLib( nLibId );
|
||||
}
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ static const char* _crlf()
|
||||
}
|
||||
|
||||
// This method exists because we want to load the file as own segment
|
||||
BOOL SbModule::Disassemble( String& rText )
|
||||
sal_Bool SbModule::Disassemble( String& rText )
|
||||
{
|
||||
rText.Erase();
|
||||
if( pImage )
|
||||
@@ -244,7 +244,7 @@ BOOL SbModule::Disassemble( String& rText )
|
||||
SbiDisas aDisas( this, pImage );
|
||||
aDisas.Disas( rText );
|
||||
}
|
||||
return BOOL( rText.Len() != 0 );
|
||||
return sal_Bool( rText.Len() != 0 );
|
||||
}
|
||||
|
||||
SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p )
|
||||
@@ -278,23 +278,23 @@ SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p )
|
||||
}
|
||||
nOff = 0;
|
||||
// Add the publics
|
||||
for( USHORT i = 0; i < pMod->GetMethods()->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pMod->GetMethods()->Count(); i++ )
|
||||
{
|
||||
SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
|
||||
if( pMeth )
|
||||
{
|
||||
USHORT nPos = (USHORT) (pMeth->GetId());
|
||||
sal_uInt16 nPos = (sal_uInt16) (pMeth->GetId());
|
||||
cLabels[ nPos >> 3 ] |= ( 1 << ( nPos & 7 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Read current opcode
|
||||
BOOL SbiDisas::Fetch()
|
||||
sal_Bool SbiDisas::Fetch()
|
||||
{
|
||||
nPC = nOff;
|
||||
if( nOff >= rImg.GetCodeSize() )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
const unsigned char* p = (const unsigned char*)( rImg.GetCode() + nOff );
|
||||
eOp = (SbiOpcode) ( *p++ & 0xFF );
|
||||
if( eOp <= SbOP0_END )
|
||||
@@ -302,29 +302,29 @@ BOOL SbiDisas::Fetch()
|
||||
nOp1 = nOp2 = 0;
|
||||
nParts = 1;
|
||||
nOff++;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
else if( eOp <= SbOP1_END )
|
||||
{
|
||||
nOff += 5;
|
||||
if( nOff > rImg.GetCodeSize() )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
|
||||
nParts = 2;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
else if( eOp <= SbOP2_END )
|
||||
{
|
||||
nOff += 9;
|
||||
if( nOff > rImg.GetCodeSize() )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
|
||||
nOp2 = *p++; nOp2 |= *p++ << 8; nOp2 |= *p++ << 16; nOp2 |= *p++ << 24;
|
||||
nParts = 3;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
void SbiDisas::Disas( SvStream& r )
|
||||
@@ -351,7 +351,7 @@ void SbiDisas::Disas( String& r )
|
||||
aText.ConvertLineEnd();
|
||||
}
|
||||
|
||||
BOOL SbiDisas::DisasLine( String& rText )
|
||||
sal_Bool SbiDisas::DisasLine( String& rText )
|
||||
{
|
||||
char cBuf[ 100 ];
|
||||
const char* pMask[] = {
|
||||
@@ -361,7 +361,7 @@ BOOL SbiDisas::DisasLine( String& rText )
|
||||
"%08" SAL_PRIXUINT32 " %02X %08X %08X " };
|
||||
rText.Erase();
|
||||
if( !Fetch() )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
#ifdef DBG_TRACE_BASIC
|
||||
String aTraceStr_STMNT;
|
||||
@@ -373,8 +373,8 @@ BOOL SbiDisas::DisasLine( String& rText )
|
||||
// Find line
|
||||
String aSource = rImg.aOUSource;
|
||||
nLine = nOp1;
|
||||
USHORT n = 0;
|
||||
USHORT l = (USHORT)nLine;
|
||||
sal_uInt16 n = 0;
|
||||
sal_uInt16 l = (sal_uInt16)nLine;
|
||||
while( --l ) {
|
||||
n = aSource.SearchAscii( "\n", n );
|
||||
if( n == STRING_NOTFOUND ) break;
|
||||
@@ -383,16 +383,16 @@ BOOL SbiDisas::DisasLine( String& rText )
|
||||
// Show position
|
||||
if( n != STRING_NOTFOUND )
|
||||
{
|
||||
USHORT n2 = aSource.SearchAscii( "\n", n );
|
||||
sal_uInt16 n2 = aSource.SearchAscii( "\n", n );
|
||||
if( n2 == STRING_NOTFOUND ) n2 = aSource.Len() - n;
|
||||
String s( aSource.Copy( n, n2 - n + 1 ) );
|
||||
BOOL bDone;
|
||||
sal_Bool bDone;
|
||||
do {
|
||||
bDone = TRUE;
|
||||
bDone = sal_True;
|
||||
n = s.Search( '\r' );
|
||||
if( n != STRING_NOTFOUND ) bDone = FALSE, s.Erase( n, 1 );
|
||||
if( n != STRING_NOTFOUND ) bDone = sal_False, s.Erase( n, 1 );
|
||||
n = s.Search( '\n' );
|
||||
if( n != STRING_NOTFOUND ) bDone = FALSE, s.Erase( n, 1 );
|
||||
if( n != STRING_NOTFOUND ) bDone = sal_False, s.Erase( n, 1 );
|
||||
} while( !bDone );
|
||||
// snprintf( cBuf, sizeof(cBuf), pMask[ 0 ], nPC );
|
||||
// rText += cBuf;
|
||||
@@ -412,7 +412,7 @@ BOOL SbiDisas::DisasLine( String& rText )
|
||||
{
|
||||
// Public?
|
||||
ByteString aByteMethName;
|
||||
for( USHORT i = 0; i < pMod->GetMethods()->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pMod->GetMethods()->Count(); i++ )
|
||||
{
|
||||
SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
|
||||
if( pMeth )
|
||||
@@ -442,7 +442,7 @@ BOOL SbiDisas::DisasLine( String& rText )
|
||||
rText += ':';
|
||||
rText.AppendAscii( _crlf() );
|
||||
}
|
||||
snprintf( cBuf, sizeof(cBuf), pMask[ nParts ], nPC, (USHORT) eOp, nOp1, nOp2 );
|
||||
snprintf( cBuf, sizeof(cBuf), pMask[ nParts ], nPC, (sal_uInt16) eOp, nOp1, nOp2 );
|
||||
|
||||
String aPCodeStr;
|
||||
aPCodeStr.AppendAscii( cBuf );
|
||||
@@ -466,13 +466,13 @@ BOOL SbiDisas::DisasLine( String& rText )
|
||||
dbg_RegisterTraceTextForPC( pMod, nPC, aTraceStr_STMNT, aPCodeStr );
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
// Read from StringPool
|
||||
void SbiDisas::StrOp( String& rText )
|
||||
{
|
||||
String aStr = rImg.GetString( (USHORT)nOp1 );
|
||||
String aStr = rImg.GetString( (sal_uInt16)nOp1 );
|
||||
ByteString aByteString( aStr, RTL_TEXTENCODING_ASCII_US );
|
||||
const char* p = aByteString.GetBuffer();
|
||||
if( p )
|
||||
@@ -484,7 +484,7 @@ void SbiDisas::StrOp( String& rText )
|
||||
else
|
||||
{
|
||||
rText.AppendAscii( "?String? " );
|
||||
rText += (USHORT)nOp1;
|
||||
rText += (sal_uInt16)nOp1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ void SbiDisas::ResumeOp( String& rText )
|
||||
}
|
||||
|
||||
// print Prompt
|
||||
// FALSE/TRUE
|
||||
// sal_False/TRUE
|
||||
void SbiDisas::PromptOp( String& rText )
|
||||
{
|
||||
if( nOp1 )
|
||||
@@ -570,16 +570,16 @@ void SbiDisas::CharOp( String& rText )
|
||||
rText += '\'';
|
||||
else
|
||||
rText.AppendAscii( "char " ),
|
||||
rText += (USHORT)nOp1;
|
||||
rText += (sal_uInt16)nOp1;
|
||||
}
|
||||
|
||||
// Print var: String-ID and type
|
||||
void SbiDisas::VarOp( String& rText )
|
||||
{
|
||||
rText += rImg.GetString( (USHORT)(nOp1 & 0x7FFF) );
|
||||
rText += rImg.GetString( (sal_uInt16)(nOp1 & 0x7FFF) );
|
||||
rText.AppendAscii( "\t; " );
|
||||
// The type
|
||||
UINT32 n = nOp1;
|
||||
sal_uInt32 n = nOp1;
|
||||
nOp1 = nOp2;
|
||||
TypeOp( rText );
|
||||
if( n & 0x8000 )
|
||||
@@ -589,7 +589,7 @@ void SbiDisas::VarOp( String& rText )
|
||||
// Define variable: String-ID and type
|
||||
void SbiDisas::VarDefOp( String& rText )
|
||||
{
|
||||
rText += rImg.GetString( (USHORT)(nOp1 & 0x7FFF) );
|
||||
rText += rImg.GetString( (sal_uInt16)(nOp1 & 0x7FFF) );
|
||||
rText.AppendAscii( "\t; " );
|
||||
// The Typ
|
||||
nOp1 = nOp2;
|
||||
@@ -602,7 +602,7 @@ void SbiDisas::OffOp( String& rText )
|
||||
rText += String::CreateFromInt32( nOp1 & 0x7FFF );
|
||||
rText.AppendAscii( "\t; " );
|
||||
// The type
|
||||
UINT32 n = nOp1;
|
||||
sal_uInt32 n = nOp1;
|
||||
nOp1 = nOp2;
|
||||
TypeOp( rText );
|
||||
if( n & 0x8000 )
|
||||
@@ -638,14 +638,14 @@ void SbiDisas::TypeOp( String& rText )
|
||||
else
|
||||
{
|
||||
rText.AppendAscii( "type " );
|
||||
rText += (USHORT)nOp1;
|
||||
rText += (sal_uInt16)nOp1;
|
||||
}
|
||||
}
|
||||
#ifdef HP9000
|
||||
#undef pTypes
|
||||
#endif
|
||||
|
||||
// TRUE-Label, condition Opcode
|
||||
// sal_True-Label, condition Opcode
|
||||
void SbiDisas::CaseOp( String& rText )
|
||||
{
|
||||
LblOp( rText );
|
||||
@@ -658,8 +658,8 @@ void SbiDisas::StmntOp( String& rText )
|
||||
{
|
||||
rText += String::CreateFromInt32( nOp1 );
|
||||
rText += ',';
|
||||
UINT32 nCol = nOp2 & 0xFF;
|
||||
UINT32 nFor = nOp2 / 0x100;
|
||||
sal_uInt32 nCol = nOp2 & 0xFF;
|
||||
sal_uInt32 nFor = nOp2 / 0x100;
|
||||
rText += String::CreateFromInt32( nCol );
|
||||
rText.AppendAscii( " (For-Level: " );
|
||||
rText += String::CreateFromInt32( nFor );
|
||||
|
||||
@@ -298,7 +298,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
|
||||
if( aName == aLibName )
|
||||
{
|
||||
// Search only in the lib, not automatically in application basic
|
||||
USHORT nFlags = pBasic->GetFlags();
|
||||
sal_uInt16 nFlags = pBasic->GetFlags();
|
||||
pBasic->ResetFlag( SBX_GBLSEARCH );
|
||||
pMethVar = pBasic->Find( aMacro, SbxCLASS_DONTCARE );
|
||||
pBasic->SetFlags( nFlags );
|
||||
@@ -328,7 +328,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
|
||||
{
|
||||
SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
|
||||
unoToSbxValue( (SbxVariable*)xVar, pArgs[i] );
|
||||
xArray->Put( xVar, sal::static_int_cast< USHORT >(i+1) );
|
||||
xArray->Put( xVar, sal::static_int_cast< sal_uInt16 >(i+1) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ static ::rtl::OUString aDecorationPropName =
|
||||
static ::rtl::OUString aTitlePropName =
|
||||
::rtl::OUString::createFromAscii( "Title" );
|
||||
|
||||
void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" );
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ SbiImage::SbiImage()
|
||||
nLegacyCodeSize =
|
||||
nDimBase = 0;
|
||||
bInit =
|
||||
bError = FALSE;
|
||||
bFirstInit = TRUE;
|
||||
bError = sal_False;
|
||||
bFirstInit = sal_True;
|
||||
eCharSet = gsl_getSystemTextEncoding();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ void SbiImage::Clear()
|
||||
nCodeSize = 0;
|
||||
eCharSet = gsl_getSystemTextEncoding();
|
||||
nDimBase = 0;
|
||||
bError = FALSE;
|
||||
bError = sal_False;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@@ -82,25 +82,25 @@ void SbiImage::Clear()
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
BOOL SbiGood( SvStream& r )
|
||||
sal_Bool SbiGood( SvStream& r )
|
||||
{
|
||||
return BOOL( !r.IsEof() && r.GetError() == SVSTREAM_OK );
|
||||
return sal_Bool( !r.IsEof() && r.GetError() == SVSTREAM_OK );
|
||||
}
|
||||
|
||||
// Open Record
|
||||
ULONG SbiOpenRecord( SvStream& r, UINT16 nSignature, UINT16 nElem )
|
||||
sal_uIntPtr SbiOpenRecord( SvStream& r, sal_uInt16 nSignature, sal_uInt16 nElem )
|
||||
{
|
||||
ULONG nPos = r.Tell();
|
||||
r << nSignature << (INT32) 0 << nElem;
|
||||
sal_uIntPtr nPos = r.Tell();
|
||||
r << nSignature << (sal_Int32) 0 << nElem;
|
||||
return nPos;
|
||||
}
|
||||
|
||||
// Close Record
|
||||
void SbiCloseRecord( SvStream& r, ULONG nOff )
|
||||
void SbiCloseRecord( SvStream& r, sal_uIntPtr nOff )
|
||||
{
|
||||
ULONG nPos = r.Tell();
|
||||
sal_uIntPtr nPos = r.Tell();
|
||||
r.Seek( nOff + 2 );
|
||||
r << (INT32) ( nPos - nOff - 8 );
|
||||
r << (sal_Int32) ( nPos - nOff - 8 );
|
||||
r.Seek( nPos );
|
||||
}
|
||||
|
||||
@@ -112,40 +112,40 @@ void SbiCloseRecord( SvStream& r, ULONG nOff )
|
||||
|
||||
// If the version number does not find, binary parts are omitted, but not
|
||||
// source, comments and name
|
||||
BOOL SbiImage::Load( SvStream& r )
|
||||
sal_Bool SbiImage::Load( SvStream& r )
|
||||
{
|
||||
UINT32 nVersion = 0; // Versionsnumber
|
||||
sal_uInt32 nVersion = 0; // Versionsnumber
|
||||
return Load( r, nVersion );
|
||||
}
|
||||
BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
|
||||
sal_Bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
|
||||
{
|
||||
|
||||
UINT16 nSign, nCount;
|
||||
UINT32 nLen, nOff;
|
||||
sal_uInt16 nSign, nCount;
|
||||
sal_uInt32 nLen, nOff;
|
||||
|
||||
Clear();
|
||||
// Read Master-Record
|
||||
r >> nSign >> nLen >> nCount;
|
||||
ULONG nLast = r.Tell() + nLen;
|
||||
UINT32 nCharSet; // System charset
|
||||
UINT32 lDimBase;
|
||||
UINT16 nReserved1;
|
||||
UINT32 nReserved2;
|
||||
UINT32 nReserved3;
|
||||
BOOL bBadVer = FALSE;
|
||||
sal_uIntPtr nLast = r.Tell() + nLen;
|
||||
sal_uInt32 nCharSet; // System charset
|
||||
sal_uInt32 lDimBase;
|
||||
sal_uInt16 nReserved1;
|
||||
sal_uInt32 nReserved2;
|
||||
sal_uInt32 nReserved3;
|
||||
sal_Bool bBadVer = sal_False;
|
||||
if( nSign == B_MODULE )
|
||||
{
|
||||
r >> nVersion >> nCharSet >> lDimBase
|
||||
>> nFlags >> nReserved1 >> nReserved2 >> nReserved3;
|
||||
eCharSet = (CharSet) nCharSet;
|
||||
eCharSet = GetSOLoadTextEncoding( eCharSet );
|
||||
bBadVer = BOOL( nVersion > B_CURVERSION );
|
||||
nDimBase = (USHORT) lDimBase;
|
||||
bBadVer = sal_Bool( nVersion > B_CURVERSION );
|
||||
nDimBase = (sal_uInt16) lDimBase;
|
||||
}
|
||||
|
||||
bool bLegacy = ( nVersion < B_EXT_IMG_VERSION );
|
||||
|
||||
ULONG nNext;
|
||||
sal_uIntPtr nNext;
|
||||
while( ( nNext = r.Tell() ) < nLast )
|
||||
{
|
||||
short i;
|
||||
@@ -174,7 +174,7 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
|
||||
#ifdef EXTENDED_BINARY_MODULES
|
||||
case B_EXTSOURCE:
|
||||
{
|
||||
for( UINT16 j = 0 ; j < nCount ; j++ )
|
||||
for( sal_uInt16 j = 0 ; j < nCount ; j++ )
|
||||
{
|
||||
String aTmp;
|
||||
r.ReadByteString( aTmp, eCharSet );
|
||||
@@ -191,10 +191,10 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
|
||||
if ( bLegacy )
|
||||
{
|
||||
ReleaseLegacyBuffer(); // release any previously held buffer
|
||||
nLegacyCodeSize = (UINT16) nCodeSize;
|
||||
nLegacyCodeSize = (sal_uInt16) nCodeSize;
|
||||
pLegacyPCode = pCode;
|
||||
|
||||
PCodeBuffConvertor< UINT16, UINT32 > aLegacyToNew( (BYTE*)pLegacyPCode, nLegacyCodeSize );
|
||||
PCodeBuffConvertor< sal_uInt16, sal_uInt32 > aLegacyToNew( (sal_uInt8*)pLegacyPCode, nLegacyCodeSize );
|
||||
aLegacyToNew.convert();
|
||||
pCode = (char*)aLegacyToNew.GetBuffer();
|
||||
nCodeSize = aLegacyToNew.GetSize();
|
||||
@@ -219,20 +219,20 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
|
||||
for( i = 0; i < nStrings && SbiGood( r ); i++ )
|
||||
{
|
||||
r >> nOff;
|
||||
pStringOff[ i ] = (USHORT) nOff;
|
||||
pStringOff[ i ] = (sal_uInt16) nOff;
|
||||
}
|
||||
r >> nLen;
|
||||
if( SbiGood( r ) )
|
||||
{
|
||||
delete [] pStrings;
|
||||
pStrings = new sal_Unicode[ nLen ];
|
||||
nStringSize = (USHORT) nLen;
|
||||
nStringSize = (sal_uInt16) nLen;
|
||||
|
||||
char* pByteStrings = new char[ nLen ];
|
||||
r.Read( pByteStrings, nStringSize );
|
||||
for( short j = 0; j < nStrings; j++ )
|
||||
{
|
||||
USHORT nOff2 = (USHORT) pStringOff[ j ];
|
||||
sal_uInt16 nOff2 = (sal_uInt16) pStringOff[ j ];
|
||||
String aStr( pByteStrings + nOff2, eCharSet );
|
||||
memcpy( pStrings + nOff2, aStr.GetBuffer(), (aStr.Len() + 1) * sizeof( sal_Unicode ) );
|
||||
}
|
||||
@@ -252,11 +252,11 @@ done:
|
||||
//if( eCharSet != ::GetSystemCharSet() )
|
||||
//ConvertStrings();
|
||||
if( !SbiGood( r ) )
|
||||
bError = TRUE;
|
||||
return BOOL( !bError );
|
||||
bError = sal_True;
|
||||
return sal_Bool( !bError );
|
||||
}
|
||||
|
||||
BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
|
||||
sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
|
||||
{
|
||||
bool bLegacy = ( nVer < B_EXT_IMG_VERSION );
|
||||
|
||||
@@ -267,23 +267,23 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
|
||||
SbiImage aEmptyImg;
|
||||
aEmptyImg.aName = aName;
|
||||
aEmptyImg.Save( r, B_LEGACYVERSION );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
// First of all the header
|
||||
ULONG nStart = SbiOpenRecord( r, B_MODULE, 1 );
|
||||
ULONG nPos;
|
||||
sal_uIntPtr nStart = SbiOpenRecord( r, B_MODULE, 1 );
|
||||
sal_uIntPtr nPos;
|
||||
|
||||
eCharSet = GetSOStoreTextEncoding( eCharSet );
|
||||
if ( bLegacy )
|
||||
r << (INT32) B_LEGACYVERSION;
|
||||
r << (sal_Int32) B_LEGACYVERSION;
|
||||
else
|
||||
r << (INT32) B_CURVERSION;
|
||||
r << (INT32) eCharSet
|
||||
<< (INT32) nDimBase
|
||||
<< (INT16) nFlags
|
||||
<< (INT16) 0
|
||||
<< (INT32) 0
|
||||
<< (INT32) 0;
|
||||
r << (sal_Int32) B_CURVERSION;
|
||||
r << (sal_Int32) eCharSet
|
||||
<< (sal_Int32) nDimBase
|
||||
<< (sal_Int16) nFlags
|
||||
<< (sal_Int16) 0
|
||||
<< (sal_Int32) 0
|
||||
<< (sal_Int32) 0;
|
||||
|
||||
// Name?
|
||||
if( aName.Len() && SbiGood( r ) )
|
||||
@@ -320,9 +320,9 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
|
||||
if( nLen > STRING_MAXLEN )
|
||||
{
|
||||
sal_Int32 nRemainingLen = nLen - nMaxUnitSize;
|
||||
UINT16 nUnitCount = UINT16( (nRemainingLen + nMaxUnitSize - 1) / nMaxUnitSize );
|
||||
sal_uInt16 nUnitCount = sal_uInt16( (nRemainingLen + nMaxUnitSize - 1) / nMaxUnitSize );
|
||||
nPos = SbiOpenRecord( r, B_EXTSOURCE, nUnitCount );
|
||||
for( UINT16 i = 0 ; i < nUnitCount ; i++ )
|
||||
for( sal_uInt16 i = 0 ; i < nUnitCount ; i++ )
|
||||
{
|
||||
sal_Int32 nCopyLen =
|
||||
(nRemainingLen > nMaxUnitSize) ? nMaxUnitSize : nRemainingLen;
|
||||
@@ -341,7 +341,7 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
|
||||
if ( bLegacy )
|
||||
{
|
||||
ReleaseLegacyBuffer(); // release any previously held buffer
|
||||
PCodeBuffConvertor< UINT32, UINT16 > aNewToLegacy( (BYTE*)pCode, nCodeSize );
|
||||
PCodeBuffConvertor< sal_uInt32, sal_uInt16 > aNewToLegacy( (sal_uInt8*)pCode, nCodeSize );
|
||||
aNewToLegacy.convert();
|
||||
pLegacyPCode = (char*)aNewToLegacy.GetBuffer();
|
||||
nLegacyCodeSize = aNewToLegacy.GetSize();
|
||||
@@ -356,21 +356,21 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
|
||||
{
|
||||
nPos = SbiOpenRecord( r, B_STRINGPOOL, nStrings );
|
||||
// For every String:
|
||||
// UINT32 Offset of the Strings in the Stringblock
|
||||
// sal_uInt32 Offset of the Strings in the Stringblock
|
||||
short i;
|
||||
|
||||
for( i = 0; i < nStrings && SbiGood( r ); i++ )
|
||||
r << (UINT32) pStringOff[ i ];
|
||||
r << (sal_uInt32) pStringOff[ i ];
|
||||
|
||||
// Then the String-Block
|
||||
char* pByteStrings = new char[ nStringSize ];
|
||||
for( i = 0; i < nStrings; i++ )
|
||||
{
|
||||
USHORT nOff = (USHORT) pStringOff[ i ];
|
||||
sal_uInt16 nOff = (sal_uInt16) pStringOff[ i ];
|
||||
ByteString aStr( pStrings + nOff, eCharSet );
|
||||
memcpy( pByteStrings + nOff, aStr.GetBuffer(), (aStr.Len() + 1) * sizeof( char ) );
|
||||
}
|
||||
r << (UINT32) nStringSize;
|
||||
r << (sal_uInt32) nStringSize;
|
||||
r.Write( pByteStrings, nStringSize );
|
||||
|
||||
delete[] pByteStrings;
|
||||
@@ -379,8 +379,8 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
|
||||
// Set overall length
|
||||
SbiCloseRecord( r, nStart );
|
||||
if( !SbiGood( r ) )
|
||||
bError = TRUE;
|
||||
return BOOL( !bError );
|
||||
bError = sal_True;
|
||||
return sal_Bool( !bError );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@@ -396,15 +396,15 @@ void SbiImage::MakeStrings( short nSize )
|
||||
nStringOff = 0;
|
||||
nStringSize = 1024;
|
||||
pStrings = new sal_Unicode[ nStringSize ];
|
||||
pStringOff = new UINT32[ nSize ];
|
||||
pStringOff = new sal_uInt32[ nSize ];
|
||||
if( pStrings && pStringOff )
|
||||
{
|
||||
nStrings = nSize;
|
||||
memset( pStringOff, 0, nSize * sizeof( UINT32 ) );
|
||||
memset( pStringOff, 0, nSize * sizeof( sal_uInt32 ) );
|
||||
memset( pStrings, 0, nStringSize * sizeof( sal_Unicode ) );
|
||||
}
|
||||
else
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
|
||||
// Hinzufuegen eines Strings an den StringPool. Der String-Puffer
|
||||
@@ -414,16 +414,16 @@ void SbiImage::MakeStrings( short nSize )
|
||||
void SbiImage::AddString( const String& r )
|
||||
{
|
||||
if( nStringIdx >= nStrings )
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
if( !bError )
|
||||
{
|
||||
xub_StrLen len = r.Len() + 1;
|
||||
UINT32 needed = nStringOff + len;
|
||||
sal_uInt32 needed = nStringOff + len;
|
||||
if( needed > 0xFFFFFF00L )
|
||||
bError = TRUE; // out of mem!
|
||||
bError = sal_True; // out of mem!
|
||||
else if( needed > nStringSize )
|
||||
{
|
||||
UINT32 nNewLen = needed + 1024;
|
||||
sal_uInt32 nNewLen = needed + 1024;
|
||||
nNewLen &= 0xFFFFFC00; // trim to 1K border
|
||||
if( nNewLen > 0xFFFFFF00L )
|
||||
nNewLen = 0xFFFFFF00L;
|
||||
@@ -433,10 +433,10 @@ void SbiImage::AddString( const String& r )
|
||||
memcpy( p, pStrings, nStringSize * sizeof( sal_Unicode ) );
|
||||
delete[] pStrings;
|
||||
pStrings = p;
|
||||
nStringSize = sal::static_int_cast< UINT16 >(nNewLen);
|
||||
nStringSize = sal::static_int_cast< sal_uInt16 >(nNewLen);
|
||||
}
|
||||
else
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
if( !bError )
|
||||
{
|
||||
@@ -455,7 +455,7 @@ void SbiImage::AddString( const String& r )
|
||||
// The block was fetched by the compiler from class SbBuffer and
|
||||
// is already created with new. Additionally it contains all Integers
|
||||
// in Big Endian format, so can be directly read/written.
|
||||
void SbiImage::AddCode( char* p, UINT32 s )
|
||||
void SbiImage::AddCode( char* p, sal_uInt32 s )
|
||||
{
|
||||
pCode = p;
|
||||
nCodeSize = s;
|
||||
@@ -489,14 +489,14 @@ String SbiImage::GetString( short nId ) const
|
||||
{
|
||||
if( nId && nId <= nStrings )
|
||||
{
|
||||
UINT32 nOff = pStringOff[ nId - 1 ];
|
||||
sal_uInt32 nOff = pStringOff[ nId - 1 ];
|
||||
sal_Unicode* pStr = pStrings + nOff;
|
||||
|
||||
// #i42467: Special treatment for vbNullChar
|
||||
if( *pStr == 0 )
|
||||
{
|
||||
UINT32 nNextOff = (nId < nStrings) ? pStringOff[ nId ] : nStringOff;
|
||||
UINT32 nLen = nNextOff - nOff - 1;
|
||||
sal_uInt32 nNextOff = (nId < nStrings) ? pStringOff[ nId ] : nStringOff;
|
||||
sal_uInt32 nLen = nNextOff - nOff - 1;
|
||||
if( nLen == 1 )
|
||||
{
|
||||
// Force length 1 and make char 0 afterwards
|
||||
@@ -519,14 +519,14 @@ const SbxObject* SbiImage::FindType (String aTypeName) const
|
||||
return rTypes.Is() ? (SbxObject*)rTypes->Find(aTypeName,SbxCLASS_OBJECT) : NULL;
|
||||
}
|
||||
|
||||
UINT16 SbiImage::CalcLegacyOffset( INT32 nOffset )
|
||||
sal_uInt16 SbiImage::CalcLegacyOffset( sal_Int32 nOffset )
|
||||
{
|
||||
return SbiCodeGen::calcLegacyOffSet( (BYTE*)pCode, nOffset ) ;
|
||||
return SbiCodeGen::calcLegacyOffSet( (sal_uInt8*)pCode, nOffset ) ;
|
||||
}
|
||||
|
||||
UINT32 SbiImage::CalcNewOffset( INT16 nOffset )
|
||||
sal_uInt32 SbiImage::CalcNewOffset( sal_Int16 nOffset )
|
||||
{
|
||||
return SbiCodeGen::calcNewOffSet( (BYTE*)pLegacyPCode, nOffset ) ;
|
||||
return SbiCodeGen::calcNewOffSet( (sal_uInt8*)pLegacyPCode, nOffset ) ;
|
||||
}
|
||||
|
||||
void SbiImage::ReleaseLegacyBuffer()
|
||||
@@ -536,9 +536,9 @@ void SbiImage::ReleaseLegacyBuffer()
|
||||
nLegacyCodeSize = 0;
|
||||
}
|
||||
|
||||
BOOL SbiImage::ExceedsLegacyLimits()
|
||||
sal_Bool SbiImage::ExceedsLegacyLimits()
|
||||
{
|
||||
if ( ( nStringSize > 0xFF00L ) || ( CalcLegacyOffset( nCodeSize ) > 0xFF00L ) )
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return sal_True;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ SbPropertyValues::~SbPropertyValues()
|
||||
{
|
||||
_xInfo = Reference< XPropertySetInfo >();
|
||||
|
||||
for ( USHORT n = 0; n < _aPropVals.Count(); ++n )
|
||||
for ( sal_uInt16 n = 0; n < _aPropVals.Count(); ++n )
|
||||
delete _aPropVals.GetObject( n );
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ Reference< XPropertySetInfo > SbPropertyValues::getPropertySetInfo(void) throw(
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
INT32 SbPropertyValues::GetIndex_Impl( const ::rtl::OUString &rPropName ) const
|
||||
sal_Int32 SbPropertyValues::GetIndex_Impl( const ::rtl::OUString &rPropName ) const
|
||||
{
|
||||
PropertyValue **ppPV;
|
||||
ppPV = (PropertyValue **)
|
||||
@@ -133,9 +133,9 @@ void SbPropertyValues::setPropertyValue(
|
||||
::com::sun::star::lang::WrappedTargetException,
|
||||
::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
INT32 nIndex = GetIndex_Impl( aPropertyName );
|
||||
sal_Int32 nIndex = GetIndex_Impl( aPropertyName );
|
||||
PropertyValue *pPropVal = _aPropVals.GetObject(
|
||||
sal::static_int_cast< USHORT >(nIndex));
|
||||
sal::static_int_cast< sal_uInt16 >(nIndex));
|
||||
pPropVal->Value = aValue;
|
||||
}
|
||||
|
||||
@@ -147,10 +147,10 @@ Any SbPropertyValues::getPropertyValue(
|
||||
::com::sun::star::lang::WrappedTargetException,
|
||||
::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
INT32 nIndex = GetIndex_Impl( aPropertyName );
|
||||
sal_Int32 nIndex = GetIndex_Impl( aPropertyName );
|
||||
if ( nIndex != USHRT_MAX )
|
||||
return _aPropVals.GetObject(
|
||||
sal::static_int_cast< USHORT >(nIndex))->Value;
|
||||
sal::static_int_cast< sal_uInt16 >(nIndex))->Value;
|
||||
return Any();
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void SbPropertyValues::removeVetoableChangeListener(
|
||||
Sequence< PropertyValue > SbPropertyValues::getPropertyValues(void) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
Sequence<PropertyValue> aRet( _aPropVals.Count());
|
||||
for ( USHORT n = 0; n < _aPropVals.Count(); ++n )
|
||||
for ( sal_uInt16 n = 0; n < _aPropVals.Count(); ++n )
|
||||
aRet.getArray()[n] = *_aPropVals.GetObject(n);
|
||||
return aRet;
|
||||
}
|
||||
@@ -231,14 +231,14 @@ PropertySetInfoImpl::PropertySetInfoImpl()
|
||||
{
|
||||
}
|
||||
|
||||
INT32 PropertySetInfoImpl::GetIndex_Impl( const ::rtl::OUString &rPropName ) const
|
||||
sal_Int32 PropertySetInfoImpl::GetIndex_Impl( const ::rtl::OUString &rPropName ) const
|
||||
{
|
||||
Property *pP;
|
||||
pP = (Property*)
|
||||
bsearch( &rPropName, _aProps.getConstArray(), _aProps.getLength(),
|
||||
sizeof( Property ),
|
||||
SbCompare_UString_Property_Impl );
|
||||
return pP ? sal::static_int_cast<INT32>( (pP-_aProps.getConstArray()) / sizeof(pP) ) : -1;
|
||||
return pP ? sal::static_int_cast<sal_Int32>( (pP-_aProps.getConstArray()) / sizeof(pP) ) : -1;
|
||||
}
|
||||
|
||||
Sequence< Property > PropertySetInfoImpl::getProperties(void) throw()
|
||||
@@ -272,7 +272,7 @@ SbPropertySetInfo::SbPropertySetInfo()
|
||||
SbPropertySetInfo::SbPropertySetInfo( const SbPropertyValueArr_Impl &rPropVals )
|
||||
{
|
||||
aImpl._aProps.realloc( rPropVals.Count() );
|
||||
for ( USHORT n = 0; n < rPropVals.Count(); ++n )
|
||||
for ( sal_uInt16 n = 0; n < rPropVals.Count(); ++n )
|
||||
{
|
||||
Property &rProp = aImpl._aProps.getArray()[n];
|
||||
const PropertyValue &rPropVal = *rPropVals.GetObject(n);
|
||||
@@ -302,7 +302,7 @@ Property SbPropertySetInfo::getPropertyByName(const ::rtl::OUString& Name)
|
||||
return aImpl.getPropertyByName( Name );
|
||||
}
|
||||
|
||||
BOOL SbPropertySetInfo::hasPropertyByName(const ::rtl::OUString& Name)
|
||||
sal_Bool SbPropertySetInfo::hasPropertyByName(const ::rtl::OUString& Name)
|
||||
throw( RuntimeException )
|
||||
{
|
||||
return aImpl.hasPropertyByName( Name );
|
||||
@@ -323,7 +323,7 @@ SbPropertyContainer::~SbPropertyContainer()
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void SbPropertyContainer::addProperty(const ::rtl::OUString& Name,
|
||||
INT16 Attributes,
|
||||
sal_Int16 Attributes,
|
||||
const Any& DefaultValue)
|
||||
throw( PropertyExistException, IllegalTypeException,
|
||||
IllegalArgumentException, RuntimeException )
|
||||
@@ -353,7 +353,7 @@ Property SbPropertyContainer::getPropertyByName(const ::rtl::OUString& Name)
|
||||
return aImpl.getPropertyByName( Name );
|
||||
}
|
||||
|
||||
BOOL SbPropertyContainer::hasPropertyByName(const ::rtl::OUString& Name)
|
||||
sal_Bool SbPropertyContainer::hasPropertyByName(const ::rtl::OUString& Name)
|
||||
throw( RuntimeException )
|
||||
{
|
||||
return aImpl.hasPropertyByName( Name );
|
||||
@@ -375,7 +375,7 @@ void SbPropertyContainer::setPropertyValues(const Sequence< PropertyValue >& Pro
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
+144
-144
@@ -119,7 +119,7 @@ SbxVariable* StarBASIC::VBAFind( const String& rName, SbxClassType t )
|
||||
// Create array for conversion SFX <-> VB error code
|
||||
struct SFX_VB_ErrorItem
|
||||
{
|
||||
USHORT nErrorVB;
|
||||
sal_uInt16 nErrorVB;
|
||||
SbError nErrorSFX;
|
||||
};
|
||||
|
||||
@@ -255,7 +255,7 @@ const SFX_VB_ErrorItem __FAR_DATA SFX_VB_ErrorTab[] =
|
||||
// the Modul-relationshop. But it works only when a modul is loaded.
|
||||
// Can cause troubles with separately loaded properties!
|
||||
|
||||
SbxBase* SbiFactory::Create( UINT16 nSbxId, UINT32 nCreator )
|
||||
SbxBase* SbiFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator )
|
||||
{
|
||||
if( nCreator == SBXCR_SBX )
|
||||
{
|
||||
@@ -304,11 +304,11 @@ SbxObject* SbiFactory::CreateObject( const String& rClass )
|
||||
class SbOLEFactory : public SbxFactory
|
||||
{
|
||||
public:
|
||||
virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
|
||||
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
|
||||
virtual SbxObject* CreateObject( const String& );
|
||||
};
|
||||
|
||||
SbxBase* SbOLEFactory::Create( UINT16, UINT32 )
|
||||
SbxBase* SbOLEFactory::Create( sal_uInt16, sal_uInt32 )
|
||||
{
|
||||
// Not supported
|
||||
return NULL;
|
||||
@@ -329,11 +329,11 @@ SbxObject* SbOLEFactory::CreateObject( const String& rClassName )
|
||||
class SbFormFactory : public SbxFactory
|
||||
{
|
||||
public:
|
||||
virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
|
||||
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
|
||||
virtual SbxObject* CreateObject( const String& );
|
||||
};
|
||||
|
||||
SbxBase* SbFormFactory::Create( UINT16, UINT32 )
|
||||
SbxBase* SbFormFactory::Create( sal_uInt16, sal_uInt32 )
|
||||
{
|
||||
// Not supported
|
||||
return NULL;
|
||||
@@ -377,8 +377,8 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
|
||||
|
||||
// Copy the properties, not only the reference to them
|
||||
SbxArray* pProps = pRet->GetProperties();
|
||||
UINT32 nCount = pProps->Count32();
|
||||
for( UINT32 i = 0 ; i < nCount ; i++ )
|
||||
sal_uInt32 nCount = pProps->Count32();
|
||||
for( sal_uInt32 i = 0 ; i < nCount ; i++ )
|
||||
{
|
||||
SbxVariable* pVar = pProps->Get32( i );
|
||||
SbxProperty* pProp = PTR_CAST( SbxProperty, pVar );
|
||||
@@ -391,22 +391,22 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
|
||||
SbxBase* pParObj = pVar->GetObject();
|
||||
SbxDimArray* pSource = PTR_CAST(SbxDimArray,pParObj);
|
||||
SbxDimArray* pDest = new SbxDimArray( pVar->GetType() );
|
||||
INT32 lb = 0;
|
||||
INT32 ub = 0;
|
||||
sal_Int32 lb = 0;
|
||||
sal_Int32 ub = 0;
|
||||
|
||||
pDest->setHasFixedSize( pSource->hasFixedSize() );
|
||||
if ( pSource->GetDims() && pSource->hasFixedSize() )
|
||||
{
|
||||
for ( INT32 j = 1 ; j <= pSource->GetDims(); ++j )
|
||||
for ( sal_Int32 j = 1 ; j <= pSource->GetDims(); ++j )
|
||||
{
|
||||
pSource->GetDim32( (INT32)j, lb, ub );
|
||||
pSource->GetDim32( (sal_Int32)j, lb, ub );
|
||||
pDest->AddDim32( lb, ub );
|
||||
}
|
||||
}
|
||||
else
|
||||
pDest->unoAddDim( 0, -1 ); // variant array
|
||||
|
||||
USHORT nSavFlags = pVar->GetFlags();
|
||||
sal_uInt16 nSavFlags = pVar->GetFlags();
|
||||
pNewProp->ResetFlag( SBX_FIXED );
|
||||
// need to reset the FIXED flag
|
||||
// when calling PutObject ( because the type will not match Object )
|
||||
@@ -432,11 +432,11 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
|
||||
class SbTypeFactory : public SbxFactory
|
||||
{
|
||||
public:
|
||||
virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
|
||||
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
|
||||
virtual SbxObject* CreateObject( const String& );
|
||||
};
|
||||
|
||||
SbxBase* SbTypeFactory::Create( UINT16, UINT32 )
|
||||
SbxBase* SbTypeFactory::Create( sal_uInt16, sal_uInt32 )
|
||||
{
|
||||
// Not supported
|
||||
return NULL;
|
||||
@@ -480,8 +480,8 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
|
||||
|
||||
// Copy the methods from original class module
|
||||
SbxArray* pClassMethods = pClassModule->GetMethods();
|
||||
UINT32 nMethodCount = pClassMethods->Count32();
|
||||
UINT32 i;
|
||||
sal_uInt32 nMethodCount = pClassMethods->Count32();
|
||||
sal_uInt32 i;
|
||||
for( i = 0 ; i < nMethodCount ; i++ )
|
||||
{
|
||||
SbxVariable* pVar = pClassMethods->Get32( i );
|
||||
@@ -493,7 +493,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
|
||||
SbMethod* pMethod = PTR_CAST(SbMethod, pVar );
|
||||
if( pMethod )
|
||||
{
|
||||
USHORT nFlags_ = pMethod->GetFlags();
|
||||
sal_uInt16 nFlags_ = pMethod->GetFlags();
|
||||
pMethod->SetFlag( SBX_NO_BROADCAST );
|
||||
SbMethod* pNewMethod = new SbMethod( *pMethod );
|
||||
pNewMethod->ResetFlag( SBX_NO_BROADCAST );
|
||||
@@ -501,7 +501,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
|
||||
pNewMethod->pMod = this;
|
||||
pNewMethod->SetParent( this );
|
||||
pMethods->PutDirect( pNewMethod, i );
|
||||
StartListening( pNewMethod->GetBroadcaster(), TRUE );
|
||||
StartListening( pNewMethod->GetBroadcaster(), sal_True );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -539,14 +539,14 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
|
||||
|
||||
// Copy the properties from original class module
|
||||
SbxArray* pClassProps = pClassModule->GetProperties();
|
||||
UINT32 nPropertyCount = pClassProps->Count32();
|
||||
sal_uInt32 nPropertyCount = pClassProps->Count32();
|
||||
for( i = 0 ; i < nPropertyCount ; i++ )
|
||||
{
|
||||
SbxVariable* pVar = pClassProps->Get32( i );
|
||||
SbProcedureProperty* pProcedureProp = PTR_CAST( SbProcedureProperty, pVar );
|
||||
if( pProcedureProp )
|
||||
{
|
||||
USHORT nFlags_ = pProcedureProp->GetFlags();
|
||||
sal_uInt16 nFlags_ = pProcedureProp->GetFlags();
|
||||
pProcedureProp->SetFlag( SBX_NO_BROADCAST );
|
||||
SbProcedureProperty* pNewProp = new SbProcedureProperty
|
||||
( pProcedureProp->GetName(), pProcedureProp->GetType() );
|
||||
@@ -555,14 +555,14 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
|
||||
pNewProp->ResetFlag( SBX_NO_BROADCAST ); // except the Broadcast if it was set
|
||||
pProcedureProp->SetFlags( nFlags_ );
|
||||
pProps->PutDirect( pNewProp, i );
|
||||
StartListening( pNewProp->GetBroadcaster(), TRUE );
|
||||
StartListening( pNewProp->GetBroadcaster(), sal_True );
|
||||
}
|
||||
else
|
||||
{
|
||||
SbxProperty* pProp = PTR_CAST( SbxProperty, pVar );
|
||||
if( pProp )
|
||||
{
|
||||
USHORT nFlags_ = pProp->GetFlags();
|
||||
sal_uInt16 nFlags_ = pProp->GetFlags();
|
||||
pProp->SetFlag( SBX_NO_BROADCAST );
|
||||
SbxProperty* pNewProp = new SbxProperty( *pProp );
|
||||
|
||||
@@ -709,7 +709,7 @@ void SbClassFactory::RemoveClassModule( SbModule* pClassModule )
|
||||
xClassModules->Remove( pClassModule );
|
||||
}
|
||||
|
||||
SbxBase* SbClassFactory::Create( UINT16, UINT32 )
|
||||
SbxBase* SbClassFactory::Create( sal_uInt16, sal_uInt32 )
|
||||
{
|
||||
// Not supported
|
||||
return NULL;
|
||||
@@ -737,13 +737,13 @@ SbModule* SbClassFactory::FindClass( const String& rClassName )
|
||||
typedef std::vector< StarBASIC* > DocBasicVector;
|
||||
static DocBasicVector GaDocBasics;
|
||||
|
||||
StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic )
|
||||
StarBASIC::StarBASIC( StarBASIC* p, sal_Bool bIsDocBasic )
|
||||
: SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic )
|
||||
{
|
||||
SetParent( p );
|
||||
pLibInfo = NULL;
|
||||
bNoRtl = bBreak = FALSE;
|
||||
bVBAEnabled = FALSE;
|
||||
bNoRtl = bBreak = sal_False;
|
||||
bVBAEnabled = sal_False;
|
||||
pModules = new SbxArray;
|
||||
|
||||
if( !GetSbData()->nInst++ )
|
||||
@@ -765,7 +765,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic )
|
||||
// Search via StarBasic is always global
|
||||
SetFlag( SBX_GBLSEARCH );
|
||||
pVBAGlobals = NULL;
|
||||
bQuit = FALSE;
|
||||
bQuit = sal_False;
|
||||
|
||||
if( bDocBasic )
|
||||
GaDocBasics.push_back( this );
|
||||
@@ -773,7 +773,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic )
|
||||
|
||||
// #51727 Override SetModified so that the modified state
|
||||
// is not given to the parent
|
||||
void StarBASIC::SetModified( BOOL b )
|
||||
void StarBASIC::SetModified( sal_Bool b )
|
||||
{
|
||||
SbxBase::SetModified( b );
|
||||
}
|
||||
@@ -835,8 +835,8 @@ StarBASIC::~StarBASIC()
|
||||
// #100326 Set Parent NULL in registered listeners
|
||||
if( xUnoListeners.Is() )
|
||||
{
|
||||
USHORT uCount = xUnoListeners->Count();
|
||||
for( USHORT i = 0 ; i < uCount ; i++ )
|
||||
sal_uInt16 uCount = xUnoListeners->Count();
|
||||
for( sal_uInt16 i = 0 ; i < uCount ; i++ )
|
||||
{
|
||||
SbxVariable* pListenerObj = xUnoListeners->Get( i );
|
||||
pListenerObj->SetParent( NULL );
|
||||
@@ -853,7 +853,7 @@ void* StarBASIC::operator new( size_t n )
|
||||
{
|
||||
if( n < sizeof( StarBASIC ) )
|
||||
{
|
||||
// DBG_ASSERT( FALSE, "Warnung: inkompatibler BASIC-Stand!" );
|
||||
// DBG_ASSERT( sal_False, "Warnung: inkompatibler BASIC-Stand!" );
|
||||
n = sizeof( StarBASIC );
|
||||
}
|
||||
return ::operator new( n );
|
||||
@@ -868,14 +868,14 @@ void StarBASIC::implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic )
|
||||
{
|
||||
if( this != pDeletedBasic )
|
||||
{
|
||||
for( USHORT i = 0; i < pModules->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
|
||||
{
|
||||
SbModule* p = (SbModule*)pModules->Get( i );
|
||||
p->ClearVarsDependingOnDeletedBasic( pDeletedBasic );
|
||||
}
|
||||
}
|
||||
|
||||
for( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
for( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
{
|
||||
SbxVariable* pVar = pObjs->Get( nObj );
|
||||
StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar);
|
||||
@@ -929,7 +929,7 @@ SbModule* StarBASIC::MakeModule32( const String& rName, const ModuleInfo& mInfo,
|
||||
p->SetSource32( rSrc );
|
||||
p->SetParent( this );
|
||||
pModules->Insert( p, pModules->Count() );
|
||||
SetModified( TRUE );
|
||||
SetModified( sal_True );
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -939,14 +939,14 @@ void StarBASIC::Insert( SbxVariable* pVar )
|
||||
{
|
||||
pModules->Insert( pVar, pModules->Count() );
|
||||
pVar->SetParent( this );
|
||||
StartListening( pVar->GetBroadcaster(), TRUE );
|
||||
StartListening( pVar->GetBroadcaster(), sal_True );
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL bWasModified = IsModified();
|
||||
sal_Bool bWasModified = IsModified();
|
||||
SbxObject::Insert( pVar );
|
||||
if( !bWasModified && pVar->IsSet( SBX_DONTSTORE ) )
|
||||
SetModified( FALSE );
|
||||
SetModified( sal_False );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -964,17 +964,17 @@ void StarBASIC::Remove( SbxVariable* pVar )
|
||||
SbxObject::Remove( pVar );
|
||||
}
|
||||
|
||||
BOOL StarBASIC::Compile( SbModule* pMod )
|
||||
sal_Bool StarBASIC::Compile( SbModule* pMod )
|
||||
{
|
||||
return pMod ? pMod->Compile() : FALSE;
|
||||
return pMod ? pMod->Compile() : sal_False;
|
||||
}
|
||||
|
||||
BOOL StarBASIC::Disassemble( SbModule* pMod, String& rText )
|
||||
sal_Bool StarBASIC::Disassemble( SbModule* pMod, String& rText )
|
||||
{
|
||||
rText.Erase();
|
||||
if( pMod )
|
||||
pMod->Disassemble( rText );
|
||||
return BOOL( rText.Len() != 0 );
|
||||
return sal_Bool( rText.Len() != 0 );
|
||||
}
|
||||
|
||||
void StarBASIC::Clear()
|
||||
@@ -985,7 +985,7 @@ void StarBASIC::Clear()
|
||||
|
||||
SbModule* StarBASIC::FindModule( const String& rName )
|
||||
{
|
||||
for( USHORT i = 0; i < pModules->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
|
||||
{
|
||||
SbModule* p = (SbModule*) pModules->Get( i );
|
||||
if( p->GetName().EqualsIgnoreCaseAscii( rName ) )
|
||||
@@ -1066,7 +1066,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
|
||||
::vos::OGuard guard( Application::GetSolarMutex() );
|
||||
|
||||
// Init own modules
|
||||
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
{
|
||||
SbModule* pModule = (SbModule*)pModules->Get( nMod );
|
||||
if( !pModule->IsCompiled() )
|
||||
@@ -1079,7 +1079,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
|
||||
// Consider required types to init in right order. Class modules
|
||||
// that are required by other modules have to be initialized first.
|
||||
ModuleInitDependencyMap aMIDMap;
|
||||
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
{
|
||||
SbModule* pModule = (SbModule*)pModules->Get( nMod );
|
||||
String aModuleName = pModule->GetName();
|
||||
@@ -1095,7 +1095,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
|
||||
}
|
||||
|
||||
// Call RunInit on standard modules
|
||||
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
{
|
||||
SbModule* pModule = (SbModule*)pModules->Get( nMod );
|
||||
if( !pModule->isProxyModule() )
|
||||
@@ -1104,7 +1104,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
|
||||
|
||||
// Check all objects if they are BASIC,
|
||||
// if yes initialize
|
||||
for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
for ( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
{
|
||||
SbxVariable* pVar = pObjs->Get( nObj );
|
||||
StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar);
|
||||
@@ -1118,14 +1118,14 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
|
||||
void StarBASIC::DeInitAllModules( void )
|
||||
{
|
||||
// Deinit own modules
|
||||
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
{
|
||||
SbModule* pModule = (SbModule*)pModules->Get( nMod );
|
||||
if( pModule->pImage && !pModule->isProxyModule() && !pModule->ISA(SbObjModule) )
|
||||
pModule->pImage->bInit = false;
|
||||
}
|
||||
|
||||
for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
for ( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
{
|
||||
SbxVariable* pVar = pObjs->Get( nObj );
|
||||
StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar);
|
||||
@@ -1138,13 +1138,13 @@ void StarBASIC::DeInitAllModules( void )
|
||||
void StarBASIC::ClearGlobalVars( void )
|
||||
{
|
||||
SbxArrayRef xProps( GetProperties() );
|
||||
USHORT nPropCount = xProps->Count();
|
||||
for ( USHORT nProp = 0 ; nProp < nPropCount ; ++nProp )
|
||||
sal_uInt16 nPropCount = xProps->Count();
|
||||
for ( sal_uInt16 nProp = 0 ; nProp < nPropCount ; ++nProp )
|
||||
{
|
||||
SbxBase* pVar = xProps->Get( nProp );
|
||||
pVar->Clear();
|
||||
}
|
||||
SetModified( TRUE );
|
||||
SetModified( sal_True );
|
||||
}
|
||||
|
||||
// This implementation at first searches within the runtime library,
|
||||
@@ -1175,7 +1175,7 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
|
||||
}
|
||||
// Search module
|
||||
if( !pRes )
|
||||
for( USHORT i = 0; i < pModules->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
|
||||
{
|
||||
SbModule* p = (SbModule*) pModules->Get( i );
|
||||
if( p->IsVisible() )
|
||||
@@ -1192,13 +1192,13 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
|
||||
}
|
||||
// Only variables qualified by the Module Name e.g. Sheet1.foo
|
||||
// should work for Documant && Class type Modules
|
||||
INT32 nType = p->GetModuleType();
|
||||
sal_Int32 nType = p->GetModuleType();
|
||||
if ( nType == ModuleType::DOCUMENT || nType == ModuleType::FORM )
|
||||
continue;
|
||||
|
||||
// otherwise check if the element is available
|
||||
// unset GBLSEARCH-Flag (due to Rekursion)
|
||||
USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
|
||||
sal_uInt16 nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
|
||||
p->ResetFlag( SBX_GBLSEARCH );
|
||||
pRes = p->Find( rName, t );
|
||||
p->SetFlag( nGblFlag );
|
||||
@@ -1214,9 +1214,9 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
|
||||
return pRes;
|
||||
}
|
||||
|
||||
BOOL StarBASIC::Call( const String& rName, SbxArray* pParam )
|
||||
sal_Bool StarBASIC::Call( const String& rName, SbxArray* pParam )
|
||||
{
|
||||
BOOL bRes = SbxObject::Call( rName, pParam );
|
||||
sal_Bool bRes = SbxObject::Call( rName, pParam );
|
||||
if( !bRes )
|
||||
{
|
||||
SbxError eErr = SbxBase::GetError();
|
||||
@@ -1239,7 +1239,7 @@ SbxBase* StarBASIC::FindSBXInCurrentScope( const String& rName )
|
||||
|
||||
// Preserve old interface
|
||||
SbxVariable* StarBASIC::FindVarInCurrentScopy
|
||||
( const String& rName, USHORT& rStatus )
|
||||
( const String& rName, sal_uInt16& rStatus )
|
||||
{
|
||||
rStatus = 1; // Presumption: nothing found
|
||||
SbxVariable* pVar = NULL;
|
||||
@@ -1257,7 +1257,7 @@ SbxVariable* StarBASIC::FindVarInCurrentScopy
|
||||
void StarBASIC::QuitAndExitApplication()
|
||||
{
|
||||
Stop();
|
||||
bQuit = TRUE;
|
||||
bQuit = sal_True;
|
||||
}
|
||||
|
||||
void StarBASIC::Stop()
|
||||
@@ -1270,9 +1270,9 @@ void StarBASIC::Stop()
|
||||
}
|
||||
}
|
||||
|
||||
BOOL StarBASIC::IsRunning()
|
||||
sal_Bool StarBASIC::IsRunning()
|
||||
{
|
||||
return BOOL( pINST != NULL );
|
||||
return sal_Bool( pINST != NULL );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@@ -1283,7 +1283,7 @@ BOOL StarBASIC::IsRunning()
|
||||
|
||||
// Activation of an object. There is no need to access active objects
|
||||
// with name via BASIC. If NULL is given, everything is activated.
|
||||
void StarBASIC::ActivateObject( const String* pName, BOOL bActivate )
|
||||
void StarBASIC::ActivateObject( const String* pName, sal_Bool bActivate )
|
||||
{
|
||||
if( pName )
|
||||
{
|
||||
@@ -1298,7 +1298,7 @@ void StarBASIC::ActivateObject( const String* pName, BOOL bActivate )
|
||||
}
|
||||
else
|
||||
{
|
||||
for( USHORT i = 0; i < GetObjects()->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < GetObjects()->Count(); i++ )
|
||||
{
|
||||
SbxObject* p = (SbxObject*) GetObjects()->Get( i );
|
||||
if( bActivate )
|
||||
@@ -1315,7 +1315,7 @@ void StarBASIC::ActivateObject( const String* pName, BOOL bActivate )
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
SbMethod* StarBASIC::GetActiveMethod( USHORT nLevel )
|
||||
SbMethod* StarBASIC::GetActiveMethod( sal_uInt16 nLevel )
|
||||
{
|
||||
if( pINST )
|
||||
return pINST->GetCaller( nLevel );
|
||||
@@ -1331,41 +1331,41 @@ SbModule* StarBASIC::GetActiveModule()
|
||||
return pCMOD;
|
||||
}
|
||||
|
||||
USHORT StarBASIC::BreakPoint( USHORT l, USHORT c1, USHORT c2 )
|
||||
sal_uInt16 StarBASIC::BreakPoint( sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
|
||||
{
|
||||
SetErrorData( 0, l, c1, c2 );
|
||||
bBreak = TRUE;
|
||||
bBreak = sal_True;
|
||||
if( GetSbData()->aBreakHdl.IsSet() )
|
||||
return (USHORT) GetSbData()->aBreakHdl.Call( this );
|
||||
return (sal_uInt16) GetSbData()->aBreakHdl.Call( this );
|
||||
else
|
||||
return BreakHdl();
|
||||
}
|
||||
|
||||
USHORT StarBASIC::StepPoint( USHORT l, USHORT c1, USHORT c2 )
|
||||
sal_uInt16 StarBASIC::StepPoint( sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
|
||||
{
|
||||
SetErrorData( 0, l, c1, c2 );
|
||||
bBreak = FALSE;
|
||||
bBreak = sal_False;
|
||||
if( GetSbData()->aBreakHdl.IsSet() )
|
||||
return (USHORT) GetSbData()->aBreakHdl.Call( this );
|
||||
return (sal_uInt16) GetSbData()->aBreakHdl.Call( this );
|
||||
else
|
||||
return BreakHdl();
|
||||
}
|
||||
|
||||
USHORT __EXPORT StarBASIC::BreakHdl()
|
||||
sal_uInt16 __EXPORT StarBASIC::BreakHdl()
|
||||
{
|
||||
return (USHORT) ( aBreakHdl.IsSet()
|
||||
return (sal_uInt16) ( aBreakHdl.IsSet()
|
||||
? aBreakHdl.Call( this ) : SbDEBUG_CONTINUE );
|
||||
}
|
||||
|
||||
// Calls for error handler and break handler
|
||||
USHORT StarBASIC::GetLine() { return GetSbData()->nLine; }
|
||||
USHORT StarBASIC::GetCol1() { return GetSbData()->nCol1; }
|
||||
USHORT StarBASIC::GetCol2() { return GetSbData()->nCol2; }
|
||||
sal_uInt16 StarBASIC::GetLine() { return GetSbData()->nLine; }
|
||||
sal_uInt16 StarBASIC::GetCol1() { return GetSbData()->nCol1; }
|
||||
sal_uInt16 StarBASIC::GetCol2() { return GetSbData()->nCol2; }
|
||||
|
||||
// Specific to error handler
|
||||
SbError StarBASIC::GetErrorCode() { return GetSbData()->nCode; }
|
||||
const String& StarBASIC::GetErrorText() { return GetSbData()->aErrMsg; }
|
||||
BOOL StarBASIC::IsCompilerError() { return GetSbData()->bCompiler; }
|
||||
sal_Bool StarBASIC::IsCompilerError() { return GetSbData()->bCompiler; }
|
||||
void StarBASIC::SetGlobalLanguageMode( SbLanguageMode eLanguageMode )
|
||||
{
|
||||
GetSbData()->eLanguageMode = eLanguageMode;
|
||||
@@ -1392,9 +1392,9 @@ SbLanguageMode StarBASIC::GetLanguageMode()
|
||||
// binaere Suche bei VB-Error -> SFX-Error.
|
||||
|
||||
// Neue Fehler-Codes auf alte, Sbx-Kompatible zurueckmappen
|
||||
USHORT StarBASIC::GetVBErrorCode( SbError nError )
|
||||
sal_uInt16 StarBASIC::GetVBErrorCode( SbError nError )
|
||||
{
|
||||
USHORT nRet = 0;
|
||||
sal_uInt16 nRet = 0;
|
||||
|
||||
if( SbiRuntime::isVBAEnabled() )
|
||||
{
|
||||
@@ -1419,7 +1419,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError )
|
||||
|
||||
// Suchschleife
|
||||
const SFX_VB_ErrorItem* pErrItem;
|
||||
USHORT nIndex = 0;
|
||||
sal_uInt16 nIndex = 0;
|
||||
do
|
||||
{
|
||||
pErrItem = SFX_VB_ErrorTab + nIndex;
|
||||
@@ -1434,7 +1434,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError )
|
||||
return nRet;
|
||||
}
|
||||
|
||||
SbError StarBASIC::GetSfxFromVBError( USHORT nError )
|
||||
SbError StarBASIC::GetSfxFromVBError( sal_uInt16 nError )
|
||||
{
|
||||
SbError nRet = 0L;
|
||||
|
||||
@@ -1466,7 +1466,7 @@ SbError StarBASIC::GetSfxFromVBError( USHORT nError )
|
||||
}
|
||||
}
|
||||
const SFX_VB_ErrorItem* pErrItem;
|
||||
USHORT nIndex = 0;
|
||||
sal_uInt16 nIndex = 0;
|
||||
do
|
||||
{
|
||||
pErrItem = SFX_VB_ErrorTab + nIndex;
|
||||
@@ -1486,7 +1486,7 @@ SbError StarBASIC::GetSfxFromVBError( USHORT nError )
|
||||
|
||||
// Error- / Break-Daten setzen
|
||||
void StarBASIC::SetErrorData
|
||||
( SbError nCode, USHORT nLine, USHORT nCol1, USHORT nCol2 )
|
||||
( SbError nCode, sal_uInt16 nLine, sal_uInt16 nCol1, sal_uInt16 nCol2 )
|
||||
{
|
||||
SbiGlobals& aGlobals = *GetSbData();
|
||||
aGlobals.nCode = nCode;
|
||||
@@ -1502,26 +1502,26 @@ struct BasicStringList_Impl : private Resource
|
||||
{
|
||||
ResId aResId;
|
||||
|
||||
BasicStringList_Impl( ResId& rErrIdP, USHORT nId)
|
||||
BasicStringList_Impl( ResId& rErrIdP, sal_uInt16 nId)
|
||||
: Resource( rErrIdP ),aResId(nId, *rErrIdP.GetResMgr() ){}
|
||||
~BasicStringList_Impl() { FreeResource(); }
|
||||
|
||||
String GetString(){ return String( aResId ); }
|
||||
BOOL IsErrorTextAvailable( void )
|
||||
sal_Bool IsErrorTextAvailable( void )
|
||||
{ return IsAvailableRes(aResId.SetRT(RSC_STRING)); }
|
||||
};
|
||||
//----------------------------------------------------------------
|
||||
|
||||
// #60175 Flag, das bei Basic-Fehlern das Anziehen der SFX-Resourcen verhindert
|
||||
static BOOL bStaticSuppressSfxResource = FALSE;
|
||||
static sal_Bool bStaticSuppressSfxResource = sal_False;
|
||||
|
||||
void StarBASIC::StaticSuppressSfxResource( BOOL bSuppress )
|
||||
void StarBASIC::StaticSuppressSfxResource( sal_Bool bSuppress )
|
||||
{
|
||||
bStaticSuppressSfxResource = bSuppress;
|
||||
}
|
||||
|
||||
// Hack for #83750, use bStaticSuppressSfxResource as setup flag
|
||||
BOOL runsInSetup( void )
|
||||
sal_Bool runsInSetup( void )
|
||||
{
|
||||
return bStaticSuppressSfxResource;
|
||||
}
|
||||
@@ -1537,11 +1537,11 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg )
|
||||
return;
|
||||
}
|
||||
|
||||
USHORT nOldID = GetVBErrorCode( nId );
|
||||
sal_uInt16 nOldID = GetVBErrorCode( nId );
|
||||
|
||||
// Hilfsklasse instanzieren
|
||||
BasResId aId( RID_BASIC_START );
|
||||
BasicStringList_Impl aMyStringList( aId, USHORT(nId & ERRCODE_RES_MASK) );
|
||||
BasicStringList_Impl aMyStringList( aId, sal_uInt16(nId & ERRCODE_RES_MASK) );
|
||||
|
||||
if( aMyStringList.IsErrorTextAvailable() )
|
||||
{
|
||||
@@ -1549,7 +1549,7 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg )
|
||||
String aMsg1 = aMyStringList.GetString();
|
||||
// Argument-Platzhalter durch %s ersetzen
|
||||
String aSrgStr( RTL_CONSTASCII_USTRINGPARAM("$(ARG1)") );
|
||||
USHORT nResult = aMsg1.Search( aSrgStr );
|
||||
sal_uInt16 nResult = aMsg1.Search( aSrgStr );
|
||||
|
||||
if( nResult != STRING_NOTFOUND )
|
||||
{
|
||||
@@ -1570,8 +1570,8 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg )
|
||||
|
||||
}
|
||||
|
||||
BOOL StarBASIC::CError
|
||||
( SbError code, const String& rMsg, USHORT l, USHORT c1, USHORT c2 )
|
||||
sal_Bool StarBASIC::CError
|
||||
( SbError code, const String& rMsg, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
|
||||
@@ -1581,39 +1581,39 @@ BOOL StarBASIC::CError
|
||||
// #109018 Check if running Basic is affected
|
||||
StarBASIC* pStartedBasic = pINST->GetBasic();
|
||||
if( pStartedBasic != this )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
Stop();
|
||||
}
|
||||
|
||||
// Flag setzen, damit GlobalRunInit den Fehler mitbekommt
|
||||
GetSbData()->bGlobalInitErr = TRUE;
|
||||
GetSbData()->bGlobalInitErr = sal_True;
|
||||
|
||||
// Fehlertext basteln
|
||||
MakeErrorText( code, rMsg );
|
||||
|
||||
// Umsetzung des Codes fuer String-Transport in SFX-Error
|
||||
if( rMsg.Len() )
|
||||
code = (ULONG)*new StringErrorInfo( code, String(rMsg) );
|
||||
code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) );
|
||||
|
||||
SetErrorData( code, l, c1, c2 );
|
||||
GetSbData()->bCompiler = TRUE;
|
||||
BOOL bRet;
|
||||
GetSbData()->bCompiler = sal_True;
|
||||
sal_Bool bRet;
|
||||
if( GetSbData()->aErrHdl.IsSet() )
|
||||
bRet = (BOOL) GetSbData()->aErrHdl.Call( this );
|
||||
bRet = (sal_Bool) GetSbData()->aErrHdl.Call( this );
|
||||
else
|
||||
bRet = ErrorHdl();
|
||||
GetSbData()->bCompiler = FALSE; // nur TRUE fuer Error-Handler
|
||||
GetSbData()->bCompiler = sal_False; // nur sal_True fuer Error-Handler
|
||||
return bRet;
|
||||
}
|
||||
|
||||
BOOL StarBASIC::RTError
|
||||
( SbError code, USHORT l, USHORT c1, USHORT c2 )
|
||||
sal_Bool StarBASIC::RTError
|
||||
( SbError code, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
|
||||
{
|
||||
return RTError( code, String(), l, c1, c2 );
|
||||
}
|
||||
|
||||
BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1, USHORT c2 )
|
||||
sal_Bool StarBASIC::RTError( SbError code, const String& rMsg, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
|
||||
@@ -1635,15 +1635,15 @@ BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1,
|
||||
aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() );
|
||||
aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") );
|
||||
aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg;
|
||||
code = (ULONG)*new StringErrorInfo( code, aTmp );
|
||||
code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp );
|
||||
}
|
||||
else
|
||||
code = (ULONG)*new StringErrorInfo( code, String(rMsg) );
|
||||
code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) );
|
||||
}
|
||||
|
||||
SetErrorData( code, l, c1, c2 );
|
||||
if( GetSbData()->aErrHdl.IsSet() )
|
||||
return (BOOL) GetSbData()->aErrHdl.Call( this );
|
||||
return (sal_Bool) GetSbData()->aErrHdl.Call( this );
|
||||
else
|
||||
return ErrorHdl();
|
||||
}
|
||||
@@ -1688,7 +1688,7 @@ String StarBASIC::GetErrorMsg()
|
||||
return String();
|
||||
}
|
||||
|
||||
USHORT StarBASIC::GetErl()
|
||||
sal_uInt16 StarBASIC::GetErl()
|
||||
{
|
||||
if( pINST )
|
||||
return pINST->GetErl();
|
||||
@@ -1696,10 +1696,10 @@ USHORT StarBASIC::GetErl()
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL __EXPORT StarBASIC::ErrorHdl()
|
||||
sal_Bool __EXPORT StarBASIC::ErrorHdl()
|
||||
{
|
||||
return (BOOL) ( aErrorHdl.IsSet()
|
||||
? aErrorHdl.Call( this ) : FALSE );
|
||||
return (sal_Bool) ( aErrorHdl.IsSet()
|
||||
? aErrorHdl.Call( this ) : sal_False );
|
||||
}
|
||||
|
||||
Link StarBASIC::GetGlobalErrorHdl()
|
||||
@@ -1737,16 +1737,16 @@ SbxArrayRef StarBASIC::getUnoListeners( void )
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer )
|
||||
sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
|
||||
{
|
||||
if( !SbxObject::LoadData( r, nVer ) )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
// #95459 Delete dialogs, otherwise endless recursion
|
||||
// in SbxVarable::GetType() if dialogs are accessed
|
||||
USHORT nObjCount = pObjs->Count();
|
||||
sal_uInt16 nObjCount = pObjs->Count();
|
||||
SbxVariable** ppDeleteTab = new SbxVariable*[ nObjCount ];
|
||||
USHORT nObj;
|
||||
sal_uInt16 nObj;
|
||||
|
||||
for( nObj = 0 ; nObj < nObjCount ; nObj++ )
|
||||
{
|
||||
@@ -1762,14 +1762,14 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer )
|
||||
}
|
||||
delete[] ppDeleteTab;
|
||||
|
||||
UINT16 nMod;
|
||||
sal_uInt16 nMod;
|
||||
pModules->Clear();
|
||||
r >> nMod;
|
||||
for( USHORT i = 0; i < nMod; i++ )
|
||||
for( sal_uInt16 i = 0; i < nMod; i++ )
|
||||
{
|
||||
SbModule* pMod = (SbModule*) SbxBase::Load( r );
|
||||
if( !pMod )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
else if( pMod->ISA(SbJScriptModule) )
|
||||
{
|
||||
// Ref zuweisen, damit pMod deleted wird
|
||||
@@ -1792,26 +1792,26 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer )
|
||||
// Suche ueber StarBASIC ist immer global
|
||||
DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic ohne GBLSEARCH geladen" );
|
||||
SetFlag( SBX_GBLSEARCH );
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL StarBASIC::StoreData( SvStream& r ) const
|
||||
sal_Bool StarBASIC::StoreData( SvStream& r ) const
|
||||
{
|
||||
if( !SbxObject::StoreData( r ) )
|
||||
return FALSE;
|
||||
r << (UINT16) pModules->Count();
|
||||
for( USHORT i = 0; i < pModules->Count(); i++ )
|
||||
return sal_False;
|
||||
r << (sal_uInt16) pModules->Count();
|
||||
for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
|
||||
{
|
||||
SbModule* p = (SbModule*) pModules->Get( i );
|
||||
if( !p->Store( r ) )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL StarBASIC::LoadOldModules( SvStream& )
|
||||
sal_Bool StarBASIC::LoadOldModules( SvStream& )
|
||||
{
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
bool StarBASIC::GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut )
|
||||
@@ -1884,7 +1884,7 @@ static const char pCountStr[] = "Count";
|
||||
static const char pAddStr[] = "Add";
|
||||
static const char pItemStr[] = "Item";
|
||||
static const char pRemoveStr[] = "Remove";
|
||||
static USHORT nCountHash = 0, nAddHash, nItemHash, nRemoveHash;
|
||||
static sal_uInt16 nCountHash = 0, nAddHash, nItemHash, nRemoveHash;
|
||||
|
||||
SbxInfoRef BasicCollection::xAddInfo = NULL;
|
||||
SbxInfoRef BasicCollection::xItemInfo = NULL;
|
||||
@@ -1955,10 +1955,10 @@ void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1,
|
||||
const SbxHint* p = PTR_CAST(SbxHint,&rHint);
|
||||
if( p )
|
||||
{
|
||||
ULONG nId = p->GetId();
|
||||
BOOL bRead = BOOL( nId == SBX_HINT_DATAWANTED );
|
||||
BOOL bWrite = BOOL( nId == SBX_HINT_DATACHANGED );
|
||||
BOOL bRequestInfo = BOOL( nId == SBX_HINT_INFOWANTED );
|
||||
sal_uIntPtr nId = p->GetId();
|
||||
sal_Bool bRead = sal_Bool( nId == SBX_HINT_DATAWANTED );
|
||||
sal_Bool bWrite = sal_Bool( nId == SBX_HINT_DATACHANGED );
|
||||
sal_Bool bRequestInfo = sal_Bool( nId == SBX_HINT_INFOWANTED );
|
||||
SbxVariable* pVar = p->GetVar();
|
||||
SbxArray* pArg = pVar->GetParameters();
|
||||
XubString aVarName( pVar->GetName() );
|
||||
@@ -1993,9 +1993,9 @@ void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1,
|
||||
SbxObject::SFX_NOTIFY( rCst, rId1, rHint, rId2 );
|
||||
}
|
||||
|
||||
INT32 BasicCollection::implGetIndex( SbxVariable* pIndexVar )
|
||||
sal_Int32 BasicCollection::implGetIndex( SbxVariable* pIndexVar )
|
||||
{
|
||||
INT32 nIndex = -1;
|
||||
sal_Int32 nIndex = -1;
|
||||
if( pIndexVar->GetType() == SbxSTRING )
|
||||
nIndex = implGetIndexForName( pIndexVar->GetString() );
|
||||
else
|
||||
@@ -2003,12 +2003,12 @@ INT32 BasicCollection::implGetIndex( SbxVariable* pIndexVar )
|
||||
return nIndex;
|
||||
}
|
||||
|
||||
INT32 BasicCollection::implGetIndexForName( const String& rName )
|
||||
sal_Int32 BasicCollection::implGetIndexForName( const String& rName )
|
||||
{
|
||||
INT32 nIndex = -1;
|
||||
INT32 nCount = xItemArray->Count32();
|
||||
INT32 nNameHash = MakeHashCode( rName );
|
||||
for( INT32 i = 0 ; i < nCount ; i++ )
|
||||
sal_Int32 nIndex = -1;
|
||||
sal_Int32 nCount = xItemArray->Count32();
|
||||
sal_Int32 nNameHash = MakeHashCode( rName );
|
||||
for( sal_Int32 i = 0 ; i < nCount ; i++ )
|
||||
{
|
||||
SbxVariable* pVar = xItemArray->Get32( i );
|
||||
if( pVar->GetHashCode() == nNameHash &&
|
||||
@@ -2023,7 +2023,7 @@ INT32 BasicCollection::implGetIndexForName( const String& rName )
|
||||
|
||||
void BasicCollection::CollAdd( SbxArray* pPar_ )
|
||||
{
|
||||
USHORT nCount = pPar_->Count();
|
||||
sal_uInt16 nCount = pPar_->Count();
|
||||
if( nCount < 2 || nCount > 5 )
|
||||
{
|
||||
SetError( SbxERR_WRONG_ARGS );
|
||||
@@ -2049,7 +2049,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
|
||||
return;
|
||||
}
|
||||
SbxVariable* pAfter = pPar_->Get(4);
|
||||
INT32 nAfterIndex = implGetIndex( pAfter );
|
||||
sal_Int32 nAfterIndex = implGetIndex( pAfter );
|
||||
if( nAfterIndex == -1 )
|
||||
{
|
||||
SetError( SbERR_BAD_ARGUMENT );
|
||||
@@ -2059,7 +2059,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
|
||||
}
|
||||
else // if( nCount == 4 )
|
||||
{
|
||||
INT32 nBeforeIndex = implGetIndex( pBefore );
|
||||
sal_Int32 nBeforeIndex = implGetIndex( pBefore );
|
||||
if( nBeforeIndex == -1 )
|
||||
{
|
||||
SetError( SbERR_BAD_ARGUMENT );
|
||||
@@ -2108,8 +2108,8 @@ void BasicCollection::CollItem( SbxArray* pPar_ )
|
||||
}
|
||||
SbxVariable* pRes = NULL;
|
||||
SbxVariable* p = pPar_->Get( 1 );
|
||||
INT32 nIndex = implGetIndex( p );
|
||||
if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() )
|
||||
sal_Int32 nIndex = implGetIndex( p );
|
||||
if( nIndex >= 0 && nIndex < (sal_Int32)xItemArray->Count32() )
|
||||
pRes = xItemArray->Get32( nIndex );
|
||||
if( !pRes )
|
||||
SetError( SbERR_BAD_ARGUMENT );
|
||||
@@ -2126,8 +2126,8 @@ void BasicCollection::CollRemove( SbxArray* pPar_ )
|
||||
}
|
||||
|
||||
SbxVariable* p = pPar_->Get( 1 );
|
||||
INT32 nIndex = implGetIndex( p );
|
||||
if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() )
|
||||
sal_Int32 nIndex = implGetIndex( p );
|
||||
if( nIndex >= 0 && nIndex < (sal_Int32)xItemArray->Count32() )
|
||||
xItemArray->Remove32( nIndex );
|
||||
else
|
||||
SetError( SbERR_BAD_ARGUMENT );
|
||||
|
||||
@@ -61,13 +61,13 @@ SbiGlobals::SbiGlobals()
|
||||
nCode = 0;
|
||||
nLine = 0;
|
||||
nCol1 = nCol2 = 0;
|
||||
bCompiler = FALSE;
|
||||
bGlobalInitErr = FALSE;
|
||||
bRunInit = FALSE;
|
||||
bCompiler = sal_False;
|
||||
bGlobalInitErr = sal_False;
|
||||
bRunInit = sal_False;
|
||||
eLanguageMode = SB_LANG_BASIC;
|
||||
pErrStack = NULL;
|
||||
pTransliterationWrapper = NULL;
|
||||
bBlockCompilerError = FALSE;
|
||||
bBlockCompilerError = sal_False;
|
||||
pAppBasMgr = NULL;
|
||||
pMSOMacroRuntimLib = NULL;
|
||||
}
|
||||
|
||||
+117
-117
@@ -444,7 +444,7 @@ String implGetWrappedMsg( const WrappedTargetException& e )
|
||||
|
||||
void implHandleBasicErrorException( BasicErrorException& e )
|
||||
{
|
||||
SbError nError = StarBASIC::GetSfxFromVBError( (USHORT)e.ErrorCode );
|
||||
SbError nError = StarBASIC::GetSfxFromVBError( (sal_uInt16)e.ErrorCode );
|
||||
StarBASIC::Error( nError, e.ErrorMessageArgument );
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ void implHandleWrappedTargetException( const Any& _rWrappedTargetException )
|
||||
// special handling for BasicErrorException errors
|
||||
if ( aWrapped.TargetException >>= aBasicError )
|
||||
{
|
||||
nError = StarBASIC::GetSfxFromVBError( (USHORT)aBasicError.ErrorCode );
|
||||
nError = StarBASIC::GetSfxFromVBError( (sal_uInt16)aBasicError.ErrorCode );
|
||||
aMessageBuf.append( aBasicError.ErrorMessageArgument );
|
||||
aExamine.clear();
|
||||
break;
|
||||
@@ -637,7 +637,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
|
||||
sal_Int32 nLen = xIdlArray->getLen( aValue );
|
||||
for ( sal_Int32 index = 0; index < nLen; ++index )
|
||||
{
|
||||
Any aElementAny = xIdlArray->get( aValue, (UINT32)index );
|
||||
Any aElementAny = xIdlArray->get( aValue, (sal_uInt32)index );
|
||||
// This detects the dimension were currently processing
|
||||
if ( dimCopy == dimension )
|
||||
{
|
||||
@@ -751,7 +751,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
|
||||
if ( pArray )
|
||||
{
|
||||
SbxDimArrayRef xArray = pArray;
|
||||
USHORT nFlags = pVar->GetFlags();
|
||||
sal_uInt16 nFlags = pVar->GetFlags();
|
||||
pVar->ResetFlag( SBX_FIXED );
|
||||
pVar->PutObject( (SbxDimArray*)xArray );
|
||||
pVar->SetFlags( nFlags );
|
||||
@@ -799,9 +799,9 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
|
||||
sal_Int64 nValue64 = aCurrency.Value;
|
||||
SbxINT64 aInt64;
|
||||
aInt64.nHigh =
|
||||
sal::static_int_cast< INT32 >(
|
||||
sal::static_int_cast< sal_Int32 >(
|
||||
nValue64 >> 32);
|
||||
aInt64.nLow = (UINT32)( nValue64 & 0xffffffff );
|
||||
aInt64.nLow = (sal_uInt32)( nValue64 & 0xffffffff );
|
||||
pVar->PutCurrency( aInt64 );
|
||||
break;
|
||||
}
|
||||
@@ -879,7 +879,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
|
||||
for( i = 0 ; i < nLen ; i++ )
|
||||
{
|
||||
// Elemente wandeln
|
||||
Any aElementAny = xIdlArray->get( aValue, (UINT32)i );
|
||||
Any aElementAny = xIdlArray->get( aValue, (sal_uInt32)i );
|
||||
SbxVariableRef xVar = new SbxVariable( eSbxElementType );
|
||||
unoToSbxValue( (SbxVariable*)xVar, aElementAny );
|
||||
|
||||
@@ -893,7 +893,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
|
||||
}
|
||||
|
||||
// Array zurueckliefern
|
||||
USHORT nFlags = pVar->GetFlags();
|
||||
sal_uInt16 nFlags = pVar->GetFlags();
|
||||
pVar->ResetFlag( SBX_FIXED );
|
||||
pVar->PutObject( (SbxDimArray*)xArray );
|
||||
pVar->SetFlags( nFlags );
|
||||
@@ -1033,9 +1033,9 @@ Type getUnoTypeForSbxValue( SbxValue* pVal )
|
||||
// der genommen, sonst wird das ganze als Any-Sequence betrachtet
|
||||
sal_Bool bNeedsInit = sal_True;
|
||||
|
||||
INT32 nSize = nUpper - nLower + 1;
|
||||
INT32 nIdx = nLower;
|
||||
for( INT32 i = 0 ; i < nSize ; i++,nIdx++ )
|
||||
sal_Int32 nSize = nUpper - nLower + 1;
|
||||
sal_Int32 nIdx = nLower;
|
||||
for( sal_Int32 i = 0 ; i < nSize ; i++,nIdx++ )
|
||||
{
|
||||
SbxVariableRef xVar = pArray->Get32( &nIdx );
|
||||
Type aType = getUnoTypeForSbxValue( (SbxVariable*)xVar );
|
||||
@@ -1071,10 +1071,10 @@ Type getUnoTypeForSbxValue( SbxValue* pVal )
|
||||
if( eElementTypeClass == TypeClass_VOID || eElementTypeClass == TypeClass_ANY )
|
||||
{
|
||||
// For this check the array's dim structure does not matter
|
||||
UINT32 nFlatArraySize = pArray->Count32();
|
||||
sal_uInt32 nFlatArraySize = pArray->Count32();
|
||||
|
||||
sal_Bool bNeedsInit = sal_True;
|
||||
for( UINT32 i = 0 ; i < nFlatArraySize ; i++ )
|
||||
for( sal_uInt32 i = 0 ; i < nFlatArraySize ; i++ )
|
||||
{
|
||||
SbxVariableRef xVar = pArray->SbxArray::Get32( i );
|
||||
Type aType = getUnoTypeForSbxValue( (SbxVariable*)xVar );
|
||||
@@ -1578,13 +1578,13 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty
|
||||
}
|
||||
|
||||
// Dbg-Hilfsmethode zum Auslesen der in einem Object implementierten Interfaces
|
||||
String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& xClass, USHORT nRekLevel )
|
||||
String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& xClass, sal_uInt16 nRekLevel )
|
||||
{
|
||||
Type aIfaceType = ::getCppuType( (const Reference< XInterface > *)0 );
|
||||
static Reference< XIdlClass > xIfaceClass = TypeToIdlClass( aIfaceType );
|
||||
|
||||
String aRetStr;
|
||||
for( USHORT i = 0 ; i < nRekLevel ; i++ )
|
||||
for( sal_uInt16 i = 0 ; i < nRekLevel ; i++ )
|
||||
aRetStr.AppendAscii( " " );
|
||||
aRetStr += String( xClass->getName() );
|
||||
::rtl::OUString aClassName = xClass->getName();
|
||||
@@ -1603,8 +1603,8 @@ String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference<
|
||||
// Super-Interfaces holen
|
||||
Sequence< Reference< XIdlClass > > aSuperClassSeq = xClass->getSuperclasses();
|
||||
const Reference< XIdlClass >* pClasses = aSuperClassSeq.getConstArray();
|
||||
UINT32 nSuperIfaceCount = aSuperClassSeq.getLength();
|
||||
for( UINT32 j = 0 ; j < nSuperIfaceCount ; j++ )
|
||||
sal_uInt32 nSuperIfaceCount = aSuperClassSeq.getLength();
|
||||
for( sal_uInt32 j = 0 ; j < nSuperIfaceCount ; j++ )
|
||||
{
|
||||
const Reference< XIdlClass >& rxIfaceClass = pClasses[j];
|
||||
if( !rxIfaceClass->equals( xIfaceClass ) )
|
||||
@@ -1685,8 +1685,8 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj,
|
||||
{
|
||||
Sequence< Type > aTypeSeq = xTypeProvider->getTypes();
|
||||
const Type* pTypeArray = aTypeSeq.getConstArray();
|
||||
UINT32 nIfaceCount = aTypeSeq.getLength();
|
||||
for( UINT32 j = 0 ; j < nIfaceCount ; j++ )
|
||||
sal_uInt32 nIfaceCount = aTypeSeq.getLength();
|
||||
for( sal_uInt32 j = 0 ; j < nIfaceCount ; j++ )
|
||||
{
|
||||
const Type& rType = pTypeArray[j];
|
||||
|
||||
@@ -1764,8 +1764,8 @@ String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj )
|
||||
// Interfaces der Implementation holen
|
||||
Sequence< Type > aTypeSeq = xTypeProvider->getTypes();
|
||||
const Type* pTypeArray = aTypeSeq.getConstArray();
|
||||
UINT32 nIfaceCount = aTypeSeq.getLength();
|
||||
for( UINT32 j = 0 ; j < nIfaceCount ; j++ )
|
||||
sal_uInt32 nIfaceCount = aTypeSeq.getLength();
|
||||
for( sal_uInt32 j = 0 ; j < nIfaceCount ; j++ )
|
||||
{
|
||||
const Type& rType = pTypeArray[j];
|
||||
|
||||
@@ -1865,13 +1865,13 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj )
|
||||
}
|
||||
|
||||
Sequence<Property> props = xAccess->getProperties( PropertyConcept::ALL - PropertyConcept::DANGEROUS );
|
||||
UINT32 nUnoPropCount = props.getLength();
|
||||
sal_uInt32 nUnoPropCount = props.getLength();
|
||||
const Property* pUnoProps = props.getConstArray();
|
||||
|
||||
SbxArray* pProps = pUnoObj->GetProperties();
|
||||
USHORT nPropCount = pProps->Count();
|
||||
USHORT nPropsPerLine = 1 + nPropCount / 30;
|
||||
for( USHORT i = 0; i < nPropCount; i++ )
|
||||
sal_uInt16 nPropCount = pProps->Count();
|
||||
sal_uInt16 nPropsPerLine = 1 + nPropCount / 30;
|
||||
for( sal_uInt16 i = 0; i < nPropCount; i++ )
|
||||
{
|
||||
SbxVariable* pVar = pProps->Get( i );
|
||||
if( pVar )
|
||||
@@ -1884,7 +1884,7 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj )
|
||||
// Ist es in Uno eine Sequence?
|
||||
SbxDataType eType = pVar->GetFullType();
|
||||
|
||||
BOOL bMaybeVoid = FALSE;
|
||||
sal_Bool bMaybeVoid = sal_False;
|
||||
if( i < nUnoPropCount )
|
||||
{
|
||||
const Property& rProp = pUnoProps[ i ];
|
||||
@@ -1894,7 +1894,7 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj )
|
||||
if( rProp.Attributes & PropertyAttribute::MAYBEVOID )
|
||||
{
|
||||
eType = unoToSbxType( rProp.Type.getTypeClass() );
|
||||
bMaybeVoid = TRUE;
|
||||
bMaybeVoid = sal_True;
|
||||
}
|
||||
if( eType == SbxOBJECT )
|
||||
{
|
||||
@@ -1945,14 +1945,14 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj )
|
||||
const Reference< XIdlMethod >* pUnoMethods = methods.getConstArray();
|
||||
|
||||
SbxArray* pMethods = pUnoObj->GetMethods();
|
||||
USHORT nMethodCount = pMethods->Count();
|
||||
sal_uInt16 nMethodCount = pMethods->Count();
|
||||
if( !nMethodCount )
|
||||
{
|
||||
aRet.AppendAscii( "\nNo methods found\n" );
|
||||
return aRet;
|
||||
}
|
||||
USHORT nPropsPerLine = 1 + nMethodCount / 30;
|
||||
for( USHORT i = 0; i < nMethodCount; i++ )
|
||||
sal_uInt16 nPropsPerLine = 1 + nMethodCount / 30;
|
||||
for( sal_uInt16 i = 0; i < nMethodCount; i++ )
|
||||
{
|
||||
SbxVariable* pVar = pMethods->Get( i );
|
||||
if( pVar )
|
||||
@@ -1980,12 +1980,12 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj )
|
||||
|
||||
// get-Methode darf keinen Parameter haben
|
||||
Sequence< Reference< XIdlClass > > aParamsSeq = rxMethod->getParameterTypes();
|
||||
UINT32 nParamCount = aParamsSeq.getLength();
|
||||
sal_uInt32 nParamCount = aParamsSeq.getLength();
|
||||
const Reference< XIdlClass >* pParams = aParamsSeq.getConstArray();
|
||||
|
||||
if( nParamCount > 0 )
|
||||
{
|
||||
for( USHORT j = 0; j < nParamCount; j++ )
|
||||
for( sal_uInt16 j = 0; j < nParamCount; j++ )
|
||||
{
|
||||
String aTypeStr = Dbg_SbxDataType2String( unoToSbxType( pParams[ j ] ) );
|
||||
aPropStr += aTypeStr;
|
||||
@@ -2032,7 +2032,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
if( pHint->GetId() == SBX_HINT_DATAWANTED )
|
||||
{
|
||||
// Test-Properties
|
||||
INT32 nId = pProp->nId;
|
||||
sal_Int32 nId = pProp->nId;
|
||||
if( nId < 0 )
|
||||
{
|
||||
// Id == -1: Implementierte Interfaces gemaess ClassProvider anzeigen
|
||||
@@ -2143,18 +2143,18 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
if( pHint->GetId() == SBX_HINT_DATAWANTED )
|
||||
{
|
||||
// Anzahl Parameter -1 wegen Param0 == this
|
||||
UINT32 nParamCount = pParams ? ((UINT32)pParams->Count() - 1) : 0;
|
||||
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
|
||||
Sequence<Any> args;
|
||||
BOOL bOutParams = FALSE;
|
||||
UINT32 i;
|
||||
sal_Bool bOutParams = sal_False;
|
||||
sal_uInt32 i;
|
||||
|
||||
if( !bInvocation && mxUnoAccess.is() )
|
||||
{
|
||||
// Infos holen
|
||||
const Sequence<ParamInfo>& rInfoSeq = pMeth->getParamInfos();
|
||||
const ParamInfo* pParamInfos = rInfoSeq.getConstArray();
|
||||
UINT32 nUnoParamCount = rInfoSeq.getLength();
|
||||
UINT32 nAllocParamCount = nParamCount;
|
||||
sal_uInt32 nUnoParamCount = rInfoSeq.getLength();
|
||||
sal_uInt32 nAllocParamCount = nParamCount;
|
||||
|
||||
// Ueberschuessige Parameter ignorieren, Alternative: Error schmeissen
|
||||
if( nParamCount > nUnoParamCount )
|
||||
@@ -2197,14 +2197,14 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
com::sun::star::uno::Type aType( rxClass->getTypeClass(), rxClass->getName() );
|
||||
|
||||
// ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen!
|
||||
pAnyArgs[i] = sbxToUnoValue( pParams->Get( (USHORT)(i+1) ), aType );
|
||||
pAnyArgs[i] = sbxToUnoValue( pParams->Get( (sal_uInt16)(i+1) ), aType );
|
||||
|
||||
// Wenn es nicht schon feststeht pruefen, ob Out-Parameter vorliegen
|
||||
if( !bOutParams )
|
||||
{
|
||||
ParamMode aParamMode = rInfo.aMode;
|
||||
if( aParamMode != ParamMode_IN )
|
||||
bOutParams = TRUE;
|
||||
bOutParams = sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2229,7 +2229,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
Any aValAny;
|
||||
for( i = 0 ; i < nParamCount ; i++ )
|
||||
{
|
||||
USHORT iSbx = (USHORT)(i+1);
|
||||
sal_uInt16 iSbx = (sal_uInt16)(i+1);
|
||||
|
||||
// ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen!
|
||||
aValAny = sbxToUnoValueImpl( pParams->Get( iSbx ),
|
||||
@@ -2254,14 +2254,14 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
for( i = 0 ; i < nParamCount ; i++ )
|
||||
{
|
||||
// ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen!
|
||||
pAnyArgs[i] = sbxToUnoValueImpl( pParams->Get( (USHORT)(i+1) ),
|
||||
pAnyArgs[i] = sbxToUnoValueImpl( pParams->Get( (sal_uInt16)(i+1) ),
|
||||
bBlockConversionToSmallestType );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Methode callen
|
||||
GetSbData()->bBlockCompilerError = TRUE; // #106433 Block compiler errors for API calls
|
||||
GetSbData()->bBlockCompilerError = sal_True; // #106433 Block compiler errors for API calls
|
||||
try
|
||||
{
|
||||
if( !bInvocation && mxUnoAccess.is() )
|
||||
@@ -2280,13 +2280,13 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
const Sequence<ParamInfo>& rInfoSeq = pMeth->getParamInfos();
|
||||
const ParamInfo* pParamInfos = rInfoSeq.getConstArray();
|
||||
|
||||
UINT32 j;
|
||||
sal_uInt32 j;
|
||||
for( j = 0 ; j < nParamCount ; j++ )
|
||||
{
|
||||
const ParamInfo& rInfo = pParamInfos[j];
|
||||
ParamMode aParamMode = rInfo.aMode;
|
||||
if( aParamMode != ParamMode_IN )
|
||||
unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pAnyArgs[ j ] );
|
||||
unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2301,21 +2301,21 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
aRetAny = xDirectInvoke->directInvoke( pMeth->GetName(), args );
|
||||
else
|
||||
{
|
||||
Sequence< INT16 > OutParamIndex;
|
||||
Sequence< sal_Int16 > OutParamIndex;
|
||||
Sequence< Any > OutParam;
|
||||
aRetAny = mxInvocation->invoke( pMeth->GetName(), args, OutParamIndex, OutParam );
|
||||
|
||||
const INT16* pIndices = OutParamIndex.getConstArray();
|
||||
UINT32 nLen = OutParamIndex.getLength();
|
||||
const sal_Int16* pIndices = OutParamIndex.getConstArray();
|
||||
sal_uInt32 nLen = OutParamIndex.getLength();
|
||||
if( nLen )
|
||||
{
|
||||
const Any* pNewValues = OutParam.getConstArray();
|
||||
for( UINT32 j = 0 ; j < nLen ; j++ )
|
||||
for( sal_uInt32 j = 0 ; j < nLen ; j++ )
|
||||
{
|
||||
INT16 iTarget = pIndices[ j ];
|
||||
if( iTarget >= (INT16)nParamCount )
|
||||
sal_Int16 iTarget = pIndices[ j ];
|
||||
if( iTarget >= (sal_Int16)nParamCount )
|
||||
break;
|
||||
unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pNewValues[ j ] );
|
||||
unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pNewValues[ j ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2333,7 +2333,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
{
|
||||
implHandleAnyException( ::cppu::getCaughtException() );
|
||||
}
|
||||
GetSbData()->bBlockCompilerError = FALSE; // #106433 Unblock compiler errors
|
||||
GetSbData()->bBlockCompilerError = sal_False; // #106433 Unblock compiler errors
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2349,8 +2349,8 @@ Reference< XInvocation > createDynamicInvocationFor( const Any& aAny );
|
||||
|
||||
SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
|
||||
: SbxObject( aName_ )
|
||||
, bNeedIntrospection( TRUE )
|
||||
, bNativeCOMObject( FALSE )
|
||||
, bNeedIntrospection( sal_True )
|
||||
, bNativeCOMObject( sal_False )
|
||||
{
|
||||
static Reference< XIntrospection > xIntrospection;
|
||||
|
||||
@@ -2393,7 +2393,7 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
|
||||
// Rest bezieht sich nur auf Introspection
|
||||
if( !xTypeProvider.is() )
|
||||
{
|
||||
bNeedIntrospection = FALSE;
|
||||
bNeedIntrospection = sal_False;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2401,34 +2401,34 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
|
||||
// hiding of equally named COM symbols, e.g. XInvocation::getValue
|
||||
Reference< oleautomation::XAutomationObject > xAutomationObject( aUnoObj_, UNO_QUERY );
|
||||
if( xAutomationObject.is() )
|
||||
bNativeCOMObject = TRUE;
|
||||
bNativeCOMObject = sal_True;
|
||||
}
|
||||
|
||||
maTmpUnoObj = aUnoObj_;
|
||||
|
||||
|
||||
//*** Namen bestimmen ***
|
||||
BOOL bFatalError = TRUE;
|
||||
sal_Bool bFatalError = sal_True;
|
||||
|
||||
// Ist es ein Interface oder eine struct?
|
||||
BOOL bSetClassName = FALSE;
|
||||
sal_Bool bSetClassName = sal_False;
|
||||
String aClassName_;
|
||||
if( eType == TypeClass_STRUCT || eType == TypeClass_EXCEPTION )
|
||||
{
|
||||
// Struct ist Ok
|
||||
bFatalError = FALSE;
|
||||
bFatalError = sal_False;
|
||||
|
||||
// #67173 Echten Klassen-Namen eintragen
|
||||
if( aName_.Len() == 0 )
|
||||
{
|
||||
aClassName_ = String( aUnoObj_.getValueType().getTypeName() );
|
||||
bSetClassName = TRUE;
|
||||
bSetClassName = sal_True;
|
||||
}
|
||||
}
|
||||
else if( eType == TypeClass_INTERFACE )
|
||||
{
|
||||
// #70197 Interface geht immer durch Typ im Any
|
||||
bFatalError = FALSE;
|
||||
bFatalError = sal_False;
|
||||
|
||||
// Nach XIdlClassProvider-Interface fragen
|
||||
Reference< XIdlClassProvider > xClassProvider( x, UNO_QUERY );
|
||||
@@ -2438,14 +2438,14 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
|
||||
if( aName_.Len() == 0 )
|
||||
{
|
||||
Sequence< Reference< XIdlClass > > szClasses = xClassProvider->getIdlClasses();
|
||||
UINT32 nLen = szClasses.getLength();
|
||||
sal_uInt32 nLen = szClasses.getLength();
|
||||
if( nLen )
|
||||
{
|
||||
const Reference< XIdlClass > xImplClass = szClasses.getConstArray()[ 0 ];
|
||||
if( xImplClass.is() )
|
||||
{
|
||||
aClassName_ = String( xImplClass->getName() );
|
||||
bSetClassName = TRUE;
|
||||
bSetClassName = sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2476,7 +2476,7 @@ void SbUnoObject::doIntrospection( void )
|
||||
|
||||
if( !bNeedIntrospection )
|
||||
return;
|
||||
bNeedIntrospection = FALSE;
|
||||
bNeedIntrospection = sal_False;
|
||||
|
||||
if( !xIntrospection.is() )
|
||||
{
|
||||
@@ -2623,16 +2623,16 @@ SbxInfo* SbUnoMethod::GetInfo()
|
||||
|
||||
const Sequence<ParamInfo>& rInfoSeq = getParamInfos();
|
||||
const ParamInfo* pParamInfos = rInfoSeq.getConstArray();
|
||||
UINT32 nParamCount = rInfoSeq.getLength();
|
||||
sal_uInt32 nParamCount = rInfoSeq.getLength();
|
||||
|
||||
for( UINT32 i = 0 ; i < nParamCount ; i++ )
|
||||
for( sal_uInt32 i = 0 ; i < nParamCount ; i++ )
|
||||
{
|
||||
const ParamInfo& rInfo = pParamInfos[i];
|
||||
::rtl::OUString aParamName = rInfo.aName;
|
||||
|
||||
// const Reference< XIdlClass >& rxClass = rInfo.aType;
|
||||
SbxDataType t = SbxVARIANT;
|
||||
USHORT nFlags_ = SBX_READ;
|
||||
sal_uInt16 nFlags_ = SBX_READ;
|
||||
pInfo->AddParam( aParamName, t, nFlags_ );
|
||||
}
|
||||
}
|
||||
@@ -2655,7 +2655,7 @@ SbUnoProperty::SbUnoProperty
|
||||
const String& aName_,
|
||||
SbxDataType eSbxType,
|
||||
const Property& aUnoProp_,
|
||||
INT32 nId_,
|
||||
sal_Int32 nId_,
|
||||
bool bInvocation
|
||||
)
|
||||
: SbxProperty( aName_, eSbxType )
|
||||
@@ -2871,10 +2871,10 @@ void SbUnoObject::implCreateAll( void )
|
||||
|
||||
// Properties anlegen
|
||||
Sequence<Property> props = xAccess->getProperties( PropertyConcept::ALL - PropertyConcept::DANGEROUS );
|
||||
UINT32 nPropCount = props.getLength();
|
||||
sal_uInt32 nPropCount = props.getLength();
|
||||
const Property* pProps_ = props.getConstArray();
|
||||
|
||||
UINT32 i;
|
||||
sal_uInt32 i;
|
||||
for( i = 0 ; i < nPropCount ; i++ )
|
||||
{
|
||||
const Property& rProp = pProps_[ i ];
|
||||
@@ -2897,7 +2897,7 @@ void SbUnoObject::implCreateAll( void )
|
||||
// Methoden anlegen
|
||||
Sequence< Reference< XIdlMethod > > aMethodSeq = xAccess->getMethods
|
||||
( MethodConcept::ALL - MethodConcept::DANGEROUS );
|
||||
UINT32 nMethCount = aMethodSeq.getLength();
|
||||
sal_uInt32 nMethCount = aMethodSeq.getLength();
|
||||
const Reference< XIdlMethod >* pMethods_ = aMethodSeq.getConstArray();
|
||||
for( i = 0 ; i < nMethCount ; i++ )
|
||||
{
|
||||
@@ -2957,7 +2957,7 @@ SbUnoObject* Impl_CreateUnoStruct( const String& aClassName )
|
||||
|
||||
|
||||
// Factory-Klasse fuer das Anlegen von Uno-Structs per DIM AS NEW
|
||||
SbxBase* SbUnoFactory::Create( UINT16, UINT32 )
|
||||
SbxBase* SbUnoFactory::Create( sal_uInt16, sal_uInt32 )
|
||||
{
|
||||
// Ueber SbxId laeuft in Uno nix
|
||||
return NULL;
|
||||
@@ -2990,7 +2990,7 @@ void createAllObjectProperties( SbxObject* pObj )
|
||||
}
|
||||
|
||||
|
||||
void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -3015,7 +3015,7 @@ void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
refVar->PutObject( (SbUnoObject*)xUnoObj );
|
||||
}
|
||||
|
||||
void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -3069,7 +3069,7 @@ void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
}
|
||||
}
|
||||
|
||||
void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -3127,7 +3127,7 @@ void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar,
|
||||
}
|
||||
}
|
||||
|
||||
void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -3151,13 +3151,13 @@ void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, BOOL
|
||||
}
|
||||
}
|
||||
|
||||
void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
// Wir brauchen mindestens 2 Parameter
|
||||
USHORT nParCount = rPar.Count();
|
||||
sal_uInt16 nParCount = rPar.Count();
|
||||
if( nParCount < 3 )
|
||||
{
|
||||
StarBASIC::Error( SbERR_BAD_ARGUMENT );
|
||||
@@ -3166,7 +3166,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
|
||||
// Variable fuer Rueckgabewert
|
||||
SbxVariableRef refVar = rPar.Get(0);
|
||||
refVar->PutBool( FALSE );
|
||||
refVar->PutBool( sal_False );
|
||||
|
||||
// Uno-Objekt holen
|
||||
SbxBaseRef pObj = (SbxBase*)rPar.Get( 1 )->GetObject();
|
||||
@@ -3185,7 +3185,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
if( !xCoreReflection.is() )
|
||||
return;
|
||||
|
||||
for( USHORT i = 2 ; i < nParCount ; i++ )
|
||||
for( sal_uInt16 i = 2 ; i < nParCount ; i++ )
|
||||
{
|
||||
// Interface-Name der struct holen
|
||||
String aIfaceName = rPar.Get( i )->GetString();
|
||||
@@ -3202,11 +3202,11 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
return;
|
||||
}
|
||||
|
||||
// Alles hat geklappt, dann TRUE liefern
|
||||
refVar->PutBool( TRUE );
|
||||
// Alles hat geklappt, dann sal_True liefern
|
||||
refVar->PutBool( sal_True );
|
||||
}
|
||||
|
||||
void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -3220,7 +3220,7 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
|
||||
// Variable fuer Rueckgabewert
|
||||
SbxVariableRef refVar = rPar.Get(0);
|
||||
refVar->PutBool( FALSE );
|
||||
refVar->PutBool( sal_False );
|
||||
|
||||
// Uno-Objekt holen
|
||||
SbxVariableRef xParam = rPar.Get( 1 );
|
||||
@@ -3232,11 +3232,11 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
Any aAny = ((SbUnoObject*)(SbxBase*)pObj)->getUnoAny();
|
||||
TypeClass eType = aAny.getValueType().getTypeClass();
|
||||
if( eType == TypeClass_STRUCT )
|
||||
refVar->PutBool( TRUE );
|
||||
refVar->PutBool( sal_True );
|
||||
}
|
||||
|
||||
|
||||
void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -3249,7 +3249,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
|
||||
// Variable fuer Rueckgabewert
|
||||
SbxVariableRef refVar = rPar.Get(0);
|
||||
refVar->PutBool( FALSE );
|
||||
refVar->PutBool( sal_False );
|
||||
|
||||
// Uno-Objekte holen
|
||||
SbxVariableRef xParam1 = rPar.Get( 1 );
|
||||
@@ -3281,7 +3281,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
//XInterfaceRef x2 = *(XInterfaceRef*)aAny2.get();
|
||||
|
||||
if( x1 == x2 )
|
||||
refVar->PutBool( TRUE );
|
||||
refVar->PutBool( sal_True );
|
||||
}
|
||||
|
||||
typedef std::hash_map< ::rtl::OUString, std::vector< ::rtl::OUString >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleHash;
|
||||
@@ -3511,7 +3511,7 @@ SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t )
|
||||
// Uns selbst gleich wieder als Listener rausnehmen,
|
||||
// die Werte sind alle konstant
|
||||
if( pRes->IsBroadcaster() )
|
||||
EndListening( pRes->GetBroadcaster(), TRUE );
|
||||
EndListening( pRes->GetBroadcaster(), sal_True );
|
||||
}
|
||||
}
|
||||
return pRes;
|
||||
@@ -3595,14 +3595,14 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
if( pUnoCtor && pHint->GetId() == SBX_HINT_DATAWANTED )
|
||||
{
|
||||
// Parameter count -1 because of Param0 == this
|
||||
UINT32 nParamCount = pParams ? ((UINT32)pParams->Count() - 1) : 0;
|
||||
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
|
||||
Sequence<Any> args;
|
||||
BOOL bOutParams = FALSE;
|
||||
sal_Bool bOutParams = sal_False;
|
||||
|
||||
Reference< XServiceConstructorDescription > xCtor = pUnoCtor->getServiceCtorDesc();
|
||||
Sequence< Reference< XParameter > > aParameterSeq = xCtor->getParameters();
|
||||
const Reference< XParameter >* pParameterSeq = aParameterSeq.getConstArray();
|
||||
UINT32 nUnoParamCount = aParameterSeq.getLength();
|
||||
sal_uInt32 nUnoParamCount = aParameterSeq.getLength();
|
||||
|
||||
// Default: Ignore not needed parameters
|
||||
bool bParameterError = false;
|
||||
@@ -3620,8 +3620,8 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
}
|
||||
|
||||
// Too many parameters with context as first parameter?
|
||||
USHORT nSbxParameterOffset = 1;
|
||||
USHORT nParameterOffsetByContext = 0;
|
||||
sal_uInt16 nSbxParameterOffset = 1;
|
||||
sal_uInt16 nParameterOffsetByContext = 0;
|
||||
Reference < XComponentContext > xFirstParamContext;
|
||||
if( nParamCount > nUnoParamCount )
|
||||
{
|
||||
@@ -3632,8 +3632,8 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
nParameterOffsetByContext = 1;
|
||||
}
|
||||
|
||||
UINT32 nEffectiveParamCount = nParamCount - nParameterOffsetByContext;
|
||||
UINT32 nAllocParamCount = nEffectiveParamCount;
|
||||
sal_uInt32 nEffectiveParamCount = nParamCount - nParameterOffsetByContext;
|
||||
sal_uInt32 nAllocParamCount = nEffectiveParamCount;
|
||||
if( nEffectiveParamCount > nUnoParamCount )
|
||||
{
|
||||
if( !bRestParameterMode )
|
||||
@@ -3660,9 +3660,9 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
{
|
||||
args.realloc( nAllocParamCount );
|
||||
Any* pAnyArgs = args.getArray();
|
||||
for( UINT32 i = 0 ; i < nEffectiveParamCount ; i++ )
|
||||
for( sal_uInt32 i = 0 ; i < nEffectiveParamCount ; i++ )
|
||||
{
|
||||
USHORT iSbx = (USHORT)(i + nSbxParameterOffset + nParameterOffsetByContext);
|
||||
sal_uInt16 iSbx = (sal_uInt16)(i + nSbxParameterOffset + nParameterOffsetByContext);
|
||||
|
||||
// bRestParameterMode allows nEffectiveParamCount > nUnoParamCount
|
||||
Reference< XParameter > xParam;
|
||||
@@ -3684,7 +3684,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
if( !bOutParams )
|
||||
{
|
||||
if( xParam->isOut() )
|
||||
bOutParams = TRUE;
|
||||
bOutParams = sal_True;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3729,14 +3729,14 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
{
|
||||
const Any* pAnyArgs = args.getConstArray();
|
||||
|
||||
for( UINT32 j = 0 ; j < nUnoParamCount ; j++ )
|
||||
for( sal_uInt32 j = 0 ; j < nUnoParamCount ; j++ )
|
||||
{
|
||||
Reference< XParameter > xParam = pParameterSeq[j];
|
||||
if( !xParam.is() )
|
||||
continue;
|
||||
|
||||
if( xParam->isOut() )
|
||||
unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pAnyArgs[ j ] );
|
||||
unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3821,8 +3821,8 @@ void SbUnoSingleton::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
{
|
||||
SbxVariable* pVar = pHint->GetVar();
|
||||
SbxArray* pParams = pVar->GetParameters();
|
||||
UINT32 nParamCount = pParams ? ((UINT32)pParams->Count() - 1) : 0;
|
||||
UINT32 nAllowedParamCount = 1;
|
||||
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
|
||||
sal_uInt32 nAllowedParamCount = 1;
|
||||
|
||||
Reference < XComponentContext > xContextToUse;
|
||||
if( nParamCount > 0 )
|
||||
@@ -3881,7 +3881,7 @@ public:
|
||||
~BasicAllListener_Impl();
|
||||
|
||||
// Methoden von XInterface
|
||||
//virtual BOOL queryInterface( Uik aUik, Reference< XInterface > & rOut );
|
||||
//virtual sal_Bool queryInterface( Uik aUik, Reference< XInterface > & rOut );
|
||||
|
||||
// Methoden von XAllListener
|
||||
virtual void SAL_CALL firing(const AllEventObject& Event) throw ( RuntimeException );
|
||||
@@ -3927,13 +3927,13 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet
|
||||
// In Basic Array anlegen
|
||||
SbxArrayRef xSbxArray = new SbxArray( SbxVARIANT );
|
||||
const Any * pArgs = Event.Arguments.getConstArray();
|
||||
INT32 nCount = Event.Arguments.getLength();
|
||||
for( INT32 i = 0; i < nCount; i++ )
|
||||
sal_Int32 nCount = Event.Arguments.getLength();
|
||||
for( sal_Int32 i = 0; i < nCount; i++ )
|
||||
{
|
||||
// Elemente wandeln
|
||||
SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
|
||||
unoToSbxValue( (SbxVariable*)xVar, pArgs[i] );
|
||||
xSbxArray->Put( xVar, sal::static_int_cast< USHORT >(i+1) );
|
||||
xSbxArray->Put( xVar, sal::static_int_cast< sal_uInt16 >(i+1) );
|
||||
}
|
||||
|
||||
pLib->Call( aMethodName, xSbxArray );
|
||||
@@ -3945,7 +3945,7 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet
|
||||
if( pVar )
|
||||
{
|
||||
// #95792 Avoid a second call
|
||||
USHORT nFlags = pVar->GetFlags();
|
||||
sal_uInt16 nFlags = pVar->GetFlags();
|
||||
pVar->SetFlag( SBX_NO_BROADCAST );
|
||||
*pRet = sbxToUnoValueImpl( pVar );
|
||||
pVar->SetFlags( nFlags );
|
||||
@@ -4140,7 +4140,7 @@ sal_Bool SAL_CALL InvocationToAllListenerMapper::hasProperty(const ::rtl::OUStri
|
||||
// Uno-Service erzeugen
|
||||
// 1. Parameter == Prefix-Name der Makros
|
||||
// 2. Parameter == voll qualifizierter Name des Listeners
|
||||
void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
//RTLFUNC(CreateUnoListener)
|
||||
{
|
||||
(void)bWrite;
|
||||
@@ -4204,7 +4204,7 @@ void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
//========================================================================
|
||||
// Represents the DefaultContext property of the ProcessServiceManager
|
||||
// in the Basic runtime system.
|
||||
void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -4232,7 +4232,7 @@ void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite
|
||||
//========================================================================
|
||||
// Creates a Basic wrapper object for a strongly typed Uno value
|
||||
// 1. parameter: Uno type as full qualified type name, e.g. "byte[]"
|
||||
void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -4489,7 +4489,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction,
|
||||
{
|
||||
SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
|
||||
unoToSbxValue( (SbxVariable*)xVar, pArgs[i] );
|
||||
xArray->Put( xVar, sal::static_int_cast< USHORT >(i+1) );
|
||||
xArray->Put( xVar, sal::static_int_cast< sal_uInt16 >(i+1) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4627,8 +4627,8 @@ void disposeComVariablesForBasic( StarBASIC* pBasic )
|
||||
StarBasicDisposeItem* pItem = *it;
|
||||
|
||||
SbxArray* pArray = pItem->m_pRegisteredVariables;
|
||||
USHORT nCount = pArray->Count();
|
||||
for( USHORT i = 0 ; i < nCount ; ++i )
|
||||
sal_uInt16 nCount = pArray->Count();
|
||||
for( sal_uInt16 i = 0 ; i < nCount ; ++i )
|
||||
{
|
||||
SbxVariable* pVar = pArray->Get( i );
|
||||
pVar->ClearComListener();
|
||||
@@ -4673,8 +4673,8 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP
|
||||
bool bSuccess = false;
|
||||
|
||||
SbxArray* pModIfaces = pClassData->mxIfaces;
|
||||
USHORT nCount = pModIfaces->Count();
|
||||
for( USHORT i = 0 ; i < nCount ; ++i )
|
||||
sal_uInt16 nCount = pModIfaces->Count();
|
||||
for( sal_uInt16 i = 0 ; i < nCount ; ++i )
|
||||
{
|
||||
SbxVariable* pVar = pModIfaces->Get( i );
|
||||
::rtl::OUString aIfaceName = pVar->GetName();
|
||||
|
||||
+142
-142
@@ -265,7 +265,7 @@ DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence<
|
||||
if ( pInfo )
|
||||
{
|
||||
sal_Int32 nSbxOptional = 0;
|
||||
USHORT n = 1;
|
||||
sal_uInt16 n = 1;
|
||||
for ( const SbxParamInfo* pParamInfo = pInfo->GetParam( n ); pParamInfo; pParamInfo = pInfo->GetParam( ++n ) )
|
||||
{
|
||||
if ( ( pParamInfo->nFlags & SBX_OPTIONAL ) != 0 )
|
||||
@@ -289,7 +289,7 @@ DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence<
|
||||
{
|
||||
SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
|
||||
unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), pParams[i] );
|
||||
xSbxParams->Put( xSbxVar, static_cast< USHORT >( i ) + 1 );
|
||||
xSbxParams->Put( xSbxVar, static_cast< sal_uInt16 >( i ) + 1 );
|
||||
|
||||
// Enable passing by ref
|
||||
if ( xSbxVar->GetType() != SbxVARIANT )
|
||||
@@ -312,7 +312,7 @@ DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence<
|
||||
if ( pInfo_ )
|
||||
{
|
||||
OutParamMap aOutParamMap;
|
||||
for ( USHORT n = 1, nCount = xSbxParams->Count(); n < nCount; ++n )
|
||||
for ( sal_uInt16 n = 1, nCount = xSbxParams->Count(); n < nCount; ++n )
|
||||
{
|
||||
const SbxParamInfo* pParamInfo = pInfo_->GetParam( n );
|
||||
if ( pParamInfo && ( pParamInfo->eType & SbxBYREF ) != 0 )
|
||||
@@ -410,7 +410,7 @@ SbMethodRef DocObjectWrapper::getMethod( const rtl::OUString& aName ) throw (Run
|
||||
SbMethodRef pMethod = NULL;
|
||||
if ( m_pMod )
|
||||
{
|
||||
USHORT nSaveFlgs = m_pMod->GetFlags();
|
||||
sal_uInt16 nSaveFlgs = m_pMod->GetFlags();
|
||||
// Limit search to this module
|
||||
m_pMod->ResetFlag( SBX_GBLSEARCH );
|
||||
pMethod = (SbMethod*) m_pMod->SbModule::Find( aName, SbxCLASS_METHOD );
|
||||
@@ -425,7 +425,7 @@ SbPropertyRef DocObjectWrapper::getProperty( const rtl::OUString& aName ) throw
|
||||
SbPropertyRef pProperty = NULL;
|
||||
if ( m_pMod )
|
||||
{
|
||||
USHORT nSaveFlgs = m_pMod->GetFlags();
|
||||
sal_uInt16 nSaveFlgs = m_pMod->GetFlags();
|
||||
// Limit search to this module.
|
||||
m_pMod->ResetFlag( SBX_GBLSEARCH );
|
||||
pProperty = (SbProperty*)m_pMod->SbModule::Find( aName, SbxCLASS_PROPERTY );
|
||||
@@ -521,7 +521,7 @@ bool VBAUnlockControllers( StarBASIC* pBasic )
|
||||
// Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen
|
||||
// Elemente von anderen Modulen aus gefunden werden koennen.
|
||||
|
||||
SbModule::SbModule( const String& rName, BOOL bVBACompat )
|
||||
SbModule::SbModule( const String& rName, sal_Bool bVBACompat )
|
||||
: SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASICModule") ) ),
|
||||
pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false )
|
||||
{
|
||||
@@ -557,9 +557,9 @@ SbModule::GetUnoModule()
|
||||
return mxWrapper;
|
||||
}
|
||||
|
||||
BOOL SbModule::IsCompiled() const
|
||||
sal_Bool SbModule::IsCompiled() const
|
||||
{
|
||||
return BOOL( pImage != 0 );
|
||||
return sal_Bool( pImage != 0 );
|
||||
}
|
||||
|
||||
const SbxObject* SbModule::FindType( String aTypeName ) const
|
||||
@@ -578,12 +578,12 @@ void SbModule::StartDefinitions()
|
||||
|
||||
// Methoden und Properties bleiben erhalten, sind jedoch ungueltig
|
||||
// schliesslich sind ja u.U. die Infos belegt
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for( i = 0; i < pMethods->Count(); i++ )
|
||||
{
|
||||
SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) );
|
||||
if( p )
|
||||
p->bInvalid = TRUE;
|
||||
p->bInvalid = sal_True;
|
||||
}
|
||||
for( i = 0; i < pProps->Count(); )
|
||||
{
|
||||
@@ -609,11 +609,11 @@ SbMethod* SbModule::GetMethod( const String& rName, SbxDataType t )
|
||||
pMeth->SetParent( this );
|
||||
pMeth->SetFlags( SBX_READ );
|
||||
pMethods->Put( pMeth, pMethods->Count() );
|
||||
StartListening( pMeth->GetBroadcaster(), TRUE );
|
||||
StartListening( pMeth->GetBroadcaster(), sal_True );
|
||||
}
|
||||
// Per Default ist die Methode GUELTIG, da sie auch vom Compiler
|
||||
// (Codegenerator) erzeugt werden kann
|
||||
pMeth->bInvalid = FALSE;
|
||||
pMeth->bInvalid = sal_False;
|
||||
pMeth->ResetFlag( SBX_FIXED );
|
||||
pMeth->SetFlag( SBX_WRITE );
|
||||
pMeth->SetType( t );
|
||||
@@ -637,7 +637,7 @@ SbProperty* SbModule::GetProperty( const String& rName, SbxDataType t )
|
||||
pProp->SetFlag( SBX_READWRITE );
|
||||
pProp->SetParent( this );
|
||||
pProps->Put( pProp, pProps->Count() );
|
||||
StartListening( pProp->GetBroadcaster(), TRUE );
|
||||
StartListening( pProp->GetBroadcaster(), sal_True );
|
||||
}
|
||||
return pProp;
|
||||
}
|
||||
@@ -655,7 +655,7 @@ SbProcedureProperty* SbModule::GetProcedureProperty
|
||||
pProp->SetFlag( SBX_READWRITE );
|
||||
pProp->SetParent( this );
|
||||
pProps->Put( pProp, pProps->Count() );
|
||||
StartListening( pProp->GetBroadcaster(), TRUE );
|
||||
StartListening( pProp->GetBroadcaster(), sal_True );
|
||||
}
|
||||
return pProp;
|
||||
}
|
||||
@@ -674,7 +674,7 @@ SbIfaceMapperMethod* SbModule::GetIfaceMapperMethod
|
||||
pMapperMethod->SetFlags( SBX_READ );
|
||||
pMethods->Put( pMapperMethod, pMethods->Count() );
|
||||
}
|
||||
pMapperMethod->bInvalid = FALSE;
|
||||
pMapperMethod->bInvalid = sal_False;
|
||||
return pMapperMethod;
|
||||
}
|
||||
|
||||
@@ -687,9 +687,9 @@ TYPEINIT1(SbIfaceMapperMethod,SbMethod)
|
||||
|
||||
// Aus dem Codegenerator: Ungueltige Eintraege entfernen
|
||||
|
||||
void SbModule::EndDefinitions( BOOL bNewState )
|
||||
void SbModule::EndDefinitions( sal_Bool bNewState )
|
||||
{
|
||||
for( USHORT i = 0; i < pMethods->Count(); )
|
||||
for( sal_uInt16 i = 0; i < pMethods->Count(); )
|
||||
{
|
||||
SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) );
|
||||
if( p )
|
||||
@@ -705,7 +705,7 @@ void SbModule::EndDefinitions( BOOL bNewState )
|
||||
else
|
||||
i++;
|
||||
}
|
||||
SetModified( TRUE );
|
||||
SetModified( sal_True );
|
||||
}
|
||||
|
||||
void SbModule::Clear()
|
||||
@@ -812,7 +812,7 @@ void SbModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
// side effects when using name as variable implicitely
|
||||
bool bForwardToSbxObject = true;
|
||||
|
||||
ULONG nId = pHint->GetId();
|
||||
sal_uIntPtr nId = pHint->GetId();
|
||||
if( (nId == SBX_HINT_DATAWANTED || nId == SBX_HINT_DATACHANGED) &&
|
||||
pVar->GetName().EqualsIgnoreCaseAscii( "name" ) )
|
||||
bForwardToSbxObject = false;
|
||||
@@ -869,7 +869,7 @@ void SbModule::SetSource32( const ::rtl::OUString& r )
|
||||
aTok.SetCompatible( true );
|
||||
else if ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) )
|
||||
{
|
||||
BOOL bIsVBA = ( aTok.GetDbl()== 1 );
|
||||
sal_Bool bIsVBA = ( aTok.GetDbl()== 1 );
|
||||
SetVBACompat( bIsVBA );
|
||||
aTok.SetCompatible( bIsVBA );
|
||||
}
|
||||
@@ -881,7 +881,7 @@ void SbModule::SetSource32( const ::rtl::OUString& r )
|
||||
SbMethod* pMeth = NULL;
|
||||
if( eEndTok != NIL )
|
||||
{
|
||||
USHORT nLine1 = aTok.GetLine();
|
||||
sal_uInt16 nLine1 = aTok.GetLine();
|
||||
if( aTok.Next() == SYMBOL )
|
||||
{
|
||||
String aName_( aTok.GetSym() );
|
||||
@@ -891,7 +891,7 @@ void SbModule::SetSource32( const ::rtl::OUString& r )
|
||||
pMeth = GetMethod( aName_, t );
|
||||
pMeth->nLine1 = pMeth->nLine2 = nLine1;
|
||||
// Die Methode ist erst mal GUELTIG
|
||||
pMeth->bInvalid = FALSE;
|
||||
pMeth->bInvalid = sal_False;
|
||||
}
|
||||
else
|
||||
eEndTok = NIL;
|
||||
@@ -911,18 +911,18 @@ void SbModule::SetSource32( const ::rtl::OUString& r )
|
||||
pMeth->nLine2 = aTok.GetLine();
|
||||
}
|
||||
}
|
||||
EndDefinitions( TRUE );
|
||||
EndDefinitions( sal_True );
|
||||
}
|
||||
|
||||
void SbModule::SetComment( const String& r )
|
||||
{
|
||||
aComment = r;
|
||||
SetModified( TRUE );
|
||||
SetModified( sal_True );
|
||||
}
|
||||
|
||||
SbMethod* SbModule::GetFunctionForLine( USHORT nLine )
|
||||
SbMethod* SbModule::GetFunctionForLine( sal_uInt16 nLine )
|
||||
{
|
||||
for( USHORT i = 0; i < pMethods->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pMethods->Count(); i++ )
|
||||
{
|
||||
SbMethod* p = (SbMethod*) pMethods->Get( i );
|
||||
if( p->GetSbxId() == SBXID_BASICMETHOD )
|
||||
@@ -936,14 +936,14 @@ SbMethod* SbModule::GetFunctionForLine( USHORT nLine )
|
||||
|
||||
// Ausstrahlen eines Hints an alle Basics
|
||||
|
||||
static void _SendHint( SbxObject* pObj, ULONG nId, SbMethod* p )
|
||||
static void _SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p )
|
||||
{
|
||||
// Selbst ein BASIC?
|
||||
if( pObj->IsA( TYPE(StarBASIC) ) && pObj->IsBroadcaster() )
|
||||
pObj->GetBroadcaster().Broadcast( SbxHint( nId, p ) );
|
||||
// Dann die Unterobjekte fragen
|
||||
SbxArray* pObjs = pObj->GetObjects();
|
||||
for( USHORT i = 0; i < pObjs->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pObjs->Count(); i++ )
|
||||
{
|
||||
SbxVariable* pVar = pObjs->Get( i );
|
||||
if( pVar->IsA( TYPE(SbxObject) ) )
|
||||
@@ -951,7 +951,7 @@ static void _SendHint( SbxObject* pObj, ULONG nId, SbMethod* p )
|
||||
}
|
||||
}
|
||||
|
||||
static void SendHint( SbxObject* pObj, ULONG nId, SbMethod* p )
|
||||
static void SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p )
|
||||
{
|
||||
while( pObj->GetParent() )
|
||||
pObj = pObj->GetParent();
|
||||
@@ -988,8 +988,8 @@ void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
|
||||
|
||||
// Ueber alle Sub-Basics gehen
|
||||
SbxArray* pObjs = pBasic->GetObjects();
|
||||
USHORT nCount = pObjs->Count();
|
||||
for( USHORT i = 0 ; i < nCount ; i++ )
|
||||
sal_uInt16 nCount = pObjs->Count();
|
||||
for( sal_uInt16 i = 0 ; i < nCount ; i++ )
|
||||
{
|
||||
SbxVariable* pObjVar = pObjs->Get( i );
|
||||
StarBASIC* pSubBasic = PTR_CAST( StarBASIC, pObjVar );
|
||||
@@ -1013,24 +1013,24 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic )
|
||||
if( ((StarBASIC*)p) != pBasic )
|
||||
ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p );
|
||||
}
|
||||
BOOL SbModule::IsVBACompat() const
|
||||
sal_Bool SbModule::IsVBACompat() const
|
||||
{
|
||||
return mbVBACompat;
|
||||
}
|
||||
|
||||
void SbModule::SetVBACompat( BOOL bCompat )
|
||||
void SbModule::SetVBACompat( sal_Bool bCompat )
|
||||
{
|
||||
mbVBACompat = bCompat;
|
||||
}
|
||||
// Ausfuehren eines BASIC-Unterprogramms
|
||||
USHORT SbModule::Run( SbMethod* pMeth )
|
||||
sal_uInt16 SbModule::Run( SbMethod* pMeth )
|
||||
{
|
||||
static USHORT nMaxCallLevel = 0;
|
||||
static sal_uInt16 nMaxCallLevel = 0;
|
||||
static String aMSOMacroRuntimeLibName = String::CreateFromAscii( "Launcher" );
|
||||
static String aMSOMacroRuntimeAppSymbol = String::CreateFromAscii( "Application" );
|
||||
|
||||
USHORT nRes = 0;
|
||||
BOOL bDelInst = BOOL( pINST == NULL );
|
||||
sal_uInt16 nRes = 0;
|
||||
sal_Bool bDelInst = sal_Bool( pINST == NULL );
|
||||
StarBASICRef xBasic;
|
||||
if( bDelInst )
|
||||
{
|
||||
@@ -1044,7 +1044,7 @@ USHORT SbModule::Run( SbMethod* pMeth )
|
||||
|
||||
// Launcher problem
|
||||
// i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already
|
||||
BOOL bWasError = SbxBase::GetError() != 0;
|
||||
sal_Bool bWasError = SbxBase::GetError() != 0;
|
||||
SbxVariable* pMSOMacroRuntimeLibVar = Find( aMSOMacroRuntimeLibName, SbxCLASS_OBJECT );
|
||||
if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) )
|
||||
SbxBase::ResetError();
|
||||
@@ -1053,7 +1053,7 @@ USHORT SbModule::Run( SbMethod* pMeth )
|
||||
StarBASIC* pMSOMacroRuntimeLib = PTR_CAST(StarBASIC,pMSOMacroRuntimeLibVar);
|
||||
if( pMSOMacroRuntimeLib )
|
||||
{
|
||||
USHORT nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH;
|
||||
sal_uInt16 nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH;
|
||||
pMSOMacroRuntimeLib->ResetFlag( SBX_GBLSEARCH );
|
||||
SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( aMSOMacroRuntimeAppSymbol, SbxCLASS_METHOD );
|
||||
pMSOMacroRuntimeLib->SetFlag( nGblFlag );
|
||||
@@ -1100,7 +1100,7 @@ USHORT SbModule::Run( SbMethod* pMeth )
|
||||
GlobalRunInit( /* bBasicStart = */ bDelInst );
|
||||
|
||||
// Trat ein Compiler-Fehler auf? Dann starten wir nicht
|
||||
if( GetSbData()->bGlobalInitErr == FALSE )
|
||||
if( GetSbData()->bGlobalInitErr == sal_False )
|
||||
{
|
||||
if( bDelInst )
|
||||
{
|
||||
@@ -1126,7 +1126,7 @@ USHORT SbModule::Run( SbMethod* pMeth )
|
||||
pINST->pRun = pRt;
|
||||
if ( mbVBACompat )
|
||||
{
|
||||
pINST->EnableCompatibility( TRUE );
|
||||
pINST->EnableCompatibility( sal_True );
|
||||
}
|
||||
while( pRt->Step() ) {}
|
||||
if( pRt->pNext )
|
||||
@@ -1151,7 +1151,7 @@ USHORT SbModule::Run( SbMethod* pMeth )
|
||||
GetpApp()->Yield();
|
||||
}
|
||||
|
||||
nRes = TRUE;
|
||||
nRes = sal_True;
|
||||
pINST->pRun = pRt->pNext;
|
||||
pINST->nCallLvl--; // Call-Level wieder runter
|
||||
|
||||
@@ -1172,7 +1172,7 @@ USHORT SbModule::Run( SbMethod* pMeth )
|
||||
clearNativeObjectWrapperVector();
|
||||
|
||||
DBG_ASSERT(pINST->nCallLvl==0,"BASIC-Call-Level > 0");
|
||||
delete pINST, pINST = NULL, bDelInst = FALSE;
|
||||
delete pINST, pINST = NULL, bDelInst = sal_False;
|
||||
|
||||
// #i30690
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
@@ -1226,9 +1226,9 @@ void SbModule::RunInit()
|
||||
&& pImage->GetFlag( SBIMG_INITCODE ) )
|
||||
{
|
||||
// Flag setzen, dass RunInit aktiv ist (Testtool)
|
||||
GetSbData()->bRunInit = TRUE;
|
||||
GetSbData()->bRunInit = sal_True;
|
||||
|
||||
// BOOL bDelInst = BOOL( pINST == NULL );
|
||||
// sal_Bool bDelInst = sal_Bool( pINST == NULL );
|
||||
// if( bDelInst )
|
||||
// pINST = new SbiInstance( (StarBASIC*) GetParent() );
|
||||
SbModule* pOldMod = pMOD;
|
||||
@@ -1254,11 +1254,11 @@ void SbModule::RunInit()
|
||||
pMOD = pOldMod;
|
||||
// if( bDelInst )
|
||||
// delete pINST, pINST = NULL;
|
||||
pImage->bInit = TRUE;
|
||||
pImage->bFirstInit = FALSE;
|
||||
pImage->bInit = sal_True;
|
||||
pImage->bFirstInit = sal_False;
|
||||
|
||||
// RunInit ist nicht mehr aktiv
|
||||
GetSbData()->bRunInit = FALSE;
|
||||
GetSbData()->bRunInit = sal_False;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1292,7 +1292,7 @@ void SbModule::RemoveVars()
|
||||
|
||||
void SbModule::ClearPrivateVars()
|
||||
{
|
||||
for( USHORT i = 0 ; i < pProps->Count() ; i++ )
|
||||
for( sal_uInt16 i = 0 ; i < pProps->Count() ; i++ )
|
||||
{
|
||||
SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) );
|
||||
if( p )
|
||||
@@ -1303,12 +1303,12 @@ void SbModule::ClearPrivateVars()
|
||||
SbxArray* pArray = PTR_CAST(SbxArray,p->GetObject());
|
||||
if( pArray )
|
||||
{
|
||||
for( USHORT j = 0 ; j < pArray->Count() ; j++ )
|
||||
for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ )
|
||||
{
|
||||
SbxVariable* pj = PTR_CAST(SbxVariable,pArray->Get( j ));
|
||||
pj->SbxValue::Clear();
|
||||
/*
|
||||
USHORT nFlags = pj->GetFlags();
|
||||
sal_uInt16 nFlags = pj->GetFlags();
|
||||
pj->SetFlags( (nFlags | SBX_WRITE) & (~SBX_FIXED) );
|
||||
pj->PutEmpty();
|
||||
pj->SetFlags( nFlags );
|
||||
@@ -1320,7 +1320,7 @@ void SbModule::ClearPrivateVars()
|
||||
{
|
||||
p->SbxValue::Clear();
|
||||
/*
|
||||
USHORT nFlags = p->GetFlags();
|
||||
sal_uInt16 nFlags = p->GetFlags();
|
||||
p->SetFlags( (nFlags | SBX_WRITE) & (~SBX_FIXED) );
|
||||
p->PutEmpty();
|
||||
p->SetFlags( nFlags );
|
||||
@@ -1360,7 +1360,7 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic )
|
||||
{
|
||||
(void)pDeletedBasic;
|
||||
|
||||
for( USHORT i = 0 ; i < pProps->Count() ; i++ )
|
||||
for( sal_uInt16 i = 0 ; i < pProps->Count() ; i++ )
|
||||
{
|
||||
SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) );
|
||||
if( p )
|
||||
@@ -1370,7 +1370,7 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic )
|
||||
SbxArray* pArray = PTR_CAST(SbxArray,p->GetObject());
|
||||
if( pArray )
|
||||
{
|
||||
for( USHORT j = 0 ; j < pArray->Count() ; j++ )
|
||||
for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ )
|
||||
{
|
||||
SbxVariable* pVar = PTR_CAST(SbxVariable,pArray->Get( j ));
|
||||
implClearIfVarDependsOnDeletedBasic( pVar, pDeletedBasic );
|
||||
@@ -1390,7 +1390,7 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic )
|
||||
void StarBASIC::ClearAllModuleVars( void )
|
||||
{
|
||||
// Eigene Module initialisieren
|
||||
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ )
|
||||
{
|
||||
SbModule* pModule = (SbModule*)pModules->Get( nMod );
|
||||
// Nur initialisieren, wenn der Startcode schon ausgefuehrt wurde
|
||||
@@ -1401,7 +1401,7 @@ void StarBASIC::ClearAllModuleVars( void )
|
||||
/* #88042 This code can delete already used public vars during runtime!
|
||||
// Alle Objekte ueberpruefen, ob es sich um ein Basic handelt
|
||||
// Wenn ja, auch dort initialisieren
|
||||
for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
for ( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ )
|
||||
{
|
||||
SbxVariable* pVar = pObjs->Get( nObj );
|
||||
StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar);
|
||||
@@ -1412,7 +1412,7 @@ void StarBASIC::ClearAllModuleVars( void )
|
||||
}
|
||||
|
||||
// Ausfuehren des Init-Codes aller Module
|
||||
void SbModule::GlobalRunInit( BOOL bBasicStart )
|
||||
void SbModule::GlobalRunInit( sal_Bool bBasicStart )
|
||||
{
|
||||
// Wenn kein Basic-Start, nur initialisieren, wenn Modul uninitialisiert
|
||||
if( !bBasicStart )
|
||||
@@ -1423,7 +1423,7 @@ void SbModule::GlobalRunInit( BOOL bBasicStart )
|
||||
// Anhand dieses Flags kann in SbModule::Run() nach dem Aufruf
|
||||
// von GlobalRunInit festgestellt werden, ob beim initialisieren
|
||||
// der Module ein Fehler auftrat. Dann wird nicht gestartet.
|
||||
GetSbData()->bGlobalInitErr = FALSE;
|
||||
GetSbData()->bGlobalInitErr = sal_False;
|
||||
|
||||
// Parent vom Modul ist ein Basic
|
||||
StarBASIC *pBasic = PTR_CAST(StarBASIC,GetParent());
|
||||
@@ -1470,15 +1470,15 @@ void SbModule::GlobalRunDeInit( void )
|
||||
// Suche nach dem naechsten STMNT-Befehl im Code. Wird vom STMNT-
|
||||
// Opcode verwendet, um die Endspalte zu setzen.
|
||||
|
||||
const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol ) const
|
||||
const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol ) const
|
||||
{
|
||||
return FindNextStmnt( p, nLine, nCol, FALSE );
|
||||
return FindNextStmnt( p, nLine, nCol, sal_False );
|
||||
}
|
||||
|
||||
const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol,
|
||||
BOOL bFollowJumps, const SbiImage* pImg ) const
|
||||
const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol,
|
||||
sal_Bool bFollowJumps, const SbiImage* pImg ) const
|
||||
{
|
||||
UINT32 nPC = (UINT32) ( p - (const BYTE*) pImage->GetCode() );
|
||||
sal_uInt32 nPC = (sal_uInt32) ( p - (const sal_uInt8*) pImage->GetCode() );
|
||||
while( nPC < pImage->GetCodeSize() )
|
||||
{
|
||||
SbiOpcode eOp = (SbiOpcode ) ( *p++ );
|
||||
@@ -1486,20 +1486,20 @@ const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol,
|
||||
if( bFollowJumps && eOp == _JUMP && pImg )
|
||||
{
|
||||
DBG_ASSERT( pImg, "FindNextStmnt: pImg==NULL with FollowJumps option" );
|
||||
UINT32 nOp1 = *p++; nOp1 |= *p++ << 8;
|
||||
sal_uInt32 nOp1 = *p++; nOp1 |= *p++ << 8;
|
||||
nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
|
||||
p = (const BYTE*) pImg->GetCode() + nOp1;
|
||||
p = (const sal_uInt8*) pImg->GetCode() + nOp1;
|
||||
}
|
||||
else if( eOp >= SbOP1_START && eOp <= SbOP1_END )
|
||||
p += 4, nPC += 4;
|
||||
else if( eOp == _STMNT )
|
||||
{
|
||||
UINT32 nl, nc;
|
||||
sal_uInt32 nl, nc;
|
||||
nl = *p++; nl |= *p++ << 8;
|
||||
nl |= *p++ << 16 ; nl |= *p++ << 24;
|
||||
nc = *p++; nc |= *p++ << 8;
|
||||
nc |= *p++ << 16 ; nc |= *p++ << 24;
|
||||
nLine = (USHORT)nl; nCol = (USHORT)nc;
|
||||
nLine = (sal_uInt16)nl; nCol = (sal_uInt16)nc;
|
||||
return p;
|
||||
}
|
||||
else if( eOp >= SbOP2_START && eOp <= SbOP2_END )
|
||||
@@ -1515,16 +1515,16 @@ const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol,
|
||||
|
||||
// Testen, ob eine Zeile STMNT-Opcodes enthaelt
|
||||
|
||||
BOOL SbModule::IsBreakable( USHORT nLine ) const
|
||||
sal_Bool SbModule::IsBreakable( sal_uInt16 nLine ) const
|
||||
{
|
||||
if( !pImage )
|
||||
return FALSE;
|
||||
const BYTE* p = (const BYTE* ) pImage->GetCode();
|
||||
USHORT nl, nc;
|
||||
return sal_False;
|
||||
const sal_uInt8* p = (const sal_uInt8* ) pImage->GetCode();
|
||||
sal_uInt16 nl, nc;
|
||||
while( ( p = FindNextStmnt( p, nl, nc ) ) != NULL )
|
||||
if( nl == nLine )
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return sal_True;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
size_t SbModule::GetBPCount() const
|
||||
@@ -1532,7 +1532,7 @@ size_t SbModule::GetBPCount() const
|
||||
return pBreaks ? pBreaks->size() : 0;
|
||||
}
|
||||
|
||||
USHORT SbModule::GetBP( size_t n ) const
|
||||
sal_uInt16 SbModule::GetBP( size_t n ) const
|
||||
{
|
||||
if( pBreaks && n < pBreaks->size() )
|
||||
return pBreaks->operator[]( n );
|
||||
@@ -1540,34 +1540,34 @@ USHORT SbModule::GetBP( size_t n ) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL SbModule::IsBP( USHORT nLine ) const
|
||||
sal_Bool SbModule::IsBP( sal_uInt16 nLine ) const
|
||||
{
|
||||
if( pBreaks )
|
||||
{
|
||||
for( size_t i = 0; i < pBreaks->size(); i++ )
|
||||
{
|
||||
USHORT b = pBreaks->operator[]( i );
|
||||
sal_uInt16 b = pBreaks->operator[]( i );
|
||||
if( b == nLine )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
if( b < nLine )
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbModule::SetBP( USHORT nLine )
|
||||
sal_Bool SbModule::SetBP( sal_uInt16 nLine )
|
||||
{
|
||||
if( !IsBreakable( nLine ) )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
if( !pBreaks )
|
||||
pBreaks = new SbiBreakpoints;
|
||||
size_t i;
|
||||
for( i = 0; i < pBreaks->size(); i++ )
|
||||
{
|
||||
USHORT b = pBreaks->operator[]( i );
|
||||
sal_uInt16 b = pBreaks->operator[]( i );
|
||||
if( b == nLine )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
if( b < nLine )
|
||||
break;
|
||||
}
|
||||
@@ -1580,18 +1580,18 @@ BOOL SbModule::SetBP( USHORT nLine )
|
||||
return IsBreakable( nLine );
|
||||
}
|
||||
|
||||
BOOL SbModule::ClearBP( USHORT nLine )
|
||||
sal_Bool SbModule::ClearBP( sal_uInt16 nLine )
|
||||
{
|
||||
BOOL bRes = FALSE;
|
||||
sal_Bool bRes = sal_False;
|
||||
if( pBreaks )
|
||||
{
|
||||
for( size_t i = 0; i < pBreaks->size(); i++ )
|
||||
{
|
||||
USHORT b = pBreaks->operator[]( i );
|
||||
sal_uInt16 b = pBreaks->operator[]( i );
|
||||
if( b == nLine )
|
||||
{
|
||||
pBreaks->erase( pBreaks->begin() + i );
|
||||
bRes = TRUE;
|
||||
bRes = sal_True;
|
||||
break;
|
||||
}
|
||||
if( b < nLine )
|
||||
@@ -1614,39 +1614,39 @@ SbModule::fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg ) const
|
||||
{
|
||||
if ( !pImg )
|
||||
pImg = pImage;
|
||||
for( UINT32 i = 0; i < pMethods->Count(); i++ )
|
||||
for( sal_uInt32 i = 0; i < pMethods->Count(); i++ )
|
||||
{
|
||||
SbMethod* pMeth = PTR_CAST(SbMethod,pMethods->Get( (USHORT)i ) );
|
||||
SbMethod* pMeth = PTR_CAST(SbMethod,pMethods->Get( (sal_uInt16)i ) );
|
||||
if( pMeth )
|
||||
{
|
||||
//fixup method start positions
|
||||
if ( bCvtToLegacy )
|
||||
pMeth->nStart = pImg->CalcLegacyOffset( pMeth->nStart );
|
||||
else
|
||||
pMeth->nStart = pImg->CalcNewOffset( (USHORT)pMeth->nStart );
|
||||
pMeth->nStart = pImg->CalcNewOffset( (sal_uInt16)pMeth->nStart );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOL SbModule::LoadData( SvStream& rStrm, USHORT nVer )
|
||||
sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
||||
{
|
||||
Clear();
|
||||
if( !SbxObject::LoadData( rStrm, 1 ) )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
// Precaution...
|
||||
SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
|
||||
BYTE bImage;
|
||||
sal_uInt8 bImage;
|
||||
rStrm >> bImage;
|
||||
if( bImage )
|
||||
{
|
||||
SbiImage* p = new SbiImage;
|
||||
UINT32 nImgVer = 0;
|
||||
sal_uInt32 nImgVer = 0;
|
||||
|
||||
if( !p->Load( rStrm, nImgVer ) )
|
||||
{
|
||||
delete p;
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
// If the image is in old format, we fix up the method start offsets
|
||||
if ( nImgVer < B_EXT_IMG_VERSION )
|
||||
@@ -1674,24 +1674,24 @@ BOOL SbModule::LoadData( SvStream& rStrm, USHORT nVer )
|
||||
delete p;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL SbModule::StoreData( SvStream& rStrm ) const
|
||||
sal_Bool SbModule::StoreData( SvStream& rStrm ) const
|
||||
{
|
||||
BOOL bFixup = ( pImage && !pImage->ExceedsLegacyLimits() );
|
||||
sal_Bool bFixup = ( pImage && !pImage->ExceedsLegacyLimits() );
|
||||
if ( bFixup )
|
||||
fixUpMethodStart( true );
|
||||
BOOL bRet = SbxObject::StoreData( rStrm );
|
||||
sal_Bool bRet = SbxObject::StoreData( rStrm );
|
||||
if ( !bRet )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
if( pImage )
|
||||
{
|
||||
pImage->aOUSource = aOUSource;
|
||||
pImage->aComment = aComment;
|
||||
pImage->aName = GetName();
|
||||
rStrm << (BYTE) 1;
|
||||
rStrm << (sal_uInt8) 1;
|
||||
// # PCode is saved only for legacy formats only
|
||||
// It should be noted that it probably isn't necessary
|
||||
// It would be better not to store the image ( more flexible with
|
||||
@@ -1708,12 +1708,12 @@ BOOL SbModule::StoreData( SvStream& rStrm ) const
|
||||
aImg.aOUSource = aOUSource;
|
||||
aImg.aComment = aComment;
|
||||
aImg.aName = GetName();
|
||||
rStrm << (BYTE) 1;
|
||||
rStrm << (sal_uInt8) 1;
|
||||
return aImg.Save( rStrm );
|
||||
}
|
||||
}
|
||||
|
||||
BOOL SbModule::ExceedsLegacyModuleSize()
|
||||
sal_Bool SbModule::ExceedsLegacyModuleSize()
|
||||
{
|
||||
if ( !IsCompiled() )
|
||||
Compile();
|
||||
@@ -1724,17 +1724,17 @@ BOOL SbModule::ExceedsLegacyModuleSize()
|
||||
|
||||
|
||||
// Store only image, no source
|
||||
BOOL SbModule::StoreBinaryData( SvStream& rStrm )
|
||||
sal_Bool SbModule::StoreBinaryData( SvStream& rStrm )
|
||||
{
|
||||
return StoreBinaryData( rStrm, 0 );
|
||||
}
|
||||
|
||||
BOOL SbModule::StoreBinaryData( SvStream& rStrm, USHORT nVer )
|
||||
sal_Bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
|
||||
{
|
||||
BOOL bRet = Compile();
|
||||
sal_Bool bRet = Compile();
|
||||
if( bRet )
|
||||
{
|
||||
BOOL bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
|
||||
sal_Bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
|
||||
|
||||
if ( bFixup ) // save in old image format, fix up method starts
|
||||
fixUpMethodStart( true );
|
||||
@@ -1745,7 +1745,7 @@ BOOL SbModule::StoreBinaryData( SvStream& rStrm, USHORT nVer )
|
||||
pImage->aComment = aComment;
|
||||
pImage->aName = GetName();
|
||||
|
||||
rStrm << (BYTE) 1;
|
||||
rStrm << (sal_uInt8) 1;
|
||||
if ( nVer )
|
||||
bRet = pImage->Save( rStrm, B_EXT_IMG_VERSION );
|
||||
else
|
||||
@@ -1762,7 +1762,7 @@ BOOL SbModule::StoreBinaryData( SvStream& rStrm, USHORT nVer )
|
||||
// Called for >= OO 1.0 passwd protected libraries only
|
||||
//
|
||||
|
||||
BOOL SbModule::LoadBinaryData( SvStream& rStrm )
|
||||
sal_Bool SbModule::LoadBinaryData( SvStream& rStrm )
|
||||
{
|
||||
::rtl::OUString aKeepSource = aOUSource;
|
||||
bool bRet = LoadData( rStrm, 2 );
|
||||
@@ -1772,10 +1772,10 @@ BOOL SbModule::LoadBinaryData( SvStream& rStrm )
|
||||
}
|
||||
|
||||
|
||||
BOOL SbModule::LoadCompleted()
|
||||
sal_Bool SbModule::LoadCompleted()
|
||||
{
|
||||
SbxArray* p = GetMethods();
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for( i = 0; i < p->Count(); i++ )
|
||||
{
|
||||
SbMethod* q = PTR_CAST(SbMethod,p->Get( i ) );
|
||||
@@ -1789,7 +1789,7 @@ BOOL SbModule::LoadCompleted()
|
||||
if( q )
|
||||
q->pMod = this;
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint )
|
||||
@@ -1818,12 +1818,12 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
|
||||
aVals.eType = SbxVARIANT;
|
||||
|
||||
SbxArray* pArg = pVar->GetParameters();
|
||||
USHORT nVarParCount = (pArg != NULL) ? pArg->Count() : 0;
|
||||
sal_uInt16 nVarParCount = (pArg != NULL) ? pArg->Count() : 0;
|
||||
if( nVarParCount > 1 )
|
||||
{
|
||||
SbxArrayRef xMethParameters = new SbxArray;
|
||||
xMethParameters->Put( pMeth, 0 ); // Method as parameter 0
|
||||
for( USHORT i = 1 ; i < nVarParCount ; ++i )
|
||||
for( sal_uInt16 i = 1 ; i < nVarParCount ; ++i )
|
||||
{
|
||||
SbxVariable* pPar = pArg->Get( i );
|
||||
xMethParameters->Put( pPar, i );
|
||||
@@ -1891,32 +1891,32 @@ SbJScriptModule::SbJScriptModule( const String& rName )
|
||||
{
|
||||
}
|
||||
|
||||
BOOL SbJScriptModule::LoadData( SvStream& rStrm, USHORT nVer )
|
||||
sal_Bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
||||
{
|
||||
(void)nVer;
|
||||
|
||||
Clear();
|
||||
if( !SbxObject::LoadData( rStrm, 1 ) )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
// Source-String holen
|
||||
String aTmp;
|
||||
rStrm.ReadByteString( aTmp, gsl_getSystemTextEncoding() );
|
||||
aOUSource = aTmp;
|
||||
//rStrm >> aSource;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL SbJScriptModule::StoreData( SvStream& rStrm ) const
|
||||
sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const
|
||||
{
|
||||
if( !SbxObject::StoreData( rStrm ) )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
|
||||
// Source-String schreiben
|
||||
String aTmp = aOUSource;
|
||||
rStrm.WriteByteString( aTmp, gsl_getSystemTextEncoding() );
|
||||
//rStrm << aSource;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
|
||||
@@ -1925,7 +1925,7 @@ BOOL SbJScriptModule::StoreData( SvStream& rStrm ) const
|
||||
SbMethod::SbMethod( const String& r, SbxDataType t, SbModule* p )
|
||||
: SbxMethod( r, t ), pMod( p )
|
||||
{
|
||||
bInvalid = TRUE;
|
||||
bInvalid = sal_True;
|
||||
nStart =
|
||||
nDebugFlags =
|
||||
nLine1 =
|
||||
@@ -1970,35 +1970,35 @@ SbxArray* SbMethod::GetStatics()
|
||||
return refStatics;
|
||||
}
|
||||
|
||||
BOOL SbMethod::LoadData( SvStream& rStrm, USHORT nVer )
|
||||
sal_Bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
||||
{
|
||||
if( !SbxMethod::LoadData( rStrm, 1 ) )
|
||||
return FALSE;
|
||||
INT16 n;
|
||||
return sal_False;
|
||||
sal_Int16 n;
|
||||
rStrm >> n;
|
||||
INT16 nTempStart = (INT16)nStart;
|
||||
sal_Int16 nTempStart = (sal_Int16)nStart;
|
||||
// nDebugFlags = n; // AB 16.1.96: Nicht mehr uebernehmen
|
||||
if( nVer == 2 )
|
||||
rStrm >> nLine1 >> nLine2 >> nTempStart >> bInvalid;
|
||||
// AB: 2.7.1996: HACK wegen 'Referenz kann nicht gesichert werden'
|
||||
SetFlag( SBX_NO_MODIFY );
|
||||
nStart = nTempStart;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
BOOL SbMethod::StoreData( SvStream& rStrm ) const
|
||||
sal_Bool SbMethod::StoreData( SvStream& rStrm ) const
|
||||
{
|
||||
if( !SbxMethod::StoreData( rStrm ) )
|
||||
return FALSE;
|
||||
rStrm << (INT16) nDebugFlags
|
||||
<< (INT16) nLine1
|
||||
<< (INT16) nLine2
|
||||
<< (INT16) nStart
|
||||
<< (BYTE) bInvalid;
|
||||
return TRUE;
|
||||
return sal_False;
|
||||
rStrm << (sal_Int16) nDebugFlags
|
||||
<< (sal_Int16) nLine1
|
||||
<< (sal_Int16) nLine2
|
||||
<< (sal_Int16) nStart
|
||||
<< (sal_uInt8) bInvalid;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
void SbMethod::GetLineRange( USHORT& l1, USHORT& l2 )
|
||||
void SbMethod::GetLineRange( sal_uInt16& l1, sal_uInt16& l2 )
|
||||
{
|
||||
l1 = nLine1; l2 = nLine2;
|
||||
}
|
||||
@@ -2048,7 +2048,7 @@ ErrCode SbMethod::Call( SbxValue* pRet )
|
||||
|
||||
|
||||
// #100883 Own Broadcast for SbMethod
|
||||
void SbMethod::Broadcast( ULONG nHintId )
|
||||
void SbMethod::Broadcast( sal_uIntPtr nHintId )
|
||||
{
|
||||
if( pCst && !IsSet( SBX_NO_BROADCAST ) && StaticIsEnabledBroadcasting() )
|
||||
{
|
||||
@@ -2080,7 +2080,7 @@ void SbMethod::Broadcast( ULONG nHintId )
|
||||
pCst = pSave;
|
||||
pSave->Broadcast( SbxHint( nHintId, pThisCopy ) );
|
||||
|
||||
USHORT nSaveFlags = GetFlags();
|
||||
sal_uInt16 nSaveFlags = GetFlags();
|
||||
SetFlag( SBX_READWRITE );
|
||||
pCst = NULL;
|
||||
Put( pThisCopy->GetValues_Impl() );
|
||||
@@ -2382,7 +2382,7 @@ void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any
|
||||
{
|
||||
SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
|
||||
unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), aArguments[i] );
|
||||
xArray->Put( xSbxVar, static_cast< USHORT >( i ) + 1 );
|
||||
xArray->Put( xSbxVar, static_cast< sal_uInt16 >( i ) + 1 );
|
||||
|
||||
// Enable passing by ref
|
||||
if ( xSbxVar->GetType() != SbxVARIANT )
|
||||
@@ -2395,7 +2395,7 @@ void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any
|
||||
|
||||
for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i )
|
||||
{
|
||||
aArguments[i] = sbxToUnoValue( xArray->Get( static_cast< USHORT >(i) + 1) );
|
||||
aArguments[i] = sbxToUnoValue( xArray->Get( static_cast< sal_uInt16 >(i) + 1) );
|
||||
}
|
||||
pMeth->SetParameters( NULL );
|
||||
}
|
||||
@@ -2465,10 +2465,10 @@ SbUserFormModuleInstance::SbUserFormModuleInstance( SbUserFormModule* pParentMod
|
||||
{
|
||||
}
|
||||
|
||||
BOOL SbUserFormModuleInstance::IsClass( const XubString& rName ) const
|
||||
sal_Bool SbUserFormModuleInstance::IsClass( const XubString& rName ) const
|
||||
{
|
||||
BOOL bParentNameMatches = m_pParentModule->GetName().EqualsIgnoreCaseAscii( rName );
|
||||
BOOL bRet = bParentNameMatches || SbxObject::IsClass( rName );
|
||||
sal_Bool bParentNameMatches = m_pParentModule->GetName().EqualsIgnoreCaseAscii( rName );
|
||||
sal_Bool bRet = bParentNameMatches || SbxObject::IsClass( rName );
|
||||
return bRet;
|
||||
}
|
||||
|
||||
@@ -2613,7 +2613,7 @@ SbUserFormModule::Find( const XubString& rName, SbxClassType t )
|
||||
SbProperty::SbProperty( const String& r, SbxDataType t, SbModule* p )
|
||||
: SbxProperty( r, t ), pMod( p )
|
||||
{
|
||||
bInvalid = FALSE;
|
||||
bInvalid = sal_False;
|
||||
}
|
||||
|
||||
SbProperty::~SbProperty()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "buffer.hxx"
|
||||
#include <string.h>
|
||||
|
||||
const static UINT32 UP_LIMIT=0xFFFFFF00L;
|
||||
const static sal_uInt32 UP_LIMIT=0xFFFFFF00L;
|
||||
|
||||
// Der SbiBuffer wird in Inkrements von mindestens 16 Bytes erweitert.
|
||||
// Dies ist notwendig, da viele Klassen von einer Pufferlaenge
|
||||
@@ -69,24 +69,24 @@ char* SbiBuffer::GetBuffer()
|
||||
// Test, ob der Puffer n Bytes aufnehmen kann.
|
||||
// Im Zweifelsfall wird er vergroessert
|
||||
|
||||
BOOL SbiBuffer::Check( USHORT n )
|
||||
sal_Bool SbiBuffer::Check( sal_uInt16 n )
|
||||
{
|
||||
if( !n ) return TRUE;
|
||||
if( ( static_cast<UINT32>( nOff )+ n ) > static_cast<UINT32>( nSize ) )
|
||||
if( !n ) return sal_True;
|
||||
if( ( static_cast<sal_uInt32>( nOff )+ n ) > static_cast<sal_uInt32>( nSize ) )
|
||||
{
|
||||
if( nInc == 0 )
|
||||
return FALSE;
|
||||
USHORT nn = 0;
|
||||
return sal_False;
|
||||
sal_uInt16 nn = 0;
|
||||
while( nn < n ) nn = nn + nInc;
|
||||
char* p;
|
||||
if( ( static_cast<UINT32>( nSize ) + nn ) > UP_LIMIT ) p = NULL;
|
||||
if( ( static_cast<sal_uInt32>( nSize ) + nn ) > UP_LIMIT ) p = NULL;
|
||||
else p = new char [nSize + nn];
|
||||
if( !p )
|
||||
{
|
||||
pParser->Error( SbERR_PROG_TOO_LARGE );
|
||||
nInc = 0;
|
||||
delete[] pBuf; pBuf = NULL;
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,19 +97,19 @@ BOOL SbiBuffer::Check( USHORT n )
|
||||
nSize = nSize + nn;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
// Angleich des Puffers auf die uebergebene Byte-Grenze
|
||||
|
||||
void SbiBuffer::Align( INT32 n )
|
||||
void SbiBuffer::Align( sal_Int32 n )
|
||||
{
|
||||
if( nOff % n ) {
|
||||
UINT32 nn =( ( nOff + n ) / n ) * n;
|
||||
sal_uInt32 nn =( ( nOff + n ) / n ) * n;
|
||||
if( nn <= UP_LIMIT )
|
||||
{
|
||||
nn = nn - nOff;
|
||||
if( Check( static_cast<USHORT>(nn) ) )
|
||||
if( Check( static_cast<sal_uInt16>(nn) ) )
|
||||
{
|
||||
memset( pCur, 0, nn );
|
||||
pCur += nn;
|
||||
@@ -121,13 +121,13 @@ void SbiBuffer::Align( INT32 n )
|
||||
|
||||
// Patch einer Location
|
||||
|
||||
void SbiBuffer::Patch( UINT32 off, UINT32 val )
|
||||
void SbiBuffer::Patch( sal_uInt32 off, sal_uInt32 val )
|
||||
{
|
||||
if( ( off + sizeof( UINT32 ) ) < nOff )
|
||||
if( ( off + sizeof( sal_uInt32 ) ) < nOff )
|
||||
{
|
||||
UINT16 val1 = static_cast<UINT16>( val & 0xFFFF );
|
||||
UINT16 val2 = static_cast<UINT16>( val >> 16 );
|
||||
BYTE* p = (BYTE*) pBuf + off;
|
||||
sal_uInt16 val1 = static_cast<sal_uInt16>( val & 0xFFFF );
|
||||
sal_uInt16 val2 = static_cast<sal_uInt16>( val >> 16 );
|
||||
sal_uInt8* p = (sal_uInt8*) pBuf + off;
|
||||
*p++ = (char) ( val1 & 0xFF );
|
||||
*p++ = (char) ( val1 >> 8 );
|
||||
*p++ = (char) ( val2 & 0xFF );
|
||||
@@ -139,18 +139,18 @@ void SbiBuffer::Patch( UINT32 off, UINT32 val )
|
||||
// bauen eine Kette auf. Der Anfang der Kette ist beim uebergebenen
|
||||
// Parameter, das Ende der Kette ist 0.
|
||||
|
||||
void SbiBuffer::Chain( UINT32 off )
|
||||
void SbiBuffer::Chain( sal_uInt32 off )
|
||||
{
|
||||
if( off && pBuf )
|
||||
{
|
||||
BYTE *ip;
|
||||
UINT32 i = off;
|
||||
UINT32 val1 = (nOff & 0xFFFF);
|
||||
UINT32 val2 = (nOff >> 16);
|
||||
sal_uInt8 *ip;
|
||||
sal_uInt32 i = off;
|
||||
sal_uInt32 val1 = (nOff & 0xFFFF);
|
||||
sal_uInt32 val2 = (nOff >> 16);
|
||||
do
|
||||
{
|
||||
ip = (BYTE*) pBuf + i;
|
||||
BYTE* pTmp = ip;
|
||||
ip = (sal_uInt8*) pBuf + i;
|
||||
sal_uInt8* pTmp = ip;
|
||||
i = *pTmp++; i |= *pTmp++ << 8; i |= *pTmp++ << 16; i |= *pTmp++ << 24;
|
||||
|
||||
if( i >= nOff )
|
||||
@@ -166,84 +166,84 @@ void SbiBuffer::Chain( UINT32 off )
|
||||
}
|
||||
}
|
||||
|
||||
BOOL SbiBuffer::operator +=( INT8 n )
|
||||
sal_Bool SbiBuffer::operator +=( sal_Int8 n )
|
||||
{
|
||||
if( Check( 1 ) )
|
||||
{
|
||||
*pCur++ = (char) n; nOff++; return TRUE;
|
||||
} else return FALSE;
|
||||
*pCur++ = (char) n; nOff++; return sal_True;
|
||||
} else return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbiBuffer::operator +=( UINT8 n )
|
||||
sal_Bool SbiBuffer::operator +=( sal_uInt8 n )
|
||||
{
|
||||
if( Check( 1 ) )
|
||||
{
|
||||
*pCur++ = (char) n; nOff++; return TRUE;
|
||||
} else return FALSE;
|
||||
*pCur++ = (char) n; nOff++; return sal_True;
|
||||
} else return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbiBuffer::operator +=( INT16 n )
|
||||
sal_Bool SbiBuffer::operator +=( sal_Int16 n )
|
||||
{
|
||||
if( Check( 2 ) )
|
||||
{
|
||||
*pCur++ = (char) ( n & 0xFF );
|
||||
*pCur++ = (char) ( n >> 8 );
|
||||
nOff += 2; return TRUE;
|
||||
} else return FALSE;
|
||||
nOff += 2; return sal_True;
|
||||
} else return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbiBuffer::operator +=( UINT16 n )
|
||||
sal_Bool SbiBuffer::operator +=( sal_uInt16 n )
|
||||
{
|
||||
if( Check( 2 ) )
|
||||
{
|
||||
*pCur++ = (char) ( n & 0xFF );
|
||||
*pCur++ = (char) ( n >> 8 );
|
||||
nOff += 2; return TRUE;
|
||||
} else return FALSE;
|
||||
nOff += 2; return sal_True;
|
||||
} else return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbiBuffer::operator +=( UINT32 n )
|
||||
sal_Bool SbiBuffer::operator +=( sal_uInt32 n )
|
||||
{
|
||||
if( Check( 4 ) )
|
||||
{
|
||||
UINT16 n1 = static_cast<UINT16>( n & 0xFFFF );
|
||||
UINT16 n2 = static_cast<UINT16>( n >> 16 );
|
||||
sal_uInt16 n1 = static_cast<sal_uInt16>( n & 0xFFFF );
|
||||
sal_uInt16 n2 = static_cast<sal_uInt16>( n >> 16 );
|
||||
if ( operator +=( n1 ) && operator +=( n2 ) )
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
return sal_True;
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbiBuffer::operator +=( INT32 n )
|
||||
sal_Bool SbiBuffer::operator +=( sal_Int32 n )
|
||||
{
|
||||
return operator +=( (UINT32) n );
|
||||
return operator +=( (sal_uInt32) n );
|
||||
}
|
||||
|
||||
|
||||
BOOL SbiBuffer::operator +=( const String& n )
|
||||
sal_Bool SbiBuffer::operator +=( const String& n )
|
||||
{
|
||||
USHORT l = n.Len() + 1;
|
||||
sal_uInt16 l = n.Len() + 1;
|
||||
if( Check( l ) )
|
||||
{
|
||||
ByteString aByteStr( n, gsl_getSystemTextEncoding() );
|
||||
memcpy( pCur, aByteStr.GetBuffer(), l );
|
||||
pCur += l;
|
||||
nOff = nOff + l;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
else return FALSE;
|
||||
else return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbiBuffer::Add( const void* p, USHORT len )
|
||||
sal_Bool SbiBuffer::Add( const void* p, sal_uInt16 len )
|
||||
{
|
||||
if( Check( len ) )
|
||||
{
|
||||
memcpy( pCur, p, len );
|
||||
pCur += len;
|
||||
nOff = nOff + len;
|
||||
return TRUE;
|
||||
} else return FALSE;
|
||||
return sal_True;
|
||||
} else return sal_False;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ SbiCodeGen::SbiCodeGen( SbModule& r, SbiParser* p, short nInc )
|
||||
: rMod( r ), aCode( p, nInc )
|
||||
{
|
||||
pParser = p;
|
||||
bStmnt = FALSE;
|
||||
bStmnt = sal_False;
|
||||
nLine = 0;
|
||||
nCol = 0;
|
||||
nForLevel = 0;
|
||||
}
|
||||
|
||||
UINT32 SbiCodeGen::GetPC()
|
||||
sal_uInt32 SbiCodeGen::GetPC()
|
||||
{
|
||||
return aCode.GetSize();
|
||||
}
|
||||
@@ -55,7 +55,7 @@ UINT32 SbiCodeGen::GetPC()
|
||||
|
||||
void SbiCodeGen::Statement()
|
||||
{
|
||||
bStmnt = TRUE;
|
||||
bStmnt = sal_True;
|
||||
|
||||
nLine = pParser->GetLine();
|
||||
nCol = pParser->GetCol1();
|
||||
@@ -71,7 +71,7 @@ void SbiCodeGen::GenStmnt()
|
||||
{
|
||||
if( bStmnt )
|
||||
{
|
||||
bStmnt = FALSE;
|
||||
bStmnt = sal_False;
|
||||
Gen( _STMNT, nLine, nCol );
|
||||
}
|
||||
}
|
||||
@@ -79,39 +79,39 @@ void SbiCodeGen::GenStmnt()
|
||||
// Die Gen-Routinen returnen den Offset des 1. Operanden,
|
||||
// damit Jumps dort ihr Backchain versenken koennen
|
||||
|
||||
UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode )
|
||||
sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode )
|
||||
{
|
||||
#ifdef DBG_UTIL
|
||||
if( eOpcode < SbOP0_START || eOpcode > SbOP0_END )
|
||||
pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE1" );
|
||||
#endif
|
||||
GenStmnt();
|
||||
aCode += (UINT8) eOpcode;
|
||||
aCode += (sal_uInt8) eOpcode;
|
||||
return GetPC();
|
||||
}
|
||||
|
||||
UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd )
|
||||
sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd )
|
||||
{
|
||||
#ifdef DBG_UTIL
|
||||
if( eOpcode < SbOP1_START || eOpcode > SbOP1_END )
|
||||
pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE2" );
|
||||
#endif
|
||||
GenStmnt();
|
||||
aCode += (UINT8) eOpcode;
|
||||
UINT32 n = GetPC();
|
||||
aCode += (sal_uInt8) eOpcode;
|
||||
sal_uInt32 n = GetPC();
|
||||
aCode += nOpnd;
|
||||
return n;
|
||||
}
|
||||
|
||||
UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd1, UINT32 nOpnd2 )
|
||||
sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd1, sal_uInt32 nOpnd2 )
|
||||
{
|
||||
#ifdef DBG_UTIL
|
||||
if( eOpcode < SbOP2_START || eOpcode > SbOP2_END )
|
||||
pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE3" );
|
||||
#endif
|
||||
GenStmnt();
|
||||
aCode += (UINT8) eOpcode;
|
||||
UINT32 n = GetPC();
|
||||
aCode += (sal_uInt8) eOpcode;
|
||||
sal_uInt32 n = GetPC();
|
||||
aCode += nOpnd1;
|
||||
aCode += nOpnd2;
|
||||
return n;
|
||||
@@ -178,7 +178,7 @@ void SbiCodeGen::Save()
|
||||
String aProcName = pProc->GetName();
|
||||
String aIfaceProcName;
|
||||
String aIfaceName;
|
||||
USHORT nPassCount = 1;
|
||||
sal_uInt16 nPassCount = 1;
|
||||
if( nIfaceCount )
|
||||
{
|
||||
int nPropPrefixFound =
|
||||
@@ -206,7 +206,7 @@ void SbiCodeGen::Save()
|
||||
}
|
||||
}
|
||||
SbMethod* pMeth = NULL;
|
||||
for( USHORT nPass = 0 ; nPass < nPassCount ; nPass++ )
|
||||
for( sal_uInt16 nPass = 0 ; nPass < nPassCount ; nPass++ )
|
||||
{
|
||||
if( nPass == 1 )
|
||||
aProcName = aIfaceProcName;
|
||||
@@ -269,7 +269,7 @@ void SbiCodeGen::Save()
|
||||
// Die Parameter:
|
||||
SbxInfo* pInfo = pMeth->GetInfo();
|
||||
String aHelpFile, aComment;
|
||||
ULONG nHelpId = 0;
|
||||
sal_uIntPtr nHelpId = 0;
|
||||
if( pInfo )
|
||||
{
|
||||
// Die Zusatzdaten retten
|
||||
@@ -282,7 +282,7 @@ void SbiCodeGen::Save()
|
||||
pInfo->SetComment( aComment );
|
||||
SbiSymPool* pPool = &pProc->GetParams();
|
||||
// Das erste Element ist immer der Funktionswert!
|
||||
for( USHORT i = 1; i < pPool->GetSize(); i++ )
|
||||
for( sal_uInt16 i = 1; i < pPool->GetSize(); i++ )
|
||||
{
|
||||
SbiSymDef* pPar = pPool->Get( i );
|
||||
SbxDataType t = pPar->GetType();
|
||||
@@ -291,14 +291,14 @@ void SbiCodeGen::Save()
|
||||
if( pPar->GetDims() )
|
||||
t = (SbxDataType) ( t | SbxARRAY );
|
||||
// #33677 Optional-Info durchreichen
|
||||
USHORT nFlags = SBX_READ;
|
||||
sal_uInt16 nFlags = SBX_READ;
|
||||
if( pPar->IsOptional() )
|
||||
nFlags |= SBX_OPTIONAL;
|
||||
|
||||
pInfo->AddParam( pPar->GetName(), t, nFlags );
|
||||
|
||||
UINT32 nUserData = 0;
|
||||
USHORT nDefaultId = pPar->GetDefaultId();
|
||||
sal_uInt32 nUserData = 0;
|
||||
sal_uInt16 nDefaultId = pPar->GetDefaultId();
|
||||
if( nDefaultId )
|
||||
nUserData |= nDefaultId;
|
||||
if( pPar->IsParamArray() )
|
||||
@@ -320,14 +320,14 @@ void SbiCodeGen::Save()
|
||||
|
||||
// Der globale StringPool. 0 ist nicht belegt.
|
||||
SbiStringPool* pPool = &pParser->aGblStrings;
|
||||
USHORT nSize = pPool->GetSize();
|
||||
sal_uInt16 nSize = pPool->GetSize();
|
||||
p->MakeStrings( nSize );
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for( i = 1; i <= nSize; i++ )
|
||||
p->AddString( pPool->Find( i ) );
|
||||
|
||||
// Typen einfuegen
|
||||
USHORT nCount = pParser->rTypeArray->Count();
|
||||
sal_uInt16 nCount = pParser->rTypeArray->Count();
|
||||
for (i = 0; i < nCount; i++)
|
||||
p->AddType((SbxObject *)pParser->rTypeArray->Get(i));
|
||||
|
||||
@@ -350,7 +350,7 @@ class PCodeVisitor
|
||||
public:
|
||||
virtual ~PCodeVisitor();
|
||||
|
||||
virtual void start( BYTE* pStart ) = 0;
|
||||
virtual void start( sal_uInt8* pStart ) = 0;
|
||||
virtual void processOpCode0( SbiOpcode eOp ) = 0;
|
||||
virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) = 0;
|
||||
virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) = 0;
|
||||
@@ -366,8 +366,8 @@ class PCodeBufferWalker
|
||||
{
|
||||
private:
|
||||
T m_nBytes;
|
||||
BYTE* m_pCode;
|
||||
T readParam( BYTE*& pCode )
|
||||
sal_uInt8* m_pCode;
|
||||
T readParam( sal_uInt8*& pCode )
|
||||
{
|
||||
short nBytes = sizeof( T );
|
||||
T nOp1=0;
|
||||
@@ -376,15 +376,15 @@ private:
|
||||
return nOp1;
|
||||
}
|
||||
public:
|
||||
PCodeBufferWalker( BYTE* pCode, T nBytes ): m_nBytes( nBytes ), m_pCode( pCode )
|
||||
PCodeBufferWalker( sal_uInt8* pCode, T nBytes ): m_nBytes( nBytes ), m_pCode( pCode )
|
||||
{
|
||||
}
|
||||
void visitBuffer( PCodeVisitor< T >& visitor )
|
||||
{
|
||||
BYTE* pCode = m_pCode;
|
||||
sal_uInt8* pCode = m_pCode;
|
||||
if ( !pCode )
|
||||
return;
|
||||
BYTE* pEnd = pCode + m_nBytes;
|
||||
sal_uInt8* pEnd = pCode + m_nBytes;
|
||||
visitor.start( m_pCode );
|
||||
T nOp1 = 0, nOp2 = 0;
|
||||
for( ; pCode < pEnd; )
|
||||
@@ -426,7 +426,7 @@ class OffSetAccumulator : public PCodeVisitor< T >
|
||||
public:
|
||||
|
||||
OffSetAccumulator() : m_nNumOp0(0), m_nNumSingleParams(0), m_nNumDoubleParams(0){}
|
||||
virtual void start( BYTE* /*pStart*/ ){}
|
||||
virtual void start( sal_uInt8* /*pStart*/ ){}
|
||||
virtual void processOpCode0( SbiOpcode /*eOp*/ ){ ++m_nNumOp0; }
|
||||
virtual void processOpCode1( SbiOpcode /*eOp*/, T /*nOp1*/ ){ ++m_nNumSingleParams; }
|
||||
virtual void processOpCode2( SbiOpcode /*eOp*/, T /*nOp1*/, T /*nOp2*/ ) { ++m_nNumDoubleParams; }
|
||||
@@ -450,18 +450,18 @@ template < class T, class S >
|
||||
|
||||
class BufferTransformer : public PCodeVisitor< T >
|
||||
{
|
||||
BYTE* m_pStart;
|
||||
sal_uInt8* m_pStart;
|
||||
SbiBuffer m_ConvertedBuf;
|
||||
public:
|
||||
BufferTransformer():m_pStart(NULL), m_ConvertedBuf( NULL, 1024 ) {}
|
||||
virtual void start( BYTE* pStart ){ m_pStart = pStart; }
|
||||
virtual void start( sal_uInt8* pStart ){ m_pStart = pStart; }
|
||||
virtual void processOpCode0( SbiOpcode eOp )
|
||||
{
|
||||
m_ConvertedBuf += (UINT8)eOp;
|
||||
m_ConvertedBuf += (sal_uInt8)eOp;
|
||||
}
|
||||
virtual void processOpCode1( SbiOpcode eOp, T nOp1 )
|
||||
{
|
||||
m_ConvertedBuf += (UINT8)eOp;
|
||||
m_ConvertedBuf += (sal_uInt8)eOp;
|
||||
switch( eOp )
|
||||
{
|
||||
case _JUMP:
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
}
|
||||
virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 )
|
||||
{
|
||||
m_ConvertedBuf += (UINT8)eOp;
|
||||
m_ConvertedBuf += (sal_uInt8)eOp;
|
||||
if ( eOp == _CASEIS )
|
||||
if ( nOp1 )
|
||||
nOp1 = static_cast<T>( convertBufferOffSet(m_pStart, nOp1) );
|
||||
@@ -503,7 +503,7 @@ public:
|
||||
{
|
||||
return m_ConvertedBuf;
|
||||
}
|
||||
static S convertBufferOffSet( BYTE* pStart, T nOp1 )
|
||||
static S convertBufferOffSet( sal_uInt8* pStart, T nOp1 )
|
||||
{
|
||||
PCodeBufferWalker< T > aBuff( pStart, nOp1);
|
||||
OffSetAccumulator< T, S > aVisitor;
|
||||
@@ -512,16 +512,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
UINT32
|
||||
SbiCodeGen::calcNewOffSet( BYTE* pCode, UINT16 nOffset )
|
||||
sal_uInt32
|
||||
SbiCodeGen::calcNewOffSet( sal_uInt8* pCode, sal_uInt16 nOffset )
|
||||
{
|
||||
return BufferTransformer< UINT16, UINT32 >::convertBufferOffSet( pCode, nOffset );
|
||||
return BufferTransformer< sal_uInt16, sal_uInt32 >::convertBufferOffSet( pCode, nOffset );
|
||||
}
|
||||
|
||||
UINT16
|
||||
SbiCodeGen::calcLegacyOffSet( BYTE* pCode, UINT32 nOffset )
|
||||
sal_uInt16
|
||||
SbiCodeGen::calcLegacyOffSet( sal_uInt8* pCode, sal_uInt32 nOffset )
|
||||
{
|
||||
return BufferTransformer< UINT32, UINT16 >::convertBufferOffSet( pCode, nOffset );
|
||||
return BufferTransformer< sal_uInt32, sal_uInt16 >::convertBufferOffSet( pCode, nOffset );
|
||||
}
|
||||
|
||||
template <class T, class S>
|
||||
@@ -531,9 +531,9 @@ PCodeBuffConvertor<T,S>::convert()
|
||||
PCodeBufferWalker< T > aBuf( m_pStart, m_nSize );
|
||||
BufferTransformer< T, S > aTrnsfrmer;
|
||||
aBuf.visitBuffer( aTrnsfrmer );
|
||||
m_pCnvtdBuf = (BYTE*)aTrnsfrmer.buffer().GetBuffer();
|
||||
m_pCnvtdBuf = (sal_uInt8*)aTrnsfrmer.buffer().GetBuffer();
|
||||
m_nCnvtdSize = static_cast<S>( aTrnsfrmer.buffer().GetSize() );
|
||||
}
|
||||
|
||||
template class PCodeBuffConvertor< UINT16, UINT32 >;
|
||||
template class PCodeBuffConvertor< UINT32, UINT16 >;
|
||||
template class PCodeBuffConvertor< sal_uInt16, sal_uInt32 >;
|
||||
template class PCodeBuffConvertor< sal_uInt32, sal_uInt16 >;
|
||||
|
||||
+91
-91
@@ -37,7 +37,7 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj );
|
||||
// Returnwert: eine neue Instanz, die eingefuegt und dann geloescht wird.
|
||||
// Array-Indexe werden als SbiDimList zurueckgegeben
|
||||
|
||||
SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst )
|
||||
SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, sal_Bool bStatic, sal_Bool bConst )
|
||||
{
|
||||
bool bWithEvents = false;
|
||||
if( Peek() == WITHEVENTS )
|
||||
@@ -72,7 +72,7 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst )
|
||||
// Aufloesen einer AS-Typdeklaration
|
||||
// Der Datentyp wird in die uebergebene Variable eingetragen
|
||||
|
||||
void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
|
||||
void SbiParser::TypeDecl( SbiSymDef& rDef, sal_Bool bAsNewAlreadyParsed )
|
||||
{
|
||||
SbxDataType eType = rDef.GetType();
|
||||
short nSize = 0;
|
||||
@@ -193,34 +193,34 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
|
||||
|
||||
void SbiParser::Dim()
|
||||
{
|
||||
DefVar( _DIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : FALSE );
|
||||
DefVar( _DIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : sal_False );
|
||||
}
|
||||
|
||||
void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
void SbiParser::DefVar( SbiOpcode eOp, sal_Bool bStatic )
|
||||
{
|
||||
SbiSymPool* pOldPool = pPool;
|
||||
BOOL bSwitchPool = FALSE;
|
||||
BOOL bPersistantGlobal = FALSE;
|
||||
sal_Bool bSwitchPool = sal_False;
|
||||
sal_Bool bPersistantGlobal = sal_False;
|
||||
SbiToken eFirstTok = eCurTok;
|
||||
if( pProc && ( eCurTok == GLOBAL || eCurTok == PUBLIC || eCurTok == PRIVATE ) )
|
||||
Error( SbERR_NOT_IN_SUBR, eCurTok );
|
||||
if( eCurTok == PUBLIC || eCurTok == GLOBAL )
|
||||
{
|
||||
bSwitchPool = TRUE; // im richtigen Moment auf globalen Pool schalten
|
||||
bSwitchPool = sal_True; // im richtigen Moment auf globalen Pool schalten
|
||||
if( eCurTok == GLOBAL )
|
||||
bPersistantGlobal = TRUE;
|
||||
bPersistantGlobal = sal_True;
|
||||
}
|
||||
// behavior in VBA is that a module scope variable's lifetime is
|
||||
// tied to the document. e.g. a module scope variable is global
|
||||
if( GetBasic()->IsDocBasic() && bVBASupportOn && !pProc )
|
||||
bPersistantGlobal = TRUE;
|
||||
bPersistantGlobal = sal_True;
|
||||
// PRIVATE ist Synonym fuer DIM
|
||||
// _CONST_?
|
||||
BOOL bConst = FALSE;
|
||||
sal_Bool bConst = sal_False;
|
||||
if( eCurTok == _CONST_ )
|
||||
bConst = TRUE;
|
||||
bConst = sal_True;
|
||||
else if( Peek() == _CONST_ )
|
||||
Next(), bConst = TRUE;
|
||||
Next(), bConst = sal_True;
|
||||
|
||||
// #110004 It can also be a sub/function
|
||||
if( !bConst && (eCurTok == SUB || eCurTok == FUNCTION || eCurTok == PROPERTY ||
|
||||
@@ -241,10 +241,10 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
if( bNewGblDefs && nGblChain == 0 )
|
||||
{
|
||||
nGblChain = aGen.Gen( _JUMP, 0 );
|
||||
bNewGblDefs = FALSE;
|
||||
bNewGblDefs = sal_False;
|
||||
}
|
||||
Next();
|
||||
DefProc( FALSE, bPrivate );
|
||||
DefProc( sal_False, bPrivate );
|
||||
return;
|
||||
}
|
||||
else if( eCurTok == ENUM )
|
||||
@@ -291,14 +291,14 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
SbiDimList* pDim;
|
||||
|
||||
// AB 9.7.97, #40689, Statics -> Modul-Initialisierung, in Sub ueberspringen
|
||||
UINT32 nEndOfStaticLbl = 0;
|
||||
sal_uInt32 nEndOfStaticLbl = 0;
|
||||
if( !bVBASupportOn && bStatic )
|
||||
{
|
||||
nEndOfStaticLbl = aGen.Gen( _JUMP, 0 );
|
||||
aGen.Statement(); // bei static hier nachholen
|
||||
}
|
||||
|
||||
BOOL bDefined = FALSE;
|
||||
sal_Bool bDefined = sal_False;
|
||||
while( ( pDef = VarDecl( &pDim, bStatic, bConst ) ) != NULL )
|
||||
{
|
||||
EnableErrors();
|
||||
@@ -307,12 +307,12 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
pPool = &aGlobals;
|
||||
SbiSymDef* pOld = pPool->Find( pDef->GetName() );
|
||||
// AB 31.3.1996, #25651#, auch in Runtime-Library suchen
|
||||
BOOL bRtlSym = FALSE;
|
||||
sal_Bool bRtlSym = sal_False;
|
||||
if( !pOld )
|
||||
{
|
||||
pOld = CheckRTLForSym( pDef->GetName(), SbxVARIANT );
|
||||
if( pOld )
|
||||
bRtlSym = TRUE;
|
||||
bRtlSym = sal_True;
|
||||
}
|
||||
if( pOld && !(eOp == _REDIM || eOp == _REDIMP) )
|
||||
{
|
||||
@@ -321,7 +321,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
}
|
||||
if( pOld )
|
||||
{
|
||||
bDefined = TRUE;
|
||||
bDefined = sal_True;
|
||||
// Bei RTL-Symbol immer Fehler
|
||||
if( !bRtlSym && (eOp == _REDIM || eOp == _REDIMP) )
|
||||
{
|
||||
@@ -367,11 +367,11 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
}
|
||||
global: aGen.BackChain( nGblChain );
|
||||
nGblChain = 0;
|
||||
bGblDefs = bNewGblDefs = TRUE;
|
||||
bGblDefs = bNewGblDefs = sal_True;
|
||||
break;
|
||||
default: eOp2 = _LOCAL;
|
||||
}
|
||||
UINT32 nOpnd2 = sal::static_int_cast< UINT16 >( pDef->GetType() );
|
||||
sal_uInt32 nOpnd2 = sal::static_int_cast< sal_uInt16 >( pDef->GetType() );
|
||||
if( pDef->IsWithEvents() )
|
||||
nOpnd2 |= SBX_TYPE_WITH_EVENTS_FLAG;
|
||||
|
||||
@@ -380,7 +380,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
|
||||
short nFixedStringLength = pDef->GetFixedStringLength();
|
||||
if( nFixedStringLength >= 0 )
|
||||
nOpnd2 |= (SBX_FIXED_LEN_STRING_FLAG + (UINT32(nFixedStringLength) << 17)); // len = all bits above 0x10000
|
||||
nOpnd2 |= (SBX_FIXED_LEN_STRING_FLAG + (sal_uInt32(nFixedStringLength) << 17)); // len = all bits above 0x10000
|
||||
|
||||
aGen.Gen( eOp2, pDef->GetId(), nOpnd2 );
|
||||
}
|
||||
@@ -487,10 +487,10 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
}
|
||||
pDef->SetDims( pDim->GetDims() );
|
||||
if( bPersistantGlobal )
|
||||
pDef->SetGlobal( TRUE );
|
||||
pDef->SetGlobal( sal_True );
|
||||
SbiExpression aExpr( this, *pDef, pDim );
|
||||
aExpr.Gen();
|
||||
pDef->SetGlobal( FALSE );
|
||||
pDef->SetGlobal( sal_False );
|
||||
aGen.Gen( (eOp == _STATIC) ? _DIM : eOp );
|
||||
}
|
||||
}
|
||||
@@ -515,7 +515,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
{
|
||||
// globalen Chain pflegen
|
||||
nGblChain = aGen.Gen( _JUMP, 0 );
|
||||
bGblDefs = bNewGblDefs = TRUE;
|
||||
bGblDefs = bNewGblDefs = sal_True;
|
||||
|
||||
// fuer Sub Sprung auf Ende der statics eintragen
|
||||
aGen.BackChain( nEndOfStaticLbl );
|
||||
@@ -528,7 +528,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
|
||||
|
||||
void SbiParser::ReDim()
|
||||
{
|
||||
DefVar( _REDIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : FALSE );
|
||||
DefVar( _REDIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : sal_False );
|
||||
}
|
||||
|
||||
// ERASE array, ...
|
||||
@@ -548,10 +548,10 @@ void SbiParser::Erase()
|
||||
|
||||
void SbiParser::Type()
|
||||
{
|
||||
DefType( FALSE );
|
||||
DefType( sal_False );
|
||||
}
|
||||
|
||||
void SbiParser::DefType( BOOL bPrivate )
|
||||
void SbiParser::DefType( sal_Bool bPrivate )
|
||||
{
|
||||
// TODO: Use bPrivate
|
||||
(void)bPrivate;
|
||||
@@ -570,7 +570,7 @@ void SbiParser::DefType( BOOL bPrivate )
|
||||
|
||||
SbiSymDef* pElem;
|
||||
SbiDimList* pDim = NULL;
|
||||
BOOL bDone = FALSE;
|
||||
sal_Bool bDone = sal_False;
|
||||
|
||||
while( !bDone && !IsEof() )
|
||||
{
|
||||
@@ -578,7 +578,7 @@ void SbiParser::DefType( BOOL bPrivate )
|
||||
{
|
||||
case ENDTYPE :
|
||||
pElem = NULL;
|
||||
bDone = TRUE;
|
||||
bDone = sal_True;
|
||||
Next();
|
||||
break;
|
||||
|
||||
@@ -590,9 +590,9 @@ void SbiParser::DefType( BOOL bPrivate )
|
||||
|
||||
default:
|
||||
pDim = NULL;
|
||||
pElem = VarDecl(&pDim,FALSE,FALSE);
|
||||
pElem = VarDecl(&pDim,sal_False,sal_False);
|
||||
if( !pElem )
|
||||
bDone = TRUE; // Error occured
|
||||
bDone = sal_True; // Error occured
|
||||
}
|
||||
if( pElem )
|
||||
{
|
||||
@@ -613,8 +613,8 @@ void SbiParser::DefType( BOOL bPrivate )
|
||||
|
||||
for ( short i=0; i<pDim->GetSize();++i )
|
||||
{
|
||||
INT32 ub = -1;
|
||||
INT32 lb = nBase;
|
||||
sal_Int32 ub = -1;
|
||||
sal_Int32 lb = nBase;
|
||||
SbiExprNode* pNode = pDim->Get(i)->GetExprNode();
|
||||
ub = pNode->GetNumber();
|
||||
if ( !pDim->Get( i )->IsBased() ) // each dim is low/up
|
||||
@@ -633,7 +633,7 @@ void SbiParser::DefType( BOOL bPrivate )
|
||||
}
|
||||
else
|
||||
pArray->unoAddDim( 0, -1 ); // variant array
|
||||
USHORT nSavFlags = pTypeElem->GetFlags();
|
||||
sal_uInt16 nSavFlags = pTypeElem->GetFlags();
|
||||
// need to reset the FIXED flag
|
||||
// when calling PutObject ( because the type will not match Object )
|
||||
pTypeElem->ResetFlag( SBX_FIXED );
|
||||
@@ -643,7 +643,7 @@ void SbiParser::DefType( BOOL bPrivate )
|
||||
// Nested user type?
|
||||
if( eElemType == SbxOBJECT )
|
||||
{
|
||||
USHORT nElemTypeId = pElem->GetTypeId();
|
||||
sal_uInt16 nElemTypeId = pElem->GetTypeId();
|
||||
if( nElemTypeId != 0 )
|
||||
{
|
||||
String aTypeName( aGblStrings.Find( nElemTypeId ) );
|
||||
@@ -673,10 +673,10 @@ void SbiParser::DefType( BOOL bPrivate )
|
||||
|
||||
void SbiParser::Enum()
|
||||
{
|
||||
DefEnum( FALSE );
|
||||
DefEnum( sal_False );
|
||||
}
|
||||
|
||||
void SbiParser::DefEnum( BOOL bPrivate )
|
||||
void SbiParser::DefEnum( sal_Bool bPrivate )
|
||||
{
|
||||
// Neues Token lesen, es muss ein Symbol sein
|
||||
if (!TestSymbol())
|
||||
@@ -695,7 +695,7 @@ void SbiParser::DefEnum( BOOL bPrivate )
|
||||
|
||||
SbiSymDef* pElem;
|
||||
SbiDimList* pDim;
|
||||
BOOL bDone = FALSE;
|
||||
sal_Bool bDone = sal_False;
|
||||
|
||||
// Starting with -1 to make first default value 0 after ++
|
||||
sal_Int32 nCurrentEnumValue = -1;
|
||||
@@ -705,7 +705,7 @@ void SbiParser::DefEnum( BOOL bPrivate )
|
||||
{
|
||||
case ENDENUM :
|
||||
pElem = NULL;
|
||||
bDone = TRUE;
|
||||
bDone = sal_True;
|
||||
Next();
|
||||
break;
|
||||
|
||||
@@ -718,20 +718,20 @@ void SbiParser::DefEnum( BOOL bPrivate )
|
||||
default:
|
||||
{
|
||||
// TODO: Check existing!
|
||||
BOOL bDefined = FALSE;
|
||||
sal_Bool bDefined = sal_False;
|
||||
|
||||
pDim = NULL;
|
||||
pElem = VarDecl( &pDim, FALSE, TRUE );
|
||||
pElem = VarDecl( &pDim, sal_False, sal_True );
|
||||
if( !pElem )
|
||||
{
|
||||
bDone = TRUE; // Error occured
|
||||
bDone = sal_True; // Error occured
|
||||
break;
|
||||
}
|
||||
else if( pDim )
|
||||
{
|
||||
delete pDim;
|
||||
Error( SbERR_SYNTAX );
|
||||
bDone = TRUE; // Error occured
|
||||
bDone = sal_True; // Error occured
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -761,7 +761,7 @@ void SbiParser::DefEnum( BOOL bPrivate )
|
||||
if( pOld )
|
||||
{
|
||||
Error( SbERR_VAR_DEFINED, pElem->GetName() );
|
||||
bDone = TRUE; // Error occured
|
||||
bDone = sal_True; // Error occured
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -772,13 +772,13 @@ void SbiParser::DefEnum( BOOL bPrivate )
|
||||
SbiOpcode eOp = _GLOBAL;
|
||||
aGen.BackChain( nGblChain );
|
||||
nGblChain = 0;
|
||||
bGblDefs = bNewGblDefs = TRUE;
|
||||
bGblDefs = bNewGblDefs = sal_True;
|
||||
aGen.Gen(
|
||||
eOp, pElem->GetId(),
|
||||
sal::static_int_cast< UINT16 >( pElem->GetType() ) );
|
||||
sal::static_int_cast< sal_uInt16 >( pElem->GetType() ) );
|
||||
|
||||
aVar.Gen();
|
||||
USHORT nStringId = aGen.GetParser()->aGblStrings.Add( nCurrentEnumValue, SbxLONG );
|
||||
sal_uInt16 nStringId = aGen.GetParser()->aGblStrings.Add( nCurrentEnumValue, SbxLONG );
|
||||
aGen.Gen( _NUMBER, nStringId );
|
||||
aGen.Gen( _PUTC );
|
||||
}
|
||||
@@ -809,10 +809,10 @@ void SbiParser::DefEnum( BOOL bPrivate )
|
||||
// das erste Token ist bereits eingelesen (SUB/FUNCTION)
|
||||
// xxx Name [LIB "name"[ALIAS "name"]][(Parameter)][AS TYPE]
|
||||
|
||||
SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
|
||||
SbiProcDef* SbiParser::ProcDecl( sal_Bool bDecl )
|
||||
{
|
||||
BOOL bFunc = BOOL( eCurTok == FUNCTION );
|
||||
BOOL bProp = BOOL( eCurTok == GET || eCurTok == SET || eCurTok == LET );
|
||||
sal_Bool bFunc = sal_Bool( eCurTok == FUNCTION );
|
||||
sal_Bool bProp = sal_Bool( eCurTok == GET || eCurTok == SET || eCurTok == LET );
|
||||
if( !TestSymbol() ) return NULL;
|
||||
String aName( aSym );
|
||||
SbxDataType eType = eScanType;
|
||||
@@ -847,7 +847,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
|
||||
Error( SbERR_UNEXPECTED, ALIAS );
|
||||
if( pDef->IsCdecl() )
|
||||
Error( SbERR_UNEXPECTED, _CDECL_ );
|
||||
pDef->SetCdecl( FALSE );
|
||||
pDef->SetCdecl( sal_False );
|
||||
pDef->GetLib().Erase();
|
||||
pDef->GetAlias().Erase();
|
||||
}
|
||||
@@ -858,7 +858,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
|
||||
Error( SbERR_UNEXPECTED, ALIAS );
|
||||
if( pDef->IsCdecl() )
|
||||
Error( SbERR_UNEXPECTED, _CDECL_ );
|
||||
pDef->SetCdecl( FALSE );
|
||||
pDef->SetCdecl( sal_False );
|
||||
pDef->GetAlias().Erase();
|
||||
}
|
||||
// Klammern?
|
||||
@@ -869,23 +869,23 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
|
||||
Next();
|
||||
else
|
||||
for(;;) {
|
||||
BOOL bByVal = FALSE;
|
||||
BOOL bOptional = FALSE;
|
||||
BOOL bParamArray = FALSE;
|
||||
sal_Bool bByVal = sal_False;
|
||||
sal_Bool bOptional = sal_False;
|
||||
sal_Bool bParamArray = sal_False;
|
||||
while( Peek() == BYVAL || Peek() == BYREF || Peek() == _OPTIONAL_ )
|
||||
{
|
||||
if ( Peek() == BYVAL ) Next(), bByVal = TRUE;
|
||||
else if ( Peek() == BYREF ) Next(), bByVal = FALSE;
|
||||
else if ( Peek() == _OPTIONAL_ ) Next(), bOptional = TRUE;
|
||||
if ( Peek() == BYVAL ) Next(), bByVal = sal_True;
|
||||
else if ( Peek() == BYREF ) Next(), bByVal = sal_False;
|
||||
else if ( Peek() == _OPTIONAL_ ) Next(), bOptional = sal_True;
|
||||
}
|
||||
if( bCompatible && Peek() == PARAMARRAY )
|
||||
{
|
||||
if( bByVal || bOptional )
|
||||
Error( SbERR_UNEXPECTED, PARAMARRAY );
|
||||
Next();
|
||||
bParamArray = TRUE;
|
||||
bParamArray = sal_True;
|
||||
}
|
||||
SbiSymDef* pPar = VarDecl( NULL, FALSE, FALSE );
|
||||
SbiSymDef* pPar = VarDecl( NULL, sal_False, sal_False );
|
||||
if( !pPar )
|
||||
break;
|
||||
if( bByVal )
|
||||
@@ -898,13 +898,13 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
|
||||
SbiToken eTok = Next();
|
||||
if( eTok != COMMA && eTok != RPAREN )
|
||||
{
|
||||
BOOL bError2 = TRUE;
|
||||
sal_Bool bError2 = sal_True;
|
||||
if( bOptional && bCompatible && eTok == EQ )
|
||||
{
|
||||
SbiConstExpression* pDefaultExpr = new SbiConstExpression( this );
|
||||
SbxDataType eType2 = pDefaultExpr->GetType();
|
||||
|
||||
USHORT nStringId;
|
||||
sal_uInt16 nStringId;
|
||||
if( eType2 == SbxSTRING )
|
||||
nStringId = aGblStrings.Add( pDefaultExpr->GetString() );
|
||||
else
|
||||
@@ -915,7 +915,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
|
||||
|
||||
eTok = Next();
|
||||
if( eTok == COMMA || eTok == RPAREN )
|
||||
bError2 = FALSE;
|
||||
bError2 = sal_False;
|
||||
}
|
||||
if( bError2 )
|
||||
{
|
||||
@@ -942,10 +942,10 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
|
||||
|
||||
void SbiParser::Declare()
|
||||
{
|
||||
DefDeclare( FALSE );
|
||||
DefDeclare( sal_False );
|
||||
}
|
||||
|
||||
void SbiParser::DefDeclare( BOOL bPrivate )
|
||||
void SbiParser::DefDeclare( sal_Bool bPrivate )
|
||||
{
|
||||
Next();
|
||||
if( eCurTok != SUB && eCurTok != FUNCTION )
|
||||
@@ -954,7 +954,7 @@ void SbiParser::DefDeclare( BOOL bPrivate )
|
||||
{
|
||||
bool bFunction = (eCurTok == FUNCTION);
|
||||
|
||||
SbiProcDef* pDef = ProcDecl( TRUE );
|
||||
SbiProcDef* pDef = ProcDecl( sal_True );
|
||||
if( pDef )
|
||||
{
|
||||
if( !pDef->GetLib().Len() )
|
||||
@@ -987,39 +987,39 @@ void SbiParser::DefDeclare( BOOL bPrivate )
|
||||
if( bNewGblDefs && nGblChain == 0 )
|
||||
{
|
||||
nGblChain = aGen.Gen( _JUMP, 0 );
|
||||
bNewGblDefs = FALSE;
|
||||
bNewGblDefs = sal_False;
|
||||
}
|
||||
|
||||
USHORT nSavLine = nLine;
|
||||
sal_uInt16 nSavLine = nLine;
|
||||
aGen.Statement();
|
||||
pDef->Define();
|
||||
pDef->SetLine1( nSavLine );
|
||||
pDef->SetLine2( nSavLine );
|
||||
|
||||
SbiSymPool& rPool = pDef->GetParams();
|
||||
USHORT nParCount = rPool.GetSize();
|
||||
sal_uInt16 nParCount = rPool.GetSize();
|
||||
|
||||
SbxDataType eType = pDef->GetType();
|
||||
if( bFunction )
|
||||
aGen.Gen( _PARAM, 0, sal::static_int_cast< UINT16 >( eType ) );
|
||||
aGen.Gen( _PARAM, 0, sal::static_int_cast< sal_uInt16 >( eType ) );
|
||||
|
||||
if( nParCount > 1 )
|
||||
{
|
||||
aGen.Gen( _ARGC );
|
||||
|
||||
for( USHORT i = 1 ; i < nParCount ; ++i )
|
||||
for( sal_uInt16 i = 1 ; i < nParCount ; ++i )
|
||||
{
|
||||
SbiSymDef* pParDef = rPool.Get( i );
|
||||
SbxDataType eParType = pParDef->GetType();
|
||||
|
||||
aGen.Gen( _PARAM, i, sal::static_int_cast< UINT16 >( eParType ) );
|
||||
aGen.Gen( _PARAM, i, sal::static_int_cast< sal_uInt16 >( eParType ) );
|
||||
aGen.Gen( _ARGV );
|
||||
|
||||
USHORT nTyp = sal::static_int_cast< USHORT >( pParDef->GetType() );
|
||||
sal_uInt16 nTyp = sal::static_int_cast< sal_uInt16 >( pParDef->GetType() );
|
||||
if( pParDef->IsByVal() )
|
||||
{
|
||||
// Reset to avoid additional byval in call to wrapper function
|
||||
pParDef->SetByVal( FALSE );
|
||||
pParDef->SetByVal( sal_False );
|
||||
nTyp |= 0x8000;
|
||||
}
|
||||
aGen.Gen( _ARGTYP, nTyp );
|
||||
@@ -1029,12 +1029,12 @@ void SbiParser::DefDeclare( BOOL bPrivate )
|
||||
aGen.Gen( _LIB, aGblStrings.Add( pDef->GetLib() ) );
|
||||
|
||||
SbiOpcode eOp = pDef->IsCdecl() ? _CALLC : _CALL;
|
||||
USHORT nId = pDef->GetId();
|
||||
sal_uInt16 nId = pDef->GetId();
|
||||
if( pDef->GetAlias().Len() )
|
||||
nId = ( nId & 0x8000 ) | aGblStrings.Add( pDef->GetAlias() );
|
||||
if( nParCount > 1 )
|
||||
nId |= 0x8000;
|
||||
aGen.Gen( eOp, nId, sal::static_int_cast< UINT16 >( eType ) );
|
||||
aGen.Gen( eOp, nId, sal::static_int_cast< sal_uInt16 >( eType ) );
|
||||
|
||||
if( bFunction )
|
||||
aGen.Gen( _PUT );
|
||||
@@ -1060,18 +1060,18 @@ void SbiParser::Call()
|
||||
|
||||
void SbiParser::SubFunc()
|
||||
{
|
||||
DefProc( FALSE, FALSE );
|
||||
DefProc( sal_False, sal_False );
|
||||
}
|
||||
|
||||
// Einlesen einer Prozedur
|
||||
|
||||
BOOL runsInSetup( void );
|
||||
sal_Bool runsInSetup( void );
|
||||
|
||||
void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
|
||||
void SbiParser::DefProc( sal_Bool bStatic, sal_Bool bPrivate )
|
||||
{
|
||||
USHORT l1 = nLine, l2 = nLine;
|
||||
BOOL bSub = BOOL( eCurTok == SUB );
|
||||
BOOL bProperty = BOOL( eCurTok == PROPERTY );
|
||||
sal_uInt16 l1 = nLine, l2 = nLine;
|
||||
sal_Bool bSub = sal_Bool( eCurTok == SUB );
|
||||
sal_Bool bProperty = sal_Bool( eCurTok == PROPERTY );
|
||||
PropertyMode ePropertyMode = PROPERTY_MODE_NONE;
|
||||
if( bProperty )
|
||||
{
|
||||
@@ -1087,7 +1087,7 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
|
||||
}
|
||||
|
||||
SbiToken eExit = eCurTok;
|
||||
SbiProcDef* pDef = ProcDecl( FALSE );
|
||||
SbiProcDef* pDef = ProcDecl( sal_False );
|
||||
if( !pDef )
|
||||
return;
|
||||
pDef->setPropertyMode( ePropertyMode );
|
||||
@@ -1141,13 +1141,13 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
|
||||
if( bStatic )
|
||||
{
|
||||
if ( bVBASupportOn )
|
||||
pProc->SetStatic( TRUE );
|
||||
pProc->SetStatic( sal_True );
|
||||
else
|
||||
Error( SbERR_NOT_IMPLEMENTED ); // STATIC SUB ...
|
||||
}
|
||||
else
|
||||
{
|
||||
pProc->SetStatic( FALSE );
|
||||
pProc->SetStatic( sal_False );
|
||||
}
|
||||
// Normalfall: Lokale Variable->Parameter->Globale Variable
|
||||
pProc->GetLocals().SetParent( &pProc->GetParams() );
|
||||
@@ -1172,10 +1172,10 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate )
|
||||
|
||||
void SbiParser::Static()
|
||||
{
|
||||
DefStatic( FALSE );
|
||||
DefStatic( sal_False );
|
||||
}
|
||||
|
||||
void SbiParser::DefStatic( BOOL bPrivate )
|
||||
void SbiParser::DefStatic( sal_Bool bPrivate )
|
||||
{
|
||||
switch( Peek() )
|
||||
{
|
||||
@@ -1187,10 +1187,10 @@ void SbiParser::DefStatic( BOOL bPrivate )
|
||||
if( bNewGblDefs && nGblChain == 0 )
|
||||
{
|
||||
nGblChain = aGen.Gen( _JUMP, 0 );
|
||||
bNewGblDefs = FALSE;
|
||||
bNewGblDefs = sal_False;
|
||||
}
|
||||
Next();
|
||||
DefProc( TRUE, bPrivate );
|
||||
DefProc( sal_True, bPrivate );
|
||||
break;
|
||||
default: {
|
||||
if( !pProc )
|
||||
@@ -1198,7 +1198,7 @@ void SbiParser::DefStatic( BOOL bPrivate )
|
||||
// Pool umsetzen, damit STATIC-Deklarationen im globalen
|
||||
// Pool landen
|
||||
SbiSymPool* p = pPool; pPool = &aPublics;
|
||||
DefVar( _STATIC, TRUE );
|
||||
DefVar( _STATIC, sal_True );
|
||||
pPool = p;
|
||||
} break;
|
||||
}
|
||||
|
||||
@@ -75,12 +75,12 @@ void SbiExprNode::Gen( RecursiveMode eRecMode )
|
||||
case SbxINTEGER: pGen->Gen( _CONST, (short) nVal ); break;
|
||||
case SbxSTRING:
|
||||
{
|
||||
USHORT nStringId = pGen->GetParser()->aGblStrings.Add( aStrVal, TRUE );
|
||||
sal_uInt16 nStringId = pGen->GetParser()->aGblStrings.Add( aStrVal, sal_True );
|
||||
pGen->Gen( _SCONST, nStringId ); break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
USHORT nStringId = pGen->GetParser()->aGblStrings.Add( nVal, eType );
|
||||
sal_uInt16 nStringId = pGen->GetParser()->aGblStrings.Add( nVal, eType );
|
||||
pGen->Gen( _NUMBER, nStringId );
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ void SbiExprNode::GenElement( SbiOpcode eOp )
|
||||
// Das ID ist entweder die Position oder das String-ID
|
||||
// Falls das Bit 0x8000 gesetzt ist, hat die Variable
|
||||
// eine Parameterliste.
|
||||
USHORT nId = ( eOp == _PARAM ) ? pDef->GetPos() : pDef->GetId();
|
||||
sal_uInt16 nId = ( eOp == _PARAM ) ? pDef->GetPos() : pDef->GetId();
|
||||
// Parameterliste aufbauen
|
||||
if( aVar.pPar && aVar.pPar->GetSize() )
|
||||
{
|
||||
@@ -182,7 +182,7 @@ void SbiExprNode::GenElement( SbiOpcode eOp )
|
||||
aVar.pPar->Gen();
|
||||
}
|
||||
|
||||
pGen->Gen( eOp, nId, sal::static_int_cast< UINT16 >( GetType() ) );
|
||||
pGen->Gen( eOp, nId, sal::static_int_cast< sal_uInt16 >( GetType() ) );
|
||||
|
||||
if( aVar.pvMorePar )
|
||||
{
|
||||
@@ -207,7 +207,7 @@ void SbiExprList::Gen()
|
||||
{
|
||||
pParser->aGen.Gen( _ARGC );
|
||||
// AB 10.1.96: Typ-Anpassung bei DECLARE
|
||||
USHORT nCount = 1 /*, nParAnz = 0*/;
|
||||
sal_uInt16 nCount = 1 /*, nParAnz = 0*/;
|
||||
// SbiSymPool* pPool = NULL;
|
||||
for( SbiExpression* pExpr = pFirst; pExpr; pExpr = pExpr->pNext,nCount++ )
|
||||
{
|
||||
@@ -215,7 +215,7 @@ void SbiExprList::Gen()
|
||||
if( pExpr->GetName().Len() )
|
||||
{
|
||||
// named arg
|
||||
USHORT nSid = pParser->aGblStrings.Add( pExpr->GetName() );
|
||||
sal_uInt16 nSid = pParser->aGblStrings.Add( pExpr->GetName() );
|
||||
pParser->aGen.Gen( _ARGN, nSid );
|
||||
|
||||
/* TODO: Check after Declare concept change
|
||||
@@ -226,7 +226,7 @@ void SbiExprList::Gen()
|
||||
pParser->Error( SbERR_NO_NAMED_ARGS );
|
||||
|
||||
// Spaeter, wenn Named Args bei DECLARE moeglich
|
||||
//for( USHORT i = 1 ; i < nParAnz ; i++ )
|
||||
//for( sal_uInt16 i = 1 ; i < nParAnz ; i++ )
|
||||
//{
|
||||
// SbiSymDef* pDef = pPool->Get( i );
|
||||
// const String& rName = pDef->GetName();
|
||||
@@ -260,7 +260,7 @@ void SbiExpression::Gen( RecursiveMode eRecMode )
|
||||
pParser->aGen.Gen( _BYVAL );
|
||||
if( bBased )
|
||||
{
|
||||
USHORT uBase = pParser->nBase;
|
||||
sal_uInt16 uBase = pParser->nBase;
|
||||
if( pParser->IsCompatible() )
|
||||
uBase |= 0x8000; // #109275 Flag compatiblity
|
||||
pParser->aGen.Gen( _BASED, uBase );
|
||||
|
||||
@@ -53,7 +53,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, SbiToken t, SbiExprNode*
|
||||
nVal = 0;
|
||||
eType = SbxVARIANT; // Nodes sind immer Variant
|
||||
eNodeType = SbxNODE;
|
||||
bComposite= TRUE;
|
||||
bComposite= sal_True;
|
||||
}
|
||||
|
||||
SbiExprNode::SbiExprNode( SbiParser* p, double n, SbxDataType t )
|
||||
@@ -86,11 +86,11 @@ SbiExprNode::SbiExprNode( SbiParser* p, const SbiSymDef& r, SbxDataType t, SbiEx
|
||||
aVar.pNext= NULL;
|
||||
|
||||
// Funktionsergebnisse sind nie starr
|
||||
bComposite= BOOL( aVar.pDef->GetProcDef() != NULL );
|
||||
bComposite= sal_Bool( aVar.pDef->GetProcDef() != NULL );
|
||||
}
|
||||
|
||||
// #120061 TypeOf
|
||||
SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, USHORT nId )
|
||||
SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, sal_uInt16 nId )
|
||||
{
|
||||
BaseInit( p );
|
||||
|
||||
@@ -101,7 +101,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, USHORT nId )
|
||||
}
|
||||
|
||||
// new <type>
|
||||
SbiExprNode::SbiExprNode( SbiParser* p, USHORT nId )
|
||||
SbiExprNode::SbiExprNode( SbiParser* p, sal_uInt16 nId )
|
||||
{
|
||||
BaseInit( p );
|
||||
|
||||
@@ -118,8 +118,8 @@ void SbiExprNode::BaseInit( SbiParser* p )
|
||||
pLeft = NULL;
|
||||
pRight = NULL;
|
||||
pWithParent = NULL;
|
||||
bComposite = FALSE;
|
||||
bError = FALSE;
|
||||
bComposite = sal_False;
|
||||
bError = sal_False;
|
||||
}
|
||||
|
||||
SbiExprNode::~SbiExprNode()
|
||||
@@ -174,7 +174,7 @@ SbiExprNode* SbiExprNode::GetRealNode()
|
||||
|
||||
// Diese Methode setzt den Typ um, falls er in den Integer-Bereich hineinpasst
|
||||
|
||||
BOOL SbiExprNode::IsIntConst()
|
||||
sal_Bool SbiExprNode::IsIntConst()
|
||||
{
|
||||
if( eNodeType == SbxNUMVAL )
|
||||
{
|
||||
@@ -185,29 +185,29 @@ BOOL SbiExprNode::IsIntConst()
|
||||
{
|
||||
nVal = (double) (short) nVal;
|
||||
eType = SbxINTEGER;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
BOOL SbiExprNode::IsNumber()
|
||||
sal_Bool SbiExprNode::IsNumber()
|
||||
{
|
||||
return BOOL( eNodeType == SbxNUMVAL );
|
||||
return sal_Bool( eNodeType == SbxNUMVAL );
|
||||
}
|
||||
|
||||
BOOL SbiExprNode::IsString()
|
||||
sal_Bool SbiExprNode::IsString()
|
||||
{
|
||||
return BOOL( eNodeType == SbxSTRVAL );
|
||||
return sal_Bool( eNodeType == SbxSTRVAL );
|
||||
}
|
||||
|
||||
BOOL SbiExprNode::IsVariable()
|
||||
sal_Bool SbiExprNode::IsVariable()
|
||||
{
|
||||
return BOOL( eNodeType == SbxVARVAL );
|
||||
return sal_Bool( eNodeType == SbxVARVAL );
|
||||
}
|
||||
|
||||
BOOL SbiExprNode::IsLvalue()
|
||||
sal_Bool SbiExprNode::IsLvalue()
|
||||
{
|
||||
return IsVariable();
|
||||
}
|
||||
@@ -256,7 +256,7 @@ void SbiExprNode::CollectBits()
|
||||
}
|
||||
}
|
||||
|
||||
// Kann ein Zweig umgeformt werden, wird TRUE zurueckgeliefert. In diesem
|
||||
// Kann ein Zweig umgeformt werden, wird sal_True zurueckgeliefert. In diesem
|
||||
// Fall ist das Ergebnis im linken Zweig.
|
||||
|
||||
void SbiExprNode::FoldConstants()
|
||||
@@ -283,7 +283,7 @@ void SbiExprNode::FoldConstants()
|
||||
String rr( pRight->GetString() );
|
||||
delete pLeft; pLeft = NULL;
|
||||
delete pRight; pRight = NULL;
|
||||
bComposite = FALSE;
|
||||
bComposite = sal_False;
|
||||
if( eTok == PLUS || eTok == CAT )
|
||||
{
|
||||
eTok = CAT;
|
||||
@@ -320,7 +320,7 @@ void SbiExprNode::FoldConstants()
|
||||
break;
|
||||
default:
|
||||
pGen->GetParser()->Error( SbERR_CONVERSION );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -334,50 +334,50 @@ void SbiExprNode::FoldConstants()
|
||||
|| eTok == IDIV || eTok == MOD )
|
||||
{
|
||||
// Integer-Operationen
|
||||
BOOL err = FALSE;
|
||||
if( nl > SbxMAXLNG ) err = TRUE, nl = SbxMAXLNG;
|
||||
sal_Bool err = sal_False;
|
||||
if( nl > SbxMAXLNG ) err = sal_True, nl = SbxMAXLNG;
|
||||
else
|
||||
if( nl < SbxMINLNG ) err = TRUE, nl = SbxMINLNG;
|
||||
if( nr > SbxMAXLNG ) err = TRUE, nr = SbxMAXLNG;
|
||||
if( nl < SbxMINLNG ) err = sal_True, nl = SbxMINLNG;
|
||||
if( nr > SbxMAXLNG ) err = sal_True, nr = SbxMAXLNG;
|
||||
else
|
||||
if( nr < SbxMINLNG ) err = TRUE, nr = SbxMINLNG;
|
||||
if( nr < SbxMINLNG ) err = sal_True, nr = SbxMINLNG;
|
||||
ll = (long) nl; lr = (long) nr;
|
||||
llMod = (long) (nl < 0 ? nl - 0.5 : nl + 0.5);
|
||||
lrMod = (long) (nr < 0 ? nr - 0.5 : nr + 0.5);
|
||||
if( err )
|
||||
{
|
||||
pGen->GetParser()->Error( SbERR_MATH_OVERFLOW );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
BOOL bBothInt = BOOL( pLeft->eType < SbxSINGLE
|
||||
sal_Bool bBothInt = sal_Bool( pLeft->eType < SbxSINGLE
|
||||
&& pRight->eType < SbxSINGLE );
|
||||
delete pLeft; pLeft = NULL;
|
||||
delete pRight; pRight = NULL;
|
||||
nVal = 0;
|
||||
eType = SbxDOUBLE;
|
||||
eNodeType = SbxNUMVAL;
|
||||
bComposite = FALSE;
|
||||
BOOL bCheckType = FALSE;
|
||||
bComposite = sal_False;
|
||||
sal_Bool bCheckType = sal_False;
|
||||
switch( eTok )
|
||||
{
|
||||
case EXPON:
|
||||
nVal = pow( nl, nr ); break;
|
||||
case MUL:
|
||||
bCheckType = TRUE;
|
||||
bCheckType = sal_True;
|
||||
nVal = nl * nr; break;
|
||||
case DIV:
|
||||
if( !nr )
|
||||
{
|
||||
pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
} else nVal = nl / nr;
|
||||
break;
|
||||
case PLUS:
|
||||
bCheckType = TRUE;
|
||||
bCheckType = sal_True;
|
||||
nVal = nl + nr; break;
|
||||
case MINUS:
|
||||
bCheckType = TRUE;
|
||||
bCheckType = sal_True;
|
||||
nVal = nl - nr; break;
|
||||
case EQ:
|
||||
nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE;
|
||||
@@ -401,14 +401,14 @@ void SbiExprNode::FoldConstants()
|
||||
if( !lr )
|
||||
{
|
||||
pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
} else nVal = ll / lr;
|
||||
eType = SbxLONG; break;
|
||||
case MOD:
|
||||
if( !lr )
|
||||
{
|
||||
pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
} else nVal = llMod % lrMod;
|
||||
eType = SbxLONG; break;
|
||||
case AND:
|
||||
@@ -448,21 +448,21 @@ void SbiExprNode::FoldConstants()
|
||||
pLeft = NULL;
|
||||
eType = SbxDOUBLE;
|
||||
eNodeType = SbxNUMVAL;
|
||||
bComposite = FALSE;
|
||||
bComposite = sal_False;
|
||||
switch( eTok )
|
||||
{
|
||||
case NEG:
|
||||
nVal = -nVal; break;
|
||||
case NOT: {
|
||||
// Integer-Operation!
|
||||
BOOL err = FALSE;
|
||||
if( nVal > SbxMAXLNG ) err = TRUE, nVal = SbxMAXLNG;
|
||||
sal_Bool err = sal_False;
|
||||
if( nVal > SbxMAXLNG ) err = sal_True, nVal = SbxMAXLNG;
|
||||
else
|
||||
if( nVal < SbxMINLNG ) err = TRUE, nVal = SbxMINLNG;
|
||||
if( nVal < SbxMINLNG ) err = sal_True, nVal = SbxMINLNG;
|
||||
if( err )
|
||||
{
|
||||
pGen->GetParser()->Error( SbERR_MATH_OVERFLOW );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
nVal = (double) ~((long) nVal);
|
||||
eType = SbxLONG;
|
||||
|
||||
@@ -42,7 +42,7 @@ SbiExpression::SbiExpression( SbiParser* p, SbiExprType t,
|
||||
SbiExprMode eMode, const KeywordSymbolInfo* pKeywordSymbolInfo )
|
||||
{
|
||||
pParser = p;
|
||||
bError = bByVal = bBased = bBracket = FALSE;
|
||||
bError = bByVal = bBased = bBracket = sal_False;
|
||||
nParenLevel = 0;
|
||||
eCurExpr = t;
|
||||
m_eMode = eMode;
|
||||
@@ -61,7 +61,7 @@ SbiExpression::SbiExpression( SbiParser* p, double n, SbxDataType t )
|
||||
pParser = p;
|
||||
eCurExpr = SbOPERAND;
|
||||
pNext = NULL;
|
||||
bError = bByVal = bBased = bBracket = FALSE;
|
||||
bError = bByVal = bBased = bBracket = sal_False;
|
||||
pExpr = new SbiExprNode( pParser, n, t );
|
||||
pExpr->Optimize();
|
||||
}
|
||||
@@ -70,7 +70,7 @@ SbiExpression::SbiExpression( SbiParser* p, const String& r )
|
||||
{
|
||||
pParser = p;
|
||||
pNext = NULL;
|
||||
bError = bByVal = bBased = bBracket = FALSE;
|
||||
bError = bByVal = bBased = bBracket = sal_False;
|
||||
eCurExpr = SbOPERAND;
|
||||
pExpr = new SbiExprNode( pParser, r );
|
||||
}
|
||||
@@ -79,7 +79,7 @@ SbiExpression::SbiExpression( SbiParser* p, const SbiSymDef& r, SbiExprList* pPa
|
||||
{
|
||||
pParser = p;
|
||||
pNext = NULL;
|
||||
bError = bByVal = bBased = bBracket = FALSE;
|
||||
bError = bByVal = bBased = bBracket = sal_False;
|
||||
eCurExpr = SbOPERAND;
|
||||
pExpr = new SbiExprNode( pParser, r, SbxVARIANT, pPar );
|
||||
}
|
||||
@@ -88,7 +88,7 @@ SbiExpression::SbiExpression( SbiParser* p, SbiToken t )
|
||||
{
|
||||
pParser = p;
|
||||
pNext = NULL;
|
||||
bError = bByVal = bBased = bBracket = FALSE;
|
||||
bError = bByVal = bBased = bBracket = sal_False;
|
||||
eCurExpr = SbOPERAND;
|
||||
pExpr = new SbiExprNode( pParser, NULL, t, NULL );
|
||||
}
|
||||
@@ -107,17 +107,17 @@ SbiExpression::~SbiExpression()
|
||||
// Folgen Parameter ohne Klammer? Dies kann eine Zahl, ein String,
|
||||
// ein Symbol oder auch ein Komma sein (wenn der 1. Parameter fehlt)
|
||||
|
||||
static BOOL DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok )
|
||||
static sal_Bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok )
|
||||
{
|
||||
if( eTok == LPAREN )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
// Aber nur, wenn CALL-aehnlich!
|
||||
if( !p->WhiteSpace() || eCurExpr != SbSYMBOL )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
if ( eTok == NUMBER || eTok == MINUS || eTok == FIXSTRING
|
||||
|| eTok == SYMBOL || eTok == COMMA || eTok == DOT || eTok == NOT || eTok == BYVAL )
|
||||
{
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
else // check for default params with reserved names ( e.g. names of tokens )
|
||||
{
|
||||
@@ -125,9 +125,9 @@ static BOOL DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTo
|
||||
// Urk the Next() / Peek() symantics are... weird
|
||||
tokens.Next();
|
||||
if ( tokens.Peek() == ASSIGN )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
// Definition eines neuen Symbols
|
||||
@@ -138,7 +138,7 @@ static SbiSymDef* AddSym
|
||||
{
|
||||
SbiSymDef* pDef;
|
||||
// A= ist keine Prozedur
|
||||
BOOL bHasType = BOOL( eTok == EQ || eTok == DOT );
|
||||
sal_Bool bHasType = sal_Bool( eTok == EQ || eTok == DOT );
|
||||
if( ( !bHasType && eCurExpr == SbSYMBOL ) || pPar )
|
||||
{
|
||||
// Dies ist also eine Prozedur
|
||||
@@ -151,14 +151,14 @@ static SbiSymDef* AddSym
|
||||
|
||||
// Sonderbehandlung fuer Colls wie Documents(1)
|
||||
if( eCurExpr == SbSTDEXPR )
|
||||
bHasType = TRUE;
|
||||
bHasType = sal_True;
|
||||
|
||||
pDef = pProc;
|
||||
pDef->SetType( bHasType ? eType : SbxEMPTY );
|
||||
if( pPar )
|
||||
{
|
||||
// Dummy-Parameter generieren
|
||||
USHORT n = 1;
|
||||
sal_uInt16 n = 1;
|
||||
for( short i = 0; i < pPar->GetSize(); i++ )
|
||||
{
|
||||
String aPar = String::CreateFromAscii( "PAR" );
|
||||
@@ -232,7 +232,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
|
||||
else
|
||||
{
|
||||
pParser->Error( SbERR_SYNTAX );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,18 +259,18 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
|
||||
// Es koennte ein Objektteil sein, wenn . oder ! folgt
|
||||
// Bei . muss aber die Variable bereits definiert sein; wenn pDef
|
||||
// nach der Suche NULL ist, isses ein Objekt!
|
||||
BOOL bObj = BOOL( ( eTok == DOT || eTok == EXCLAM )
|
||||
sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM )
|
||||
&& !pParser->WhiteSpace() );
|
||||
if( bObj )
|
||||
{
|
||||
bBracket = FALSE; // Now the bracket for the first term is obsolete
|
||||
bBracket = sal_False; // Now the bracket for the first term is obsolete
|
||||
if( eType == SbxVARIANT )
|
||||
eType = SbxOBJECT;
|
||||
else
|
||||
{
|
||||
// Name%. geht wirklich nicht!
|
||||
pParser->Error( SbERR_BAD_DECLARATION, aSym );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
// Suche:
|
||||
@@ -330,7 +330,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
|
||||
{
|
||||
// Wie? Erst mit AS definieren und dann einen Suffix nehmen?
|
||||
pParser->Error( SbERR_BAD_DECLARATION, aSym );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
else if ( eType == SbxVARIANT )
|
||||
// Falls nix angegeben, den Typ des Eintrags nehmen
|
||||
@@ -355,13 +355,13 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
|
||||
else
|
||||
{
|
||||
pParser->Error( SbERR_BAD_DECLARATION, aSym );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
SbiExprNode* pNd = new SbiExprNode( pParser, *pDef, eType );
|
||||
if( !pPar )
|
||||
pPar = new SbiParameters( pParser,FALSE,FALSE );
|
||||
pPar = new SbiParameters( pParser,sal_False,sal_False );
|
||||
pNd->aVar.pPar = pPar;
|
||||
pNd->aVar.pvMorePar = pvMoreParLcl;
|
||||
if( bObj )
|
||||
@@ -374,7 +374,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
|
||||
if( pDef->GetType() != SbxOBJECT && pDef->GetType() != SbxVARIANT )
|
||||
{
|
||||
pParser->Error( SbERR_BAD_DECLARATION, aSym );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
if( !bError )
|
||||
pNd->aVar.pNext = ObjTerm( *pDef );
|
||||
@@ -399,14 +399,14 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
|
||||
eTok != XOR && eTok != EQV && eTok != IMP && eTok != IS )
|
||||
{
|
||||
pParser->Error( SbERR_VAR_EXPECTED );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
/* #118410 Allow type for Class methods and RTL object, e.g. RTL.Chr$(97)
|
||||
else
|
||||
{
|
||||
if( pParser->GetType() != SbxVARIANT )
|
||||
pParser->Error( SbERR_SYNTAX ), bError = TRUE;
|
||||
pParser->Error( SbERR_SYNTAX ), bError = sal_True;
|
||||
}
|
||||
*/
|
||||
if( bError )
|
||||
@@ -437,7 +437,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
|
||||
}
|
||||
|
||||
}
|
||||
BOOL bObj = BOOL( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() );
|
||||
sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() );
|
||||
if( bObj )
|
||||
{
|
||||
if( eType == SbxVARIANT )
|
||||
@@ -446,7 +446,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
|
||||
{
|
||||
// Name%. geht wirklich nicht!
|
||||
pParser->Error( SbERR_BAD_DECLARATION, aSym );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
|
||||
if( pDef->GetType() != SbxOBJECT )
|
||||
{
|
||||
pParser->Error( SbERR_BAD_DECLARATION, aSym );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
if( !bError )
|
||||
{
|
||||
@@ -554,7 +554,7 @@ SbiExprNode* SbiExpression::Operand( bool bUsedForTypeOf )
|
||||
}
|
||||
}
|
||||
nParenLevel--;
|
||||
pRes->bComposite = TRUE;
|
||||
pRes->bComposite = sal_True;
|
||||
break;
|
||||
default:
|
||||
// Zur Zeit sind Keywords hier OK!
|
||||
@@ -604,7 +604,7 @@ SbiExprNode* SbiExpression::Unary()
|
||||
pParser->TestToken( IS );
|
||||
String aDummy;
|
||||
SbiSymDef* pTypeDef = new SbiSymDef( aDummy );
|
||||
pParser->TypeDecl( *pTypeDef, TRUE );
|
||||
pParser->TypeDecl( *pTypeDef, sal_True );
|
||||
pNd = new SbiExprNode( pParser, pObjNode, pTypeDef->GetTypeId() );
|
||||
break;
|
||||
}
|
||||
@@ -613,7 +613,7 @@ SbiExprNode* SbiExpression::Unary()
|
||||
pParser->Next();
|
||||
String aStr;
|
||||
SbiSymDef* pTypeDef = new SbiSymDef( aStr );
|
||||
pParser->TypeDecl( *pTypeDef, TRUE );
|
||||
pParser->TypeDecl( *pTypeDef, sal_True );
|
||||
pNd = new SbiExprNode( pParser, pTypeDef->GetTypeId() );
|
||||
break;
|
||||
}
|
||||
@@ -766,7 +766,7 @@ SbiExprNode* SbiExpression::Like()
|
||||
if( nCount > 1 )
|
||||
{
|
||||
pParser->Error( SbERR_SYNTAX );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
return pNd;
|
||||
@@ -816,28 +816,28 @@ SbiConstExpression::SbiConstExpression( SbiParser* p ) : SbiExpression( p )
|
||||
}
|
||||
else
|
||||
{
|
||||
// #40204 Spezialbehandlung fuer BOOL-Konstanten
|
||||
BOOL bIsBool = FALSE;
|
||||
// #40204 Spezialbehandlung fuer sal_Bool-Konstanten
|
||||
sal_Bool bIsBool = sal_False;
|
||||
if( pExpr->eNodeType == SbxVARVAL )
|
||||
{
|
||||
SbiSymDef* pVarDef = pExpr->GetVar();
|
||||
|
||||
// Ist es eine BOOL-Konstante?
|
||||
BOOL bBoolVal = FALSE;
|
||||
// Ist es eine sal_Bool-Konstante?
|
||||
sal_Bool bBoolVal = sal_False;
|
||||
if( pVarDef->GetName().EqualsIgnoreCaseAscii( "true" ) )
|
||||
//if( pVarDef->GetName().ICompare( "true" ) == COMPARE_EQUAL )
|
||||
{
|
||||
bIsBool = TRUE;
|
||||
bBoolVal = TRUE;
|
||||
bIsBool = sal_True;
|
||||
bBoolVal = sal_True;
|
||||
}
|
||||
else if( pVarDef->GetName().EqualsIgnoreCaseAscii( "false" ) )
|
||||
//else if( pVarDef->GetName().ICompare( "false" ) == COMPARE_EQUAL )
|
||||
{
|
||||
bIsBool = TRUE;
|
||||
bBoolVal = FALSE;
|
||||
bIsBool = sal_True;
|
||||
bBoolVal = sal_False;
|
||||
}
|
||||
|
||||
// Wenn es ein BOOL ist, Node austauschen
|
||||
// Wenn es ein sal_Bool ist, Node austauschen
|
||||
if( bIsBool )
|
||||
{
|
||||
delete pExpr;
|
||||
@@ -889,7 +889,7 @@ SbiExprList::SbiExprList( SbiParser* p )
|
||||
nExpr =
|
||||
nDim = 0;
|
||||
bError =
|
||||
bBracket = FALSE;
|
||||
bBracket = sal_False;
|
||||
}
|
||||
|
||||
SbiExprList::~SbiExprList()
|
||||
@@ -937,8 +937,8 @@ void SbiExprList::addExpression( SbiExpression* pExpr )
|
||||
|
||||
// #i79918/#i80532: bConst has never been set to true
|
||||
// -> reused as bStandaloneExpression
|
||||
//SbiParameters::SbiParameters( SbiParser* p, BOOL bConst, BOOL bPar) :
|
||||
SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPar) :
|
||||
//SbiParameters::SbiParameters( SbiParser* p, sal_Bool bConst, sal_Bool bPar) :
|
||||
SbiParameters::SbiParameters( SbiParser* p, sal_Bool bStandaloneExpression, sal_Bool bPar) :
|
||||
SbiExprList( p )
|
||||
{
|
||||
if( !bPar )
|
||||
@@ -958,7 +958,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
|
||||
}
|
||||
else
|
||||
{
|
||||
bBracket = TRUE;
|
||||
bBracket = sal_True;
|
||||
pParser->Next();
|
||||
eTok = pParser->Peek();
|
||||
}
|
||||
@@ -982,7 +982,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
|
||||
{
|
||||
pExpr = new SbiExpression( pParser, 0, SbxEMPTY );
|
||||
//if( bConst )
|
||||
// pParser->Error( SbERR_SYNTAX ), bError = TRUE;
|
||||
// pParser->Error( SbERR_SYNTAX ), bError = sal_True;
|
||||
}
|
||||
// Benannte Argumente: entweder .name= oder name:=
|
||||
else
|
||||
@@ -998,25 +998,25 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
|
||||
if( bAssumeExprLParenMode )
|
||||
{
|
||||
pExpr = new SbiExpression( pParser, SbSTDEXPR, EXPRMODE_LPAREN_PENDING );
|
||||
bAssumeExprLParenMode = FALSE;
|
||||
bAssumeExprLParenMode = sal_False;
|
||||
|
||||
SbiExprMode eModeAfter = pExpr->m_eMode;
|
||||
if( eModeAfter == EXPRMODE_LPAREN_NOT_NEEDED )
|
||||
{
|
||||
bBracket = TRUE;
|
||||
bBracket = sal_True;
|
||||
}
|
||||
else if( eModeAfter == EXPRMODE_ARRAY_OR_OBJECT )
|
||||
{
|
||||
// Expression "looks" like an array assignment
|
||||
// a(...)[(...)] = ? or a(...).b(...)
|
||||
// RPAREN is already parsed
|
||||
bBracket = TRUE;
|
||||
bBracket = sal_True;
|
||||
bAssumeArrayMode = true;
|
||||
eTok = NIL;
|
||||
}
|
||||
else if( eModeAfter == EXPRMODE_EMPTY_PAREN )
|
||||
{
|
||||
bBracket = TRUE;
|
||||
bBracket = sal_True;
|
||||
delete pExpr;
|
||||
if( bByVal )
|
||||
pParser->Error( SbERR_LVALUE_EXPECTED );
|
||||
@@ -1042,7 +1042,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
|
||||
pParser->Next();
|
||||
pExpr = new SbiExpression( pParser );
|
||||
//if( bConst )
|
||||
// pParser->Error( SbERR_SYNTAX ), bError = TRUE;
|
||||
// pParser->Error( SbERR_SYNTAX ), bError = sal_True;
|
||||
}
|
||||
pExpr->GetName() = aName;
|
||||
}
|
||||
@@ -1067,7 +1067,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
|
||||
pParser->Error( bBracket
|
||||
? SbERR_BAD_BRACKETS
|
||||
: SbERR_EXPECTED, COMMA );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1085,7 +1085,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
|
||||
if( !bBracket )
|
||||
{
|
||||
pParser->Error( SbERR_BAD_BRACKETS );
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
}
|
||||
}
|
||||
nDim = nExpr;
|
||||
@@ -1104,12 +1104,12 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
|
||||
|
||||
SbiDimList::SbiDimList( SbiParser* p ) : SbiExprList( p )
|
||||
{
|
||||
bConst = TRUE;
|
||||
bConst = sal_True;
|
||||
|
||||
if( pParser->Next() != LPAREN )
|
||||
{
|
||||
pParser->Error( SbERR_EXPECTED, LPAREN );
|
||||
bError = TRUE; return;
|
||||
bError = sal_True; return;
|
||||
}
|
||||
|
||||
if( pParser->Peek() != RPAREN )
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
// Test, ob ein I/O-Channel angegeben wurde
|
||||
|
||||
BOOL SbiParser::Channel( BOOL bAlways )
|
||||
sal_Bool SbiParser::Channel( sal_Bool bAlways )
|
||||
{
|
||||
BOOL bRes = FALSE;
|
||||
sal_Bool bRes = sal_False;
|
||||
Peek();
|
||||
if( IsHash() )
|
||||
{
|
||||
@@ -46,7 +46,7 @@ BOOL SbiParser::Channel( BOOL bAlways )
|
||||
Next();
|
||||
aExpr.Gen();
|
||||
aGen.Gen( _CHANNEL );
|
||||
bRes = TRUE;
|
||||
bRes = sal_True;
|
||||
}
|
||||
else if( bAlways )
|
||||
Error( SbERR_EXPECTED, "#" );
|
||||
@@ -60,7 +60,7 @@ BOOL SbiParser::Channel( BOOL bAlways )
|
||||
|
||||
void SbiParser::Print()
|
||||
{
|
||||
BOOL bChan = Channel();
|
||||
sal_Bool bChan = Channel();
|
||||
// Die Ausdruecke zum Drucken:
|
||||
while( !bAbort )
|
||||
{
|
||||
@@ -91,7 +91,7 @@ void SbiParser::Print()
|
||||
|
||||
void SbiParser::Write()
|
||||
{
|
||||
BOOL bChan = Channel();
|
||||
sal_Bool bChan = Channel();
|
||||
// Die Ausdruecke zum Drucken:
|
||||
while( !bAbort )
|
||||
{
|
||||
@@ -143,8 +143,8 @@ void SbiParser::Line()
|
||||
|
||||
void SbiParser::LineInput()
|
||||
{
|
||||
Channel( TRUE );
|
||||
// BOOL bChan = Channel( TRUE );
|
||||
Channel( sal_True );
|
||||
// sal_Bool bChan = Channel( sal_True );
|
||||
SbiExpression* pExpr = new SbiExpression( this, SbOPERAND );
|
||||
/* AB 15.1.96: Keinen allgemeinen Ausdruck mehr zulassen
|
||||
SbiExpression* pExpr = new SbiExpression( this );
|
||||
@@ -180,8 +180,8 @@ void SbiParser::LineInput()
|
||||
void SbiParser::Input()
|
||||
{
|
||||
aGen.Gen( _RESTART );
|
||||
Channel( TRUE );
|
||||
// BOOL bChan = Channel( TRUE );
|
||||
Channel( sal_True );
|
||||
// sal_Bool bChan = Channel( sal_True );
|
||||
SbiExpression* pExpr = new SbiExpression( this, SbOPERAND );
|
||||
/* ALT: Jetzt keinen allgemeinen Ausdruck mehr zulassen
|
||||
SbiExpression* pExpr = new SbiExpression( this );
|
||||
|
||||
+31
-31
@@ -34,7 +34,7 @@
|
||||
|
||||
void SbiParser::If()
|
||||
{
|
||||
UINT32 nEndLbl;
|
||||
sal_uInt32 nEndLbl;
|
||||
SbiToken eTok = NIL;
|
||||
// Ende-Tokens ignorieren:
|
||||
SbiExpression aCond( this );
|
||||
@@ -46,8 +46,8 @@ void SbiParser::If()
|
||||
// eingefuegt werden, damit bei ELSEIF nicht erneut die Bedingung
|
||||
// ausgewertet wird. Die Tabelle nimmt alle Absprungstellen auf.
|
||||
#define JMP_TABLE_SIZE 100
|
||||
UINT32 pnJmpToEndLbl[JMP_TABLE_SIZE]; // 100 ELSEIFs zulaessig
|
||||
USHORT iJmp = 0; // aktueller Tabellen-Index
|
||||
sal_uInt32 pnJmpToEndLbl[JMP_TABLE_SIZE]; // 100 ELSEIFs zulaessig
|
||||
sal_uInt16 iJmp = 0; // aktueller Tabellen-Index
|
||||
|
||||
// multiline IF
|
||||
nEndLbl = aGen.Gen( _JUMPF, 0 );
|
||||
@@ -58,7 +58,7 @@ void SbiParser::If()
|
||||
eTok = Peek();
|
||||
if( IsEof() )
|
||||
{
|
||||
Error( SbERR_BAD_BLOCK, IF ); bAbort = TRUE; return;
|
||||
Error( SbERR_BAD_BLOCK, IF ); bAbort = sal_True; return;
|
||||
}
|
||||
}
|
||||
// ELSEIF?
|
||||
@@ -67,7 +67,7 @@ void SbiParser::If()
|
||||
// #27720# Bei erfolgreichem IF/ELSEIF auf ENDIF springen
|
||||
if( iJmp >= JMP_TABLE_SIZE )
|
||||
{
|
||||
Error( SbERR_PROG_TOO_LARGE ); bAbort = TRUE; return;
|
||||
Error( SbERR_PROG_TOO_LARGE ); bAbort = sal_True; return;
|
||||
}
|
||||
pnJmpToEndLbl[iJmp++] = aGen.Gen( _JUMP, 0 );
|
||||
|
||||
@@ -87,14 +87,14 @@ void SbiParser::If()
|
||||
eTok = Peek();
|
||||
if( IsEof() )
|
||||
{
|
||||
Error( SbERR_BAD_BLOCK, ELSEIF ); bAbort = TRUE; return;
|
||||
Error( SbERR_BAD_BLOCK, ELSEIF ); bAbort = sal_True; return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( eTok == ELSE )
|
||||
{
|
||||
Next();
|
||||
UINT32 nElseLbl = nEndLbl;
|
||||
sal_uInt32 nElseLbl = nEndLbl;
|
||||
nEndLbl = aGen.Gen( _JUMP, 0 );
|
||||
aGen.BackChain( nElseLbl );
|
||||
|
||||
@@ -114,7 +114,7 @@ void SbiParser::If()
|
||||
else
|
||||
{
|
||||
// single line IF
|
||||
bSingleLineIf = TRUE;
|
||||
bSingleLineIf = sal_True;
|
||||
nEndLbl = aGen.Gen( _JUMPF, 0 );
|
||||
Push( eCurTok );
|
||||
while( !bAbort )
|
||||
@@ -127,7 +127,7 @@ void SbiParser::If()
|
||||
if( eTok == ELSE )
|
||||
{
|
||||
Next();
|
||||
UINT32 nElseLbl = nEndLbl;
|
||||
sal_uInt32 nElseLbl = nEndLbl;
|
||||
nEndLbl = aGen.Gen( _JUMP, 0 );
|
||||
aGen.BackChain( nElseLbl );
|
||||
while( !bAbort )
|
||||
@@ -138,7 +138,7 @@ void SbiParser::If()
|
||||
break;
|
||||
}
|
||||
}
|
||||
bSingleLineIf = FALSE;
|
||||
bSingleLineIf = sal_False;
|
||||
}
|
||||
aGen.BackChain( nEndLbl );
|
||||
}
|
||||
@@ -156,7 +156,7 @@ void SbiParser::NoIf()
|
||||
|
||||
void SbiParser::DoLoop()
|
||||
{
|
||||
UINT32 nStartLbl = aGen.GetPC();
|
||||
sal_uInt32 nStartLbl = aGen.GetPC();
|
||||
OpenBlock( DO );
|
||||
SbiToken eTok = Next();
|
||||
if( IsEoln( eTok ) )
|
||||
@@ -183,7 +183,7 @@ void SbiParser::DoLoop()
|
||||
SbiExpression aCond( this );
|
||||
aCond.Gen();
|
||||
}
|
||||
UINT32 nEndLbl = aGen.Gen( eTok == UNTIL ? _JUMPT : _JUMPF, 0 );
|
||||
sal_uInt32 nEndLbl = aGen.Gen( eTok == UNTIL ? _JUMPT : _JUMPF, 0 );
|
||||
StmntBlock( LOOP );
|
||||
TestEoln();
|
||||
aGen.Gen( _JUMP, nStartLbl );
|
||||
@@ -197,9 +197,9 @@ void SbiParser::DoLoop()
|
||||
void SbiParser::While()
|
||||
{
|
||||
SbiExpression aCond( this );
|
||||
UINT32 nStartLbl = aGen.GetPC();
|
||||
sal_uInt32 nStartLbl = aGen.GetPC();
|
||||
aCond.Gen();
|
||||
UINT32 nEndLbl = aGen.Gen( _JUMPF, 0 );
|
||||
sal_uInt32 nEndLbl = aGen.Gen( _JUMPF, 0 );
|
||||
StmntBlock( WEND );
|
||||
aGen.Gen( _JUMP, nStartLbl );
|
||||
aGen.BackChain( nEndLbl );
|
||||
@@ -248,9 +248,9 @@ void SbiParser::For()
|
||||
aGen.Gen( _INITFOR );
|
||||
}
|
||||
|
||||
UINT32 nLoop = aGen.GetPC();
|
||||
sal_uInt32 nLoop = aGen.GetPC();
|
||||
// Test durchfuehren, evtl. Stack freigeben
|
||||
UINT32 nEndTarget = aGen.Gen( _TESTFOR, 0 );
|
||||
sal_uInt32 nEndTarget = aGen.Gen( _TESTFOR, 0 );
|
||||
OpenBlock( FOR );
|
||||
StmntBlock( NEXT );
|
||||
aGen.Gen( _NEXT );
|
||||
@@ -305,7 +305,7 @@ void SbiParser::OnGoto()
|
||||
{
|
||||
SbiExpression aCond( this );
|
||||
aCond.Gen();
|
||||
UINT32 nLabelsTarget = aGen.Gen( _ONJUMP, 0 );
|
||||
sal_uInt32 nLabelsTarget = aGen.Gen( _ONJUMP, 0 );
|
||||
SbiToken eTok = Next();
|
||||
if( eTok != GOTO && eTok != GOSUB )
|
||||
{
|
||||
@@ -313,14 +313,14 @@ void SbiParser::OnGoto()
|
||||
eTok = GOTO;
|
||||
}
|
||||
// Label-Tabelle einlesen:
|
||||
UINT32 nLbl = 0;
|
||||
sal_uInt32 nLbl = 0;
|
||||
do
|
||||
{
|
||||
SbiToken eTok2 = NIL;
|
||||
eTok2 = Next(); // Label holen
|
||||
if( MayBeLabel() )
|
||||
{
|
||||
UINT32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
sal_uInt32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
aGen.Gen( _JUMP, nOff );
|
||||
nLbl++;
|
||||
}
|
||||
@@ -340,7 +340,7 @@ void SbiParser::Goto()
|
||||
Next();
|
||||
if( MayBeLabel() )
|
||||
{
|
||||
UINT32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
sal_uInt32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
aGen.Gen( eOp, nOff );
|
||||
}
|
||||
else Error( SbERR_LABEL_EXPECTED );
|
||||
@@ -353,7 +353,7 @@ void SbiParser::Return()
|
||||
Next();
|
||||
if( MayBeLabel() )
|
||||
{
|
||||
UINT32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
sal_uInt32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
aGen.Gen( _RETURN, nOff );
|
||||
}
|
||||
else aGen.Gen( _RETURN, 0 );
|
||||
@@ -369,9 +369,9 @@ void SbiParser::Select()
|
||||
aCase.Gen();
|
||||
aGen.Gen( _CASE );
|
||||
TestEoln();
|
||||
UINT32 nNextTarget = 0;
|
||||
UINT32 nDoneTarget = 0;
|
||||
BOOL bElse = FALSE;
|
||||
sal_uInt32 nNextTarget = 0;
|
||||
sal_uInt32 nDoneTarget = 0;
|
||||
sal_Bool bElse = sal_False;
|
||||
// Die Cases einlesen:
|
||||
while( !bAbort )
|
||||
{
|
||||
@@ -382,13 +382,13 @@ void SbiParser::Select()
|
||||
aGen.BackChain( nNextTarget ), nNextTarget = 0;
|
||||
aGen.Statement();
|
||||
// Jeden Case einlesen
|
||||
BOOL bDone = FALSE;
|
||||
UINT32 nTrueTarget = 0;
|
||||
sal_Bool bDone = sal_False;
|
||||
sal_uInt32 nTrueTarget = 0;
|
||||
if( Peek() == ELSE )
|
||||
{
|
||||
// CASE ELSE
|
||||
Next();
|
||||
bElse = TRUE;
|
||||
bElse = sal_True;
|
||||
}
|
||||
else while( !bDone )
|
||||
{
|
||||
@@ -407,7 +407,7 @@ void SbiParser::Select()
|
||||
aCompare.Gen();
|
||||
nTrueTarget = aGen.Gen(
|
||||
_CASEIS, nTrueTarget,
|
||||
sal::static_int_cast< UINT16 >(
|
||||
sal::static_int_cast< sal_uInt16 >(
|
||||
SbxEQ + ( eTok2 - EQ ) ) );
|
||||
}
|
||||
else
|
||||
@@ -428,7 +428,7 @@ void SbiParser::Select()
|
||||
|
||||
}
|
||||
if( Peek() == COMMA ) Next();
|
||||
else TestEoln(), bDone = TRUE;
|
||||
else TestEoln(), bDone = sal_True;
|
||||
}
|
||||
// Alle Cases abgearbeitet
|
||||
if( !bElse )
|
||||
@@ -493,7 +493,7 @@ void SbiParser::On()
|
||||
aGen.Gen( _STDERROR );
|
||||
else
|
||||
{
|
||||
UINT32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
sal_uInt32 nOff = pProc->GetLabels().Reference( aSym );
|
||||
aGen.Gen( _ERRHDL, nOff );
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ void SbiParser::On()
|
||||
|
||||
void SbiParser::Resume()
|
||||
{
|
||||
UINT32 nLbl;
|
||||
sal_uInt32 nLbl;
|
||||
|
||||
switch( Next() )
|
||||
{
|
||||
|
||||
@@ -35,18 +35,18 @@ struct SbiParseStack { // "Stack" fuer Statement-Blocks
|
||||
SbiParseStack* pNext; // Chain
|
||||
SbiExprNode* pWithVar; // Variable fuer WITH
|
||||
SbiToken eExitTok; // Exit-Token
|
||||
UINT32 nChain; // JUMP-Chain
|
||||
sal_uInt32 nChain; // JUMP-Chain
|
||||
};
|
||||
|
||||
struct SbiStatement {
|
||||
SbiToken eTok;
|
||||
void( SbiParser::*Func )(); // Verarbeitungsroutine
|
||||
BOOL bMain; // TRUE: ausserhalb SUBs OK
|
||||
BOOL bSubr; // TRUE: in SUBs OK
|
||||
sal_Bool bMain; // sal_True: ausserhalb SUBs OK
|
||||
sal_Bool bSubr; // sal_True: in SUBs OK
|
||||
};
|
||||
|
||||
#define Y TRUE
|
||||
#define N FALSE
|
||||
#define Y sal_True
|
||||
#define N sal_False
|
||||
|
||||
static SbiStatement StmntTable [] = {
|
||||
{ CALL, &SbiParser::Call, N, Y, }, // CALL
|
||||
@@ -141,7 +141,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm )
|
||||
bGblDefs =
|
||||
bNewGblDefs =
|
||||
bSingleLineIf =
|
||||
bExplicit = FALSE;
|
||||
bExplicit = sal_False;
|
||||
bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::CLASS );
|
||||
OSL_TRACE("Parser - %s, bClassModule %d", rtl::OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule );
|
||||
pPool = &aPublics;
|
||||
@@ -187,7 +187,7 @@ SbiSymDef* SbiParser::CheckRTLForSym( const String& rSym, SbxDataType eType )
|
||||
|
||||
// Globale Chainkette schliessen
|
||||
|
||||
BOOL SbiParser::HasGlobalCode()
|
||||
sal_Bool SbiParser::HasGlobalCode()
|
||||
{
|
||||
if( bGblDefs && nGblChain )
|
||||
{
|
||||
@@ -252,49 +252,49 @@ void SbiParser::Exit()
|
||||
Error( SbERR_BAD_EXIT );
|
||||
}
|
||||
|
||||
BOOL SbiParser::TestSymbol( BOOL bKwdOk )
|
||||
sal_Bool SbiParser::TestSymbol( sal_Bool bKwdOk )
|
||||
{
|
||||
Peek();
|
||||
if( eCurTok == SYMBOL || ( bKwdOk && IsKwd( eCurTok ) ) )
|
||||
{
|
||||
Next(); return TRUE;
|
||||
Next(); return sal_True;
|
||||
}
|
||||
Error( SbERR_SYMBOL_EXPECTED );
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
// Testen auf ein bestimmtes Token
|
||||
|
||||
BOOL SbiParser::TestToken( SbiToken t )
|
||||
sal_Bool SbiParser::TestToken( SbiToken t )
|
||||
{
|
||||
if( Peek() == t )
|
||||
{
|
||||
Next(); return TRUE;
|
||||
Next(); return sal_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error( SbERR_EXPECTED, t );
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
}
|
||||
|
||||
// Testen auf Komma oder EOLN
|
||||
|
||||
BOOL SbiParser::TestComma()
|
||||
sal_Bool SbiParser::TestComma()
|
||||
{
|
||||
SbiToken eTok = Peek();
|
||||
if( IsEoln( eTok ) )
|
||||
{
|
||||
Next();
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
else if( eTok != COMMA )
|
||||
{
|
||||
Error( SbERR_EXPECTED, COMMA );
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
Next();
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
// Testen, ob EOLN vorliegt
|
||||
@@ -320,16 +320,16 @@ void SbiParser::StmntBlock( SbiToken eEnd )
|
||||
if( IsEof() )
|
||||
{
|
||||
Error( SbERR_BAD_BLOCK, eEnd );
|
||||
bAbort = TRUE;
|
||||
bAbort = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
// Die Hauptroutine. Durch wiederholten Aufrufs dieser Routine wird
|
||||
// die Quelle geparst. Returnwert FALSE bei Ende/Fehlern.
|
||||
// die Quelle geparst. Returnwert sal_False bei Ende/Fehlern.
|
||||
|
||||
BOOL SbiParser::Parse()
|
||||
sal_Bool SbiParser::Parse()
|
||||
{
|
||||
if( bAbort ) return FALSE;
|
||||
if( bAbort ) return sal_False;
|
||||
|
||||
EnableErrors();
|
||||
|
||||
@@ -345,16 +345,16 @@ BOOL SbiParser::Parse()
|
||||
// ein nGblChain vorhanden sein, daher vorher abfragen
|
||||
if( bNewGblDefs && nGblChain == 0 )
|
||||
nGblChain = aGen.Gen( _JUMP, 0 );
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
// Leerstatement?
|
||||
if( IsEoln( eCurTok ) )
|
||||
{
|
||||
Next(); return TRUE;
|
||||
Next(); return sal_True;
|
||||
}
|
||||
|
||||
if( !bSingleLineIf && MayBeLabel( TRUE ) )
|
||||
if( !bSingleLineIf && MayBeLabel( sal_True ) )
|
||||
{
|
||||
// Ist ein Label
|
||||
if( !pProc )
|
||||
@@ -365,7 +365,7 @@ BOOL SbiParser::Parse()
|
||||
// Leerstatement?
|
||||
if( IsEoln( eCurTok ) )
|
||||
{
|
||||
Next(); return TRUE;
|
||||
Next(); return sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,13 +378,13 @@ BOOL SbiParser::Parse()
|
||||
Next();
|
||||
if( eCurTok != NIL )
|
||||
aGen.Statement();
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
// Kommentar?
|
||||
if( eCurTok == REM )
|
||||
{
|
||||
Next(); return TRUE;
|
||||
Next(); return sal_True;
|
||||
}
|
||||
|
||||
// Kommt ein Symbol, ist es entweder eine Variable( LET )
|
||||
@@ -428,7 +428,7 @@ BOOL SbiParser::Parse()
|
||||
( eCurTok == SUB || eCurTok == FUNCTION || eCurTok == PROPERTY ) )
|
||||
{
|
||||
nGblChain = aGen.Gen( _JUMP, 0 );
|
||||
bNewGblDefs = FALSE;
|
||||
bNewGblDefs = sal_False;
|
||||
}
|
||||
// Statement-Opcode bitte auch am Anfang einer Sub
|
||||
if( ( p->bSubr && (eCurTok != STATIC || Peek() == SUB || Peek() == FUNCTION ) ) ||
|
||||
@@ -459,7 +459,7 @@ BOOL SbiParser::Parse()
|
||||
}
|
||||
// Der Parser bricht am Ende ab, das naechste Token ist noch nicht
|
||||
// geholt!
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
// Innerste With-Variable liefern
|
||||
@@ -564,7 +564,7 @@ void SbiParser::Assign()
|
||||
SbiExpression aExpr( this );
|
||||
aLvalue.Gen();
|
||||
aExpr.Gen();
|
||||
USHORT nLen = 0;
|
||||
sal_uInt16 nLen = 0;
|
||||
SbiSymDef* pDef = aLvalue.GetRealVar();
|
||||
{
|
||||
if( pDef->GetConstDef() )
|
||||
@@ -595,7 +595,7 @@ void SbiParser::Set()
|
||||
Next();
|
||||
String aStr;
|
||||
SbiSymDef* pTypeDef = new SbiSymDef( aStr );
|
||||
TypeDecl( *pTypeDef, TRUE );
|
||||
TypeDecl( *pTypeDef, sal_True );
|
||||
|
||||
aLvalue.Gen();
|
||||
// aGen.Gen( _CLASS, pDef->GetTypeId() | 0x8000 );
|
||||
@@ -747,7 +747,7 @@ void SbiParser::EnableCompatibility()
|
||||
{
|
||||
if( !bCompatible )
|
||||
AddConstants();
|
||||
bCompatible = TRUE;
|
||||
bCompatible = sal_True;
|
||||
}
|
||||
|
||||
// OPTION
|
||||
@@ -757,7 +757,7 @@ void SbiParser::Option()
|
||||
switch( Next() )
|
||||
{
|
||||
case EXPLICIT:
|
||||
bExplicit = TRUE; break;
|
||||
bExplicit = sal_True; break;
|
||||
case BASE:
|
||||
if( Next() == NUMBER )
|
||||
{
|
||||
@@ -780,9 +780,9 @@ void SbiParser::Option()
|
||||
{
|
||||
SbiToken eTok = Next();
|
||||
if( eTok == BINARY )
|
||||
bText = FALSE;
|
||||
bText = sal_False;
|
||||
else if( eTok == SYMBOL && GetSym().EqualsIgnoreCaseAscii("text") )
|
||||
bText = TRUE;
|
||||
bText = sal_True;
|
||||
else
|
||||
Error( SbERR_EXPECTED, "Text/Binary" );
|
||||
break;
|
||||
@@ -792,7 +792,7 @@ void SbiParser::Option()
|
||||
break;
|
||||
|
||||
case CLASSMODULE:
|
||||
bClassModule = TRUE;
|
||||
bClassModule = sal_True;
|
||||
aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS );
|
||||
break;
|
||||
case VBASUPPORT:
|
||||
|
||||
@@ -271,7 +271,7 @@ String lcl_dumpMethodParameters( SbMethod* pMethod )
|
||||
{
|
||||
aStr += '(';
|
||||
// 0 is sub itself
|
||||
for ( USHORT nParam = 1; nParam < pParams->Count(); nParam++ )
|
||||
for ( sal_uInt16 nParam = 1; nParam < pParams->Count(); nParam++ )
|
||||
{
|
||||
SbxVariable* pVar = pParams->Get( nParam );
|
||||
DBG_ASSERT( pVar, "Parameter?!" );
|
||||
@@ -324,9 +324,9 @@ void dbg_DeInitTrace( void )
|
||||
GbTraceOn = GbSavTraceOn;
|
||||
}
|
||||
|
||||
static INT32 GnLastCallLvl = 0;
|
||||
static sal_Int32 GnLastCallLvl = 0;
|
||||
|
||||
void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl )
|
||||
void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl )
|
||||
{
|
||||
if( !GbTraceOn )
|
||||
return;
|
||||
@@ -383,7 +383,7 @@ void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl )
|
||||
lcl_lineOut( GpTraceFileName, rStr_PCode.getStr(), lcl_getSpaces( nIndent ) );
|
||||
}
|
||||
|
||||
void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave )
|
||||
void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallLvl, bool bLeave )
|
||||
{
|
||||
static const char* pSeparator = "' ================================================================================";
|
||||
|
||||
@@ -448,7 +448,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl,
|
||||
lcl_lineOut( GpTraceFileName, "" );
|
||||
}
|
||||
|
||||
void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl )
|
||||
void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, sal_Int32 nCallLvl )
|
||||
{
|
||||
if( !GbTraceOn )
|
||||
return;
|
||||
@@ -463,7 +463,7 @@ void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool b
|
||||
lcl_lineOut( GpTraceFileName, Buffer, lcl_getSpaces( nIndent ) );
|
||||
}
|
||||
|
||||
void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC,
|
||||
void dbg_RegisterTraceTextForPC( SbModule* pModule, sal_uInt32 nPC,
|
||||
const String& aTraceStr_STMNT, const String& aTraceStr_PCode )
|
||||
{
|
||||
String aModuleName = pModule->GetName();
|
||||
@@ -490,7 +490,7 @@ void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC,
|
||||
(*pInnerMap)[nPC] = aData;
|
||||
}
|
||||
|
||||
void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
|
||||
void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
|
||||
{
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
@@ -621,13 +621,13 @@ void dbg_SaveDisassembly( SbModule* pModule )
|
||||
// Diese Routine ist hier definiert, damit der Compiler als eigenes Segment
|
||||
// geladen werden kann.
|
||||
|
||||
BOOL SbModule::Compile()
|
||||
sal_Bool SbModule::Compile()
|
||||
{
|
||||
if( pImage )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
StarBASIC* pBasic = PTR_CAST(StarBASIC,GetParent());
|
||||
if( !pBasic )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
SbxBase::ResetError();
|
||||
// Aktuelles Modul!
|
||||
SbModule* pOld = pCMOD;
|
||||
@@ -646,14 +646,14 @@ BOOL SbModule::Compile()
|
||||
|
||||
// Beim Compilieren eines Moduls werden die Modul-globalen
|
||||
// Variablen aller Module ungueltig
|
||||
BOOL bRet = IsCompiled();
|
||||
sal_Bool bRet = IsCompiled();
|
||||
if( bRet )
|
||||
{
|
||||
if( !this->ISA(SbObjModule) )
|
||||
pBasic->ClearAllModuleVars();
|
||||
RemoveVars(); // remove 'this' Modules variables
|
||||
// clear all method statics
|
||||
for( USHORT i = 0; i < pMethods->Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < pMethods->Count(); i++ )
|
||||
{
|
||||
SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) );
|
||||
if( p )
|
||||
|
||||
@@ -66,9 +66,9 @@ SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf
|
||||
bUsedForHilite =
|
||||
bCompatible =
|
||||
bVBASupportOn =
|
||||
bPrevLineExtentsComment = FALSE;
|
||||
bPrevLineExtentsComment = sal_False;
|
||||
bHash =
|
||||
bErrors = TRUE;
|
||||
bErrors = sal_True;
|
||||
}
|
||||
|
||||
SbiScanner::~SbiScanner()
|
||||
@@ -90,19 +90,19 @@ void SbiScanner::GenError( SbError code )
|
||||
{
|
||||
if( GetSbData()->bBlockCompilerError )
|
||||
{
|
||||
bAbort = TRUE;
|
||||
bAbort = sal_True;
|
||||
return;
|
||||
}
|
||||
if( !bError && bErrors )
|
||||
{
|
||||
BOOL bRes = TRUE;
|
||||
sal_Bool bRes = sal_True;
|
||||
// Nur einen Fehler pro Statement reporten
|
||||
bError = TRUE;
|
||||
bError = sal_True;
|
||||
if( pBasic )
|
||||
{
|
||||
// Falls EXPECTED oder UNEXPECTED kommen sollte, bezieht es sich
|
||||
// immer auf das letzte Token, also die Col1 uebernehmen
|
||||
USHORT nc = nColLock ? nSavedCol1 : nCol1;
|
||||
sal_uInt16 nc = nColLock ? nSavedCol1 : nCol1;
|
||||
switch( code )
|
||||
{
|
||||
case SbERR_EXPECTED:
|
||||
@@ -122,16 +122,16 @@ void SbiScanner::GenError( SbError code )
|
||||
nErrors++;
|
||||
}
|
||||
|
||||
// Falls sofort ein Doppelpunkt folgt, wird TRUE zurueckgeliefert.
|
||||
// Falls sofort ein Doppelpunkt folgt, wird sal_True zurueckgeliefert.
|
||||
// Wird von SbiTokenizer::MayBeLabel() verwendet, um einen Label zu erkennen
|
||||
|
||||
BOOL SbiScanner::DoesColonFollow()
|
||||
sal_Bool SbiScanner::DoesColonFollow()
|
||||
{
|
||||
if( pLine && *pLine == ':' )
|
||||
{
|
||||
pLine++; nCol++; return TRUE;
|
||||
pLine++; nCol++; return sal_True;
|
||||
}
|
||||
else return FALSE;
|
||||
else return sal_False;
|
||||
}
|
||||
|
||||
// Testen auf ein legales Suffix
|
||||
@@ -143,36 +143,36 @@ static SbxDataType GetSuffixType( sal_Unicode c )
|
||||
{
|
||||
sal_uInt32 n = aSuffixesStr.Search( c );
|
||||
if( STRING_NOTFOUND != n && c != ' ' )
|
||||
return SbxDataType( (USHORT) n + SbxINTEGER );
|
||||
return SbxDataType( (sal_uInt16) n + SbxINTEGER );
|
||||
}
|
||||
return SbxVARIANT;
|
||||
}
|
||||
|
||||
// Einlesen des naechsten Symbols in die Variablen aSym, nVal und eType
|
||||
// Returnwert ist FALSE bei EOF oder Fehlern
|
||||
// Returnwert ist sal_False bei EOF oder Fehlern
|
||||
#define BUF_SIZE 80
|
||||
|
||||
BOOL SbiScanner::NextSym()
|
||||
sal_Bool SbiScanner::NextSym()
|
||||
{
|
||||
// Fuer den EOLN-Fall merken
|
||||
USHORT nOldLine = nLine;
|
||||
USHORT nOldCol1 = nCol1;
|
||||
USHORT nOldCol2 = nCol2;
|
||||
sal_uInt16 nOldLine = nLine;
|
||||
sal_uInt16 nOldCol1 = nCol1;
|
||||
sal_uInt16 nOldCol2 = nCol2;
|
||||
sal_Unicode buf[ BUF_SIZE ], *p = buf;
|
||||
bHash = FALSE;
|
||||
bHash = sal_False;
|
||||
|
||||
eScanType = SbxVARIANT;
|
||||
aSym.Erase();
|
||||
bSymbol =
|
||||
bNumber = bSpaces = FALSE;
|
||||
bNumber = bSpaces = sal_False;
|
||||
|
||||
// Zeile einlesen?
|
||||
if( !pLine )
|
||||
{
|
||||
INT32 n = nBufPos;
|
||||
INT32 nLen = aBuf.getLength();
|
||||
sal_Int32 n = nBufPos;
|
||||
sal_Int32 nLen = aBuf.getLength();
|
||||
if( nBufPos >= nLen )
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
const sal_Unicode* p2 = aBuf.getStr();
|
||||
p2 += n;
|
||||
while( ( n < nLen ) && ( *p2 != '\n' ) && ( *p2 != '\r' ) )
|
||||
@@ -194,7 +194,7 @@ BOOL SbiScanner::NextSym()
|
||||
|
||||
// Leerstellen weg:
|
||||
while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) )
|
||||
pLine++, nCol++, bSpaces = TRUE;
|
||||
pLine++, nCol++, bSpaces = sal_True;
|
||||
|
||||
nCol1 = nCol;
|
||||
|
||||
@@ -209,7 +209,7 @@ BOOL SbiScanner::NextSym()
|
||||
{
|
||||
pLine++;
|
||||
nCol++;
|
||||
bHash = TRUE;
|
||||
bHash = sal_True;
|
||||
}
|
||||
|
||||
// Symbol? Dann Zeichen kopieren.
|
||||
@@ -219,7 +219,7 @@ BOOL SbiScanner::NextSym()
|
||||
if( *pLine == '_' && !*(pLine+1) )
|
||||
{ pLine++;
|
||||
goto eoln; }
|
||||
bSymbol = TRUE;
|
||||
bSymbol = sal_True;
|
||||
short n = nCol;
|
||||
for ( ; (BasicSimpleCharClass::isAlphaNumeric( *pLine, bCompatible ) || ( *pLine == '_' ) ); pLine++ )
|
||||
nCol++;
|
||||
@@ -279,13 +279,13 @@ BOOL SbiScanner::NextSym()
|
||||
short ndig = 0;
|
||||
short ncdig = 0;
|
||||
eScanType = SbxDOUBLE;
|
||||
BOOL bBufOverflow = FALSE;
|
||||
sal_Bool bBufOverflow = sal_False;
|
||||
while( strchr( "0123456789.DEde", *pLine ) && *pLine )
|
||||
{
|
||||
// AB 4.1.1996: Buffer voll? -> leer weiter scannen
|
||||
if( (p-buf) == (BUF_SIZE-1) )
|
||||
{
|
||||
bBufOverflow = TRUE;
|
||||
bBufOverflow = sal_True;
|
||||
pLine++, nCol++;
|
||||
continue;
|
||||
}
|
||||
@@ -322,7 +322,7 @@ BOOL SbiScanner::NextSym()
|
||||
if (!exp) ndig++;
|
||||
}
|
||||
*p = 0;
|
||||
aSym = p; bNumber = TRUE;
|
||||
aSym = p; bNumber = sal_True;
|
||||
// Komma, Exponent mehrfach vorhanden?
|
||||
if( comma > 1 || exp > 1 )
|
||||
{ aError = '.';
|
||||
@@ -382,10 +382,10 @@ BOOL SbiScanner::NextSym()
|
||||
// Wird als Operator angesehen
|
||||
pLine--; nCol--; nCol1 = nCol-1; aSym = '&'; return SYMBOL;
|
||||
}
|
||||
bNumber = TRUE;
|
||||
bNumber = sal_True;
|
||||
long l = 0;
|
||||
int i;
|
||||
BOOL bBufOverflow = FALSE;
|
||||
sal_Bool bBufOverflow = sal_False;
|
||||
while( BasicSimpleCharClass::isAlphaNumeric( *pLine & 0xFF, bCompatible ) )
|
||||
{
|
||||
sal_Unicode ch = sal::static_int_cast< sal_Unicode >(
|
||||
@@ -393,7 +393,7 @@ BOOL SbiScanner::NextSym()
|
||||
pLine++; nCol++;
|
||||
// AB 4.1.1996: Buffer voll, leer weiter scannen
|
||||
if( (p-buf) == (BUF_SIZE-1) )
|
||||
bBufOverflow = TRUE;
|
||||
bBufOverflow = sal_True;
|
||||
else if( String( cmp ).Search( ch ) != STRING_NOTFOUND )
|
||||
//else if( strchr( cmp, ch ) )
|
||||
*p++ = ch;
|
||||
@@ -426,7 +426,7 @@ BOOL SbiScanner::NextSym()
|
||||
{
|
||||
sal_Unicode cSep = *pLine;
|
||||
if( cSep == '[' )
|
||||
bSymbol = TRUE, cSep = ']';
|
||||
bSymbol = sal_True, cSep = ']';
|
||||
short n = nCol+1;
|
||||
while( *pLine )
|
||||
{
|
||||
@@ -446,7 +446,7 @@ BOOL SbiScanner::NextSym()
|
||||
// Doppelte Stringbegrenzer raus
|
||||
String s( cSep );
|
||||
s += cSep;
|
||||
USHORT nIdx = 0;
|
||||
sal_uInt16 nIdx = 0;
|
||||
do
|
||||
{
|
||||
nIdx = aSym.Search( s, nIdx );
|
||||
@@ -485,15 +485,15 @@ PrevLineCommentLbl:
|
||||
if( bPrevLineExtentsComment || (eScanType != SbxSTRING &&
|
||||
( aSym.GetBuffer()[0] == '\'' || aSym.EqualsIgnoreCaseAscii( "REM" ) ) ) )
|
||||
{
|
||||
bPrevLineExtentsComment = FALSE;
|
||||
bPrevLineExtentsComment = sal_False;
|
||||
aSym = String::CreateFromAscii( "REM" );
|
||||
USHORT nLen = String( pLine ).Len();
|
||||
sal_uInt16 nLen = String( pLine ).Len();
|
||||
if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' )
|
||||
bPrevLineExtentsComment = TRUE;
|
||||
bPrevLineExtentsComment = sal_True;
|
||||
nCol2 = nCol2 + nLen;
|
||||
pLine = NULL;
|
||||
}
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
|
||||
// Sonst Zeilen-Ende: aber bitte auf '_' testen, ob die
|
||||
// Zeile nicht weitergeht!
|
||||
@@ -508,7 +508,7 @@ eoln:
|
||||
// .Method
|
||||
// ^^^ <- spaces is legal in MSO VBA
|
||||
OSL_TRACE("*** resetting bSpaces***");
|
||||
bSpaces = FALSE;
|
||||
bSpaces = sal_False;
|
||||
}
|
||||
return bRes;
|
||||
}
|
||||
@@ -520,7 +520,7 @@ eoln:
|
||||
nCol2 = nOldCol2;
|
||||
aSym = '\n';
|
||||
nColLock = 0;
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ SbiStringPool::~SbiStringPool()
|
||||
|
||||
// Suchen
|
||||
|
||||
const String& SbiStringPool::Find( USHORT n ) const
|
||||
const String& SbiStringPool::Find( sal_uInt16 n ) const
|
||||
{
|
||||
if( !n || n > aData.Count() )
|
||||
return aEmpty;
|
||||
@@ -69,10 +69,10 @@ const String& SbiStringPool::Find( USHORT n ) const
|
||||
// Hinzufuegen eines Strings. Der String wird Case-Insensitiv
|
||||
// verglichen.
|
||||
|
||||
short SbiStringPool::Add( const String& rVal, BOOL bNoCase )
|
||||
short SbiStringPool::Add( const String& rVal, sal_Bool bNoCase )
|
||||
{
|
||||
USHORT n = aData.Count();
|
||||
for( USHORT i = 0; i < n; i++ )
|
||||
sal_uInt16 n = aData.Count();
|
||||
for( sal_uInt16 i = 0; i < n; i++ )
|
||||
{
|
||||
String* p = aData.GetObject( i );
|
||||
if( ( bNoCase && p->Equals( rVal ) )
|
||||
@@ -125,7 +125,7 @@ void SbiSymPool::Clear()
|
||||
|
||||
SbiSymDef* SbiSymPool::First()
|
||||
{
|
||||
nCur = (USHORT) -1;
|
||||
nCur = (sal_uInt16) -1;
|
||||
return Next();
|
||||
}
|
||||
|
||||
@@ -206,8 +206,8 @@ void SbiSymPool::Add( SbiSymDef* pDef )
|
||||
|
||||
SbiSymDef* SbiSymPool::Find( const String& rName ) const
|
||||
{
|
||||
USHORT nCount = aData.Count();
|
||||
for( USHORT i = 0; i < nCount; i++ )
|
||||
sal_uInt16 nCount = aData.Count();
|
||||
for( sal_uInt16 i = 0; i < nCount; i++ )
|
||||
{
|
||||
SbiSymDef* p = aData.GetObject( nCount - i - 1 );
|
||||
if( ( !p->nProcId || ( p->nProcId == nProcId ) )
|
||||
@@ -222,9 +222,9 @@ SbiSymDef* SbiSymPool::Find( const String& rName ) const
|
||||
|
||||
// Suchen ueber ID-Nummer
|
||||
|
||||
SbiSymDef* SbiSymPool::FindId( USHORT n ) const
|
||||
SbiSymDef* SbiSymPool::FindId( sal_uInt16 n ) const
|
||||
{
|
||||
for( USHORT i = 0; i < aData.Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < aData.Count(); i++ )
|
||||
{
|
||||
SbiSymDef* p = aData.GetObject( i );
|
||||
if( p->nId == n && ( !p->nProcId || ( p->nProcId == nProcId ) ) )
|
||||
@@ -238,7 +238,7 @@ SbiSymDef* SbiSymPool::FindId( USHORT n ) const
|
||||
|
||||
// Suchen ueber Position (ab 0)
|
||||
|
||||
SbiSymDef* SbiSymPool::Get( USHORT n ) const
|
||||
SbiSymDef* SbiSymPool::Get( sal_uInt16 n ) const
|
||||
{
|
||||
if( n >= aData.Count() )
|
||||
return NULL;
|
||||
@@ -246,7 +246,7 @@ SbiSymDef* SbiSymPool::Get( USHORT n ) const
|
||||
return aData.GetObject( n );
|
||||
}
|
||||
|
||||
UINT32 SbiSymPool::Define( const String& rName )
|
||||
sal_uInt32 SbiSymPool::Define( const String& rName )
|
||||
{
|
||||
SbiSymDef* p = Find( rName );
|
||||
if( p )
|
||||
@@ -258,7 +258,7 @@ UINT32 SbiSymPool::Define( const String& rName )
|
||||
return p->Define();
|
||||
}
|
||||
|
||||
UINT32 SbiSymPool::Reference( const String& rName )
|
||||
sal_uInt32 SbiSymPool::Reference( const String& rName )
|
||||
{
|
||||
SbiSymDef* p = Find( rName );
|
||||
if( !p )
|
||||
@@ -272,7 +272,7 @@ UINT32 SbiSymPool::Reference( const String& rName )
|
||||
|
||||
void SbiSymPool::CheckRefs()
|
||||
{
|
||||
for( USHORT i = 0; i < aData.Count(); i++ )
|
||||
for( sal_uInt16 i = 0; i < aData.Count(); i++ )
|
||||
{
|
||||
SbiSymDef* p = aData.GetObject( i );
|
||||
if( !p->IsDefined() )
|
||||
@@ -304,7 +304,7 @@ SbiSymDef::SbiSymDef( const String& rName ) : aName( rName )
|
||||
bWithEvents =
|
||||
bByVal =
|
||||
bChained =
|
||||
bGlobal = FALSE;
|
||||
bGlobal = sal_False;
|
||||
pIn =
|
||||
pPool = NULL;
|
||||
nDefaultId = 0;
|
||||
@@ -360,11 +360,11 @@ void SbiSymDef::SetType( SbxDataType t )
|
||||
// Es wird der Wert zurueckgeliefert, der als Operand gespeichert
|
||||
// werden soll.
|
||||
|
||||
UINT32 SbiSymDef::Reference()
|
||||
sal_uInt32 SbiSymDef::Reference()
|
||||
{
|
||||
if( !bChained )
|
||||
{
|
||||
UINT32 n = nChain;
|
||||
sal_uInt32 n = nChain;
|
||||
nChain = pIn->pParser->aGen.GetOffset();
|
||||
return n;
|
||||
}
|
||||
@@ -374,13 +374,13 @@ UINT32 SbiSymDef::Reference()
|
||||
// Definition eines Symbols.
|
||||
// Hier wird der Backchain aufgeloest, falls vorhanden
|
||||
|
||||
UINT32 SbiSymDef::Define()
|
||||
sal_uInt32 SbiSymDef::Define()
|
||||
{
|
||||
UINT32 n = pIn->pParser->aGen.GetPC();
|
||||
sal_uInt32 n = pIn->pParser->aGen.GetPC();
|
||||
pIn->pParser->aGen.GenStmnt();
|
||||
if( nChain ) pIn->pParser->aGen.BackChain( nChain );
|
||||
nChain = n;
|
||||
bChained = TRUE;
|
||||
bChained = sal_True;
|
||||
return nChain;
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ SbiSymScope SbiSymDef::GetScope() const
|
||||
// 3) aLabels: Labels
|
||||
|
||||
SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName,
|
||||
BOOL bProcDecl )
|
||||
sal_Bool bProcDecl )
|
||||
: SbiSymDef( rName )
|
||||
, aParams( pParser->aGblStrings, SbPARAM ) // wird gedumpt
|
||||
, aLabels( pParser->aLclStrings, SbLOCAL ) // wird nicht gedumpt
|
||||
@@ -421,9 +421,9 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName,
|
||||
nLine1 =
|
||||
nLine2 = 0;
|
||||
mePropMode = PROPERTY_MODE_NONE;
|
||||
bPublic = TRUE;
|
||||
bCdecl = FALSE;
|
||||
bStatic = FALSE;
|
||||
bPublic = sal_True;
|
||||
bCdecl = sal_False;
|
||||
bStatic = sal_False;
|
||||
// Fuer Returnwerte ist das erste Element der Parameterliste
|
||||
// immer mit dem Namen und dem Typ der Proc definiert
|
||||
aParams.AddSym( aName );
|
||||
@@ -451,7 +451,7 @@ void SbiProcDef::Match( SbiProcDef* pOld )
|
||||
{
|
||||
SbiSymDef* po, *pn=NULL;
|
||||
// Parameter 0 ist der Funktionsname
|
||||
USHORT i;
|
||||
sal_uInt16 i;
|
||||
for( i = 1; i < aParams.GetSize(); i++ )
|
||||
{
|
||||
po = pOld->aParams.Get( i );
|
||||
|
||||
+20
-20
@@ -386,10 +386,10 @@ SbiTokenizer::SbiTokenizer( const ::rtl::OUString& rSrc, StarBASIC* pb )
|
||||
//if( StarBASIC::GetGlobalLanguageMode() == SB_LANG_JAVASCRIPT )
|
||||
// pTokTable = aTokTable_Java;
|
||||
TokenTable *tp;
|
||||
bEof = bAs = FALSE;
|
||||
bEof = bAs = sal_False;
|
||||
eCurTok = NIL;
|
||||
ePush = NIL;
|
||||
bEos = bKeywords = bErrorIsSymbol = TRUE;
|
||||
bEos = bKeywords = bErrorIsSymbol = sal_True;
|
||||
if( !nToken )
|
||||
for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ ) {}
|
||||
}
|
||||
@@ -431,9 +431,9 @@ SbiToken SbiTokenizer::Peek()
|
||||
{
|
||||
if( ePush == NIL )
|
||||
{
|
||||
USHORT nOldLine = nLine;
|
||||
USHORT nOldCol1 = nCol1;
|
||||
USHORT nOldCol2 = nCol2;
|
||||
sal_uInt16 nOldLine = nLine;
|
||||
sal_uInt16 nOldCol1 = nCol1;
|
||||
sal_uInt16 nOldCol2 = nCol2;
|
||||
ePush = Next();
|
||||
nPLine = nLine; nLine = nOldLine;
|
||||
nPCol1 = nCol1; nCol1 = nOldCol1;
|
||||
@@ -498,15 +498,15 @@ SbiToken SbiTokenizer::Next()
|
||||
// Sonst einlesen:
|
||||
if( !NextSym() )
|
||||
{
|
||||
bEof = bEos = TRUE;
|
||||
bEof = bEos = sal_True;
|
||||
return eCurTok = EOLN;
|
||||
}
|
||||
// Zeilenende?
|
||||
if( aSym.GetBuffer()[0] == '\n' )
|
||||
{
|
||||
bEos = TRUE; return eCurTok = EOLN;
|
||||
bEos = sal_True; return eCurTok = EOLN;
|
||||
}
|
||||
bEos = FALSE;
|
||||
bEos = sal_False;
|
||||
|
||||
// Zahl?
|
||||
if( bNumber )
|
||||
@@ -573,10 +573,10 @@ special:
|
||||
{
|
||||
// AB, 15.3.96, Spezialbehandlung fuer END, beim Peek() geht die
|
||||
// aktuelle Zeile verloren, daher alles merken und danach restaurieren
|
||||
USHORT nOldLine = nLine;
|
||||
USHORT nOldCol = nCol;
|
||||
USHORT nOldCol1 = nCol1;
|
||||
USHORT nOldCol2 = nCol2;
|
||||
sal_uInt16 nOldLine = nLine;
|
||||
sal_uInt16 nOldCol = nCol;
|
||||
sal_uInt16 nOldCol1 = nCol1;
|
||||
sal_uInt16 nOldCol2 = nCol2;
|
||||
String aOldSym = aSym;
|
||||
SaveLine(); // pLine im Scanner sichern
|
||||
|
||||
@@ -612,11 +612,11 @@ special:
|
||||
eCurTok = tp->t;
|
||||
// AS: Datentypen sind Keywords
|
||||
if( tp->t == AS )
|
||||
bAs = TRUE;
|
||||
bAs = sal_True;
|
||||
else
|
||||
{
|
||||
if( bAs )
|
||||
bAs = FALSE;
|
||||
bAs = sal_False;
|
||||
else if( eCurTok >= DATATYPE1 && eCurTok <= DATATYPE2 && (bErrorIsSymbol || eCurTok != _ERROR_) )
|
||||
eCurTok = SYMBOL;
|
||||
}
|
||||
@@ -653,12 +653,12 @@ special:
|
||||
|
||||
// Kann das aktuell eingelesene Token ein Label sein?
|
||||
|
||||
BOOL SbiTokenizer::MayBeLabel( BOOL bNeedsColon )
|
||||
sal_Bool SbiTokenizer::MayBeLabel( sal_Bool bNeedsColon )
|
||||
{
|
||||
if( eCurTok == SYMBOL || m_aTokenLabelInfo.canTokenBeLabel( eCurTok ) )
|
||||
return bNeedsColon ? DoesColonFollow() : TRUE;
|
||||
return bNeedsColon ? DoesColonFollow() : sal_True;
|
||||
else
|
||||
return BOOL( eCurTok == NUMBER
|
||||
return sal_Bool( eCurTok == NUMBER
|
||||
&& eScanType == SbxINTEGER
|
||||
&& nVal >= 0 );
|
||||
}
|
||||
@@ -670,8 +670,8 @@ BOOL SbiTokenizer::MayBeLabel( BOOL bNeedsColon )
|
||||
|
||||
void SbiTokenizer::Hilite( SbTextPortions& rList )
|
||||
{
|
||||
bErrors = FALSE;
|
||||
bUsedForHilite = TRUE;
|
||||
bErrors = sal_False;
|
||||
bUsedForHilite = sal_True;
|
||||
SbiToken eLastTok = NIL;
|
||||
for( ;; )
|
||||
{
|
||||
@@ -709,6 +709,6 @@ void SbiTokenizer::Hilite( SbTextPortions& rList )
|
||||
break;
|
||||
eLastTok = eCurTok;
|
||||
}
|
||||
bUsedForHilite = FALSE;
|
||||
bUsedForHilite = sal_False;
|
||||
}
|
||||
|
||||
|
||||
+15
-15
@@ -37,27 +37,27 @@ class SbiBuffer { // Code/Konstanten-Puffer:
|
||||
SbiParser* pParser; // fuer Fehlermeldungen
|
||||
char* pBuf; // Puffer-Pointer
|
||||
char* pCur; // aktueller Puffer-Pointer
|
||||
UINT32 nOff; // aktuelles Offset
|
||||
UINT32 nSize; // aktuelle Groesse
|
||||
sal_uInt32 nOff; // aktuelles Offset
|
||||
sal_uInt32 nSize; // aktuelle Groesse
|
||||
short nInc; // Inkrement
|
||||
BOOL Check( USHORT ); // Buffergroesse testen
|
||||
sal_Bool Check( sal_uInt16 ); // Buffergroesse testen
|
||||
public:
|
||||
SbiBuffer( SbiParser*, short ); // Inkrement
|
||||
~SbiBuffer();
|
||||
void Patch( UINT32, UINT32 ); // Patchen
|
||||
void Chain( UINT32 ); // Back-Chain
|
||||
void Align( INT32 ); // Alignment
|
||||
BOOL Add( const void*, USHORT );// Element anfuegen
|
||||
BOOL operator += (const String&);// Basic-String speichern
|
||||
BOOL operator += (INT8); // Zeichen speichern
|
||||
BOOL operator += (INT16); // Integer speichern
|
||||
BOOL operator += (UINT8); // Zeichen speichern
|
||||
BOOL operator += (UINT16); // Integer speichern
|
||||
BOOL operator += (UINT32); // Integer speichern
|
||||
BOOL operator += (INT32); // Integer speichern
|
||||
void Patch( sal_uInt32, sal_uInt32 ); // Patchen
|
||||
void Chain( sal_uInt32 ); // Back-Chain
|
||||
void Align( sal_Int32 ); // Alignment
|
||||
sal_Bool Add( const void*, sal_uInt16 );// Element anfuegen
|
||||
sal_Bool operator += (const String&);// Basic-String speichern
|
||||
sal_Bool operator += (sal_Int8); // Zeichen speichern
|
||||
sal_Bool operator += (sal_Int16); // Integer speichern
|
||||
sal_Bool operator += (sal_uInt8); // Zeichen speichern
|
||||
sal_Bool operator += (sal_uInt16); // Integer speichern
|
||||
sal_Bool operator += (sal_uInt32); // Integer speichern
|
||||
sal_Bool operator += (sal_Int32); // Integer speichern
|
||||
char* GetBuffer(); // Puffer rausgeben (selbst loeschen!)
|
||||
char* GetBufferPtr(){ return pBuf; }
|
||||
UINT32 GetSize() { return nOff; }
|
||||
sal_uInt32 GetSize() { return nOff; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,28 +40,28 @@ class SbiCodeGen { // Code-Erzeugung:
|
||||
SbiBuffer aCode; // Code-Puffer
|
||||
short nLine, nCol; // Zeile, Spalte fuer Stmnt-Befehl
|
||||
short nForLevel; // #29955 for-Schleifen-Ebene
|
||||
BOOL bStmnt; // TRUE: Statement-Opcode liegt an
|
||||
sal_Bool bStmnt; // sal_True: Statement-Opcode liegt an
|
||||
public:
|
||||
SbiCodeGen( SbModule&, SbiParser*, short );
|
||||
SbiParser* GetParser() { return pParser; }
|
||||
SbModule& GetModule() { return rMod; }
|
||||
UINT32 Gen( SbiOpcode );
|
||||
UINT32 Gen( SbiOpcode, UINT32 );
|
||||
UINT32 Gen( SbiOpcode, UINT32, UINT32 );
|
||||
void Patch( UINT32 o, UINT32 v ){ aCode.Patch( o, v ); }
|
||||
void BackChain( UINT32 off ) { aCode.Chain( off ); }
|
||||
sal_uInt32 Gen( SbiOpcode );
|
||||
sal_uInt32 Gen( SbiOpcode, sal_uInt32 );
|
||||
sal_uInt32 Gen( SbiOpcode, sal_uInt32, sal_uInt32 );
|
||||
void Patch( sal_uInt32 o, sal_uInt32 v ){ aCode.Patch( o, v ); }
|
||||
void BackChain( sal_uInt32 off ) { aCode.Chain( off ); }
|
||||
void Statement();
|
||||
void GenStmnt(); // evtl. Statement-Opcode erzeugen
|
||||
UINT32 GetPC();
|
||||
UINT32 GetOffset() { return GetPC() + 1; }
|
||||
sal_uInt32 GetPC();
|
||||
sal_uInt32 GetOffset() { return GetPC() + 1; }
|
||||
void Save();
|
||||
|
||||
// #29955 for-Schleifen-Ebene pflegen
|
||||
void IncForLevel( void ) { nForLevel++; }
|
||||
void DecForLevel( void ) { nForLevel--; }
|
||||
|
||||
static UINT32 calcNewOffSet( BYTE* pCode, UINT16 nOffset );
|
||||
static UINT16 calcLegacyOffSet( BYTE* pCode, UINT32 nOffset );
|
||||
static sal_uInt32 calcNewOffSet( sal_uInt8* pCode, sal_uInt16 nOffset );
|
||||
static sal_uInt16 calcLegacyOffSet( sal_uInt8* pCode, sal_uInt32 nOffset );
|
||||
|
||||
};
|
||||
|
||||
@@ -69,8 +69,8 @@ template < class T, class S >
|
||||
class PCodeBuffConvertor
|
||||
{
|
||||
T m_nSize; //
|
||||
BYTE* m_pStart;
|
||||
BYTE* m_pCnvtdBuf;
|
||||
sal_uInt8* m_pStart;
|
||||
sal_uInt8* m_pCnvtdBuf;
|
||||
S m_nCnvtdSize; //
|
||||
|
||||
// Disable usual copying symantics and bodgy default ctor
|
||||
@@ -78,11 +78,11 @@ class PCodeBuffConvertor
|
||||
PCodeBuffConvertor(const PCodeBuffConvertor& );
|
||||
PCodeBuffConvertor& operator = ( const PCodeBuffConvertor& );
|
||||
public:
|
||||
PCodeBuffConvertor( BYTE* pCode, T nSize ): m_nSize( nSize ), m_pStart( pCode ), m_pCnvtdBuf( NULL ), m_nCnvtdSize( 0 ){ convert(); }
|
||||
PCodeBuffConvertor( sal_uInt8* pCode, T nSize ): m_nSize( nSize ), m_pStart( pCode ), m_pCnvtdBuf( NULL ), m_nCnvtdSize( 0 ){ convert(); }
|
||||
S GetSize(){ return m_nCnvtdSize; }
|
||||
void convert();
|
||||
// Caller owns the buffer returned
|
||||
BYTE* GetBuffer() { return m_pCnvtdBuf; }
|
||||
sal_uInt8* GetBuffer() { return m_pCnvtdBuf; }
|
||||
};
|
||||
|
||||
// #111897 PARAM_INFO flags start at 0x00010000 to not
|
||||
|
||||
@@ -37,14 +37,14 @@ class SbiDisas {
|
||||
const SbiImage& rImg;
|
||||
SbModule* pMod;
|
||||
char cLabels[ MAX_LABELS ]; // Bitvektor fuer Labels
|
||||
UINT32 nOff; // aktuelle Position
|
||||
UINT32 nPC; // Position des Opcodes
|
||||
sal_uInt32 nOff; // aktuelle Position
|
||||
sal_uInt32 nPC; // Position des Opcodes
|
||||
SbiOpcode eOp; // Opcode
|
||||
UINT32 nOp1, nOp2; // Operanden
|
||||
UINT32 nParts; // 1, 2 oder 3
|
||||
UINT32 nLine; // aktuelle Zeile
|
||||
BOOL DisasLine( String& );
|
||||
BOOL Fetch(); // naechster Opcode
|
||||
sal_uInt32 nOp1, nOp2; // Operanden
|
||||
sal_uInt32 nParts; // 1, 2 oder 3
|
||||
sal_uInt32 nLine; // aktuelle Zeile
|
||||
sal_Bool DisasLine( String& );
|
||||
sal_Bool Fetch(); // naechster Opcode
|
||||
public:
|
||||
SbiDisas( SbModule*, const SbiImage* );
|
||||
void Disas( SvStream& );
|
||||
|
||||
+42
-42
@@ -98,7 +98,7 @@ class SbiExprNode { // Operatoren (und Operanden)
|
||||
friend class SbiExpression;
|
||||
friend class SbiConstExpression;
|
||||
union {
|
||||
USHORT nTypeStrId; // gepoolter String-ID, #i59791/#i45570 Now only for TypeOf
|
||||
sal_uInt16 nTypeStrId; // gepoolter String-ID, #i59791/#i45570 Now only for TypeOf
|
||||
double nVal; // numerischer Wert
|
||||
SbVar aVar; // oder Variable
|
||||
};
|
||||
@@ -110,19 +110,19 @@ class SbiExprNode { // Operatoren (und Operanden)
|
||||
SbiNodeType eNodeType; // Art des Nodes
|
||||
SbxDataType eType; // aktueller Datentyp
|
||||
SbiToken eTok; // Token des Operators
|
||||
BOOL bComposite; // TRUE: Zusammengesetzter Ausdruck
|
||||
BOOL bError; // TRUE: Fehlerhaft
|
||||
sal_Bool bComposite; // sal_True: Zusammengesetzter Ausdruck
|
||||
sal_Bool bError; // sal_True: Fehlerhaft
|
||||
void FoldConstants(); // Constant Folding durchfuehren
|
||||
void CollectBits(); // Umwandeln von Zahlen in Strings
|
||||
BOOL IsOperand() // TRUE, wenn Operand
|
||||
{ return BOOL( eNodeType != SbxNODE && eNodeType != SbxTYPEOF && eNodeType != SbxNEW ); }
|
||||
BOOL IsTypeOf()
|
||||
{ return BOOL( eNodeType == SbxTYPEOF ); }
|
||||
BOOL IsNew()
|
||||
{ return BOOL( eNodeType == SbxNEW ); }
|
||||
BOOL IsNumber(); // TRUE bei Zahlen
|
||||
BOOL IsString(); // TRUE bei Strings
|
||||
BOOL IsLvalue(); // TRUE, falls als Lvalue verwendbar
|
||||
sal_Bool IsOperand() // sal_True, wenn Operand
|
||||
{ return sal_Bool( eNodeType != SbxNODE && eNodeType != SbxTYPEOF && eNodeType != SbxNEW ); }
|
||||
sal_Bool IsTypeOf()
|
||||
{ return sal_Bool( eNodeType == SbxTYPEOF ); }
|
||||
sal_Bool IsNew()
|
||||
{ return sal_Bool( eNodeType == SbxNEW ); }
|
||||
sal_Bool IsNumber(); // sal_True bei Zahlen
|
||||
sal_Bool IsString(); // sal_True bei Strings
|
||||
sal_Bool IsLvalue(); // sal_True, falls als Lvalue verwendbar
|
||||
void GenElement( SbiOpcode ); // Element
|
||||
void BaseInit( SbiParser* p ); // Hilfsfunktion fuer Ctor, AB 17.12.95
|
||||
public:
|
||||
@@ -131,15 +131,15 @@ public:
|
||||
SbiExprNode( SbiParser*, const String& );
|
||||
SbiExprNode( SbiParser*, const SbiSymDef&, SbxDataType, SbiExprList* = NULL );
|
||||
SbiExprNode( SbiParser*, SbiExprNode*, SbiToken, SbiExprNode* );
|
||||
SbiExprNode( SbiParser*, SbiExprNode*, USHORT ); // #120061 TypeOf
|
||||
SbiExprNode( SbiParser*, USHORT ); // new <type>
|
||||
SbiExprNode( SbiParser*, SbiExprNode*, sal_uInt16 ); // #120061 TypeOf
|
||||
SbiExprNode( SbiParser*, sal_uInt16 ); // new <type>
|
||||
virtual ~SbiExprNode();
|
||||
|
||||
BOOL IsValid() { return BOOL( !bError ); }
|
||||
BOOL IsConstant() // TRUE bei konstantem Operanden
|
||||
{ return BOOL( eNodeType == SbxSTRVAL || eNodeType == SbxNUMVAL ); }
|
||||
BOOL IsIntConst(); // TRUE bei Integer-Konstanten
|
||||
BOOL IsVariable(); // TRUE, wenn Variable
|
||||
sal_Bool IsValid() { return sal_Bool( !bError ); }
|
||||
sal_Bool IsConstant() // sal_True bei konstantem Operanden
|
||||
{ return sal_Bool( eNodeType == SbxSTRVAL || eNodeType == SbxNUMVAL ); }
|
||||
sal_Bool IsIntConst(); // sal_True bei Integer-Konstanten
|
||||
sal_Bool IsVariable(); // sal_True, wenn Variable
|
||||
|
||||
SbiExprNode* GetWithParent() { return pWithParent; }
|
||||
void SetWithParent( SbiExprNode* p ) { pWithParent = p; }
|
||||
@@ -172,11 +172,11 @@ protected:
|
||||
SbiExprNode* pExpr; // Der Expression-Baum
|
||||
SbiExprType eCurExpr; // Art des Ausdrucks
|
||||
SbiExprMode m_eMode; // Expression context
|
||||
BOOL bBased; // TRUE: einfacher DIM-Teil (+BASE)
|
||||
BOOL bError; // TRUE: Fehler
|
||||
BOOL bByVal; // TRUE: ByVal-Parameter
|
||||
BOOL bBracket; // TRUE: Parameter list with brackets
|
||||
USHORT nParenLevel;
|
||||
sal_Bool bBased; // sal_True: einfacher DIM-Teil (+BASE)
|
||||
sal_Bool bError; // sal_True: Fehler
|
||||
sal_Bool bByVal; // sal_True: ByVal-Parameter
|
||||
sal_Bool bBracket; // sal_True: Parameter list with brackets
|
||||
sal_uInt16 nParenLevel;
|
||||
SbiExprNode* Term( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL );
|
||||
SbiExprNode* ObjTerm( SbiSymDef& );
|
||||
SbiExprNode* Operand( bool bUsedForTypeOf = false );
|
||||
@@ -200,16 +200,16 @@ public:
|
||||
SbiExpression( SbiParser*, SbiToken ); // Spezial-Expr mit Spezial-Tokens
|
||||
~SbiExpression();
|
||||
String& GetName() { return aArgName; }
|
||||
void SetBased() { bBased = TRUE; }
|
||||
BOOL IsBased() { return bBased; }
|
||||
void SetByVal() { bByVal = TRUE; }
|
||||
BOOL IsByVal() { return bByVal; }
|
||||
BOOL IsBracket() { return bBracket; }
|
||||
BOOL IsValid() { return pExpr->IsValid(); }
|
||||
BOOL IsConstant() { return pExpr->IsConstant(); }
|
||||
BOOL IsVariable() { return pExpr->IsVariable(); }
|
||||
BOOL IsLvalue() { return pExpr->IsLvalue(); }
|
||||
BOOL IsIntConstant() { return pExpr->IsIntConst(); }
|
||||
void SetBased() { bBased = sal_True; }
|
||||
sal_Bool IsBased() { return bBased; }
|
||||
void SetByVal() { bByVal = sal_True; }
|
||||
sal_Bool IsByVal() { return bByVal; }
|
||||
sal_Bool IsBracket() { return bBracket; }
|
||||
sal_Bool IsValid() { return pExpr->IsValid(); }
|
||||
sal_Bool IsConstant() { return pExpr->IsConstant(); }
|
||||
sal_Bool IsVariable() { return pExpr->IsVariable(); }
|
||||
sal_Bool IsLvalue() { return pExpr->IsLvalue(); }
|
||||
sal_Bool IsIntConstant() { return pExpr->IsIntConst(); }
|
||||
const String& GetString() { return pExpr->GetString(); }
|
||||
SbiSymDef* GetVar() { return pExpr->GetVar(); }
|
||||
SbiSymDef* GetRealVar() { return pExpr->GetRealVar(); }
|
||||
@@ -237,31 +237,31 @@ protected:
|
||||
SbiExpression* pFirst; // Expressions
|
||||
short nExpr; // Anzahl Expressions
|
||||
short nDim; // Anzahl Dimensionen
|
||||
BOOL bError; // TRUE: Fehler
|
||||
BOOL bBracket; // TRUE: Klammern
|
||||
sal_Bool bError; // sal_True: Fehler
|
||||
sal_Bool bBracket; // sal_True: Klammern
|
||||
public:
|
||||
SbiExprList( SbiParser* );
|
||||
virtual ~SbiExprList();
|
||||
BOOL IsBracket() { return bBracket; }
|
||||
BOOL IsValid() { return BOOL( !bError ); }
|
||||
sal_Bool IsBracket() { return bBracket; }
|
||||
sal_Bool IsValid() { return sal_Bool( !bError ); }
|
||||
short GetSize() { return nExpr; }
|
||||
short GetDims() { return nDim; }
|
||||
SbiExpression* Get( short );
|
||||
BOOL Test( const SbiProcDef& ); // Parameter-Checks
|
||||
sal_Bool Test( const SbiProcDef& ); // Parameter-Checks
|
||||
void Gen(); // Code-Erzeugung
|
||||
void addExpression( SbiExpression* pExpr );
|
||||
};
|
||||
|
||||
class SbiParameters : public SbiExprList {
|
||||
public:
|
||||
SbiParameters( SbiParser*, BOOL bConst = FALSE, BOOL bPar = TRUE);// parsender Ctor
|
||||
SbiParameters( SbiParser*, sal_Bool bConst = sal_False, sal_Bool bPar = sal_True);// parsender Ctor
|
||||
};
|
||||
|
||||
class SbiDimList : public SbiExprList {
|
||||
BOOL bConst; // TRUE: Alles sind Integer-Konstanten
|
||||
sal_Bool bConst; // sal_True: Alles sind Integer-Konstanten
|
||||
public:
|
||||
SbiDimList( SbiParser* ); // Parsender Ctor
|
||||
BOOL IsConstant() { return bConst; }
|
||||
sal_Bool IsConstant() { return bConst; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,9 +57,9 @@ class SvStream;
|
||||
// Diese Records enthalten wiederum weitere Records. Jeder Record hat
|
||||
// den folgenden Header:
|
||||
|
||||
// UINT16 Kennung
|
||||
// UINT32 Laenge des Records ohne Header
|
||||
// UINT16 Anzahl Unterelemente
|
||||
// sal_uInt16 Kennung
|
||||
// sal_uInt32 Laenge des Records ohne Header
|
||||
// sal_uInt16 Anzahl Unterelemente
|
||||
|
||||
// Alle Datei-Offsets in Records sind relativ zum Start des Moduls!
|
||||
|
||||
@@ -84,33 +84,33 @@ class SvStream;
|
||||
#endif
|
||||
|
||||
// Ein Library Record enthaelt nur Module Records
|
||||
// UINT16 Kennung BL
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 Anzahl Module
|
||||
// sal_uInt16 Kennung BL
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 Anzahl Module
|
||||
|
||||
// Ein Modul-Record enthaelt alle anderen Recordtypen
|
||||
// UINT16 Kennung BM
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 1
|
||||
// sal_uInt16 Kennung BM
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 1
|
||||
// Daten:
|
||||
// UINT32 Versionsnummer
|
||||
// UINT32 Zeichensatz
|
||||
// UINT32 Startadresse Initialisierungscode
|
||||
// UINT32 Startadresse Sub Main
|
||||
// UINT32 Reserviert
|
||||
// UINT32 Reserviert
|
||||
// sal_uInt32 Versionsnummer
|
||||
// sal_uInt32 Zeichensatz
|
||||
// sal_uInt32 Startadresse Initialisierungscode
|
||||
// sal_uInt32 Startadresse Sub Main
|
||||
// sal_uInt32 Reserviert
|
||||
// sal_uInt32 Reserviert
|
||||
|
||||
// Modulname, Kommentar und Quellcode:
|
||||
// UINT16 Kennung MN, MC oder SC
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 1
|
||||
// sal_uInt16 Kennung MN, MC oder SC
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 1
|
||||
// Daten:
|
||||
// String-Instanz
|
||||
|
||||
// P-Code:
|
||||
// UINT16 Kennung PC
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 1
|
||||
// sal_uInt16 Kennung PC
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 1
|
||||
// Daten:
|
||||
// Der P-Code als Bytesack
|
||||
|
||||
@@ -118,61 +118,61 @@ class SvStream;
|
||||
// Verweise auf diese Strings sind in Form eines Indexes in diesen Pool.
|
||||
|
||||
// Liste aller Publics:
|
||||
// UINT16 Kennung PU oder Pu
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 Anzahl der Publics
|
||||
// sal_uInt16 Kennung PU oder Pu
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 Anzahl der Publics
|
||||
// Daten fuer jeden Public-Eintrag:
|
||||
// UINT16 String-Index
|
||||
// UINT32 Startadresse im P-Code-Image (UINT16 fuer alte Publics)
|
||||
// UINT16 Datentyp des Returnwertes (ab Version 2)
|
||||
// sal_uInt16 String-Index
|
||||
// sal_uInt32 Startadresse im P-Code-Image (sal_uInt16 fuer alte Publics)
|
||||
// sal_uInt16 Datentyp des Returnwertes (ab Version 2)
|
||||
|
||||
// Verzeichnis der Symbol-Tabellen:
|
||||
// UINT16 Kennung SP
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 Anzahl der Symboltabellen
|
||||
// sal_uInt16 Kennung SP
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 Anzahl der Symboltabellen
|
||||
// Daten fuer jede Symboltabelle:
|
||||
// UINT16 Stringindex des Namens
|
||||
// UINT16 Anzahl Symbole
|
||||
// UINT16 Scope-Kennung
|
||||
// sal_uInt16 Stringindex des Namens
|
||||
// sal_uInt16 Anzahl Symbole
|
||||
// sal_uInt16 Scope-Kennung
|
||||
|
||||
// Symboltabelle:
|
||||
// UINT16 Kennung SY
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 Anzahl der Symbole
|
||||
// sal_uInt16 Kennung SY
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 Anzahl der Symbole
|
||||
// Daten:
|
||||
// UINT16 Stringindex des Namens
|
||||
// UINT16 Anzahl Symbole
|
||||
// sal_uInt16 Stringindex des Namens
|
||||
// sal_uInt16 Anzahl Symbole
|
||||
// Daten fuer jedes Symbol:
|
||||
// UINT16 Stringindex des Namens
|
||||
// UINT16 Datentyp
|
||||
// UINT16 Laenge bei STRING*n-Symbolen (0x8000: STATIC-Variable)
|
||||
// sal_uInt16 Stringindex des Namens
|
||||
// sal_uInt16 Datentyp
|
||||
// sal_uInt16 Laenge bei STRING*n-Symbolen (0x8000: STATIC-Variable)
|
||||
|
||||
// Stringpool:
|
||||
// UINT16 Kennung ST
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 Anzahl der Strings
|
||||
// sal_uInt16 Kennung ST
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 Anzahl der Strings
|
||||
// Daten fuer jeden String:
|
||||
// UINT32 Offset in den Block aller Strings
|
||||
// sal_uInt32 Offset in den Block aller Strings
|
||||
// Danach folgt der Block aller Strings, die dort als ASCIIZ-Strings liegen.
|
||||
|
||||
// Line Ranges:
|
||||
// UINT16 Kennung LR
|
||||
// UINT32 Laenge des Records
|
||||
// UINT16 Anzahl der Strings
|
||||
// sal_uInt16 Kennung LR
|
||||
// sal_uInt32 Laenge des Records
|
||||
// sal_uInt16 Anzahl der Strings
|
||||
// Daten fuer jedes Public:
|
||||
// UINT16 1. Zeile (Sub XXX)
|
||||
// UINT16 2. Zeile (End Sub)
|
||||
// sal_uInt16 1. Zeile (Sub XXX)
|
||||
// sal_uInt16 2. Zeile (End Sub)
|
||||
|
||||
// SBX-Objekte:
|
||||
// UINT16 Anzahl Objekte
|
||||
// sal_uInt16 Anzahl Objekte
|
||||
// .... Objektdaten
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Service-Routinen (in IMAGE.CXX)
|
||||
|
||||
BOOL SbGood( SvStream& r );
|
||||
ULONG SbOpenRecord( SvStream&, UINT16 nSignature, UINT16 nElem );
|
||||
void SbCloseRecord( SvStream&, ULONG );
|
||||
sal_Bool SbGood( SvStream& r );
|
||||
sal_uIntPtr SbOpenRecord( SvStream&, sal_uInt16 nSignature, sal_uInt16 nElem );
|
||||
void SbCloseRecord( SvStream&, sal_uIntPtr );
|
||||
|
||||
#endif
|
||||
|
||||
+22
-22
@@ -44,25 +44,25 @@ class SbiImage {
|
||||
|
||||
SbxArrayRef rTypes; // User defined types
|
||||
SbxArrayRef rEnums; // Enum types
|
||||
UINT32* pStringOff; // StringId-Offsets
|
||||
sal_uInt32* pStringOff; // StringId-Offsets
|
||||
sal_Unicode* pStrings; // StringPool
|
||||
char* pCode; // Code-Image
|
||||
char* pLegacyPCode; // Code-Image
|
||||
BOOL bError; // TRUE: Fehler
|
||||
USHORT nFlags; // Flags (s.u.)
|
||||
sal_Bool bError; // sal_True: Fehler
|
||||
sal_uInt16 nFlags; // Flags (s.u.)
|
||||
short nStrings; // Anzahl Strings
|
||||
UINT32 nStringSize; // Groesse des String-Puffers
|
||||
UINT32 nCodeSize; // Groesse des Code-Blocks
|
||||
UINT16 nLegacyCodeSize; // Groesse des Code-Blocks
|
||||
UINT16 nDimBase; // OPTION BASE-Wert
|
||||
sal_uInt32 nStringSize; // Groesse des String-Puffers
|
||||
sal_uInt32 nCodeSize; // Groesse des Code-Blocks
|
||||
sal_uInt16 nLegacyCodeSize; // Groesse des Code-Blocks
|
||||
sal_uInt16 nDimBase; // OPTION BASE-Wert
|
||||
rtl_TextEncoding eCharSet; // Zeichensatz fuer Strings
|
||||
// temporaere Verwaltungs-Variable:
|
||||
short nStringIdx; // aktueller String-Index
|
||||
UINT32 nStringOff; // aktuelle Pos im Stringpuffer
|
||||
sal_uInt32 nStringOff; // aktuelle Pos im Stringpuffer
|
||||
// Routinen fuer Compiler:
|
||||
void MakeStrings( short ); // StringPool einrichten
|
||||
void AddString( const String& );// String zufuegen
|
||||
void AddCode( char*, UINT32 ); // Codeblock dazu
|
||||
void AddCode( char*, sal_uInt32 ); // Codeblock dazu
|
||||
void AddType(SbxObject *); // User-Type mit aufnehmen
|
||||
void AddEnum(SbxObject *); // Register enum type
|
||||
|
||||
@@ -70,35 +70,35 @@ public:
|
||||
String aName; // Makroname
|
||||
::rtl::OUString aOUSource; // Quellcode
|
||||
String aComment; // Kommentar
|
||||
BOOL bInit; // TRUE: Init-Code ist gelaufen
|
||||
BOOL bFirstInit; // TRUE, wenn das Image das erste mal nach
|
||||
sal_Bool bInit; // sal_True: Init-Code ist gelaufen
|
||||
sal_Bool bFirstInit; // sal_True, wenn das Image das erste mal nach
|
||||
// dem Compilieren initialisiert wird.
|
||||
SbiImage();
|
||||
~SbiImage();
|
||||
void Clear(); // Inhalt loeschen
|
||||
BOOL Load( SvStream&, UINT32& nVer ); // Loads image from stream
|
||||
sal_Bool Load( SvStream&, sal_uInt32& nVer ); // Loads image from stream
|
||||
// nVer is set to version
|
||||
// of image
|
||||
BOOL Load( SvStream& );
|
||||
BOOL Save( SvStream&, UINT32 = B_CURVERSION );
|
||||
BOOL IsError() { return bError; }
|
||||
sal_Bool Load( SvStream& );
|
||||
sal_Bool Save( SvStream&, sal_uInt32 = B_CURVERSION );
|
||||
sal_Bool IsError() { return bError; }
|
||||
|
||||
const char* GetCode() const { return pCode; }
|
||||
UINT32 GetCodeSize() const { return nCodeSize; }
|
||||
sal_uInt32 GetCodeSize() const { return nCodeSize; }
|
||||
::rtl::OUString& GetSource32() { return aOUSource; }
|
||||
USHORT GetBase() const { return nDimBase; }
|
||||
sal_uInt16 GetBase() const { return nDimBase; }
|
||||
String GetString( short nId ) const;
|
||||
//const char* GetString( short nId ) const;
|
||||
const SbxObject* FindType (String aTypeName) const;
|
||||
|
||||
SbxArrayRef GetEnums() { return rEnums; }
|
||||
|
||||
void SetFlag( USHORT n ) { nFlags |= n; }
|
||||
USHORT GetFlag( USHORT n ) const { return nFlags & n; }
|
||||
UINT16 CalcLegacyOffset( INT32 nOffset );
|
||||
UINT32 CalcNewOffset( INT16 nOffset );
|
||||
void SetFlag( sal_uInt16 n ) { nFlags |= n; }
|
||||
sal_uInt16 GetFlag( sal_uInt16 n ) const { return nFlags & n; }
|
||||
sal_uInt16 CalcLegacyOffset( sal_Int32 nOffset );
|
||||
sal_uInt32 CalcNewOffset( sal_Int16 nOffset );
|
||||
void ReleaseLegacyBuffer();
|
||||
BOOL ExceedsLegacyLimits();
|
||||
sal_Bool ExceedsLegacyLimits();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ class SvStream;
|
||||
|
||||
class SbiStream {
|
||||
SvStream* pStrm; // der Stream
|
||||
ULONG nExpandOnWriteTo; // bei Schreibzugriff, den Stream
|
||||
sal_uIntPtr nExpandOnWriteTo; // bei Schreibzugriff, den Stream
|
||||
// bis zu dieser Groesse aufblasen
|
||||
ByteString aLine; // aktuelle Zeile
|
||||
ULONG nLine; // aktuelle Zeilennummer
|
||||
sal_uIntPtr nLine; // aktuelle Zeilennummer
|
||||
short nLen; // Pufferlaenge
|
||||
short nMode; // Bits:
|
||||
short nChan; // aktueller Kanal
|
||||
@@ -64,9 +64,9 @@ public:
|
||||
~SbiStream();
|
||||
SbError Open( short, const ByteString&, short, short, short );
|
||||
SbError Close();
|
||||
SbError Read( ByteString&, USHORT = 0, bool bForceReadingPerByte=false );
|
||||
SbError Read( ByteString&, sal_uInt16 = 0, bool bForceReadingPerByte=false );
|
||||
SbError Read( char& );
|
||||
SbError Write( const ByteString&, USHORT = 0 );
|
||||
SbError Write( const ByteString&, sal_uInt16 = 0 );
|
||||
|
||||
bool IsText() const { return (nMode & SBSTRM_BINARY) == 0; }
|
||||
bool IsRandom() const { return (nMode & SBSTRM_RANDOM) != 0; }
|
||||
@@ -75,8 +75,8 @@ public:
|
||||
bool IsAppend() const { return (nMode & SBSTRM_APPEND) != 0; }
|
||||
short GetBlockLen() const { return nLen; }
|
||||
short GetMode() const { return nMode; }
|
||||
ULONG GetLine() const { return nLine; }
|
||||
void SetExpandOnWriteTo( ULONG n ) { nExpandOnWriteTo = n; }
|
||||
sal_uIntPtr GetLine() const { return nLine; }
|
||||
void SetExpandOnWriteTo( sal_uIntPtr n ) { nExpandOnWriteTo = n; }
|
||||
void ExpandFile();
|
||||
SvStream* GetStrm() { return pStrm; }
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@ using SbxVariable::GetInfo;
|
||||
public:
|
||||
#endif
|
||||
typedef void( SampleObject::*pMeth )
|
||||
( SbxVariable* pThis, SbxArray* pArgs, BOOL bWrite );
|
||||
( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite );
|
||||
#if defined ( ICC ) || defined ( HPUX )
|
||||
private:
|
||||
#endif
|
||||
@@ -74,10 +74,10 @@ private:
|
||||
static Methods aMethods[]; // Methodentabelle
|
||||
|
||||
// Methoden
|
||||
void Display( SbxVariable*, SbxArray*, BOOL );
|
||||
void Event( SbxVariable*, SbxArray*, BOOL );
|
||||
void Square( SbxVariable*, SbxArray*, BOOL );
|
||||
void Create( SbxVariable*, SbxArray*, BOOL );
|
||||
void Display( SbxVariable*, SbxArray*, sal_Bool );
|
||||
void Event( SbxVariable*, SbxArray*, sal_Bool );
|
||||
void Square( SbxVariable*, SbxArray*, sal_Bool );
|
||||
void Create( SbxVariable*, SbxArray*, sal_Bool );
|
||||
// Infoblock auffuellen
|
||||
SbxInfo* GetInfo( short nIdx );
|
||||
// Broadcaster Notification
|
||||
|
||||
+22
-22
@@ -46,24 +46,24 @@ class SbiParser : public SbiTokenizer
|
||||
SbiProcDef* pProc; // aktuelle Prozedur
|
||||
SbiExprNode* pWithVar; // aktuelle With-Variable
|
||||
SbiToken eEndTok; // das Ende-Token
|
||||
UINT32 nGblChain; // Chainkette fuer globale DIMs
|
||||
BOOL bGblDefs; // TRUE globale Definitionen allgemein
|
||||
BOOL bNewGblDefs; // TRUE globale Definitionen vor Sub
|
||||
BOOL bSingleLineIf; // TRUE einzeiliges if-Statement
|
||||
sal_uInt32 nGblChain; // Chainkette fuer globale DIMs
|
||||
sal_Bool bGblDefs; // sal_True globale Definitionen allgemein
|
||||
sal_Bool bNewGblDefs; // sal_True globale Definitionen vor Sub
|
||||
sal_Bool bSingleLineIf; // sal_True einzeiliges if-Statement
|
||||
|
||||
SbiSymDef* VarDecl( SbiDimList**,BOOL,BOOL );// Variablen-Deklaration
|
||||
SbiProcDef* ProcDecl(BOOL bDecl);// Prozedur-Deklaration
|
||||
void DefStatic( BOOL bPrivate );
|
||||
void DefProc( BOOL bStatic, BOOL bPrivate ); // Prozedur einlesen
|
||||
void DefVar( SbiOpcode eOp, BOOL bStatic ); // DIM/REDIM einlesen
|
||||
void TypeDecl( SbiSymDef&, BOOL bAsNewAlreadyParsed=FALSE ); // AS-Deklaration
|
||||
SbiSymDef* VarDecl( SbiDimList**,sal_Bool,sal_Bool );// Variablen-Deklaration
|
||||
SbiProcDef* ProcDecl(sal_Bool bDecl);// Prozedur-Deklaration
|
||||
void DefStatic( sal_Bool bPrivate );
|
||||
void DefProc( sal_Bool bStatic, sal_Bool bPrivate ); // Prozedur einlesen
|
||||
void DefVar( SbiOpcode eOp, sal_Bool bStatic ); // DIM/REDIM einlesen
|
||||
void TypeDecl( SbiSymDef&, sal_Bool bAsNewAlreadyParsed=sal_False ); // AS-Deklaration
|
||||
void OpenBlock( SbiToken, SbiExprNode* = NULL ); // Block oeffnen
|
||||
void CloseBlock(); // Block aufloesen
|
||||
BOOL Channel( BOOL=FALSE ); // Kanalnummer parsen
|
||||
sal_Bool Channel( sal_Bool=sal_False ); // Kanalnummer parsen
|
||||
void StmntBlock( SbiToken ); // Statement-Block abarbeiten
|
||||
void DefType( BOOL bPrivate ); // Parse type declaration
|
||||
void DefEnum( BOOL bPrivate ); // Parse enum declaration
|
||||
void DefDeclare( BOOL bPrivate );
|
||||
void DefType( sal_Bool bPrivate ); // Parse type declaration
|
||||
void DefEnum( sal_Bool bPrivate ); // Parse enum declaration
|
||||
void DefDeclare( sal_Bool bPrivate );
|
||||
void EnableCompatibility();
|
||||
public:
|
||||
SbxArrayRef rTypeArray; // das Type-Array
|
||||
@@ -78,26 +78,26 @@ public:
|
||||
SbiSymPool* pPool; // aktueller Pool
|
||||
SbiExprType eCurExpr; // aktueller Expr-Typ
|
||||
short nBase; // OPTION BASE-Wert
|
||||
BOOL bText; // OPTION COMPARE TEXT
|
||||
BOOL bExplicit; // TRUE: OPTION EXPLICIT
|
||||
BOOL bClassModule; // TRUE: OPTION ClassModule
|
||||
sal_Bool bText; // OPTION COMPARE TEXT
|
||||
sal_Bool bExplicit; // sal_True: OPTION EXPLICIT
|
||||
sal_Bool bClassModule; // sal_True: OPTION ClassModule
|
||||
StringVector aIfaceVector; // Holds all interfaces implemented by a class module
|
||||
StringVector aRequiredTypes; // Types used in Dim As New <type> outside subs
|
||||
SbxDataType eDefTypes[26]; // DEFxxx-Datentypen
|
||||
|
||||
SbiParser( StarBASIC*, SbModule* );
|
||||
BOOL Parse(); // die Aktion
|
||||
sal_Bool Parse(); // die Aktion
|
||||
SbiExprNode* GetWithVar(); // Innerste With-Variable liefern
|
||||
|
||||
// AB 31.3.1996, Symbol in Runtime-Library suchen
|
||||
SbiSymDef* CheckRTLForSym( const String& rSym, SbxDataType eType );
|
||||
void AddConstants( void );
|
||||
|
||||
BOOL HasGlobalCode(); // Globaler Code definiert?
|
||||
sal_Bool HasGlobalCode(); // Globaler Code definiert?
|
||||
|
||||
BOOL TestToken( SbiToken ); // bestimmtes TOken?
|
||||
BOOL TestSymbol( BOOL=FALSE ); // Symbol?
|
||||
BOOL TestComma(); // Komma oder EOLN?
|
||||
sal_Bool TestToken( SbiToken ); // bestimmtes TOken?
|
||||
sal_Bool TestSymbol( sal_Bool=sal_False ); // Symbol?
|
||||
sal_Bool TestComma(); // Komma oder EOLN?
|
||||
void TestEoln(); // EOLN?
|
||||
|
||||
void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // Let oder Call
|
||||
|
||||
@@ -65,7 +65,7 @@ class SbPropertyValues: public SbPropertyValuesHelper
|
||||
NS_UNO::Reference< ::com::sun::star::beans::XPropertySetInfo > _xInfo;
|
||||
|
||||
private:
|
||||
INT32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const;
|
||||
sal_Int32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const;
|
||||
|
||||
public:
|
||||
SbPropertyValues();
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
|
||||
// XPropertyContainer
|
||||
virtual void SAL_CALL addProperty( const ::rtl::OUString& Name,
|
||||
INT16 Attributes,
|
||||
sal_Int16 Attributes,
|
||||
const NS_UNO::Any& DefaultValue)
|
||||
throw( NS_BEANS::PropertyExistException, NS_BEANS::IllegalTypeException,
|
||||
NS_LANG::IllegalArgumentException, NS_UNO::RuntimeException );
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
class StarBASIC;
|
||||
class SbxArray;
|
||||
|
||||
void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
|
||||
|
||||
#undef NS_BEANS
|
||||
|
||||
@@ -109,10 +109,10 @@ struct SbiForStack { // for/next stack:
|
||||
|
||||
// For each support
|
||||
ForType eForType;
|
||||
INT32 nCurCollectionIndex;
|
||||
INT32* pArrayCurIndices;
|
||||
INT32* pArrayLowerBounds;
|
||||
INT32* pArrayUpperBounds;
|
||||
sal_Int32 nCurCollectionIndex;
|
||||
sal_Int32* pArrayCurIndices;
|
||||
sal_Int32* pArrayLowerBounds;
|
||||
sal_Int32* pArrayUpperBounds;
|
||||
Reference< XEnumeration > xEnumeration;
|
||||
|
||||
SbiForStack( void )
|
||||
@@ -130,8 +130,8 @@ struct SbiForStack { // for/next stack:
|
||||
|
||||
struct SbiGosubStack { // GOSUB-Stack:
|
||||
SbiGosubStack* pNext; // Chain
|
||||
const BYTE* pCode; // Return-Pointer
|
||||
USHORT nStartForLvl; // #118235: For Level in moment of gosub
|
||||
const sal_uInt8* pCode; // Return-Pointer
|
||||
sal_uInt16 nStartForLvl; // #118235: For Level in moment of gosub
|
||||
};
|
||||
|
||||
#define MAXRECURSION 500 // max. 500 Rekursionen
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
#else
|
||||
::osl::Directory* pDir;
|
||||
#endif
|
||||
INT16 nDirFlags;
|
||||
sal_Int16 nDirFlags;
|
||||
short nCurDirPos;
|
||||
|
||||
String sFullNameToBeChecked;
|
||||
@@ -198,9 +198,9 @@ class SbiInstance
|
||||
|
||||
SbError nErr; // aktueller Fehlercode
|
||||
String aErrorMsg; // letzte Error-Message fuer $ARG
|
||||
USHORT nErl; // aktuelle Fehlerzeile
|
||||
BOOL bReschedule; // Flag: TRUE = Reschedule in Hauptschleife
|
||||
BOOL bCompatibility; // Flag: TRUE = VBA runtime compatibility mode
|
||||
sal_uInt16 nErl; // aktuelle Fehlerzeile
|
||||
sal_Bool bReschedule; // Flag: sal_True = Reschedule in Hauptschleife
|
||||
sal_Bool bCompatibility; // Flag: sal_True = VBA runtime compatibility mode
|
||||
|
||||
ComponentVector_t ComponentVector;
|
||||
|
||||
@@ -210,9 +210,9 @@ public:
|
||||
|
||||
// #31460 Neues Konzept fuer StepInto/Over/Out,
|
||||
// Erklaerung siehe runtime.cxx bei SbiInstance::CalcBreakCallLevel()
|
||||
USHORT nCallLvl; // Call-Level (wg. Rekursion)
|
||||
USHORT nBreakCallLvl; // Call-Level zum Anhalten
|
||||
void CalcBreakCallLevel( USHORT nFlags ); // Gemaess Flags setzen
|
||||
sal_uInt16 nCallLvl; // Call-Level (wg. Rekursion)
|
||||
sal_uInt16 nBreakCallLvl; // Call-Level zum Anhalten
|
||||
void CalcBreakCallLevel( sal_uInt16 nFlags ); // Gemaess Flags setzen
|
||||
|
||||
SbiInstance( StarBASIC* );
|
||||
~SbiInstance();
|
||||
@@ -229,14 +229,14 @@ public:
|
||||
SbError GetErr() { return nErr; }
|
||||
String GetErrorMsg() { return aErrorMsg; }
|
||||
xub_StrLen GetErl() { return nErl; }
|
||||
void EnableReschedule( BOOL bEnable ) { bReschedule = bEnable; }
|
||||
BOOL IsReschedule( void ) { return bReschedule; }
|
||||
void EnableCompatibility( BOOL bEnable ) { bCompatibility = bEnable; }
|
||||
BOOL IsCompatibility( void ) { return bCompatibility; }
|
||||
void EnableReschedule( sal_Bool bEnable ) { bReschedule = bEnable; }
|
||||
sal_Bool IsReschedule( void ) { return bReschedule; }
|
||||
void EnableCompatibility( sal_Bool bEnable ) { bCompatibility = bEnable; }
|
||||
sal_Bool IsCompatibility( void ) { return bCompatibility; }
|
||||
|
||||
ComponentVector_t& getComponentVector( void ) { return ComponentVector; }
|
||||
|
||||
SbMethod* GetCaller( USHORT );
|
||||
SbMethod* GetCaller( sal_uInt16 );
|
||||
SbModule* GetActiveModule();
|
||||
SbxArray* GetLocals( SbMethod* );
|
||||
|
||||
@@ -276,11 +276,11 @@ struct RefSaveItem
|
||||
|
||||
class SbiRuntime
|
||||
{
|
||||
friend void SbRtl_CallByName( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
friend void SbRtl_CallByName( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
|
||||
typedef void( SbiRuntime::*pStep0 )();
|
||||
typedef void( SbiRuntime::*pStep1 )( UINT32 nOp1 );
|
||||
typedef void( SbiRuntime::*pStep2 )( UINT32 nOp1, UINT32 nOp2 );
|
||||
typedef void( SbiRuntime::*pStep1 )( sal_uInt32 nOp1 );
|
||||
typedef void( SbiRuntime::*pStep2 )( sal_uInt32 nOp1, sal_uInt32 nOp2 );
|
||||
static pStep0 aStep0[]; // Opcode-Tabelle Gruppe 0
|
||||
static pStep1 aStep1[]; // Opcode-Tabelle Gruppe 1
|
||||
static pStep2 aStep2[]; // Opcode-Tabelle Gruppe 2
|
||||
@@ -298,15 +298,15 @@ class SbiRuntime
|
||||
SbiArgvStack* pArgvStk; // ARGV-Stack
|
||||
SbiGosubStack* pGosubStk; // GOSUB stack
|
||||
SbiForStack* pForStk; // FOR/NEXT-Stack
|
||||
USHORT nExprLvl; // Tiefe des Expr-Stacks
|
||||
USHORT nGosubLvl; // Zum Vermeiden von Tot-Rekursionen
|
||||
USHORT nForLvl; // #118235: Maintain for level
|
||||
const BYTE* pCode; // aktueller Code-Pointer
|
||||
const BYTE* pStmnt; // Beginn des lezten Statements
|
||||
const BYTE* pError; // Adresse des aktuellen Error-Handlers
|
||||
const BYTE* pRestart; // Restart-Adresse
|
||||
const BYTE* pErrCode; // Restart-Adresse RESUME NEXT
|
||||
const BYTE* pErrStmnt; // Restart-Adresse RESUMT 0
|
||||
sal_uInt16 nExprLvl; // Tiefe des Expr-Stacks
|
||||
sal_uInt16 nGosubLvl; // Zum Vermeiden von Tot-Rekursionen
|
||||
sal_uInt16 nForLvl; // #118235: Maintain for level
|
||||
const sal_uInt8* pCode; // aktueller Code-Pointer
|
||||
const sal_uInt8* pStmnt; // Beginn des lezten Statements
|
||||
const sal_uInt8* pError; // Adresse des aktuellen Error-Handlers
|
||||
const sal_uInt8* pRestart; // Restart-Adresse
|
||||
const sal_uInt8* pErrCode; // Restart-Adresse RESUME NEXT
|
||||
const sal_uInt8* pErrStmnt; // Restart-Adresse RESUMT 0
|
||||
String aLibName; // Lib-Name fuer Declare-Call
|
||||
SbxArrayRef refParams; // aktuelle Prozedur-Parameter
|
||||
SbxArrayRef refLocals; // lokale Variable
|
||||
@@ -314,14 +314,14 @@ class SbiRuntime
|
||||
// AB, 28.3.2000 #74254, Ein refSaveObj reicht nicht! Neu: pRefSaveList (s.u.)
|
||||
//SbxVariableRef refSaveObj; // #56368 Bei StepElem Referenz sichern
|
||||
short nArgc; // aktueller Argc
|
||||
BOOL bRun; // TRUE: Programm ist aktiv
|
||||
BOOL bError; // TRUE: Fehler behandeln
|
||||
BOOL bInError; // TRUE: in einem Fehler-Handler
|
||||
BOOL bBlocked; // TRUE: blocked by next call level, #i48868
|
||||
BOOL bVBAEnabled;
|
||||
USHORT nFlags; // Debugging-Flags
|
||||
sal_Bool bRun; // sal_True: Programm ist aktiv
|
||||
sal_Bool bError; // sal_True: Fehler behandeln
|
||||
sal_Bool bInError; // sal_True: in einem Fehler-Handler
|
||||
sal_Bool bBlocked; // sal_True: blocked by next call level, #i48868
|
||||
sal_Bool bVBAEnabled;
|
||||
sal_uInt16 nFlags; // Debugging-Flags
|
||||
SbError nError; // letzter Fehler
|
||||
USHORT nOps; // Opcode-Zaehler
|
||||
sal_uInt16 nOps; // Opcode-Zaehler
|
||||
sal_uInt32 m_nLastTime;
|
||||
|
||||
RefSaveItem* pRefSaveList; // #74254 Temporaere Referenzen sichern
|
||||
@@ -350,17 +350,17 @@ class SbiRuntime
|
||||
}
|
||||
|
||||
SbxVariable* FindElement
|
||||
( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError, BOOL bLocal, BOOL bStatic = FALSE );
|
||||
void SetupArgs( SbxVariable*, UINT32 );
|
||||
( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError, sal_Bool bLocal, sal_Bool bStatic = sal_False );
|
||||
void SetupArgs( SbxVariable*, sal_uInt32 );
|
||||
SbxVariable* CheckArray( SbxVariable* );
|
||||
|
||||
void PushVar( SbxVariable* ); // Variable push
|
||||
SbxVariableRef PopVar(); // Variable pop
|
||||
SbxVariable* GetTOS( short=0 ); // Variable vom TOS holen
|
||||
void TOSMakeTemp(); // TOS in temp. Variable wandeln
|
||||
BOOL ClearExprStack(); // Expr-Stack freigeben
|
||||
sal_Bool ClearExprStack(); // Expr-Stack freigeben
|
||||
|
||||
void PushGosub( const BYTE* ); // GOSUB-Element push
|
||||
void PushGosub( const sal_uInt8* ); // GOSUB-Element push
|
||||
void PopGosub(); // GOSUB-Element pop
|
||||
void ClearGosubStack(); // GOSUB-Stack freigeben
|
||||
|
||||
@@ -380,7 +380,7 @@ class SbiRuntime
|
||||
void SetParameters( SbxArray* );// Parameter uebernehmen
|
||||
|
||||
// MUSS NOCH IMPLEMENTIERT WERDEN
|
||||
void DllCall( const String&, const String&, SbxArray*, SbxDataType, BOOL );
|
||||
void DllCall( const String&, const String&, SbxArray*, SbxDataType, sal_Bool );
|
||||
|
||||
// #56204 DIM-Funktionalitaet in Hilfsmethode auslagern (step0.cxx)
|
||||
void DimImpl( SbxVariableRef refVar );
|
||||
@@ -388,7 +388,7 @@ class SbiRuntime
|
||||
// #115829
|
||||
bool implIsClass( SbxObject* pObj, const String& aClass );
|
||||
|
||||
void StepSETCLASS_impl( UINT32 nOp1, bool bHandleDflt = false );
|
||||
void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt = false );
|
||||
|
||||
// Die nachfolgenden Routinen werden vom Single Stepper
|
||||
// gerufen und implementieren die einzelnen Opcodes
|
||||
@@ -411,40 +411,40 @@ class SbiRuntime
|
||||
void StepLSET(), StepRSET(), StepREDIMP_ERASE(), StepERASE_CLEAR();
|
||||
void StepARRAYACCESS(), StepBYVAL();
|
||||
// Alle Opcodes mit einem Operanden
|
||||
void StepLOADNC( UINT32 ), StepLOADSC( UINT32 ), StepLOADI( UINT32 );
|
||||
void StepARGN( UINT32 ), StepBASED( UINT32 ), StepPAD( UINT32 );
|
||||
void StepJUMP( UINT32 ), StepJUMPT( UINT32 );
|
||||
void StepJUMPF( UINT32 ), StepONJUMP( UINT32 );
|
||||
void StepGOSUB( UINT32 ), StepRETURN( UINT32 );
|
||||
void StepTESTFOR( UINT32 ), StepCASETO( UINT32 ), StepERRHDL( UINT32 );
|
||||
void StepRESUME( UINT32 ), StepSETCLASS( UINT32 ), StepVBASETCLASS( UINT32 ), StepTESTCLASS( UINT32 ), StepLIB( UINT32 );
|
||||
void StepLOADNC( sal_uInt32 ), StepLOADSC( sal_uInt32 ), StepLOADI( sal_uInt32 );
|
||||
void StepARGN( sal_uInt32 ), StepBASED( sal_uInt32 ), StepPAD( sal_uInt32 );
|
||||
void StepJUMP( sal_uInt32 ), StepJUMPT( sal_uInt32 );
|
||||
void StepJUMPF( sal_uInt32 ), StepONJUMP( sal_uInt32 );
|
||||
void StepGOSUB( sal_uInt32 ), StepRETURN( sal_uInt32 );
|
||||
void StepTESTFOR( sal_uInt32 ), StepCASETO( sal_uInt32 ), StepERRHDL( sal_uInt32 );
|
||||
void StepRESUME( sal_uInt32 ), StepSETCLASS( sal_uInt32 ), StepVBASETCLASS( sal_uInt32 ), StepTESTCLASS( sal_uInt32 ), StepLIB( sal_uInt32 );
|
||||
bool checkClass_Impl( const SbxVariableRef& refVal, const String& aClass, bool bRaiseErrors, bool bDefault = true );
|
||||
void StepCLOSE( UINT32 ), StepPRCHAR( UINT32 ), StepARGTYP( UINT32 );
|
||||
void StepCLOSE( sal_uInt32 ), StepPRCHAR( sal_uInt32 ), StepARGTYP( sal_uInt32 );
|
||||
// Alle Opcodes mit zwei Operanden
|
||||
void StepRTL( UINT32, UINT32 ), StepPUBLIC( UINT32, UINT32 ), StepPUBLIC_P( UINT32, UINT32 );
|
||||
void StepPUBLIC_Impl( UINT32, UINT32, bool bUsedForClassModule );
|
||||
void StepFIND_Impl( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError, BOOL bLocal, BOOL bStatic = FALSE );
|
||||
void StepFIND( UINT32, UINT32 ), StepELEM( UINT32, UINT32 );
|
||||
void StepGLOBAL( UINT32, UINT32 ), StepLOCAL( UINT32, UINT32 );
|
||||
void StepPARAM( UINT32, UINT32), StepCREATE( UINT32, UINT32 );
|
||||
void StepCALL( UINT32, UINT32 ), StepCALLC( UINT32, UINT32 );
|
||||
void StepCASEIS( UINT32, UINT32 ), StepSTMNT( UINT32, UINT32 );
|
||||
void StepRTL( sal_uInt32, sal_uInt32 ), StepPUBLIC( sal_uInt32, sal_uInt32 ), StepPUBLIC_P( sal_uInt32, sal_uInt32 );
|
||||
void StepPUBLIC_Impl( sal_uInt32, sal_uInt32, bool bUsedForClassModule );
|
||||
void StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError, sal_Bool bLocal, sal_Bool bStatic = sal_False );
|
||||
void StepFIND( sal_uInt32, sal_uInt32 ), StepELEM( sal_uInt32, sal_uInt32 );
|
||||
void StepGLOBAL( sal_uInt32, sal_uInt32 ), StepLOCAL( sal_uInt32, sal_uInt32 );
|
||||
void StepPARAM( sal_uInt32, sal_uInt32), StepCREATE( sal_uInt32, sal_uInt32 );
|
||||
void StepCALL( sal_uInt32, sal_uInt32 ), StepCALLC( sal_uInt32, sal_uInt32 );
|
||||
void StepCASEIS( sal_uInt32, sal_uInt32 ), StepSTMNT( sal_uInt32, sal_uInt32 );
|
||||
SbxVariable* StepSTATIC_Impl( String& aName, SbxDataType& t );
|
||||
void StepOPEN( UINT32, UINT32 ), StepSTATIC( UINT32, UINT32 );
|
||||
void StepTCREATE(UINT32,UINT32), StepDCREATE(UINT32,UINT32);
|
||||
void StepGLOBAL_P( UINT32, UINT32 ),StepFIND_G( UINT32, UINT32 );
|
||||
void StepDCREATE_REDIMP(UINT32,UINT32), StepDCREATE_IMPL(UINT32,UINT32);
|
||||
void StepFIND_CM( UINT32, UINT32 );
|
||||
void StepFIND_STATIC( UINT32, UINT32 );
|
||||
void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, UINT32 nOp2 );
|
||||
void StepOPEN( sal_uInt32, sal_uInt32 ), StepSTATIC( sal_uInt32, sal_uInt32 );
|
||||
void StepTCREATE(sal_uInt32,sal_uInt32), StepDCREATE(sal_uInt32,sal_uInt32);
|
||||
void StepGLOBAL_P( sal_uInt32, sal_uInt32 ),StepFIND_G( sal_uInt32, sal_uInt32 );
|
||||
void StepDCREATE_REDIMP(sal_uInt32,sal_uInt32), StepDCREATE_IMPL(sal_uInt32,sal_uInt32);
|
||||
void StepFIND_CM( sal_uInt32, sal_uInt32 );
|
||||
void StepFIND_STATIC( sal_uInt32, sal_uInt32 );
|
||||
void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt32 nOp2 );
|
||||
public:
|
||||
void SetVBAEnabled( bool bEnabled );
|
||||
USHORT GetImageFlag( USHORT n ) const;
|
||||
USHORT GetBase();
|
||||
sal_uInt16 GetImageFlag( sal_uInt16 n ) const;
|
||||
sal_uInt16 GetBase();
|
||||
xub_StrLen nLine,nCol1,nCol2; // aktuelle Zeile, Spaltenbereich
|
||||
SbiRuntime* pNext; // Stack-Chain
|
||||
|
||||
SbiRuntime( SbModule*, SbMethod*, UINT32 );
|
||||
SbiRuntime( SbModule*, SbMethod*, sal_uInt32 );
|
||||
~SbiRuntime();
|
||||
void Error( SbError, bool bVBATranslationAlreadyDone = false ); // Fehler setzen, falls != 0
|
||||
void Error( SbError, const String& ); // Fehler setzen, falls != 0
|
||||
@@ -452,15 +452,15 @@ public:
|
||||
void FatalError( SbError, const String& ); // Fehlerbehandlung=Standard, Fehler setzen
|
||||
static sal_Int32 translateErrorToVba( SbError nError, String& rMsg );
|
||||
void DumpPCode();
|
||||
BOOL Step(); // Einzelschritt (ein Opcode)
|
||||
void Stop() { bRun = FALSE; }
|
||||
BOOL IsRun() { return bRun; }
|
||||
void block( void ) { bBlocked = TRUE; }
|
||||
void unblock( void ) { bBlocked = FALSE; }
|
||||
sal_Bool Step(); // Einzelschritt (ein Opcode)
|
||||
void Stop() { bRun = sal_False; }
|
||||
sal_Bool IsRun() { return bRun; }
|
||||
void block( void ) { bBlocked = sal_True; }
|
||||
void unblock( void ) { bBlocked = sal_False; }
|
||||
SbMethod* GetMethod() { return pMeth; }
|
||||
SbModule* GetModule() { return pMod; }
|
||||
USHORT GetDebugFlags() { return nFlags; }
|
||||
void SetDebugFlags( USHORT nFl ) { nFlags = nFl; }
|
||||
sal_uInt16 GetDebugFlags() { return nFlags; }
|
||||
void SetDebugFlags( sal_uInt16 nFl ) { nFlags = nFl; }
|
||||
SbMethod* GetCaller();
|
||||
SbxArray* GetLocals();
|
||||
SbxArray* GetParams();
|
||||
@@ -493,12 +493,12 @@ StarBASIC* GetCurrentBasic( StarBASIC* pRTBasic );
|
||||
// no DDE functionality, no DLLCALL) in basic because
|
||||
// of portal "virtual" users (portal user != UNIX user)
|
||||
// (Implemented in iosys.cxx)
|
||||
BOOL needSecurityRestrictions( void );
|
||||
sal_Bool needSecurityRestrictions( void );
|
||||
|
||||
// Returns TRUE if UNO is available, otherwise the old
|
||||
// Returns sal_True if UNO is available, otherwise the old
|
||||
// file system implementation has to be used
|
||||
// (Implemented in iosys.cxx)
|
||||
BOOL hasUno( void );
|
||||
sal_Bool hasUno( void );
|
||||
|
||||
// Converts possibly relative paths to absolute paths
|
||||
// according to the setting done by ChDir/ChDrive
|
||||
|
||||
@@ -46,7 +46,7 @@ class SbModule;
|
||||
class SbiFactory : public SbxFactory
|
||||
{
|
||||
public:
|
||||
virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
|
||||
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
|
||||
virtual SbxObject* CreateObject( const String& );
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
void AddClassModule( SbModule* pClassModule );
|
||||
void RemoveClassModule( SbModule* pClassModule );
|
||||
|
||||
virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
|
||||
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
|
||||
virtual SbxObject* CreateObject( const String& );
|
||||
|
||||
SbModule* FindClass( const String& rClassName );
|
||||
@@ -117,14 +117,14 @@ struct SbiGlobals
|
||||
SbError nCode; // aktueller Fehlercode
|
||||
xub_StrLen nLine; // aktuelle Zeile
|
||||
xub_StrLen nCol1,nCol2; // aktuelle Spalten (von,bis)
|
||||
BOOL bCompiler; // Flag fuer Compiler-Error
|
||||
BOOL bGlobalInitErr; // Beim GlobalInit trat ein Compiler-Fehler auf
|
||||
BOOL bRunInit; // TRUE, wenn RunInit vom Basic aktiv ist
|
||||
sal_Bool bCompiler; // Flag fuer Compiler-Error
|
||||
sal_Bool bGlobalInitErr; // Beim GlobalInit trat ein Compiler-Fehler auf
|
||||
sal_Bool bRunInit; // sal_True, wenn RunInit vom Basic aktiv ist
|
||||
String aErrMsg; // Puffer fuer GetErrorText()
|
||||
SbLanguageMode eLanguageMode; // Flag fuer Visual-Basic-Script-Modus
|
||||
SbErrorStack* pErrStack; // Stack fuer die im Fehlerfall abgebaute SbiRuntime Kette
|
||||
::utl::TransliterationWrapper* pTransliterationWrapper; // For StrComp
|
||||
BOOL bBlockCompilerError;
|
||||
sal_Bool bBlockCompilerError;
|
||||
BasicManager* pAppBasMgr;
|
||||
StarBASIC* pMSOMacroRuntimLib; // Lib containing MSO Macro Runtime API entry symbols
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
class SbJScriptModule : public SbModule
|
||||
{
|
||||
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_JSCRIPTMOD,1);
|
||||
TYPEINFO();
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
#ifdef DBG_TRACE_BASIC
|
||||
void dbg_InitTrace( void );
|
||||
void dbg_DeInitTrace( void );
|
||||
void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl );
|
||||
void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave = false );
|
||||
void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl );
|
||||
void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC,
|
||||
void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl );
|
||||
void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallLvl, bool bLeave = false );
|
||||
void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, sal_Int32 nCallLvl );
|
||||
void dbg_RegisterTraceTextForPC( SbModule* pModule, sal_uInt32 nPC,
|
||||
const String& aTraceStr_STMNT, const String& aTraceStr_PCode );
|
||||
void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,8 +51,8 @@ class SbUnoObject: public SbxObject
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > mxInvocation;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactName;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactNameInvocation;
|
||||
BOOL bNeedIntrospection;
|
||||
BOOL bNativeCOMObject;
|
||||
sal_Bool bNeedIntrospection;
|
||||
sal_Bool bNativeCOMObject;
|
||||
::com::sun::star::uno::Any maTmpUnoObj; // Only to save obj for doIntrospection!
|
||||
|
||||
// Hilfs-Methode zum Anlegen der dbg_-Properties
|
||||
@@ -135,7 +135,7 @@ class SbUnoProperty : public SbxProperty
|
||||
|
||||
// Daten der Uno-Property
|
||||
::com::sun::star::beans::Property aUnoProp;
|
||||
INT32 nId;
|
||||
sal_Int32 nId;
|
||||
|
||||
bool mbInvocation; // Property is based on invocation
|
||||
|
||||
@@ -143,7 +143,7 @@ class SbUnoProperty : public SbxProperty
|
||||
public:
|
||||
TYPEINFO();
|
||||
SbUnoProperty( const String& aName_, SbxDataType eSbxType,
|
||||
const ::com::sun::star::beans::Property& aUnoProp_, INT32 nId_, bool bInvocation );
|
||||
const ::com::sun::star::beans::Property& aUnoProp_, sal_Int32 nId_, bool bInvocation );
|
||||
|
||||
bool isInvocationBased( void )
|
||||
{ return mbInvocation; }
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
class SbUnoFactory : public SbxFactory
|
||||
{
|
||||
public:
|
||||
virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
|
||||
virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
|
||||
virtual SbxObject* CreateObject( const String& );
|
||||
};
|
||||
|
||||
@@ -292,15 +292,15 @@ public:
|
||||
class StarBASIC;
|
||||
|
||||
// Impl-Methoden fuer RTL
|
||||
void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
|
||||
void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
|
||||
|
||||
void disposeComVariablesForBasic( StarBASIC* pBasic );
|
||||
void clearNativeObjectWrapperVector( void );
|
||||
@@ -320,8 +320,8 @@ class BasicCollection : public SbxObject
|
||||
virtual ~BasicCollection();
|
||||
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||
const SfxHint& rHint, const TypeId& rHintType );
|
||||
INT32 implGetIndex( SbxVariable* pIndexVar );
|
||||
INT32 implGetIndexForName( const String& rName );
|
||||
sal_Int32 implGetIndex( SbxVariable* pIndexVar );
|
||||
sal_Int32 implGetIndexForName( const String& rName );
|
||||
void CollAdd( SbxArray* pPar_ );
|
||||
void CollItem( SbxArray* pPar_ );
|
||||
void CollRemove( SbxArray* pPar_ );
|
||||
|
||||
@@ -58,33 +58,33 @@ protected:
|
||||
short nCol; // aktuelle Spaltennummer
|
||||
short nErrors; // Anzahl Fehler
|
||||
short nColLock; // Lock-Zaehler fuer Col1
|
||||
INT32 nBufPos; // aktuelle Buffer-Pos
|
||||
USHORT nLine; // aktuelle Zeile
|
||||
USHORT nCol1, nCol2; // aktuelle 1. und 2. Spalte
|
||||
BOOL bSymbol; // TRUE: Symbol gescannt
|
||||
BOOL bNumber; // TRUE: Zahl gescannt
|
||||
BOOL bSpaces; // TRUE: Whitespace vor Token
|
||||
BOOL bErrors; // TRUE: Fehler generieren
|
||||
BOOL bAbort; // TRUE: abbrechen
|
||||
BOOL bHash; // TRUE: # eingelesen
|
||||
BOOL bError; // TRUE: Fehler generieren
|
||||
BOOL bUsedForHilite; // TRUE: Nutzung fuer Highlighting
|
||||
BOOL bCompatible; // TRUE: OPTION Compatibl
|
||||
BOOL bVBASupportOn; // TRUE: OPTION VBASupport 1 otherwise default False
|
||||
BOOL bPrevLineExtentsComment; // TRUE: Previous line is comment and ends on "... _"
|
||||
sal_Int32 nBufPos; // aktuelle Buffer-Pos
|
||||
sal_uInt16 nLine; // aktuelle Zeile
|
||||
sal_uInt16 nCol1, nCol2; // aktuelle 1. und 2. Spalte
|
||||
sal_Bool bSymbol; // sal_True: Symbol gescannt
|
||||
sal_Bool bNumber; // sal_True: Zahl gescannt
|
||||
sal_Bool bSpaces; // sal_True: Whitespace vor Token
|
||||
sal_Bool bErrors; // sal_True: Fehler generieren
|
||||
sal_Bool bAbort; // sal_True: abbrechen
|
||||
sal_Bool bHash; // sal_True: # eingelesen
|
||||
sal_Bool bError; // sal_True: Fehler generieren
|
||||
sal_Bool bUsedForHilite; // sal_True: Nutzung fuer Highlighting
|
||||
sal_Bool bCompatible; // sal_True: OPTION Compatibl
|
||||
sal_Bool bVBASupportOn; // sal_True: OPTION VBASupport 1 otherwise default False
|
||||
sal_Bool bPrevLineExtentsComment; // sal_True: Previous line is comment and ends on "... _"
|
||||
|
||||
void GenError( SbError );
|
||||
public:
|
||||
SbiScanner( const ::rtl::OUString&, StarBASIC* = NULL );
|
||||
~SbiScanner();
|
||||
|
||||
void EnableErrors() { bError = FALSE; }
|
||||
BOOL IsHash() { return bHash; }
|
||||
BOOL IsCompatible() { return bCompatible; }
|
||||
void EnableErrors() { bError = sal_False; }
|
||||
sal_Bool IsHash() { return bHash; }
|
||||
sal_Bool IsCompatible() { return bCompatible; }
|
||||
void SetCompatible( bool b ) { bCompatible = b; } // #118206
|
||||
BOOL IsVBASupportOn() { return bVBASupportOn; }
|
||||
sal_Bool IsVBASupportOn() { return bVBASupportOn; }
|
||||
void SetVBASupportOn( bool b ) { bVBASupportOn = b; }
|
||||
BOOL WhiteSpace() { return bSpaces; }
|
||||
sal_Bool WhiteSpace() { return bSpaces; }
|
||||
short GetErrors() { return nErrors; }
|
||||
short GetLine() { return nLine; }
|
||||
short GetCol1() { return nCol1; }
|
||||
@@ -95,9 +95,9 @@ public:
|
||||
void RestoreLine(void) { pLine = pSaveLine; }
|
||||
void LockColumn();
|
||||
void UnlockColumn();
|
||||
BOOL DoesColonFollow();
|
||||
sal_Bool DoesColonFollow();
|
||||
|
||||
BOOL NextSym(); // naechstes Symbol lesen
|
||||
sal_Bool NextSym(); // naechstes Symbol lesen
|
||||
const String& GetSym() { return aSym; }
|
||||
SbxDataType GetType() { return eScanType; }
|
||||
double GetDbl() { return nVal; }
|
||||
@@ -123,22 +123,22 @@ class BasicSimpleCharClass
|
||||
static LetterTable aLetterTable;
|
||||
|
||||
public:
|
||||
static BOOL isAlpha( sal_Unicode c, bool bCompatible )
|
||||
static sal_Bool isAlpha( sal_Unicode c, bool bCompatible )
|
||||
{
|
||||
BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|
||||
sal_Bool bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|
||||
|| (bCompatible && aLetterTable.isLetter( c ));
|
||||
return bRet;
|
||||
}
|
||||
|
||||
static BOOL isDigit( sal_Unicode c )
|
||||
static sal_Bool isDigit( sal_Unicode c )
|
||||
{
|
||||
BOOL bRet = (c >= '0' && c <= '9');
|
||||
sal_Bool bRet = (c >= '0' && c <= '9');
|
||||
return bRet;
|
||||
}
|
||||
|
||||
static BOOL isAlphaNumeric( sal_Unicode c, bool bCompatible )
|
||||
static sal_Bool isAlphaNumeric( sal_Unicode c, bool bCompatible )
|
||||
{
|
||||
BOOL bRet = isDigit( c ) || isAlpha( c, bCompatible );
|
||||
sal_Bool bRet = isDigit( c ) || isAlpha( c, bCompatible );
|
||||
return bRet;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ class SbiStdObject : public SbxObject
|
||||
public:
|
||||
SbiStdObject( const String&, StarBASIC* );
|
||||
virtual SbxVariable* Find( const String&, SbxClassType );
|
||||
virtual void SetModified( BOOL );
|
||||
virtual void SetModified( sal_Bool );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+68
-68
@@ -58,12 +58,12 @@ class SbiStringPool { // String-Pool
|
||||
public:
|
||||
SbiStringPool( SbiParser* );
|
||||
~SbiStringPool();
|
||||
USHORT GetSize() const { return aData.Count(); }
|
||||
// AB 8.4.1999, Default wegen #64236 auf TRUE geaendert
|
||||
// Wenn der Bug sauber behoben ist, wieder auf FALSE aendern.
|
||||
short Add( const String&, BOOL=TRUE );
|
||||
sal_uInt16 GetSize() const { return aData.Count(); }
|
||||
// AB 8.4.1999, Default wegen #64236 auf sal_True geaendert
|
||||
// Wenn der Bug sauber behoben ist, wieder auf sal_False aendern.
|
||||
short Add( const String&, sal_Bool=sal_True );
|
||||
short Add( double, SbxDataType );
|
||||
const String& Find( USHORT ) const;
|
||||
const String& Find( sal_uInt16 ) const;
|
||||
SbiParser* GetParser() { return pParser; }
|
||||
};
|
||||
|
||||
@@ -80,8 +80,8 @@ protected:
|
||||
SbiSymPool* pParent; // uebergeordneter Symbol-Pool
|
||||
SbiParser* pParser; // der Parser
|
||||
SbiSymScope eScope; // Scope des Pools
|
||||
USHORT nProcId; // aktuelles ProcId fuer STATIC-Variable
|
||||
USHORT nCur; // Iterator
|
||||
sal_uInt16 nProcId; // aktuelles ProcId fuer STATIC-Variable
|
||||
sal_uInt16 nCur; // Iterator
|
||||
public:
|
||||
SbiSymPool( SbiStringPool&, SbiSymScope );
|
||||
~SbiSymPool();
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
void SetParent( SbiSymPool* p ) { pParent = p; }
|
||||
void SetProcId( short n ) { nProcId = n; }
|
||||
USHORT GetSize() const { return aData.Count(); }
|
||||
sal_uInt16 GetSize() const { return aData.Count(); }
|
||||
SbiSymScope GetScope() const { return eScope; }
|
||||
void SetScope( SbiSymScope s ) { eScope = s; }
|
||||
SbiParser* GetParser() { return pParser; }
|
||||
@@ -99,12 +99,12 @@ public:
|
||||
SbiProcDef* AddProc( const String& );// Prozedur hinzufuegen
|
||||
void Add( SbiSymDef* ); // Symbol uebernehmen
|
||||
SbiSymDef* Find( const String& ) const;// Variablenname
|
||||
SbiSymDef* FindId( USHORT ) const; // Variable per ID suchen
|
||||
SbiSymDef* Get( USHORT ) const; // Variable per Position suchen
|
||||
SbiSymDef* FindId( sal_uInt16 ) const; // Variable per ID suchen
|
||||
SbiSymDef* Get( sal_uInt16 ) const; // Variable per Position suchen
|
||||
SbiSymDef* First(), *Next(); // Iteratoren
|
||||
|
||||
UINT32 Define( const String& ); // Label definieren
|
||||
UINT32 Reference( const String& ); // Label referenzieren
|
||||
sal_uInt32 Define( const String& ); // Label definieren
|
||||
sal_uInt32 Reference( const String& ); // Label referenzieren
|
||||
void CheckRefs(); // offene Referenzen suchen
|
||||
};
|
||||
|
||||
@@ -119,21 +119,21 @@ protected:
|
||||
SbiSymPool* pPool; // Pool fuer Unterelemente
|
||||
short nLen; // Stringlaenge bei STRING*n
|
||||
short nDims; // Array-Dimensionen
|
||||
USHORT nId; // Symbol-Nummer
|
||||
USHORT nTypeId; // String-ID des Datentyps (Dim X AS Dytentyp)
|
||||
USHORT nProcId; // aktuelles ProcId fuer STATIC-Variable
|
||||
USHORT nPos; // Positions-Nummer
|
||||
UINT32 nChain; // Backchain-Kette
|
||||
BOOL bNew : 1; // TRUE: Dim As New...
|
||||
BOOL bChained : 1; // TRUE: Symbol ist in Code definiert
|
||||
BOOL bByVal : 1; // TRUE: ByVal-Parameter
|
||||
BOOL bOpt : 1; // TRUE: optionaler Parameter
|
||||
BOOL bStatic : 1; // TRUE: STATIC-Variable
|
||||
BOOL bAs : 1; // TRUE: Datentyp per AS XXX definiert
|
||||
BOOL bGlobal : 1; // TRUE: Global-Variable
|
||||
BOOL bParamArray : 1; // TRUE: ParamArray parameter
|
||||
BOOL bWithEvents : 1; // TRUE: Declared WithEvents
|
||||
USHORT nDefaultId; // Symbol number of default value
|
||||
sal_uInt16 nId; // Symbol-Nummer
|
||||
sal_uInt16 nTypeId; // String-ID des Datentyps (Dim X AS Dytentyp)
|
||||
sal_uInt16 nProcId; // aktuelles ProcId fuer STATIC-Variable
|
||||
sal_uInt16 nPos; // Positions-Nummer
|
||||
sal_uInt32 nChain; // Backchain-Kette
|
||||
sal_Bool bNew : 1; // sal_True: Dim As New...
|
||||
sal_Bool bChained : 1; // sal_True: Symbol ist in Code definiert
|
||||
sal_Bool bByVal : 1; // sal_True: ByVal-Parameter
|
||||
sal_Bool bOpt : 1; // sal_True: optionaler Parameter
|
||||
sal_Bool bStatic : 1; // sal_True: STATIC-Variable
|
||||
sal_Bool bAs : 1; // sal_True: Datentyp per AS XXX definiert
|
||||
sal_Bool bGlobal : 1; // sal_True: Global-Variable
|
||||
sal_Bool bParamArray : 1; // sal_True: ParamArray parameter
|
||||
sal_Bool bWithEvents : 1; // sal_True: Declared WithEvents
|
||||
sal_uInt16 nDefaultId; // Symbol number of default value
|
||||
short nFixedStringLength; // String length in: Dim foo As String*Length
|
||||
public:
|
||||
SbiSymDef( const String& );
|
||||
@@ -145,42 +145,42 @@ public:
|
||||
virtual void SetType( SbxDataType );
|
||||
const String& GetName();
|
||||
SbiSymScope GetScope() const;
|
||||
USHORT GetProcId() const{ return nProcId; }
|
||||
UINT32 GetAddr() const { return nChain; }
|
||||
USHORT GetId() const { return nId; }
|
||||
USHORT GetTypeId() const{ return nTypeId; }
|
||||
void SetTypeId( USHORT n ) { nTypeId = n; eType = SbxOBJECT; }
|
||||
USHORT GetPos() const { return nPos; }
|
||||
sal_uInt16 GetProcId() const{ return nProcId; }
|
||||
sal_uInt32 GetAddr() const { return nChain; }
|
||||
sal_uInt16 GetId() const { return nId; }
|
||||
sal_uInt16 GetTypeId() const{ return nTypeId; }
|
||||
void SetTypeId( sal_uInt16 n ) { nTypeId = n; eType = SbxOBJECT; }
|
||||
sal_uInt16 GetPos() const { return nPos; }
|
||||
void SetLen( short n ){ nLen = n; }
|
||||
short GetLen() const { return nLen; }
|
||||
void SetDims( short n ) { nDims = n; }
|
||||
short GetDims() const { return nDims; }
|
||||
BOOL IsDefined() const{ return bChained; }
|
||||
void SetOptional() { bOpt = TRUE; }
|
||||
void SetParamArray() { bParamArray = TRUE; }
|
||||
void SetWithEvents() { bWithEvents = TRUE; }
|
||||
void SetByVal( BOOL bByVal_ = TRUE )
|
||||
sal_Bool IsDefined() const{ return bChained; }
|
||||
void SetOptional() { bOpt = sal_True; }
|
||||
void SetParamArray() { bParamArray = sal_True; }
|
||||
void SetWithEvents() { bWithEvents = sal_True; }
|
||||
void SetByVal( sal_Bool bByVal_ = sal_True )
|
||||
{ bByVal = bByVal_; }
|
||||
void SetStatic( BOOL bAsStatic = TRUE ) { bStatic = bAsStatic; }
|
||||
void SetNew() { bNew = TRUE; }
|
||||
void SetDefinedAs() { bAs = TRUE; }
|
||||
void SetGlobal(BOOL b){ bGlobal = b; }
|
||||
void SetDefaultId( USHORT n ) { nDefaultId = n; }
|
||||
USHORT GetDefaultId( void ) { return nDefaultId; }
|
||||
BOOL IsOptional() const{ return bOpt; }
|
||||
BOOL IsParamArray() const{ return bParamArray; }
|
||||
BOOL IsWithEvents() const{ return bWithEvents; }
|
||||
BOOL IsByVal() const { return bByVal; }
|
||||
BOOL IsStatic() const { return bStatic; }
|
||||
BOOL IsNew() const { return bNew; }
|
||||
BOOL IsDefinedAs() const { return bAs; }
|
||||
BOOL IsGlobal() const { return bGlobal; }
|
||||
void SetStatic( sal_Bool bAsStatic = sal_True ) { bStatic = bAsStatic; }
|
||||
void SetNew() { bNew = sal_True; }
|
||||
void SetDefinedAs() { bAs = sal_True; }
|
||||
void SetGlobal(sal_Bool b){ bGlobal = b; }
|
||||
void SetDefaultId( sal_uInt16 n ) { nDefaultId = n; }
|
||||
sal_uInt16 GetDefaultId( void ) { return nDefaultId; }
|
||||
sal_Bool IsOptional() const{ return bOpt; }
|
||||
sal_Bool IsParamArray() const{ return bParamArray; }
|
||||
sal_Bool IsWithEvents() const{ return bWithEvents; }
|
||||
sal_Bool IsByVal() const { return bByVal; }
|
||||
sal_Bool IsStatic() const { return bStatic; }
|
||||
sal_Bool IsNew() const { return bNew; }
|
||||
sal_Bool IsDefinedAs() const { return bAs; }
|
||||
sal_Bool IsGlobal() const { return bGlobal; }
|
||||
short GetFixedStringLength( void ) const { return nFixedStringLength; }
|
||||
void SetFixedStringLength( short n ) { nFixedStringLength = n; }
|
||||
|
||||
SbiSymPool& GetPool();
|
||||
UINT32 Define(); // Symbol in Code definieren
|
||||
UINT32 Reference(); // Symbol in Code referenzieren
|
||||
sal_uInt32 Define(); // Symbol in Code definieren
|
||||
sal_uInt32 Reference(); // Symbol in Code referenzieren
|
||||
|
||||
private:
|
||||
SbiSymDef( const SbiSymDef& );
|
||||
@@ -192,14 +192,14 @@ class SbiProcDef : public SbiSymDef { // Prozedur-Definition (aus Basic):
|
||||
SbiSymPool aLabels; // lokale Sprungziele
|
||||
String aLibName; // LIB "name"
|
||||
String aAlias; // ALIAS "name"
|
||||
USHORT nLine1, nLine2; // Zeilenbereich
|
||||
sal_uInt16 nLine1, nLine2; // Zeilenbereich
|
||||
PropertyMode mePropMode; // Marks if this is a property procedure and which
|
||||
String maPropName; // Property name if property procedure (!= proc name)
|
||||
BOOL bCdecl : 1; // TRUE: CDECL angegeben
|
||||
BOOL bPublic : 1; // TRUE: proc ist PUBLIC
|
||||
BOOL mbProcDecl : 1; // TRUE: instanciated by SbiParser::ProcDecl
|
||||
sal_Bool bCdecl : 1; // sal_True: CDECL angegeben
|
||||
sal_Bool bPublic : 1; // sal_True: proc ist PUBLIC
|
||||
sal_Bool mbProcDecl : 1; // sal_True: instanciated by SbiParser::ProcDecl
|
||||
public:
|
||||
SbiProcDef( SbiParser*, const String&, BOOL bProcDecl=false );
|
||||
SbiProcDef( SbiParser*, const String&, sal_Bool bProcDecl=false );
|
||||
virtual ~SbiProcDef();
|
||||
virtual SbiProcDef* GetProcDef();
|
||||
virtual void SetType( SbxDataType );
|
||||
@@ -208,15 +208,15 @@ public:
|
||||
SbiSymPool& GetLocals() { return GetPool();}
|
||||
String& GetLib() { return aLibName; }
|
||||
String& GetAlias() { return aAlias; }
|
||||
void SetPublic( BOOL b ) { bPublic = b; }
|
||||
BOOL IsPublic() const { return bPublic; }
|
||||
void SetCdecl( BOOL b = TRUE) { bCdecl = b; }
|
||||
BOOL IsCdecl() const { return bCdecl; }
|
||||
BOOL IsUsedForProcDecl() const { return mbProcDecl; }
|
||||
void SetLine1( USHORT n ) { nLine1 = n; }
|
||||
USHORT GetLine1() const { return nLine1; }
|
||||
void SetLine2( USHORT n ) { nLine2 = n; }
|
||||
USHORT GetLine2() const { return nLine2; }
|
||||
void SetPublic( sal_Bool b ) { bPublic = b; }
|
||||
sal_Bool IsPublic() const { return bPublic; }
|
||||
void SetCdecl( sal_Bool b = sal_True) { bCdecl = b; }
|
||||
sal_Bool IsCdecl() const { return bCdecl; }
|
||||
sal_Bool IsUsedForProcDecl() const { return mbProcDecl; }
|
||||
void SetLine1( sal_uInt16 n ) { nLine1 = n; }
|
||||
sal_uInt16 GetLine1() const { return nLine1; }
|
||||
void SetLine2( sal_uInt16 n ) { nLine2 = n; }
|
||||
sal_uInt16 GetLine2() const { return nLine2; }
|
||||
PropertyMode getPropertyMode() { return mePropMode; }
|
||||
void setPropertyMode( PropertyMode ePropMode );
|
||||
const String& GetPropName() { return maPropName; }
|
||||
|
||||
+16
-16
@@ -142,25 +142,25 @@ class SbiTokenizer : public SbiScanner {
|
||||
protected:
|
||||
SbiToken eCurTok; // aktuelles Token
|
||||
SbiToken ePush; // Pushback-Token
|
||||
USHORT nPLine, nPCol1, nPCol2; // Pushback-Location
|
||||
BOOL bEof; // TRUE bei Dateiende
|
||||
BOOL bEos; // TRUE bei Statement-Ende
|
||||
BOOL bKeywords; // TRUE, falls Keywords geparst werden
|
||||
BOOL bAs; // letztes Keyword war AS
|
||||
BOOL bErrorIsSymbol; // Handle Error token as Symbol, not keyword
|
||||
sal_uInt16 nPLine, nPCol1, nPCol2; // Pushback-Location
|
||||
sal_Bool bEof; // sal_True bei Dateiende
|
||||
sal_Bool bEos; // sal_True bei Statement-Ende
|
||||
sal_Bool bKeywords; // sal_True, falls Keywords geparst werden
|
||||
sal_Bool bAs; // letztes Keyword war AS
|
||||
sal_Bool bErrorIsSymbol; // Handle Error token as Symbol, not keyword
|
||||
public:
|
||||
SbiTokenizer( const ::rtl::OUString&, StarBASIC* = NULL );
|
||||
~SbiTokenizer();
|
||||
|
||||
inline BOOL IsEof() { return bEof; }
|
||||
inline BOOL IsEos() { return bEos; }
|
||||
inline sal_Bool IsEof() { return bEof; }
|
||||
inline sal_Bool IsEos() { return bEos; }
|
||||
|
||||
void Push( SbiToken ); // Pushback eines Tokens
|
||||
const String& Symbol( SbiToken );// Rueckumwandlung
|
||||
|
||||
SbiToken Peek(); // das naechste Token lesen
|
||||
SbiToken Next(); // Ein Token lesen
|
||||
BOOL MayBeLabel( BOOL= FALSE ); // Kann es ein Label sein?
|
||||
sal_Bool MayBeLabel( sal_Bool= sal_False ); // Kann es ein Label sein?
|
||||
|
||||
void Hilite( SbTextPortions& ); // Syntax-Highlighting
|
||||
|
||||
@@ -169,14 +169,14 @@ public:
|
||||
void Error( SbError, const char* );
|
||||
void Error( SbError, String );
|
||||
|
||||
void Keywords( BOOL b ) { bKeywords = b; }
|
||||
void Keywords( sal_Bool b ) { bKeywords = b; }
|
||||
|
||||
static BOOL IsEoln( SbiToken t )
|
||||
{ return BOOL( t == EOS || t == EOLN || t == REM ); }
|
||||
static BOOL IsKwd( SbiToken t )
|
||||
{ return BOOL( t >= FIRSTKWD && t <= LASTKWD ); }
|
||||
static BOOL IsExtra( SbiToken t )
|
||||
{ return BOOL( t >= FIRSTEXTRA ); }
|
||||
static sal_Bool IsEoln( SbiToken t )
|
||||
{ return sal_Bool( t == EOS || t == EOLN || t == REM ); }
|
||||
static sal_Bool IsKwd( SbiToken t )
|
||||
{ return sal_Bool( t >= FIRSTKWD && t <= LASTKWD ); }
|
||||
static sal_Bool IsExtra( SbiToken t )
|
||||
{ return sal_Bool( t >= FIRSTEXTRA ); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ BasicDLL::BasicDLL()
|
||||
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
||||
pSttResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(stt), aLocale );
|
||||
pBasResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(sb), aLocale );
|
||||
bDebugMode = FALSE;
|
||||
bBreakEnabled = TRUE;
|
||||
bDebugMode = sal_False;
|
||||
bBreakEnabled = sal_True;
|
||||
}
|
||||
|
||||
BasicDLL::~BasicDLL()
|
||||
@@ -64,7 +64,7 @@ BasicDLL::~BasicDLL()
|
||||
delete pBasResMgr;
|
||||
}
|
||||
|
||||
void BasicDLL::EnableBreak( BOOL bEnable )
|
||||
void BasicDLL::EnableBreak( sal_Bool bEnable )
|
||||
{
|
||||
BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC);
|
||||
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
|
||||
@@ -72,7 +72,7 @@ void BasicDLL::EnableBreak( BOOL bEnable )
|
||||
pThis->bBreakEnabled = bEnable;
|
||||
}
|
||||
|
||||
void BasicDLL::SetDebugMode( BOOL bDebugMode )
|
||||
void BasicDLL::SetDebugMode( sal_Bool bDebugMode )
|
||||
{
|
||||
BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC);
|
||||
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
|
||||
@@ -85,7 +85,7 @@ void BasicDLL::BasicBreak()
|
||||
{
|
||||
//bJustStopping: Wenn jemand wie wild x-mal STOP drueckt, aber das Basic
|
||||
// nicht schnell genug anhaelt, kommt die Box ggf. oefters...
|
||||
static BOOL bJustStopping = FALSE;
|
||||
static sal_Bool bJustStopping = sal_False;
|
||||
|
||||
BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC);
|
||||
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
|
||||
@@ -93,11 +93,11 @@ void BasicDLL::BasicBreak()
|
||||
{
|
||||
if ( StarBASIC::IsRunning() && !bJustStopping && ( pThis->bBreakEnabled || pThis->bDebugMode ) )
|
||||
{
|
||||
bJustStopping = TRUE;
|
||||
bJustStopping = sal_True;
|
||||
StarBASIC::Stop();
|
||||
String aMessageStr( BasResId( IDS_SBERR_TERMINATED ) );
|
||||
InfoBox( 0, aMessageStr ).Execute();
|
||||
bJustStopping = FALSE;
|
||||
bJustStopping = sal_False;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,12 +93,12 @@ SbiDdeControl::~SbiDdeControl()
|
||||
delete pConvList;
|
||||
}
|
||||
|
||||
INT16 SbiDdeControl::GetFreeChannel()
|
||||
sal_Int16 SbiDdeControl::GetFreeChannel()
|
||||
{
|
||||
INT16 nListSize = (INT16)pConvList->Count();
|
||||
sal_Int16 nListSize = (sal_Int16)pConvList->Count();
|
||||
DdeConnection* pPtr = pConvList->First();
|
||||
pPtr = pConvList->Next(); // nullten eintrag ueberspringen
|
||||
INT16 nChannel;
|
||||
sal_Int16 nChannel;
|
||||
for( nChannel = 1; nChannel < nListSize; nChannel++ )
|
||||
{
|
||||
if( pPtr == DDE_FREECHANNEL )
|
||||
@@ -111,7 +111,7 @@ INT16 SbiDdeControl::GetFreeChannel()
|
||||
}
|
||||
|
||||
SbError SbiDdeControl::Initiate( const String& rService, const String& rTopic,
|
||||
INT16& rnHandle )
|
||||
sal_Int16& rnHandle )
|
||||
{
|
||||
SbError nErr;
|
||||
DdeConnection* pConv = new DdeConnection( rService, rTopic );
|
||||
@@ -123,26 +123,26 @@ SbError SbiDdeControl::Initiate( const String& rService, const String& rTopic,
|
||||
}
|
||||
else
|
||||
{
|
||||
INT16 nChannel = GetFreeChannel();
|
||||
pConvList->Replace( pConv, (ULONG)nChannel );
|
||||
sal_Int16 nChannel = GetFreeChannel();
|
||||
pConvList->Replace( pConv, (sal_uIntPtr)nChannel );
|
||||
rnHandle = nChannel;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SbError SbiDdeControl::Terminate( INT16 nChannel )
|
||||
SbError SbiDdeControl::Terminate( sal_Int16 nChannel )
|
||||
{
|
||||
DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel );
|
||||
DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel );
|
||||
if( !nChannel || !pConv || pConv == DDE_FREECHANNEL )
|
||||
return SbERR_DDE_NO_CHANNEL;
|
||||
pConvList->Replace( DDE_FREECHANNEL, (ULONG)nChannel );
|
||||
pConvList->Replace( DDE_FREECHANNEL, (sal_uIntPtr)nChannel );
|
||||
delete pConv;
|
||||
return 0L;
|
||||
}
|
||||
|
||||
SbError SbiDdeControl::TerminateAll()
|
||||
{
|
||||
INT16 nChannel = (INT16)pConvList->Count();
|
||||
sal_Int16 nChannel = (sal_Int16)pConvList->Count();
|
||||
while( nChannel )
|
||||
{
|
||||
nChannel--;
|
||||
@@ -156,9 +156,9 @@ SbError SbiDdeControl::TerminateAll()
|
||||
return 0;
|
||||
}
|
||||
|
||||
SbError SbiDdeControl::Request( INT16 nChannel, const String& rItem, String& rResult )
|
||||
SbError SbiDdeControl::Request( sal_Int16 nChannel, const String& rItem, String& rResult )
|
||||
{
|
||||
DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel );
|
||||
DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel );
|
||||
if( !nChannel || !pConv || pConv == DDE_FREECHANNEL )
|
||||
return SbERR_DDE_NO_CHANNEL;
|
||||
|
||||
@@ -169,9 +169,9 @@ SbError SbiDdeControl::Request( INT16 nChannel, const String& rItem, String& rRe
|
||||
return GetLastErr( pConv );
|
||||
}
|
||||
|
||||
SbError SbiDdeControl::Execute( INT16 nChannel, const String& rCommand )
|
||||
SbError SbiDdeControl::Execute( sal_Int16 nChannel, const String& rCommand )
|
||||
{
|
||||
DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel );
|
||||
DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel );
|
||||
if( !nChannel || !pConv || pConv == DDE_FREECHANNEL )
|
||||
return SbERR_DDE_NO_CHANNEL;
|
||||
DdeExecute aRequest( *pConv, rCommand, 30000 );
|
||||
@@ -179,9 +179,9 @@ SbError SbiDdeControl::Execute( INT16 nChannel, const String& rCommand )
|
||||
return GetLastErr( pConv );
|
||||
}
|
||||
|
||||
SbError SbiDdeControl::Poke( INT16 nChannel, const String& rItem, const String& rData )
|
||||
SbError SbiDdeControl::Poke( sal_Int16 nChannel, const String& rItem, const String& rData )
|
||||
{
|
||||
DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel );
|
||||
DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel );
|
||||
if( !nChannel || !pConv || pConv == DDE_FREECHANNEL )
|
||||
return SbERR_DDE_NO_CHANNEL;
|
||||
DdePoke aRequest( *pConv, rItem, DdeData(rData), 30000 );
|
||||
|
||||
@@ -43,7 +43,7 @@ class SbiDdeControl
|
||||
private:
|
||||
DECL_LINK( Data, DdeData* );
|
||||
SbError GetLastErr( DdeConnection* );
|
||||
INT16 GetFreeChannel();
|
||||
sal_Int16 GetFreeChannel();
|
||||
DdeConnections* pConvList;
|
||||
String aData;
|
||||
|
||||
@@ -53,12 +53,12 @@ public:
|
||||
~SbiDdeControl();
|
||||
|
||||
SbError Initiate( const String& rService, const String& rTopic,
|
||||
INT16& rnHandle );
|
||||
SbError Terminate( INT16 nChannel );
|
||||
sal_Int16& rnHandle );
|
||||
SbError Terminate( sal_Int16 nChannel );
|
||||
SbError TerminateAll();
|
||||
SbError Request( INT16 nChannel, const String& rItem, String& rResult );
|
||||
SbError Execute( INT16 nChannel, const String& rCommand );
|
||||
SbError Poke( INT16 nChannel, const String& rItem, const String& rData );
|
||||
SbError Request( sal_Int16 nChannel, const String& rItem, String& rResult );
|
||||
SbError Execute( sal_Int16 nChannel, const String& rCommand );
|
||||
SbError Poke( sal_Int16 nChannel, const String& rItem, const String& rData );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -168,7 +168,7 @@ std::size_t alignment(SbxVariable * variable) {
|
||||
std::size_t n = 1;
|
||||
SbxArray * props = PTR_CAST(SbxObject, variable->GetObject())->
|
||||
GetProperties();
|
||||
for (USHORT i = 0; i < props->Count(); ++i) {
|
||||
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
|
||||
n = std::max(n, alignment(props->Get(i)));
|
||||
}
|
||||
return n;
|
||||
@@ -183,9 +183,9 @@ std::size_t alignment(SbxVariable * variable) {
|
||||
} else {
|
||||
SbxDimArray * arr = PTR_CAST(SbxDimArray, variable->GetObject());
|
||||
int dims = arr->GetDims();
|
||||
std::vector< INT32 > low(dims);
|
||||
std::vector< sal_Int32 > low(dims);
|
||||
for (int i = 0; i < dims; ++i) {
|
||||
INT32 up;
|
||||
sal_Int32 up;
|
||||
arr->GetDim32(i + 1, low[i], up);
|
||||
}
|
||||
return alignment(arr->Get32(&low[0]));
|
||||
@@ -219,7 +219,7 @@ SbError marshalStruct(
|
||||
OSL_ASSERT(variable != 0);
|
||||
SbxArray * props = PTR_CAST(SbxObject, variable->GetObject())->
|
||||
GetProperties();
|
||||
for (USHORT i = 0; i < props->Count(); ++i) {
|
||||
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
|
||||
SbError e = marshal(false, props->Get(i), false, blob, offset, data);
|
||||
if (e != ERRCODE_NONE) {
|
||||
return e;
|
||||
@@ -235,12 +235,12 @@ SbError marshalArray(
|
||||
OSL_ASSERT(variable != 0);
|
||||
SbxDimArray * arr = PTR_CAST(SbxDimArray, variable->GetObject());
|
||||
int dims = arr->GetDims();
|
||||
std::vector< INT32 > low(dims);
|
||||
std::vector< INT32 > up(dims);
|
||||
std::vector< sal_Int32 > low(dims);
|
||||
std::vector< sal_Int32 > up(dims);
|
||||
for (int i = 0; i < dims; ++i) {
|
||||
arr->GetDim32(i + 1, low[i], up[i]);
|
||||
}
|
||||
for (std::vector< INT32 > idx = low;;) {
|
||||
for (std::vector< sal_Int32 > idx = low;;) {
|
||||
SbError e = marshal(
|
||||
false, arr->Get32(&idx[0]), false, blob, offset, data);
|
||||
if (e != ERRCODE_NONE) {
|
||||
@@ -405,7 +405,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
|
||||
alignment(variable)));
|
||||
SbxArray * props = PTR_CAST(SbxObject, variable->GetObject())->
|
||||
GetProperties();
|
||||
for (USHORT i = 0; i < props->Count(); ++i) {
|
||||
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
|
||||
data = unmarshal(props->Get(i), data);
|
||||
}
|
||||
break;
|
||||
@@ -423,12 +423,12 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
|
||||
} else {
|
||||
SbxDimArray * arr = PTR_CAST(SbxDimArray, variable->GetObject());
|
||||
int dims = arr->GetDims();
|
||||
std::vector< INT32 > low(dims);
|
||||
std::vector< INT32 > up(dims);
|
||||
std::vector< sal_Int32 > low(dims);
|
||||
std::vector< sal_Int32 > up(dims);
|
||||
for (int i = 0; i < dims; ++i) {
|
||||
arr->GetDim32(i + 1, low[i], up[i]);
|
||||
}
|
||||
for (std::vector< INT32 > idx = low;;) {
|
||||
for (std::vector< sal_Int32 > idx = low;;) {
|
||||
data = unmarshal(arr->Get32(&idx[0]), data);
|
||||
int i = dims - 1;
|
||||
while (idx[i] == up[i]) {
|
||||
@@ -488,7 +488,7 @@ SbError call(
|
||||
RTL_CONSTASCII_STRINGPARAM("KERNEL32.DLL")) &&
|
||||
(proc.name ==
|
||||
rtl::OString(RTL_CONSTASCII_STRINGPARAM("GetLogicalDriveStringsA")));
|
||||
for (USHORT i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) {
|
||||
for (sal_uInt16 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) {
|
||||
SbError e = marshal(
|
||||
true, arguments->Get(i), special && i == 2, stack, stack.size(),
|
||||
data);
|
||||
@@ -550,7 +550,7 @@ SbError call(
|
||||
OSL_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
for (USHORT i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) {
|
||||
for (sal_uInt16 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) {
|
||||
arguments->Get(i)->ResetFlag(SBX_REFERENCE);
|
||||
//TODO: skipped for errors?!?
|
||||
}
|
||||
|
||||
@@ -162,14 +162,14 @@ RTLFUNC(InputBox)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
ULONG nArgCount = rPar.Count();
|
||||
sal_uIntPtr nArgCount = rPar.Count();
|
||||
if ( nArgCount < 2 )
|
||||
StarBASIC::Error( SbERR_BAD_ARGUMENT );
|
||||
else
|
||||
{
|
||||
String aTitle;
|
||||
String aDefault;
|
||||
INT32 nX = -1, nY = -1; // zentrieren
|
||||
sal_Int32 nX = -1, nY = -1; // zentrieren
|
||||
const String& rPrompt = rPar.Get(1)->GetString();
|
||||
if ( nArgCount > 2 && !rPar.Get(2)->IsErr() )
|
||||
aTitle = rPar.Get(2)->GetString();
|
||||
|
||||
@@ -217,13 +217,13 @@ void SbiStream::MapError()
|
||||
|
||||
|
||||
// Hack for #83750
|
||||
BOOL runsInSetup( void );
|
||||
sal_Bool runsInSetup( void );
|
||||
|
||||
BOOL needSecurityRestrictions( void )
|
||||
sal_Bool needSecurityRestrictions( void )
|
||||
{
|
||||
#ifdef _USE_UNO
|
||||
static BOOL bNeedInit = TRUE;
|
||||
static BOOL bRetVal = TRUE;
|
||||
static sal_Bool bNeedInit = sal_True;
|
||||
static sal_Bool bRetVal = sal_True;
|
||||
|
||||
if( bNeedInit )
|
||||
{
|
||||
@@ -232,11 +232,11 @@ BOOL needSecurityRestrictions( void )
|
||||
if( runsInSetup() )
|
||||
{
|
||||
// Setup is not critical
|
||||
bRetVal = FALSE;
|
||||
bRetVal = sal_False;
|
||||
return bRetVal;
|
||||
}
|
||||
|
||||
bNeedInit = FALSE;
|
||||
bNeedInit = sal_False;
|
||||
|
||||
// Get system user to compare to portal user
|
||||
oslSecurity aSecurity = osl_getCurrentSecurity();
|
||||
@@ -245,12 +245,12 @@ BOOL needSecurityRestrictions( void )
|
||||
if( !bRet )
|
||||
{
|
||||
// No valid security! -> Secure mode!
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
|
||||
if( !xSMgr.is() )
|
||||
return TRUE;
|
||||
return sal_True;
|
||||
Reference< XBridgeFactory > xBridgeFac( xSMgr->createInstance
|
||||
( ::rtl::OUString::createFromAscii( "com.sun.star.bridge.BridgeFactory" ) ), UNO_QUERY );
|
||||
|
||||
@@ -265,13 +265,13 @@ BOOL needSecurityRestrictions( void )
|
||||
if( nBridgeCount == 0 )
|
||||
{
|
||||
// No bridges -> local
|
||||
bRetVal = FALSE;
|
||||
bRetVal = sal_False;
|
||||
return bRetVal;
|
||||
}
|
||||
|
||||
// Iterate through all bridges to find (portal) user property
|
||||
const Reference< XBridge >* pBridges = aBridgeSeq.getConstArray();
|
||||
bRetVal = FALSE; // Now only TRUE if user different from portal user is found
|
||||
bRetVal = sal_False; // Now only sal_True if user different from portal user is found
|
||||
sal_Int32 i;
|
||||
for( i = 0 ; i < nBridgeCount ; i++ )
|
||||
{
|
||||
@@ -289,7 +289,7 @@ BOOL needSecurityRestrictions( void )
|
||||
else
|
||||
{
|
||||
// Different user -> Secure mode!
|
||||
bRetVal = TRUE;
|
||||
bRetVal = sal_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -299,27 +299,27 @@ BOOL needSecurityRestrictions( void )
|
||||
|
||||
return bRetVal;
|
||||
#else
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Returns TRUE if UNO is available, otherwise the old file
|
||||
// Returns sal_True if UNO is available, otherwise the old file
|
||||
// system implementation has to be used
|
||||
// #89378 New semantic: Don't just ask for UNO but for UCB
|
||||
BOOL hasUno( void )
|
||||
sal_Bool hasUno( void )
|
||||
{
|
||||
#ifdef _USE_UNO
|
||||
static BOOL bNeedInit = TRUE;
|
||||
static BOOL bRetVal = TRUE;
|
||||
static sal_Bool bNeedInit = sal_True;
|
||||
static sal_Bool bRetVal = sal_True;
|
||||
|
||||
if( bNeedInit )
|
||||
{
|
||||
bNeedInit = FALSE;
|
||||
bNeedInit = sal_False;
|
||||
Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
|
||||
if( !xSMgr.is() )
|
||||
{
|
||||
// No service manager at all
|
||||
bRetVal = FALSE;
|
||||
bRetVal = sal_False;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -329,13 +329,13 @@ BOOL hasUno( void )
|
||||
if ( !( xManager.is() && xManager->queryContentProvider( ::rtl::OUString::createFromAscii( "file:///" ) ).is() ) )
|
||||
{
|
||||
// No UCB
|
||||
bRetVal = FALSE;
|
||||
bRetVal = sal_False;
|
||||
}
|
||||
}
|
||||
}
|
||||
return bRetVal;
|
||||
#else
|
||||
return FALSE;
|
||||
return sal_False;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -351,11 +351,11 @@ class OslStream : public SvStream
|
||||
public:
|
||||
OslStream( const String& rName, short nStrmMode );
|
||||
~OslStream();
|
||||
virtual ULONG GetData( void* pData, ULONG nSize );
|
||||
virtual ULONG PutData( const void* pData, ULONG nSize );
|
||||
virtual ULONG SeekPos( ULONG nPos );
|
||||
virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize );
|
||||
virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize );
|
||||
virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
|
||||
virtual void FlushData();
|
||||
virtual void SetSize( ULONG nSize );
|
||||
virtual void SetSize( sal_uIntPtr nSize );
|
||||
};
|
||||
|
||||
OslStream::OslStream( const String& rName, short nStrmMode )
|
||||
@@ -396,23 +396,23 @@ OslStream::~OslStream()
|
||||
maFile.close();
|
||||
}
|
||||
|
||||
ULONG OslStream::GetData( void* pData, ULONG nSize )
|
||||
sal_uIntPtr OslStream::GetData( void* pData, sal_uIntPtr nSize )
|
||||
{
|
||||
sal_uInt64 nBytesRead = nSize;
|
||||
FileBase::RC nRet = FileBase::E_None;
|
||||
nRet = maFile.read( pData, nBytesRead, nBytesRead );
|
||||
return (ULONG)nBytesRead;
|
||||
return (sal_uIntPtr)nBytesRead;
|
||||
}
|
||||
|
||||
ULONG OslStream::PutData( const void* pData, ULONG nSize )
|
||||
sal_uIntPtr OslStream::PutData( const void* pData, sal_uIntPtr nSize )
|
||||
{
|
||||
sal_uInt64 nBytesWritten;
|
||||
FileBase::RC nRet = FileBase::E_None;
|
||||
nRet = maFile.write( pData, (sal_uInt64)nSize, nBytesWritten );
|
||||
return (ULONG)nBytesWritten;
|
||||
return (sal_uIntPtr)nBytesWritten;
|
||||
}
|
||||
|
||||
ULONG OslStream::SeekPos( ULONG nPos )
|
||||
sal_uIntPtr OslStream::SeekPos( sal_uIntPtr nPos )
|
||||
{
|
||||
FileBase::RC nRet;
|
||||
if( nPos == STREAM_SEEK_TO_END )
|
||||
@@ -425,14 +425,14 @@ ULONG OslStream::SeekPos( ULONG nPos )
|
||||
}
|
||||
sal_uInt64 nRealPos;
|
||||
nRet = maFile.getPos( nRealPos );
|
||||
return sal::static_int_cast<ULONG>(nRealPos);
|
||||
return sal::static_int_cast<sal_uIntPtr>(nRealPos);
|
||||
}
|
||||
|
||||
void OslStream::FlushData()
|
||||
{
|
||||
}
|
||||
|
||||
void OslStream::SetSize( ULONG nSize )
|
||||
void OslStream::SetSize( sal_uIntPtr nSize )
|
||||
{
|
||||
FileBase::RC nRet = FileBase::E_None;
|
||||
nRet = maFile.setSize( (sal_uInt64)nSize );
|
||||
@@ -454,17 +454,17 @@ public:
|
||||
UCBStream( Reference< XOutputStream > & xOS );
|
||||
UCBStream( Reference< XStream > & xS );
|
||||
~UCBStream();
|
||||
virtual ULONG GetData( void* pData, ULONG nSize );
|
||||
virtual ULONG PutData( const void* pData, ULONG nSize );
|
||||
virtual ULONG SeekPos( ULONG nPos );
|
||||
virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize );
|
||||
virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize );
|
||||
virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
|
||||
virtual void FlushData();
|
||||
virtual void SetSize( ULONG nSize );
|
||||
virtual void SetSize( sal_uIntPtr nSize );
|
||||
};
|
||||
|
||||
/*
|
||||
ULONG UCBErrorToSvStramError( ucb::IOErrorCode nError )
|
||||
sal_uIntPtr UCBErrorToSvStramError( ucb::IOErrorCode nError )
|
||||
{
|
||||
ULONG eReturn = ERRCODE_IO_GENERAL;
|
||||
sal_uIntPtr eReturn = ERRCODE_IO_GENERAL;
|
||||
switch( nError )
|
||||
{
|
||||
case ucb::IOErrorCode_ABORT: eReturn = SVSTREAM_GENERALERROR; break;
|
||||
@@ -535,7 +535,7 @@ UCBStream::~UCBStream()
|
||||
}
|
||||
}
|
||||
|
||||
ULONG UCBStream::GetData( void* pData, ULONG nSize )
|
||||
sal_uIntPtr UCBStream::GetData( void* pData, sal_uIntPtr nSize )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -564,7 +564,7 @@ ULONG UCBStream::GetData( void* pData, ULONG nSize )
|
||||
return 0;
|
||||
}
|
||||
|
||||
ULONG UCBStream::PutData( const void* pData, ULONG nSize )
|
||||
sal_uIntPtr UCBStream::PutData( const void* pData, sal_uIntPtr nSize )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -591,13 +591,13 @@ ULONG UCBStream::PutData( const void* pData, ULONG nSize )
|
||||
return 0;
|
||||
}
|
||||
|
||||
ULONG UCBStream::SeekPos( ULONG nPos )
|
||||
sal_uIntPtr UCBStream::SeekPos( sal_uIntPtr nPos )
|
||||
{
|
||||
try
|
||||
{
|
||||
if( xSeek.is() )
|
||||
{
|
||||
ULONG nLen = sal::static_int_cast<ULONG>( xSeek->getLength() );
|
||||
sal_uIntPtr nLen = sal::static_int_cast<sal_uIntPtr>( xSeek->getLength() );
|
||||
if( nPos > nLen )
|
||||
nPos = nLen;
|
||||
xSeek->seek( nPos );
|
||||
@@ -631,7 +631,7 @@ void UCBStream::FlushData()
|
||||
}
|
||||
}
|
||||
|
||||
void UCBStream::SetSize( ULONG nSize )
|
||||
void UCBStream::SetSize( sal_uIntPtr nSize )
|
||||
{
|
||||
(void)nSize;
|
||||
|
||||
@@ -738,7 +738,7 @@ SbError SbiStream::Close()
|
||||
return nError;
|
||||
}
|
||||
|
||||
SbError SbiStream::Read( ByteString& rBuf, USHORT n, bool bForceReadingPerByte )
|
||||
SbError SbiStream::Read( ByteString& rBuf, sal_uInt16 n, bool bForceReadingPerByte )
|
||||
{
|
||||
nExpandOnWriteTo = 0;
|
||||
if( !bForceReadingPerByte && IsText() )
|
||||
@@ -777,10 +777,10 @@ void SbiStream::ExpandFile()
|
||||
{
|
||||
if ( nExpandOnWriteTo )
|
||||
{
|
||||
ULONG nCur = pStrm->Seek(STREAM_SEEK_TO_END);
|
||||
sal_uIntPtr nCur = pStrm->Seek(STREAM_SEEK_TO_END);
|
||||
if( nCur < nExpandOnWriteTo )
|
||||
{
|
||||
ULONG nDiff = nExpandOnWriteTo - nCur;
|
||||
sal_uIntPtr nDiff = nExpandOnWriteTo - nCur;
|
||||
char c = 0;
|
||||
while( nDiff-- )
|
||||
*pStrm << c;
|
||||
@@ -793,7 +793,7 @@ void SbiStream::ExpandFile()
|
||||
}
|
||||
}
|
||||
|
||||
SbError SbiStream::Write( const ByteString& rBuf, USHORT n )
|
||||
SbError SbiStream::Write( const ByteString& rBuf, sal_uInt16 n )
|
||||
{
|
||||
ExpandFile();
|
||||
if( IsAppend() )
|
||||
@@ -804,7 +804,7 @@ SbError SbiStream::Write( const ByteString& rBuf, USHORT n )
|
||||
aLine += rBuf;
|
||||
// Raus damit, wenn das Ende ein LF ist, aber CRLF vorher
|
||||
// strippen, da der SvStrm ein CRLF anfuegt!
|
||||
USHORT nLineLen = aLine.Len();
|
||||
sal_uInt16 nLineLen = aLine.Len();
|
||||
if( nLineLen && aLine.GetBuffer()[ --nLineLen ] == 0x0A )
|
||||
{
|
||||
aLine.Erase( nLineLen );
|
||||
@@ -1023,8 +1023,8 @@ void SbiIoSystem::ReadCon( ByteString& rIn )
|
||||
void SbiIoSystem::WriteCon( const ByteString& rText )
|
||||
{
|
||||
aOut += rText;
|
||||
USHORT n1 = aOut.Search( '\n' );
|
||||
USHORT n2 = aOut.Search( '\r' );
|
||||
sal_uInt16 n1 = aOut.Search( '\n' );
|
||||
sal_uInt16 n2 = aOut.Search( '\r' );
|
||||
if( n1 != STRING_NOTFOUND || n2 != STRING_NOTFOUND )
|
||||
{
|
||||
if( n1 == STRING_NOTFOUND ) n1 = n2;
|
||||
|
||||
+218
-218
File diff suppressed because it is too large
Load Diff
+173
-173
File diff suppressed because it is too large
Load Diff
@@ -34,8 +34,8 @@
|
||||
#include "errobject.hxx"
|
||||
|
||||
|
||||
// Properties und Methoden legen beim Get (bWrite = FALSE) den Returnwert
|
||||
// im Element 0 des Argv ab; beim Put (bWrite = TRUE) wird der Wert aus
|
||||
// Properties und Methoden legen beim Get (bWrite = sal_False) den Returnwert
|
||||
// im Element 0 des Argv ab; beim Put (bWrite = sal_True) wird der Wert aus
|
||||
// Element 0 gespeichert.
|
||||
|
||||
RTLFUNC(Erl)
|
||||
@@ -59,9 +59,9 @@ RTLFUNC(Err)
|
||||
{
|
||||
if( bWrite )
|
||||
{
|
||||
INT32 nVal = rPar.Get( 0 )->GetLong();
|
||||
sal_Int32 nVal = rPar.Get( 0 )->GetLong();
|
||||
if( nVal <= 65535L )
|
||||
StarBASIC::Error( StarBASIC::GetSfxFromVBError( (USHORT) nVal ) );
|
||||
StarBASIC::Error( StarBASIC::GetSfxFromVBError( (sal_uInt16) nVal ) );
|
||||
}
|
||||
else
|
||||
rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) );
|
||||
@@ -73,7 +73,7 @@ RTLFUNC(False)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
rPar.Get(0)->PutBool( FALSE );
|
||||
rPar.Get(0)->PutBool( sal_False );
|
||||
}
|
||||
|
||||
RTLFUNC(Empty)
|
||||
@@ -114,7 +114,7 @@ RTLFUNC(True)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
rPar.Get( 0 )->PutBool( TRUE );
|
||||
rPar.Get( 0 )->PutBool( sal_True );
|
||||
}
|
||||
|
||||
RTLFUNC(ATTR_NORMAL)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user