diff options
Diffstat (limited to 'basic/source/inc')
26 files changed, 740 insertions, 740 deletions
diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx index 7a6a2092693d..e66fa80f2159 100644 --- a/basic/source/inc/buffer.hxx +++ b/basic/source/inc/buffer.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,31 +34,31 @@ class SbiParser; -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 - short nInc; // Inkrement - BOOL Check( USHORT ); // Buffergroesse testen +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 + short nInc; // Inkrement + BOOL Check( USHORT ); // Buffergroesse testen public: - SbiBuffer( SbiParser*, short ); // Inkrement + SbiBuffer( SbiParser*, short ); // Inkrement ~SbiBuffer(); - void Patch( UINT32, UINT32 ); // Patchen - void Chain( UINT32 ); // Back-Chain - void Align( INT32 ); // Alignment + 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 - char* GetBuffer(); // Puffer rausgeben (selbst loeschen!) + 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 + char* GetBuffer(); // Puffer rausgeben (selbst loeschen!) char* GetBufferPtr(){ return pBuf; } - UINT32 GetSize() { return nOff; } + UINT32 GetSize() { return nOff; } }; #endif diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx index cfafcddec8e0..3b1dd88eb7a5 100644 --- a/basic/source/inc/codegen.hxx +++ b/basic/source/inc/codegen.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,13 +35,13 @@ class SbModule; #include "opcodes.hxx" #include "buffer.hxx" -class SbiCodeGen { // Code-Erzeugung: - SbiParser* pParser; // fuer Fehlermeldungen, Line, Column etc. - SbModule& rMod; // aktuelles Modul - 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 +class SbiCodeGen { // Code-Erzeugung: + SbiParser* pParser; // fuer Fehlermeldungen, Line, Column etc. + SbModule& rMod; // aktuelles Modul + 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 public: SbiCodeGen( SbModule&, SbiParser*, short ); SbiParser* GetParser() { return pParser; } @@ -50,11 +50,11 @@ public: 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 ); } + void BackChain( UINT32 off ) { aCode.Chain( off ); } void Statement(); - void GenStmnt(); // evtl. Statement-Opcode erzeugen + void GenStmnt(); // evtl. Statement-Opcode erzeugen UINT32 GetPC(); - UINT32 GetOffset() { return GetPC() + 1; } + UINT32 GetOffset() { return GetPC() + 1; } void Save(); // #29955 for-Schleifen-Ebene pflegen @@ -67,15 +67,15 @@ public: }; template < class T, class S > -class PCodeBuffConvertor +class PCodeBuffConvertor { - T m_nSize; // + T m_nSize; // BYTE* m_pStart; BYTE* m_pCnvtdBuf; - S m_nCnvtdSize; // + S m_nCnvtdSize; // // Disable usual copying symantics and bodgy default ctor - PCodeBuffConvertor(); + PCodeBuffConvertor(); PCodeBuffConvertor(const PCodeBuffConvertor& ); PCodeBuffConvertor& operator = ( const PCodeBuffConvertor& ); public: @@ -88,7 +88,7 @@ public: // #111897 PARAM_INFO flags start at 0x00010000 to not // conflict with DefaultId in SbxParamInfo::nUserData -#define PARAM_INFO_PARAMARRAY 0x0010000 +#define PARAM_INFO_PARAMARRAY 0x0010000 #endif diff --git a/basic/source/inc/collelem.hxx b/basic/source/inc/collelem.hxx index 2c39e711f993..b7904df3bf85 100644 --- a/basic/source/inc/collelem.hxx +++ b/basic/source/inc/collelem.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/basic/source/inc/disas.hxx b/basic/source/inc/disas.hxx index 93929dab42a9..f7e463bdd2ec 100644 --- a/basic/source/inc/disas.hxx +++ b/basic/source/inc/disas.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,43 +31,43 @@ #include "image.hxx" #include "opcodes.hxx" -// find a place for this limit ( also used in +// find a place for this limit ( also used in class SvStream; #define MAX_LABELS 0x2000L class SbiDisas { const SbiImage& rImg; SbModule* pMod; - char cLabels[ MAX_LABELS ]; // Bitvektor fuer Labels - UINT32 nOff; // aktuelle Position - 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 + char cLabels[ MAX_LABELS ]; // Bitvektor fuer Labels + UINT32 nOff; // aktuelle Position + 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 public: SbiDisas( SbModule*, const SbiImage* ); void Disas( SvStream& ); void Disas( String& ); // NICHT AUFRUFEN - void StrOp( String& ); - void Str2Op( String& ); - void ImmOp( String& ); - void OnOp( String& ); - void LblOp( String& ); - void ReturnOp( String& ); - void ResumeOp( String& ); - void PromptOp( String& ); - void CloseOp( String& ); - void CharOp( String& ); - void VarOp( String& ); - void VarDefOp( String& ); - void OffOp( String& ); - void TypeOp( String& ); - void CaseOp( String& ); - void StmntOp( String& ); - void StrmOp( String& ); + void StrOp( String& ); + void Str2Op( String& ); + void ImmOp( String& ); + void OnOp( String& ); + void LblOp( String& ); + void ReturnOp( String& ); + void ResumeOp( String& ); + void PromptOp( String& ); + void CloseOp( String& ); + void CharOp( String& ); + void VarOp( String& ); + void VarDefOp( String& ); + void OffOp( String& ); + void TypeOp( String& ); + void CaseOp( String& ); + void StmntOp( String& ); + void StrmOp( String& ); }; #endif diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx index 94c10ca86b2e..e779a3200fca 100644 --- a/basic/source/inc/dlgcont.hxx +++ b/basic/source/inc/dlgcont.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,22 +47,22 @@ class SfxDialogLibraryContainer : public SfxLibraryContainer // Methods to distinguish between different library types virtual SfxLibrary* SAL_CALL implCreateLibrary( const ::rtl::OUString& aName ); virtual SfxLibrary* SAL_CALL implCreateLibraryLink - ( const ::rtl::OUString& aName, const ::rtl::OUString& aLibInfoFileURL, + ( const ::rtl::OUString& aName, const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& StorageURL, sal_Bool ReadOnly ); virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void ); virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const; virtual void SAL_CALL writeLibraryElement - ( + ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, - const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutput + const ::rtl::OUString& aElementName, + const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutput ) throw(::com::sun::star::uno::Exception); virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement - ( + ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, + const ::rtl::OUString& aElementName, const ::rtl::OUString& aFile, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xElementStream ); @@ -87,7 +87,7 @@ public: throw (::com::sun::star::uno::RuntimeException); // Resource handling - ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourcePersistence > + ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourcePersistence > implCreateStringResource( class SfxDialogLibrary* pDialog ); // Methods XServiceInfo @@ -102,7 +102,7 @@ public: static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(); static ::rtl::OUString getImplementationName_static(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create - ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager ) + ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager ) throw( ::com::sun::star::uno::Exception ); }; @@ -114,10 +114,10 @@ typedef ::cppu::ImplHelper1 < ::com::sun::star::resource::XStringResourceSuppl class SfxDialogLibrary :public SfxLibrary ,public SfxDialogLibrary_BASE { - SfxDialogLibraryContainer* m_pParent; + SfxDialogLibraryContainer* m_pParent; ::com::sun::star::uno::Reference - < ::com::sun::star::resource::XStringResourcePersistence> m_xStringResourcePersistence; - ::rtl::OUString m_aName; + < ::com::sun::star::resource::XStringResourcePersistence> m_xStringResourcePersistence; + ::rtl::OUString m_aName; // Provide modify state including resources virtual sal_Bool isModified( void ); @@ -152,13 +152,13 @@ public: DECLARE_XTYPEPROVIDER() // XStringResourceSupplier - virtual ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > + virtual ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > SAL_CALL getStringResource( ) throw (::com::sun::star::uno::RuntimeException); ::rtl::OUString getName( void ) { return m_aName; } - ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourcePersistence > + ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourcePersistence > getStringResourcePersistence( void ) { return m_xStringResourcePersistence; diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx index 852978b5740f..785ee8e1514b 100644 --- a/basic/source/inc/expr.hxx +++ b/basic/source/inc/expr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,27 +47,27 @@ class SbiProcDef; typedef ::std::vector<SbiExprList*> SbiExprListVector; struct SbVar { // Variablen-Element: - SbiExprNode* pNext; // Weiteres Element (bei Strukturen) - SbiSymDef* pDef; // Symboldefinition - SbiExprList* pPar; // optionale Parameter (wird geloescht) + SbiExprNode* pNext; // Weiteres Element (bei Strukturen) + SbiSymDef* pDef; // Symboldefinition + SbiExprList* pPar; // optionale Parameter (wird geloescht) SbiExprListVector* pvMorePar; // Array of arrays foo(pPar)(avMorePar[0])(avMorePar[1])... }; struct KeywordSymbolInfo { - String m_aKeywordSymbol; - SbxDataType m_eSbxDataType; - SbiToken m_eTok; + String m_aKeywordSymbol; + SbxDataType m_eSbxDataType; + SbiToken m_eTok; }; -enum SbiExprType { // Expression-Typen: +enum SbiExprType { // Expression-Typen: SbSTDEXPR, // normaler Ausdruck SbLVALUE, // beliebiger lValue SbSYMBOL, // beliebiges zusammengesetztes Symbol - SbOPERAND // Variable/Funktion + SbOPERAND // Variable/Funktion }; -enum SbiExprMode { // Expression context: +enum SbiExprMode { // Expression context: EXPRMODE_STANDARD, // default EXPRMODE_STANDALONE, // a param1, param2 OR a( param1, param2 ) = 42 EXPRMODE_LPAREN_PENDING, // start of parameter list with bracket, special handling @@ -83,8 +83,8 @@ enum SbiNodeType { SbxSTRVAL, // aStrVal = Wert, before #i59791/#i45570: nStringId = Wert SbxVARVAL, // aVar = Wert SbxTYPEOF, // TypeOf ObjExpr Is Type - SbxNODE, // Node - SbxNEW, // new <type> expression + SbxNODE, // Node + SbxNEW, // new <type> expression SbxDUMMY }; @@ -99,20 +99,20 @@ class SbiExprNode { // Operatoren (und Operanden) friend class SbiExpression; friend class SbiConstExpression; union { - USHORT nTypeStrId; // gepoolter String-ID, #i59791/#i45570 Now only for TypeOf + USHORT nTypeStrId; // gepoolter String-ID, #i59791/#i45570 Now only for TypeOf double nVal; // numerischer Wert SbVar aVar; // oder Variable }; - String aStrVal; // #i59791/#i45570 Store string directly + String aStrVal; // #i59791/#i45570 Store string directly SbiExprNode* pLeft; // linker Zweig SbiExprNode* pRight; // rechter Zweig (NULL bei unaeren Ops) SbiExprNode* pWithParent; // Knoten, dessen Member this per with ist - SbiCodeGen* pGen; // Code-Generator + SbiCodeGen* pGen; // Code-Generator SbiNodeType eNodeType; // Art des Nodes SbxDataType eType; // aktueller Datentyp SbiToken eTok; // Token des Operators - BOOL bComposite; // TRUE: Zusammengesetzter Ausdruck - BOOL bError; // TRUE: Fehlerhaft + BOOL bComposite; // TRUE: Zusammengesetzter Ausdruck + BOOL bError; // TRUE: Fehlerhaft void FoldConstants(); // Constant Folding durchfuehren void CollectBits(); // Umwandeln von Zahlen in Strings BOOL IsOperand() // TRUE, wenn Operand @@ -125,15 +125,15 @@ class SbiExprNode { // Operatoren (und Operanden) BOOL IsString(); // TRUE bei Strings BOOL IsLvalue(); // TRUE, falls als Lvalue verwendbar void GenElement( SbiOpcode ); // Element - void BaseInit( SbiParser* p ); // Hilfsfunktion fuer Ctor, AB 17.12.95 + void BaseInit( SbiParser* p ); // Hilfsfunktion fuer Ctor, AB 17.12.95 public: SbiExprNode( void ); SbiExprNode( SbiParser*, double, SbxDataType ); 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*, USHORT ); // #120061 TypeOf + SbiExprNode( SbiParser*, USHORT ); // new <type> virtual ~SbiExprNode(); BOOL IsValid() { return BOOL( !bError ); } @@ -142,24 +142,24 @@ public: BOOL IsIntConst(); // TRUE bei Integer-Konstanten BOOL IsVariable(); // TRUE, wenn Variable - SbiExprNode* GetWithParent() { return pWithParent; } - void SetWithParent( SbiExprNode* p ) { pWithParent = p; } + SbiExprNode* GetWithParent() { return pWithParent; } + void SetWithParent( SbiExprNode* p ) { pWithParent = p; } SbxDataType GetType() { return eType; } - void SetType( SbxDataType eTp ) { eType = eTp; } + void SetType( SbxDataType eTp ) { eType = eTp; } SbiNodeType GetNodeType() { return eNodeType; } - SbiSymDef* GetVar(); // Variable (falls vorhanden) - SbiSymDef* GetRealVar(); // letzte Variable in x.y.z - SbiExprNode* GetRealNode(); // letzter Knoten in x.y.z + SbiSymDef* GetVar(); // Variable (falls vorhanden) + SbiSymDef* GetRealVar(); // letzte Variable in x.y.z + SbiExprNode* GetRealNode(); // letzter Knoten in x.y.z short GetDepth(); // Tiefe eines Baumes berechnen - const String& GetString() { return aStrVal; } - short GetNumber() { return (short)nVal; } - SbiExprList* GetParameters() { return aVar.pPar; } - SbiExprListVector* GetMoreParameters() { return aVar.pvMorePar; } + const String& GetString() { return aStrVal; } + short GetNumber() { return (short)nVal; } + SbiExprList* GetParameters() { return aVar.pPar; } + SbiExprListVector* GetMoreParameters() { return aVar.pvMorePar; } void Optimize(); // Baumabgleich - void Gen( RecursiveMode eRecMode = UNDEFINED ); // Ausgabe eines Nodes + void Gen( RecursiveMode eRecMode = UNDEFINED ); // Ausgabe eines Nodes }; class SbiExpression { // der Ausdruck: @@ -167,13 +167,13 @@ class SbiExpression { // der Ausdruck: friend class SbiParameters; friend class SbiDimList; protected: - String aArgName; // Name fuer bananntes Argument - SbiParser* pParser; // fuer Fehlermeldungen, Parsing + String aArgName; // Name fuer bananntes Argument + SbiParser* pParser; // fuer Fehlermeldungen, Parsing SbiExpression* pNext; // Link bei Parameterlisten SbiExprNode* pExpr; // Der Expression-Baum - SbiExprType eCurExpr; // Art des Ausdrucks - SbiExprMode m_eMode; // Expression context - BOOL bBased; // TRUE: einfacher DIM-Teil (+BASE) + 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 @@ -200,8 +200,8 @@ public: SbiExpression( SbiParser*, SbiToken ); // Spezial-Expr mit Spezial-Tokens ~SbiExpression(); String& GetName() { return aArgName; } - void SetBased() { bBased = TRUE; } - BOOL IsBased() { return bBased; } + void SetBased() { bBased = TRUE; } + BOOL IsBased() { return bBased; } void SetByVal() { bByVal = TRUE; } BOOL IsByVal() { return bByVal; } BOOL IsBracket() { return bBracket; } @@ -213,10 +213,10 @@ public: const String& GetString() { return pExpr->GetString(); } SbiSymDef* GetVar() { return pExpr->GetVar(); } SbiSymDef* GetRealVar() { return pExpr->GetRealVar(); } - SbiExprNode* GetExprNode() { return pExpr; } + SbiExprNode* GetExprNode() { return pExpr; } SbxDataType GetType() { return pExpr->GetType(); } void SetType( SbxDataType eType){ pExpr->eType = eType; } - void Gen( RecursiveMode eRecMode = UNDEFINED ); // Ausgabe eines Nodes + void Gen( RecursiveMode eRecMode = UNDEFINED ); // Ausgabe eines Nodes }; class SbiConstExpression : public SbiExpression { @@ -233,10 +233,10 @@ public: // numerische Konstante class SbiExprList { // Basisklasse fuer Parameter und Dims protected: - SbiParser* pParser; // Parser + SbiParser* pParser; // Parser SbiExpression* pFirst; // Expressions short nExpr; // Anzahl Expressions - short nDim; // Anzahl Dimensionen + short nDim; // Anzahl Dimensionen BOOL bError; // TRUE: Fehler BOOL bBracket; // TRUE: Klammern public: @@ -245,9 +245,9 @@ public: BOOL IsBracket() { return bBracket; } BOOL IsValid() { return BOOL( !bError ); } short GetSize() { return nExpr; } - short GetDims() { return nDim; } + short GetDims() { return nDim; } SbiExpression* Get( short ); - BOOL Test( const SbiProcDef& ); // Parameter-Checks + BOOL Test( const SbiProcDef& ); // Parameter-Checks void Gen(); // Code-Erzeugung void addExpression( SbiExpression* pExpr ); }; diff --git a/basic/source/inc/filefmt.hxx b/basic/source/inc/filefmt.hxx index 0319daf7261b..7bfb1f0dd9de 100644 --- a/basic/source/inc/filefmt.hxx +++ b/basic/source/inc/filefmt.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -64,24 +64,24 @@ class SvStream; // Alle Datei-Offsets in Records sind relativ zum Start des Moduls! -#define B_LIBRARY 0x4C42 // BL Library Record -#define B_MODULE 0x4D42 // BM Module Record -#define B_NAME 0x4E4D // MN module name -#define B_COMMENT 0x434D // MC comment -#define B_SOURCE 0x4353 // SC source code -#define B_PCODE 0x4350 // PC p-code -#define B_OLDPUBLICS 0x7550 // Pu publics -#define B_PUBLICS 0x5550 // PU publics -#define B_POOLDIR 0x4450 // PD symbol pool directory -#define B_SYMPOOL 0x5953 // SY symbol pool -#define B_STRINGPOOL 0x5453 // ST symbol pool -#define B_LINERANGES 0x524C // LR line ranges for publics -#define B_MODEND 0x454D // ME module end -#define B_SBXOBJECTS 0x5853 // SX SBX objects - -#define EXTENDED_BINARY_MODULES +#define B_LIBRARY 0x4C42 // BL Library Record +#define B_MODULE 0x4D42 // BM Module Record +#define B_NAME 0x4E4D // MN module name +#define B_COMMENT 0x434D // MC comment +#define B_SOURCE 0x4353 // SC source code +#define B_PCODE 0x4350 // PC p-code +#define B_OLDPUBLICS 0x7550 // Pu publics +#define B_PUBLICS 0x5550 // PU publics +#define B_POOLDIR 0x4450 // PD symbol pool directory +#define B_SYMPOOL 0x5953 // SY symbol pool +#define B_STRINGPOOL 0x5453 // ST symbol pool +#define B_LINERANGES 0x524C // LR line ranges for publics +#define B_MODEND 0x454D // ME module end +#define B_SBXOBJECTS 0x5853 // SX SBX objects + +#define EXTENDED_BINARY_MODULES #ifdef EXTENDED_BINARY_MODULES -#define B_EXTSOURCE 0x5345 // ES extended source +#define B_EXTSOURCE 0x5345 // ES extended source #endif // Ein Library Record enthaelt nur Module Records diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx index 24a530ed1061..fcd1f58b573c 100644 --- a/basic/source/inc/image.hxx +++ b/basic/source/inc/image.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,72 +39,72 @@ struct SbPublicEntry; class SbiImage { - friend class SbiCodeGen; // Compiler-Klassen, die die private- + friend class SbiCodeGen; // Compiler-Klassen, die die private- - SbxArrayRef rTypes; // User defined types - SbxArrayRef rEnums; // Enum types - 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.) - 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 - rtl_TextEncoding eCharSet; // Zeichensatz fuer Strings + SbxArrayRef rTypes; // User defined types + SbxArrayRef rEnums; // Enum types + 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.) + 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 + rtl_TextEncoding eCharSet; // Zeichensatz fuer Strings // temporaere Verwaltungs-Variable: - short nStringIdx; // aktueller String-Index - UINT32 nStringOff; // aktuelle Pos im Stringpuffer + short nStringIdx; // aktueller String-Index + UINT32 nStringOff; // aktuelle Pos im Stringpuffer // Routinen fuer Compiler: - void MakeStrings( short ); // StringPool einrichten + void MakeStrings( short ); // StringPool einrichten void AddString( const String& );// String zufuegen - void AddCode( char*, UINT32 ); // Codeblock dazu + void AddCode( char*, UINT32 ); // Codeblock dazu void AddType(SbxObject *); // User-Type mit aufnehmen void AddEnum(SbxObject *); // Register enum type 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 + 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 // dem Compilieren initialisiert wird. SbiImage(); ~SbiImage(); - void Clear(); // Inhalt loeschen - BOOL Load( SvStream&, UINT32& nVer ); // Loads image from stream + void Clear(); // Inhalt loeschen + BOOL Load( SvStream&, 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; } + BOOL IsError() { return bError; } - const char* GetCode() const { return pCode; } - UINT32 GetCodeSize() const { return nCodeSize; } - ::rtl::OUString& GetSource32() { return aOUSource; } - USHORT GetBase() const { return nDimBase; } - String GetString( short nId ) const; + const char* GetCode() const { return pCode; } + UINT32 GetCodeSize() const { return nCodeSize; } + ::rtl::OUString& GetSource32() { return aOUSource; } + USHORT 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 ReleaseLegacyBuffer(); - BOOL ExceedsLegacyLimits(); + 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 ReleaseLegacyBuffer(); + BOOL ExceedsLegacyLimits(); + }; -#define SBIMG_EXPLICIT 0x0001 // OPTION EXPLICIT ist aktiv -#define SBIMG_COMPARETEXT 0x0002 // OPTION COMPARE TEXT ist aktiv -#define SBIMG_INITCODE 0x0004 // Init-Code vorhanden -#define SBIMG_CLASSMODULE 0x0008 // OPTION ClassModule is active +#define SBIMG_EXPLICIT 0x0001 // OPTION EXPLICIT ist aktiv +#define SBIMG_COMPARETEXT 0x0002 // OPTION COMPARE TEXT ist aktiv +#define SBIMG_INITCODE 0x0004 // Init-Code vorhanden +#define SBIMG_CLASSMODULE 0x0008 // OPTION ClassModule is active #endif diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx index 6d04889776b7..025ef857b4c2 100644 --- a/basic/source/inc/iosys.hxx +++ b/basic/source/inc/iosys.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,23 +40,23 @@ class SvStream; #define CHANNELS 256 #define CONSOLE 0 -#define SBSTRM_INPUT 0x0001 // Input -#define SBSTRM_OUTPUT 0x0002 // Output -#define SBSTRM_RANDOM 0x0004 // Random -#define SBSTRM_APPEND 0x0008 // Append -#define SBSTRM_BINARY 0x0010 // Binary +#define SBSTRM_INPUT 0x0001 // Input +#define SBSTRM_OUTPUT 0x0002 // Output +#define SBSTRM_RANDOM 0x0004 // Random +#define SBSTRM_APPEND 0x0008 // Append +#define SBSTRM_BINARY 0x0010 // Binary class SbiStream { - SvStream* pStrm; // der Stream - ULONG nExpandOnWriteTo; // bei Schreibzugriff, den Stream + SvStream* pStrm; // der Stream + ULONG nExpandOnWriteTo; // bei Schreibzugriff, den Stream // bis zu dieser Groesse aufblasen - ByteString aLine; // aktuelle Zeile - ULONG nLine; // aktuelle Zeilennummer - short nLen; // Pufferlaenge - short nMode; // Bits: - short nChan; // aktueller Kanal - SbError nError; // letzter Fehlercode - void MapError(); // Fehlercode mappen + ByteString aLine; // aktuelle Zeile + ULONG nLine; // aktuelle Zeilennummer + short nLen; // Pufferlaenge + short nMode; // Bits: + short nChan; // aktueller Kanal + SbError nError; // letzter Fehlercode + void MapError(); // Fehlercode mappen public: SbiStream(); @@ -67,36 +67,36 @@ public: SbError Read( char& ); SbError Write( const ByteString&, USHORT = 0 ); - bool IsText() const { return (nMode & SBSTRM_BINARY) == 0; } - bool IsRandom() const { return (nMode & SBSTRM_RANDOM) != 0; } - bool IsBinary() const { return (nMode & SBSTRM_BINARY) != 0; } - bool IsSeq() const { return (nMode & SBSTRM_RANDOM) == 0; } - 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; } + bool IsText() const { return (nMode & SBSTRM_BINARY) == 0; } + bool IsRandom() const { return (nMode & SBSTRM_RANDOM) != 0; } + bool IsBinary() const { return (nMode & SBSTRM_BINARY) != 0; } + bool IsSeq() const { return (nMode & SBSTRM_RANDOM) == 0; } + 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; } void ExpandFile(); - SvStream* GetStrm() { return pStrm; } + SvStream* GetStrm() { return pStrm; } }; class SbiIoSystem { SbiStream* pChan[ CHANNELS ]; - ByteString aPrompt; // Input-Prompt - ByteString aIn, aOut; // Console-Buffer - short nChan; // aktueller Kanal - SbError nError; // letzter Fehlercode - void ReadCon( ByteString& ); - void WriteCon( const ByteString& ); + ByteString aPrompt; // Input-Prompt + ByteString aIn, aOut; // Console-Buffer + short nChan; // aktueller Kanal + SbError nError; // letzter Fehlercode + void ReadCon( ByteString& ); + void WriteCon( const ByteString& ); public: SbiIoSystem(); ~SbiIoSystem(); SbError GetError(); void Shutdown(); void SetPrompt( const ByteString& r ) { aPrompt = r; } - void SetChannel( short n ) { nChan = n; } - short GetChannel() const { return nChan;} - void ResetChannel() { nChan = 0; } + void SetChannel( short n ) { nChan = n; } + short GetChannel() const { return nChan;} + void ResetChannel() { nChan = 0; } void Open( short, const ByteString&, short, short, short ); void Close(); void Read( ByteString&, short = 0 ); diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 2b3b65f74eca..d86ca14a93e1 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -688,15 +688,15 @@ protected: //=================================================================== class ScriptSubPackageIterator { - com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > m_xMainPackage; + com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > m_xMainPackage; - bool m_bIsValid; - bool m_bIsBundle; + bool m_bIsValid; + bool m_bIsBundle; com::sun::star::uno::Sequence< com::sun::star::uno::Reference - < com::sun::star::deployment::XPackage > > m_aSubPkgSeq; - sal_Int32 m_nSubPkgCount; - sal_Int32 m_iNextSubPkg; + < com::sun::star::deployment::XPackage > > m_aSubPkgSeq; + sal_Int32 m_nSubPkgCount; + sal_Int32 m_iNextSubPkg; com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > implDetectScriptPackage( const com::sun::star::uno::Reference @@ -735,36 +735,36 @@ protected: com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > implGetNextBundledScriptPackage( bool& rbPureDialogLib ); - com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; - IteratorState m_eState; + IteratorState m_eState; com::sun::star::uno::Sequence< com::sun::star::uno::Reference - < com::sun::star::deployment::XPackage > > m_aUserPackagesSeq; - bool m_bUserPackagesLoaded; + < com::sun::star::deployment::XPackage > > m_aUserPackagesSeq; + bool m_bUserPackagesLoaded; com::sun::star::uno::Sequence< com::sun::star::uno::Reference - < com::sun::star::deployment::XPackage > > m_aSharedPackagesSeq; - bool m_bSharedPackagesLoaded; + < com::sun::star::deployment::XPackage > > m_aSharedPackagesSeq; + bool m_bSharedPackagesLoaded; com::sun::star::uno::Sequence< com::sun::star::uno::Reference - < com::sun::star::deployment::XPackage > > m_aBundledPackagesSeq; - bool m_bBundledPackagesLoaded; + < com::sun::star::deployment::XPackage > > m_aBundledPackagesSeq; + bool m_bBundledPackagesLoaded; - int m_iUserPackage; - int m_iSharedPackage; - int m_iBundledPackage; + int m_iUserPackage; + int m_iSharedPackage; + int m_iBundledPackage; - ScriptSubPackageIterator* m_pScriptSubPackageIterator; + ScriptSubPackageIterator* m_pScriptSubPackageIterator; }; // end class ScriptExtensionIterator -} // namespace basic +} // namespace basic #endif diff --git a/basic/source/inc/object.hxx b/basic/source/inc/object.hxx index a6ebfdc5df20..bd659bbafeb3 100644 --- a/basic/source/inc/object.hxx +++ b/basic/source/inc/object.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/basic/source/inc/opcodes.hxx b/basic/source/inc/opcodes.hxx index 309ff38c5564..0481051df8a8 100644 --- a/basic/source/inc/opcodes.hxx +++ b/basic/source/inc/opcodes.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,10 +58,10 @@ enum SbiOpcode { _ARGV, // TOS ==> aktueller Argv _INPUT, // Input ==> TOS _LINPUT, // Line Input ==> TOS - _GET, // TOS anfassen + _GET, // TOS anfassen _SET, // Speichern Objekt TOS ==> TOS-1 - _PUT, // TOS ==> TOS-1 - _PUTC, // TOS ==> TOS-1, dann ReadOnly + _PUT, // TOS ==> TOS-1 + _PUTC, // TOS ==> TOS-1, dann ReadOnly _DIM, // DIM _REDIM, // REDIM _REDIMP, // REDIM PRESERVE @@ -70,7 +70,7 @@ enum SbiOpcode { _STOP, // Programmende _INITFOR, // FOR-Variable initialisieren _NEXT, // FOR-Variable inkrementieren - _CASE, // Anfang CASE + _CASE, // Anfang CASE _ENDCASE, // Ende CASE _STDERROR, // Standard-Fehlerbehandlung _NOERROR, // keine Fehlerbehandlung @@ -83,13 +83,13 @@ enum SbiOpcode { _RENAME, // Rename Tos+1 to Tos _PROMPT, // TOS = Prompt for Input _RESTART, // Restartpunkt definieren - _CHAN0, // I/O-Kanal 0 + _CHAN0, // I/O-Kanal 0 // Sonstiges _EMPTY, // Leeren Ausdruck auf Stack - _ERROR, // TOS = Fehlercode - _LSET, // Speichern Objekt TOS ==> TOS-1 + _ERROR, // TOS = Fehlercode + _LSET, // Speichern Objekt TOS ==> TOS-1 _RSET, // Speichern Objekt TOS ==> TOS-1 - _REDIMP_ERASE, // Copies array to be later used by REDIM PRESERVE before erasing it + _REDIMP_ERASE, // Copies array to be later used by REDIM PRESERVE before erasing it _INITFOREACH, _VBASET, // VBA-like Set _ERASE_CLEAR, // Erase array and clear variable @@ -124,45 +124,45 @@ enum SbiOpcode { // Verwaltung _SETCLASS, // Set + Klassennamen testen (+StringId) _TESTCLASS, // Check TOS class (+StringId) - _LIB, // Libnamen fuer Declare-Procs setzen (+StringId) - _BASED, // TOS wird um BASE erhoeht, BASE davor gepusht (+base) + _LIB, // Libnamen fuer Declare-Procs setzen (+StringId) + _BASED, // TOS wird um BASE erhoeht, BASE davor gepusht (+base) // Typanpassung im Argv - _ARGTYP, // Letzten Parameter in Argv konvertieren (+Typ) + _ARGTYP, // Letzten Parameter in Argv konvertieren (+Typ) _VBASETCLASS, // VBA-like Set SbOP1_END, // Alle Opcodes mit zwei Operanden - _RTL = 0x80, // Laden aus RTL (+StringID+Typ) + _RTL = 0x80, // Laden aus RTL (+StringID+Typ) SbOP2_START = _RTL, - _FIND, // Laden (+StringID+Typ) - _ELEM, // Laden Element (+StringID+Typ) - _PARAM, // Parameter (+Offset+Typ) + _FIND, // Laden (+StringID+Typ) + _ELEM, // Laden Element (+StringID+Typ) + _PARAM, // Parameter (+Offset+Typ) // Verzweigen - _CALL, // DECLARE-Methode rufen (+StringID+Typ) - _CALLC, // Cdecl-DECLARE-Methode rufen (+StringID+Typ) + _CALL, // DECLARE-Methode rufen (+StringID+Typ) + _CALLC, // Cdecl-DECLARE-Methode rufen (+StringID+Typ) _CASEIS, // Case-Test (+Test-Opcode+True-Target) // Verwaltung _STMNT, // Beginn eines Statements (+Line+Col) // E/A _OPEN, // (+SvStreamFlags+Flags) // Objekte - _LOCAL, // Lokale Variable definieren (+StringID+Typ) - _PUBLIC, // Modulglobale Variable (+StringID+Typ) - _GLOBAL, // Globale Variable definieren, public-Anweisung (+StringID+Typ) - _CREATE, // Objekt kreieren (+StringId+StringID) - _STATIC, // Statische Variabl (+StringID+Typ) JSM - _TCREATE, // User Defined Objekt kreieren - _DCREATE, // Objekt-Array kreieren (+StringId+StringID) - _GLOBAL_P, // Globale Variable definieren, die beim Neustart von Basic + _LOCAL, // Lokale Variable definieren (+StringID+Typ) + _PUBLIC, // Modulglobale Variable (+StringID+Typ) + _GLOBAL, // Globale Variable definieren, public-Anweisung (+StringID+Typ) + _CREATE, // Objekt kreieren (+StringId+StringID) + _STATIC, // Statische Variabl (+StringID+Typ) JSM + _TCREATE, // User Defined Objekt kreieren + _DCREATE, // Objekt-Array kreieren (+StringId+StringID) + _GLOBAL_P, // Globale Variable definieren, die beim Neustart von Basic // nicht ueberschrieben wird, P=PERSIST (+StringID+Typ) - _FIND_G, // Sucht globale Variable mit Spezialbehandlung wegen _GLOBAL_P - _DCREATE_REDIMP, // Objekt-Array redimensionieren (+StringId+StringID) - _FIND_CM, // Search inside a class module (CM) to enable global search in time - _PUBLIC_P, // Module global Variable (persisted between calls)(+StringID+Typ) - _FIND_STATIC, // local static var lookup (+StringID+Typ) + _FIND_G, // Sucht globale Variable mit Spezialbehandlung wegen _GLOBAL_P + _DCREATE_REDIMP, // Objekt-Array redimensionieren (+StringId+StringID) + _FIND_CM, // Search inside a class module (CM) to enable global search in time + _PUBLIC_P, // Module global Variable (persisted between calls)(+StringID+Typ) + _FIND_STATIC, // local static var lookup (+StringID+Typ) SbOP2_END diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx index 3db87e49817c..0fcd794dae0d 100644 --- a/basic/source/inc/parser.hxx +++ b/basic/source/inc/parser.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,108 +43,108 @@ class SbiParser : public SbiTokenizer { friend class SbiExpression; - SbiParseStack* pStack; // Block-Stack - 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 + SbiParseStack* pStack; // Block-Stack + 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 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 - void OpenBlock( SbiToken, SbiExprNode* = NULL ); // Block oeffnen - void CloseBlock(); // Block aufloesen - BOOL Channel( BOOL=FALSE ); // Kanalnummer parsen - void StmntBlock( SbiToken ); // Statement-Block abarbeiten - void DefType( BOOL bPrivate ); // Parse type declaration - void DefEnum( BOOL bPrivate ); // Parse enum declaration + void DefVar( SbiOpcode eOp, BOOL bStatic ); // DIM/REDIM einlesen + void TypeDecl( SbiSymDef&, BOOL bAsNewAlreadyParsed=FALSE ); // AS-Deklaration + void OpenBlock( SbiToken, SbiExprNode* = NULL ); // Block oeffnen + void CloseBlock(); // Block aufloesen + BOOL Channel( BOOL=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 EnableCompatibility(); + void EnableCompatibility(); public: - SbxArrayRef rTypeArray; // das Type-Array - SbxArrayRef rEnumArray; // Enum types - SbiStringPool aGblStrings; // der String-Pool - SbiStringPool aLclStrings; // der String-Pool - SbiSymPool aGlobals; // globale Variable - SbiSymPool aPublics; // modulglobale Variable - SbiSymPool aRtlSyms; // Runtime-Library - SbiCodeGen aGen; // Code-Generator - StarBASIC* pBasic; // StarBASIC-Instanz - 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 - StringVector aIfaceVector; // Holds all interfaces implemented by a class module + SbxArrayRef rTypeArray; // das Type-Array + SbxArrayRef rEnumArray; // Enum types + SbiStringPool aGblStrings; // der String-Pool + SbiStringPool aLclStrings; // der String-Pool + SbiSymPool aGlobals; // globale Variable + SbiSymPool aPublics; // modulglobale Variable + SbiSymPool aRtlSyms; // Runtime-Library + SbiCodeGen aGen; // Code-Generator + StarBASIC* pBasic; // StarBASIC-Instanz + 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 + 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 + SbxDataType eDefTypes[26]; // DEFxxx-Datentypen SbiParser( StarBASIC*, SbModule* ); - BOOL Parse(); // die Aktion - SbiExprNode* GetWithVar(); // Innerste With-Variable liefern + 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? + BOOL HasGlobalCode(); // Globaler Code definiert? - BOOL TestToken( SbiToken ); // bestimmtes TOken? - BOOL TestSymbol( BOOL=FALSE ); // Symbol? - BOOL TestComma(); // Komma oder EOLN? - void TestEoln(); // EOLN? + BOOL TestToken( SbiToken ); // bestimmtes TOken? + BOOL TestSymbol( BOOL=FALSE ); // Symbol? + BOOL TestComma(); // Komma oder EOLN? + void TestEoln(); // EOLN? - void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // Let oder Call - void ErrorStmnt(); // ERROR n - void NotImp(); // nicht implementiert - void BadBlock(); // LOOP/WEND/NEXT - void BadSyntax(); // Falsches SbiToken - void NoIf(); // ELSE/ELSE IF ohne IF - void Assign(); // LET + void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // Let oder Call + void ErrorStmnt(); // ERROR n + void NotImp(); // nicht implementiert + void BadBlock(); // LOOP/WEND/NEXT + void BadSyntax(); // Falsches SbiToken + void NoIf(); // ELSE/ELSE IF ohne IF + void Assign(); // LET void Attribute(); // Attribute - void Call(); // CALL - void Close(); // CLOSE - void Declare(); // DECLARE - void DefXXX(); // DEFxxx - void Dim(); // DIM - void ReDim(); // ReDim(); - void Erase(); // ERASE - void Exit(); // EXIT - void For(); // FOR...NEXT - void Goto(); // GOTO / GOSUB - void If(); // IF - void Implements(); // IMPLEMENTS - void Input(); // INPUT, INPUT # - void Line(); // LINE -> LINE INPUT [#] (#i92642) - void LineInput(); // LINE INPUT, LINE INPUT # - void LSet(); // LSET - void Name(); // NAME .. AS .. - void On(); // ON ERROR/variable - void OnGoto(); // ON...GOTO / GOSUB - void Open(); // OPEN - void Option(); // OPTION - void Print(); // PRINT, PRINT # - void SubFunc(); // SUB / FUNCTION - void Resume(); // RESUME - void Return(); // RETURN - void RSet(); // RSET - void DoLoop(); // DO...LOOP - void Select(); // SELECT ... CASE - void Set(); // SET - void Static(); // STATIC - void Stop(); // STOP/SYSTEM - void Type(); // TYPE...AS...END TYPE - void Enum(); // TYPE...END ENUM - void While(); // WHILE/WEND - void With(); // WITH - void Write(); // WRITE + void Call(); // CALL + void Close(); // CLOSE + void Declare(); // DECLARE + void DefXXX(); // DEFxxx + void Dim(); // DIM + void ReDim(); // ReDim(); + void Erase(); // ERASE + void Exit(); // EXIT + void For(); // FOR...NEXT + void Goto(); // GOTO / GOSUB + void If(); // IF + void Implements(); // IMPLEMENTS + void Input(); // INPUT, INPUT # + void Line(); // LINE -> LINE INPUT [#] (#i92642) + void LineInput(); // LINE INPUT, LINE INPUT # + void LSet(); // LSET + void Name(); // NAME .. AS .. + void On(); // ON ERROR/variable + void OnGoto(); // ON...GOTO / GOSUB + void Open(); // OPEN + void Option(); // OPTION + void Print(); // PRINT, PRINT # + void SubFunc(); // SUB / FUNCTION + void Resume(); // RESUME + void Return(); // RETURN + void RSet(); // RSET + void DoLoop(); // DO...LOOP + void Select(); // SELECT ... CASE + void Set(); // SET + void Static(); // STATIC + void Stop(); // STOP/SYSTEM + void Type(); // TYPE...AS...END TYPE + void Enum(); // TYPE...END ENUM + void While(); // WHILE/WEND + void With(); // WITH + void Write(); // WRITE }; diff --git a/basic/source/inc/propacc.hxx b/basic/source/inc/propacc.hxx index 1381d082dcdd..7f88e28f99ce 100644 --- a/basic/source/inc/propacc.hxx +++ b/basic/source/inc/propacc.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,35 +37,35 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase2.hxx> -#define NS_BEANS ::com::sun::star::beans -#define NS_LANG ::com::sun::star::lang -#define NS_UNO ::com::sun::star::uno +#define NS_BEANS ::com::sun::star::beans +#define NS_LANG ::com::sun::star::lang +#define NS_UNO ::com::sun::star::uno typedef NS_BEANS::PropertyValue* SbPropertyValuePtr; SV_DECL_PTRARR( SbPropertyValueArr_Impl, SbPropertyValuePtr, 4, 4 ) -typedef ::cppu::WeakImplHelper2< NS_BEANS::XPropertySet, +typedef ::cppu::WeakImplHelper2< NS_BEANS::XPropertySet, NS_BEANS::XPropertyAccess > SbPropertyValuesHelper; //========================================================================== -class SbPropertyValues: public SbPropertyValuesHelper +class SbPropertyValues: public SbPropertyValuesHelper { - SbPropertyValueArr_Impl _aPropVals; + SbPropertyValueArr_Impl _aPropVals; NS_UNO::Reference< ::com::sun::star::beans::XPropertySetInfo > _xInfo; private: - INT32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const; + INT32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const; public: SbPropertyValues(); - virtual ~SbPropertyValues(); + virtual ~SbPropertyValues(); // XPropertySet - virtual NS_UNO::Reference< NS_BEANS::XPropertySetInfo > SAL_CALL + virtual NS_UNO::Reference< NS_BEANS::XPropertySetInfo > SAL_CALL getPropertySetInfo(void) throw( NS_UNO::RuntimeException ); - virtual void SAL_CALL setPropertyValue( + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const NS_UNO::Any& aValue) throw (::com::sun::star::beans::UnknownPropertyException, @@ -73,23 +73,23 @@ public: ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual NS_UNO::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) - throw( NS_BEANS::UnknownPropertyException, - NS_LANG::WrappedTargetException, + virtual NS_UNO::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) + throw( NS_BEANS::UnknownPropertyException, + NS_LANG::WrappedTargetException, NS_UNO::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const NS_UNO::Reference< NS_BEANS::XPropertyChangeListener >& ) throw (); - virtual void SAL_CALL removePropertyChangeListener( + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const NS_UNO::Reference< NS_BEANS::XPropertyChangeListener >& ) throw (); - virtual void SAL_CALL addVetoableChangeListener( + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& aPropertyName, const NS_UNO::Reference< NS_BEANS::XVetoableChangeListener >& ) throw (); - virtual void SAL_CALL removeVetoableChangeListener( + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& aPropertyName, const NS_UNO::Reference< NS_BEANS::XVetoableChangeListener >& ) throw (); @@ -125,14 +125,14 @@ public: throw ( NS_UNO::RuntimeException ); }; -class SbPropertySetInfo: public SbPropertySetInfoHelper +class SbPropertySetInfo: public SbPropertySetInfoHelper { PropertySetInfoImpl aImpl; public: SbPropertySetInfo(); SbPropertySetInfo( const SbPropertyValueArr_Impl &rPropVals ); - virtual ~SbPropertySetInfo(); + virtual ~SbPropertySetInfo(); // XPropertySetInfo virtual NS_UNO::Sequence< NS_BEANS::Property > SAL_CALL getProperties(void) @@ -153,11 +153,11 @@ class SbPropertyContainer: public SbPropertyContainerHelper public: SbPropertyContainer(); - virtual ~SbPropertyContainer(); + virtual ~SbPropertyContainer(); // XPropertyContainer - virtual void SAL_CALL addProperty( const ::rtl::OUString& Name, - INT16 Attributes, + virtual void SAL_CALL addProperty( const ::rtl::OUString& Name, + INT16 Attributes, const NS_UNO::Any& DefaultValue) throw( NS_BEANS::PropertyExistException, NS_BEANS::IllegalTypeException, NS_LANG::IllegalArgumentException, NS_UNO::RuntimeException ); diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index b6b0814d1e33..24af07f9c3a8 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,16 +76,16 @@ public: #endif /* _USE_UNO */ -class SbiInstance; // aktiver StarBASIC-Prozess -class SbiRuntime; // aktive StarBASIC-Prozedur-Instanz +class SbiInstance; // aktiver StarBASIC-Prozess +class SbiRuntime; // aktive StarBASIC-Prozedur-Instanz struct SbiArgvStack; // Argv stack element struct SbiGosubStack; // GOSUB stack element class SbiImage; // Code-Image class SbiIoSystem; // Dateisystem -class SbiDdeControl; // DDE-Steuerung -class SbiDllMgr; // Aufrufe in DLLs -class SvNumberFormatter; // Zeit/Datumsfunktionen +class SbiDdeControl; // DDE-Steuerung +class SbiDllMgr; // Aufrufe in DLLs +class SvNumberFormatter; // Zeit/Datumsfunktionen enum ForType { @@ -95,18 +95,18 @@ enum ForType FOR_EACH_XENUMERATION }; -struct SbiForStack { // for/next stack: - SbiForStack* pNext; // Chain - SbxVariableRef refVar; // loop variable - SbxVariableRef refEnd; // end expression / for each: Array/BasicCollection object - SbxVariableRef refInc; // increment expression +struct SbiForStack { // for/next stack: + SbiForStack* pNext; // Chain + SbxVariableRef refVar; // loop variable + SbxVariableRef refEnd; // end expression / for each: Array/BasicCollection object + SbxVariableRef refInc; // increment expression // For each support - ForType eForType; - INT32 nCurCollectionIndex; - INT32* pArrayCurIndices; - INT32* pArrayLowerBounds; - INT32* pArrayUpperBounds; + ForType eForType; + INT32 nCurCollectionIndex; + INT32* pArrayCurIndices; + INT32* pArrayLowerBounds; + INT32* pArrayUpperBounds; Reference< XEnumeration > xEnumeration; SbiForStack( void ) @@ -122,20 +122,20 @@ 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 +struct SbiGosubStack { // GOSUB-Stack: + SbiGosubStack* pNext; // Chain + const BYTE* pCode; // Return-Pointer + USHORT nStartForLvl; // #118235: For Level in moment of gosub }; #define MAXRECURSION 500 // max. 500 Rekursionen -#define Sb_ATTR_NORMAL 0x0000 -#define Sb_ATTR_HIDDEN 0x0002 -#define Sb_ATTR_SYSTEM 0x0004 -#define Sb_ATTR_VOLUME 0x0008 -#define Sb_ATTR_DIRECTORY 0x0010 -#define Sb_ATTR_ARCHIVE 0x0020 +#define Sb_ATTR_NORMAL 0x0000 +#define Sb_ATTR_HIDDEN 0x0002 +#define Sb_ATTR_SYSTEM 0x0004 +#define Sb_ATTR_VOLUME 0x0008 +#define Sb_ATTR_DIRECTORY 0x0010 +#define Sb_ATTR_ARCHIVE 0x0020 class Dir; @@ -146,12 +146,12 @@ class SbiRTLData public: #ifdef _OLD_FILE_IMPL - Dir* pDir; + Dir* pDir; #else ::osl::Directory* pDir; #endif - INT16 nDirFlags; - short nCurDirPos; + INT16 nDirFlags; + short nCurDirPos; String sFullNameToBeChecked; WildCard* pWildCard; @@ -179,53 +179,53 @@ class SbiInstance { friend class SbiRuntime; - SbiRTLData aRTLData; + SbiRTLData aRTLData; - SbiIoSystem* pIosys; // Dateisystem - SbiDdeControl* pDdeCtrl; // DDE - SbiDllMgr* pDllMgr; // DLL-Calls (DECLARE) - StarBASIC* pBasic; + SbiIoSystem* pIosys; // Dateisystem + SbiDdeControl* pDdeCtrl; // DDE + SbiDllMgr* pDllMgr; // DLL-Calls (DECLARE) + StarBASIC* pBasic; SvNumberFormatter* pNumberFormatter; LanguageType meFormatterLangType; DateFormat meFormatterDateFormat; - sal_uInt32 nStdDateIdx, nStdTimeIdx, nStdDateTimeIdx; + sal_uInt32 nStdDateIdx, nStdTimeIdx, nStdDateTimeIdx; - 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 + 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 ComponentVector_t ComponentVector; public: - SbiRuntime* pRun; // Call-Stack + SbiRuntime* pRun; // Call-Stack SbiInstance* pNext; // Instanzen-Chain // #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 + USHORT nCallLvl; // Call-Level (wg. Rekursion) + USHORT nBreakCallLvl; // Call-Level zum Anhalten + void CalcBreakCallLevel( USHORT nFlags ); // Gemaess Flags setzen SbiInstance( StarBASIC* ); ~SbiInstance(); - void Error( SbError ); // trappable Error - void Error( SbError, const String& rMsg ); // trappable Error mit Message + void Error( SbError ); // trappable Error + void Error( SbError, const String& rMsg ); // trappable Error mit Message void ErrorVB( sal_Int32 nVBNumber, const String& rMsg ); void setErrorVB( sal_Int32 nVBNumber, const String& rMsg ); - void FatalError( SbError ); // non-trappable Error + void FatalError( SbError ); // non-trappable Error void FatalError( SbError, const String& ); // non-trappable Error - void Abort(); // Abbruch mit aktuellem Fehlercode + void Abort(); // Abbruch mit aktuellem Fehlercode void Stop(); - 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; } + 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; } ComponentVector_t& getComponentVector( void ) { return ComponentVector; } @@ -250,7 +250,7 @@ public: LanguageType* peFormatterLangType=NULL, DateFormat* peFormatterDateFormat=NULL ); }; -SbiIoSystem* SbGetIoSystem(); // das aktuelle I/O-System +SbiIoSystem* SbGetIoSystem(); // das aktuelle I/O-System // Verkettbare Items, um Referenzen temporaer zu halten @@ -276,31 +276,31 @@ class SbiRuntime static pStep1 aStep1[]; // Opcode-Tabelle Gruppe 1 static pStep2 aStep2[]; // Opcode-Tabelle Gruppe 2 - StarBASIC& rBasic; // StarBASIC-Instanz - SbiInstance* pInst; // aktiver Thread - SbModule* pMod; // aktuelles Modul - SbMethod* pMeth; // Methoden-Instanz - SbiIoSystem* pIosys; // I/O-System + StarBASIC& rBasic; // StarBASIC-Instanz + SbiInstance* pInst; // aktiver Thread + SbModule* pMod; // aktuelles Modul + SbMethod* pMeth; // Methoden-Instanz + SbiIoSystem* pIosys; // I/O-System const SbiImage* pImg; // Code-Image SbxArrayRef refExprStk; // expression stack SbxArrayRef refCaseStk; // CASE expression stack SbxArrayRef refRedimpArray; // Array saved to use for REDIM PRESERVE SbxVariableRef refRedim; // Array saved to use for REDIM - SbxVariableRef xDummyVar; // Ersatz fuer nicht gefundene Variablen - SbxVariable* mpExtCaller; // Caller ( external - e.g. button name, shape, range object etc. - only in vba mode ) - SbiArgvStack* pArgvStk; // ARGV-Stack - SbiGosubStack* pGosubStk; // GOSUB stack - SbiForStack* pForStk; // FOR/NEXT-Stack - USHORT nExprLvl; // Tiefe des Expr-Stacks + SbxVariableRef xDummyVar; // Ersatz fuer nicht gefundene Variablen + SbxVariable* mpExtCaller; // Caller ( external - e.g. button name, shape, range object etc. - only in vba mode ) + 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 + 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 - String aLibName; // Lib-Name fuer Declare-Call + String aLibName; // Lib-Name fuer Declare-Call SbxArrayRef refParams; // aktuelle Prozedur-Parameter SbxArrayRef refLocals; // lokale Variable SbxArrayRef refArgv; // aktueller Argv @@ -312,9 +312,9 @@ class SbiRuntime BOOL bInError; // TRUE: in einem Fehler-Handler BOOL bBlocked; // TRUE: blocked by next call level, #i48868 BOOL bVBAEnabled; - USHORT nFlags; // Debugging-Flags - SbError nError; // letzter Fehler - USHORT nOps; // Opcode-Zaehler + USHORT nFlags; // Debugging-Flags + SbError nError; // letzter Fehler + USHORT nOps; // Opcode-Zaehler sal_uInt32 m_nLastTime; RefSaveItem* pRefSaveList; // #74254 Temporaere Referenzen sichern @@ -350,7 +350,7 @@ class SbiRuntime void PushVar( SbxVariable* ); // Variable push SbxVariableRef PopVar(); // Variable pop SbxVariable* GetTOS( short=0 ); // Variable vom TOS holen - void TOSMakeTemp(); // TOS in temp. Variable wandeln + void TOSMakeTemp(); // TOS in temp. Variable wandeln BOOL ClearExprStack(); // Expr-Stack freigeben void PushGosub( const BYTE* ); // GOSUB-Element push @@ -392,39 +392,39 @@ class SbiRuntime void StepOR(), StepXOR(), StepEQV(), StepIMP(); void StepNOT(), StepCAT(), StepLIKE(), StepIS(); void StepCLONE(), StepOLDBASED(), StepARGC(); - void StepARGV(), StepINPUT(), StepLINPUT(), StepSTOP(); - void StepGET(), StepSET(), StepVBASET(), StepPUT(), StepPUTC(); + void StepARGV(), StepINPUT(), StepLINPUT(), StepSTOP(); + void StepGET(), StepSET(), StepVBASET(), StepPUT(), StepPUTC(); void StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bDefaultHandling = false ); - void StepDIM(), StepREDIM(), StepREDIMP(), StepERASE(); - void StepINITFOR(), StepNEXT(), StepERROR(), StepINITFOREACH(); - void StepCASE(), StepENDCASE(), StepSTDERROR(); - void StepNOERROR(), StepCHANNEL(), StepCHANNEL0(), StepPRINT(); - void StepPRINTF(), StepWRITE(), StepRENAME(), StepPROMPT(); + void StepDIM(), StepREDIM(), StepREDIMP(), StepERASE(); + void StepINITFOR(), StepNEXT(), StepERROR(), StepINITFOREACH(); + void StepCASE(), StepENDCASE(), StepSTDERROR(); + void StepNOERROR(), StepCHANNEL(), StepCHANNEL0(), StepPRINT(); + void StepPRINTF(), StepWRITE(), StepRENAME(), StepPROMPT(); void StepRESTART(), StepEMPTY(), StepLEAVE(); - void StepLSET(), StepRSET(), StepREDIMP_ERASE(), StepERASE_CLEAR(); + 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 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 StepRESUME( UINT32 ), StepSETCLASS( UINT32 ), StepVBASETCLASS( UINT32 ), StepTESTCLASS( UINT32 ), StepLIB( UINT32 ); bool checkClass_Impl( const SbxVariableRef& refVal, const String& aClass, bool bRaiseErrors, bool bDefault = true ); void StepCLOSE( UINT32 ), StepPRCHAR( UINT32 ), StepARGTYP( UINT32 ); // Alle Opcodes mit zwei Operanden - void StepRTL( UINT32, UINT32 ), StepPUBLIC( UINT32, UINT32 ), StepPUBLIC_P( UINT32, UINT32 ); + 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 StepPARAM( UINT32, UINT32), StepCREATE( UINT32, UINT32 ); void StepCALL( UINT32, UINT32 ), StepCALLC( UINT32, UINT32 ); void StepCASEIS( UINT32, UINT32 ), StepSTMNT( UINT32, UINT32 ); SbxVariable* StepSTATIC_Impl( String& aName, SbxDataType& t ); - void StepOPEN( UINT32, UINT32 ), StepSTATIC( UINT32, UINT32 ); - void StepTCREATE(UINT32,UINT32), StepDCREATE(UINT32,UINT32); + 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 ); @@ -432,23 +432,23 @@ class SbiRuntime void implCreateFixedString( SbxVariable* pStrVar, UINT32 nOp2 ); public: void SetVBAEnabled( bool bEnabled ); - USHORT GetImageFlag( USHORT n ) const; - USHORT GetBase(); - xub_StrLen nLine,nCol1,nCol2; // aktuelle Zeile, Spaltenbereich + USHORT GetImageFlag( USHORT n ) const; + USHORT GetBase(); + xub_StrLen nLine,nCol1,nCol2; // aktuelle Zeile, Spaltenbereich SbiRuntime* pNext; // Stack-Chain SbiRuntime( SbModule*, SbMethod*, UINT32 ); ~SbiRuntime(); - void Error( SbError, bool bVBATranslationAlreadyDone = false ); // Fehler setzen, falls != 0 + void Error( SbError, bool bVBATranslationAlreadyDone = false ); // Fehler setzen, falls != 0 void Error( SbError, const String& ); // Fehler setzen, falls != 0 - void FatalError( SbError ); // Fehlerbehandlung=Standard, Fehler setzen + void FatalError( SbError ); // Fehlerbehandlung=Standard, Fehler setzen 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; } + void Stop() { bRun = FALSE; } BOOL IsRun() { return bRun; } - void block( void ) { bBlocked = TRUE; } + void block( void ) { bBlocked = TRUE; } void unblock( void ) { bBlocked = FALSE; } SbMethod* GetMethod() { return pMeth; } SbModule* GetModule() { return pMod; } diff --git a/basic/source/inc/sbcomp.hxx b/basic/source/inc/sbcomp.hxx index 2918e67880f0..f1cb29a4bc03 100644 --- a/basic/source/inc/sbcomp.hxx +++ b/basic/source/inc/sbcomp.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,10 +31,10 @@ // das folgende habe ich der neuen Datei von MD entnommen! (MT) #include "sbintern.hxx" -#include "token.hxx" // Tokenizer -#include "symtbl.hxx" // Symbolverwaltung -#include "parser.hxx" // Parser -#include "codegen.hxx" // Code-Generator +#include "token.hxx" // Tokenizer +#include "symtbl.hxx" // Symbolverwaltung +#include "parser.hxx" // Parser +#include "codegen.hxx" // Code-Generator #endif diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx index 7003b5a0a1bb..6c00a999c1c0 100644 --- a/basic/source/inc/sbintern.hxx +++ b/basic/source/inc/sbintern.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ #include "sb.hxx" namespace utl -{ +{ class TransliterationWrapper; } class SbUnoFactory; @@ -55,11 +55,11 @@ typedef ::std::vector< String > StringVector; struct SbClassData { - SbxArrayRef mxIfaces; + SbxArrayRef mxIfaces; // types this module depends on because of use in Dim As New <type> // needed for initialization order of class modules - StringVector maRequiredTypes; + StringVector maRequiredTypes; SbClassData( void ); ~SbClassData( void ) @@ -71,7 +71,7 @@ struct SbClassData // Implementation: sb.cxx class SbClassFactory : public SbxFactory { - SbxObjectRef xClassModules; + SbxObjectRef xClassModules; public: SbClassFactory( void ); @@ -103,31 +103,31 @@ SV_DECL_PTRARR_DEL(SbErrorStack, SbErrorStackEntry*, 1, 1) struct SbiGlobals { - SbiInstance* pInst; // alle aktiven Runtime-Instanzen - SbiFactory* pSbFac; // StarBASIC-Factory - SbUnoFactory* pUnoFac; // Factory fuer Uno-Structs bei DIM AS NEW - SbTypeFactory* pTypeFac; // Factory for user defined types - SbClassFactory* pClassFac; // Factory for user defined classes (based on class modules) - SbOLEFactory* pOLEFac; // Factory for OLE types - SbFormFactory* pFormFac; // Factory for user forms - SbModule* pMod; // aktuell aktives Modul - SbModule* pCompMod; // aktuell compiliertes Modul - short nInst; // Anzahl BASICs - Link aErrHdl; // globaler Error-Handler - Link aBreakHdl; // globaler Break-Handler - 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 - String aErrMsg; // Puffer fuer GetErrorText() - SbLanguageMode eLanguageMode; // Flag fuer Visual-Basic-Script-Modus - SbErrorStack* pErrStack; // Stack fuer die im Fehlerfall abgebaute SbiRuntime Kette + SbiInstance* pInst; // alle aktiven Runtime-Instanzen + SbiFactory* pSbFac; // StarBASIC-Factory + SbUnoFactory* pUnoFac; // Factory fuer Uno-Structs bei DIM AS NEW + SbTypeFactory* pTypeFac; // Factory for user defined types + SbClassFactory* pClassFac; // Factory for user defined classes (based on class modules) + SbOLEFactory* pOLEFac; // Factory for OLE types + SbFormFactory* pFormFac; // Factory for user forms + SbModule* pMod; // aktuell aktives Modul + SbModule* pCompMod; // aktuell compiliertes Modul + short nInst; // Anzahl BASICs + Link aErrHdl; // globaler Error-Handler + Link aBreakHdl; // globaler Break-Handler + 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 + 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; + BOOL bBlockCompilerError; BasicManager* pAppBasMgr; - StarBASIC* pMSOMacroRuntimLib; // Lib containing MSO Macro Runtime API entry symbols + StarBASIC* pMSOMacroRuntimLib; // Lib containing MSO Macro Runtime API entry symbols SbiGlobals(); ~SbiGlobals(); @@ -137,15 +137,15 @@ struct SbiGlobals SbiGlobals* GetSbData(); -#define pINST GetSbData()->pInst -#define pMOD GetSbData()->pMod -#define pCMOD GetSbData()->pCompMod -#define pSBFAC GetSbData()->pSbFac -#define pUNOFAC GetSbData()->pUnoFac -#define pTYPEFAC GetSbData()->pTypeFac -#define pCLASSFAC GetSbData()->pClassFac -#define pOLEFAC GetSbData()->pOLEFac -#define pFORMFAC GetSbData()->pFormFac +#define pINST GetSbData()->pInst +#define pMOD GetSbData()->pMod +#define pCMOD GetSbData()->pCompMod +#define pSBFAC GetSbData()->pSbFac +#define pUNOFAC GetSbData()->pUnoFac +#define pTYPEFAC GetSbData()->pTypeFac +#define pCLASSFAC GetSbData()->pClassFac +#define pOLEFAC GetSbData()->pOLEFac +#define pFORMFAC GetSbData()->pFormFac #endif diff --git a/basic/source/inc/sbjsmeth.hxx b/basic/source/inc/sbjsmeth.hxx index f2cc8a3d3865..fe85699998dc 100644 --- a/basic/source/inc/sbjsmeth.hxx +++ b/basic/source/inc/sbjsmeth.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/basic/source/inc/sbjsmod.hxx b/basic/source/inc/sbjsmod.hxx index b3aa275aec0d..b7a754b3147d 100644 --- a/basic/source/inc/sbjsmod.hxx +++ b/basic/source/inc/sbjsmod.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ class SbJScriptModule : public SbModule public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_JSCRIPTMOD,1); TYPEINFO(); - SbJScriptModule( const String& ); // DURCHREICHEN + SbJScriptModule( const String& ); // DURCHREICHEN }; #endif diff --git a/basic/source/inc/sbtrace.hxx b/basic/source/inc/sbtrace.hxx index daa10d7f9b57..50625c10de88 100644 --- a/basic/source/inc/sbtrace.hxx +++ b/basic/source/inc/sbtrace.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 011ffb9a7e02..54e2106842e2 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -53,7 +53,7 @@ class SbUnoObject: public SbxObject ::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactNameInvocation; BOOL bNeedIntrospection; BOOL bIgnoreNativeCOMObjectMembers; - ::com::sun::star::uno::Any maTmpUnoObj; // Only to save obj for doIntrospection! + ::com::sun::star::uno::Any maTmpUnoObj; // Only to save obj for doIntrospection! // Hilfs-Methode zum Anlegen der dbg_-Properties void implCreateDbgProperties( void ); @@ -80,8 +80,8 @@ public: // Wert rausgeben ::com::sun::star::uno::Any getUnoAny( void ); - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XIntrospectionAccess > getIntrospectionAccess( void ) { return mxUnoAccess; } - ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > getInvocation( void ) { return mxInvocation; } + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XIntrospectionAccess > getIntrospectionAccess( void ) { return mxUnoAccess; } + ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > getInvocation( void ) { return mxInvocation; } void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); }; @@ -103,7 +103,7 @@ class SbUnoMethod : public SbxMethod SbUnoMethod* pPrev; SbUnoMethod* pNext; - bool mbInvocation; // Method is based on invocation + bool mbInvocation; // Method is based on invocation public: TYPEINFO(); @@ -128,7 +128,7 @@ class SbUnoProperty : public SbxProperty ::com::sun::star::beans::Property aUnoProp; INT32 nId; - bool mbInvocation; // Property is based on invocation + bool mbInvocation; // Property is based on invocation virtual ~SbUnoProperty(); public: @@ -151,7 +151,7 @@ public: // Wrapper fuer eine Uno-Klasse class SbUnoClass : public SbxObject { - const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > m_xClass; + const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > m_xClass; public: TYPEINFO(); @@ -183,8 +183,8 @@ SbUnoClass* findUnoClass( const String& rName ); // Wrapper for UNO Service class SbUnoService : public SbxObject { - const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XServiceTypeDescription2 > m_xServiceTypeDesc; - bool m_bNeedsInit; + const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XServiceTypeDescription2 > m_xServiceTypeDesc; + bool m_bNeedsInit; public: TYPEINFO(); @@ -231,7 +231,7 @@ public: // Wrapper for UNO Singleton class SbUnoSingleton : public SbxObject { - const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XSingletonTypeDescription > m_xSingletonTypeDesc; + const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XSingletonTypeDescription > m_xSingletonTypeDesc; public: TYPEINFO(); @@ -268,7 +268,7 @@ public: class AutomationNamedArgsSbxArray : public SbxArray { - ::com::sun::star::uno::Sequence< ::rtl::OUString > maNameSeq; + ::com::sun::star::uno::Sequence< ::rtl::OUString > maNameSeq; public: TYPEINFO(); AutomationNamedArgsSbxArray( sal_Int32 nSeqSize ) diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index 5a6a29c1a9c7..aa9aa8208667 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,69 +42,69 @@ class StarBASIC; class SbiScanner { - ::rtl::OUString aBuf; // Input-Puffer - ::rtl::OUString aLine; // aktuelle Zeile - const sal_Unicode* pLine; // Pointer - const sal_Unicode* pSaveLine; // Merker fuer Line + ::rtl::OUString aBuf; // Input-Puffer + ::rtl::OUString aLine; // aktuelle Zeile + const sal_Unicode* pLine; // Pointer + const sal_Unicode* pSaveLine; // Merker fuer Line protected: - String aSym; // Symbolpuffer - String aError; // Fehler-String - SbxDataType eScanType; // evtl. Datentyp - StarBASIC* pBasic; // Instanz fuer Fehler-Callbacks - double nVal; // numerischer Wert - short nCurCol1; // aktuelle Spalte 1 - short nSavedCol1; // gerettete Spalte 1 - 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 "... _" + String aSym; // Symbolpuffer + String aError; // Fehler-String + SbxDataType eScanType; // evtl. Datentyp + StarBASIC* pBasic; // Instanz fuer Fehler-Callbacks + double nVal; // numerischer Wert + short nCurCol1; // aktuelle Spalte 1 + short nSavedCol1; // gerettete Spalte 1 + 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 "... _" void GenError( SbError ); public: SbiScanner( const ::rtl::OUString&, StarBASIC* = NULL ); ~SbiScanner(); - void EnableErrors() { bError = FALSE; } - BOOL IsHash() { return bHash; } - BOOL IsCompatible() { return bCompatible; } - void SetCompatible( bool b ) { bCompatible = b; } // #118206 - BOOL IsVBASupportOn() { return bVBASupportOn; } - void SetVBASupportOn( bool b ) { bVBASupportOn = b; } - BOOL WhiteSpace() { return bSpaces; } - short GetErrors() { return nErrors; } - short GetLine() { return nLine; } - short GetCol1() { return nCol1; } - short GetCol2() { return nCol2; } - void SetCol1( short n ) { nCol1 = n; } - StarBASIC* GetBasic() { return pBasic; } - void SaveLine(void) { pSaveLine = pLine; } - void RestoreLine(void) { pLine = pSaveLine; } + void EnableErrors() { bError = FALSE; } + BOOL IsHash() { return bHash; } + BOOL IsCompatible() { return bCompatible; } + void SetCompatible( bool b ) { bCompatible = b; } // #118206 + BOOL IsVBASupportOn() { return bVBASupportOn; } + void SetVBASupportOn( bool b ) { bVBASupportOn = b; } + BOOL WhiteSpace() { return bSpaces; } + short GetErrors() { return nErrors; } + short GetLine() { return nLine; } + short GetCol1() { return nCol1; } + short GetCol2() { return nCol2; } + void SetCol1( short n ) { nCol1 = n; } + StarBASIC* GetBasic() { return pBasic; } + void SaveLine(void) { pSaveLine = pLine; } + void RestoreLine(void) { pLine = pSaveLine; } void LockColumn(); void UnlockColumn(); BOOL DoesColonFollow(); - BOOL NextSym(); // naechstes Symbol lesen - const String& GetSym() { return aSym; } - SbxDataType GetType() { return eScanType; } - double GetDbl() { return nVal; } + BOOL NextSym(); // naechstes Symbol lesen + const String& GetSym() { return aSym; } + SbxDataType GetType() { return eScanType; } + double GetDbl() { return nVal; } }; class LetterTable { - bool IsLetterTab[256]; + bool IsLetterTab[256]; public: LetterTable( void ); @@ -124,7 +124,7 @@ class BasicSimpleCharClass public: static BOOL isAlpha( sal_Unicode c, bool bCompatible ) { - BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') + BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (bCompatible && aLetterTable.isLetter( c )); return bRet; } diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index 1b68e089c451..657c8c68604f 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,22 +48,22 @@ class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPas // Methods to distinguish between deffirent library types virtual SfxLibrary* SAL_CALL implCreateLibrary( const ::rtl::OUString& aName ); virtual SfxLibrary* SAL_CALL implCreateLibraryLink - ( const ::rtl::OUString& aName, const ::rtl::OUString& aLibInfoFileURL, + ( const ::rtl::OUString& aName, const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& StorageURL, sal_Bool ReadOnly ); virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void ); virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const; virtual void SAL_CALL writeLibraryElement - ( + ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, - const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutput + const ::rtl::OUString& aElementName, + const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutput ) throw(::com::sun::star::uno::Exception); virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement - ( + ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, + const ::rtl::OUString& aElementName, const ::rtl::OUString& aFile, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xElementStream ); @@ -73,18 +73,18 @@ class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPas // Password encryption - virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, + virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage>& xStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); // New variant for library export - virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, + virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, - const ::rtl::OUString& aTargetURL, + const ::rtl::OUString& aTargetURL, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); virtual sal_Bool implLoadPasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& Name, - sal_Bool bVerifyPasswordOnly=false ) - throw(::com::sun::star::lang::WrappedTargetException, + sal_Bool bVerifyPasswordOnly=false ) + throw(::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual void onNewRootStorage(); @@ -95,7 +95,7 @@ class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPas virtual String getLibraryPassword( const String& rLibraryName ); virtual void clearLibraryPassword( const String& rLibraryName ); virtual sal_Bool hasLibraryPassword( const String& rLibraryName ); - + virtual const sal_Char* SAL_CALL getInfoFileName() const; virtual const sal_Char* SAL_CALL getOldInfoFileName() const; virtual const sal_Char* SAL_CALL getLibElementFileExtension() const; @@ -107,21 +107,21 @@ public: // Methods XLibraryContainerPassword - virtual sal_Bool SAL_CALL isLibraryPasswordProtected( const ::rtl::OUString& Name ) - throw (::com::sun::star::container::NoSuchElementException, + virtual sal_Bool SAL_CALL isLibraryPasswordProtected( const ::rtl::OUString& Name ) + throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isLibraryPasswordVerified( const ::rtl::OUString& Name ) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::container::NoSuchElementException, + virtual sal_Bool SAL_CALL isLibraryPasswordVerified( const ::rtl::OUString& Name ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL verifyLibraryPassword( const ::rtl::OUString& Name, const ::rtl::OUString& Password ) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::container::NoSuchElementException, + virtual sal_Bool SAL_CALL verifyLibraryPassword( const ::rtl::OUString& Name, const ::rtl::OUString& Password ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL changeLibraryPassword( const ::rtl::OUString& Name, - const ::rtl::OUString& OldPassword, const ::rtl::OUString& NewPassword ) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::container::NoSuchElementException, + virtual void SAL_CALL changeLibraryPassword( const ::rtl::OUString& Name, + const ::rtl::OUString& OldPassword, const ::rtl::OUString& NewPassword ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); // XLibraryQueryExecutable virtual sal_Bool SAL_CALL HasExecutableCode(const rtl::OUString&) @@ -136,7 +136,7 @@ public: static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(); static ::rtl::OUString getImplementationName_static(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create - ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager ) + ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager ) throw( ::com::sun::star::uno::Exception ); }; diff --git a/basic/source/inc/stdobj.hxx b/basic/source/inc/stdobj.hxx index 9087b81e3028..3dd28c4e3540 100644 --- a/basic/source/inc/stdobj.hxx +++ b/basic/source/inc/stdobj.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx index b8457b3c811b..a36fcfafb591 100644 --- a/basic/source/inc/symtbl.hxx +++ b/basic/source/inc/symtbl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,11 +34,11 @@ #include <basic/sbxdef.hxx> #include <basic/sbdef.hxx> -class SbiSymDef; // Basisklasse -class SbiProcDef; // Prozedur -class SbiConstDef; // Konstante -class SbiSymPool; // Symbol-Pool -class SbiStringPool; // gepoolte Strings +class SbiSymDef; // Basisklasse +class SbiProcDef; // Prozedur +class SbiConstDef; // Konstante +class SbiSymPool; // Symbol-Pool +class SbiStringPool; // gepoolte Strings class SvStream; class SbiParser; @@ -52,10 +52,10 @@ enum SbiSymScope { SbLOCAL, SbPARAM, SbPUBLIC, SbGLOBAL, SbRTL }; SV_DECL_PTRARR_DEL(SbiStrings,String*,5,5) -class SbiStringPool { // String-Pool - SbiStrings aData; // Daten - String aEmpty; // for convenience - SbiParser* pParser; // der Parser +class SbiStringPool { // String-Pool + SbiStrings aData; // Daten + String aEmpty; // for convenience + SbiParser* pParser; // der Parser public: SbiStringPool( SbiParser* ); ~SbiStringPool(); @@ -72,69 +72,69 @@ public: SV_DECL_PTRARR_DEL(SbiSymbols,SbiSymDef*,5,5) -class SbiSymPool { // Symbol-Pool +class SbiSymPool { // Symbol-Pool friend class SbiSymDef; friend class SbiProcDef; protected: - SbiStringPool& rStrings; // verwendeter Stringpool - SbiSymbols aData; // Daten - SbiSymPool* pParent; // uebergeordneter Symbol-Pool - SbiParser* pParser; // der Parser - SbiSymScope eScope; // Scope des Pools - USHORT nProcId; // aktuelles ProcId fuer STATIC-Variable - USHORT nCur; // Iterator + SbiStringPool& rStrings; // verwendeter Stringpool + SbiSymbols aData; // Daten + SbiSymPool* pParent; // uebergeordneter Symbol-Pool + SbiParser* pParser; // der Parser + SbiSymScope eScope; // Scope des Pools + USHORT nProcId; // aktuelles ProcId fuer STATIC-Variable + USHORT nCur; // Iterator public: SbiSymPool( SbiStringPool&, SbiSymScope ); ~SbiSymPool(); void Clear(); - void SetParent( SbiSymPool* p ) { pParent = p; } - void SetProcId( short n ) { nProcId = n; } - USHORT GetSize() const { return aData.Count(); } - SbiSymScope GetScope() const { return eScope; } - void SetScope( SbiSymScope s ) { eScope = s; } - SbiParser* GetParser() { return pParser; } + void SetParent( SbiSymPool* p ) { pParent = p; } + void SetProcId( short n ) { nProcId = n; } + USHORT GetSize() const { return aData.Count(); } + SbiSymScope GetScope() const { return eScope; } + void SetScope( SbiSymScope s ) { eScope = s; } + SbiParser* GetParser() { return pParser; } - SbiSymDef* AddSym( const String& ); // Symbol hinzufuegen + SbiSymDef* AddSym( const String& ); // Symbol hinzufuegen SbiProcDef* AddProc( const String& );// Prozedur hinzufuegen - void Add( SbiSymDef* ); // Symbol uebernehmen + 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* First(), *Next(); // Iteratoren + SbiSymDef* FindId( USHORT ) const; // Variable per ID suchen + SbiSymDef* Get( USHORT ) const; // Variable per Position suchen + SbiSymDef* First(), *Next(); // Iteratoren - UINT32 Define( const String& ); // Label definieren + UINT32 Define( const String& ); // Label definieren UINT32 Reference( const String& ); // Label referenzieren - void CheckRefs(); // offene Referenzen suchen + void CheckRefs(); // offene Referenzen suchen }; /////////////////////////////////////////////////////////////////////////// -class SbiSymDef { // Allgemeiner Symboleintrag +class SbiSymDef { // Allgemeiner Symboleintrag friend class SbiSymPool; protected: - String aName; // Name des Eintrags - SbxDataType eType; // Typ des Eintrags - SbiSymPool* pIn; // Parent-Pool - 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 + String aName; // Name des Eintrags + SbxDataType eType; // Typ des Eintrags + SbiSymPool* pIn; // Parent-Pool + 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 short nFixedStringLength; // String length in: Dim foo As String*Length public: SbiSymDef( const String& ); @@ -142,85 +142,85 @@ public: virtual SbiProcDef* GetProcDef(); virtual SbiConstDef* GetConstDef(); - SbxDataType GetType() const { return eType; } + SbxDataType GetType() const { return eType; } 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; } - 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 ) + 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; } + 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 ) { 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( 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; } short GetFixedStringLength( void ) const { return nFixedStringLength; } - void SetFixedStringLength( short n ) { nFixedStringLength = n; } + void SetFixedStringLength( short n ) { nFixedStringLength = n; } SbiSymPool& GetPool(); - UINT32 Define(); // Symbol in Code definieren - UINT32 Reference(); // Symbol in Code referenzieren + UINT32 Define(); // Symbol in Code definieren + UINT32 Reference(); // Symbol in Code referenzieren private: SbiSymDef( const SbiSymDef& ); }; -class SbiProcDef : public SbiSymDef { // Prozedur-Definition (aus Basic): - SbiSymPool aParams; // Parameter - SbiSymPool aLabels; // lokale Sprungziele - String aLibName; // LIB "name" - String aAlias; // ALIAS "name" - USHORT 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 +class SbiProcDef : public SbiSymDef { // Prozedur-Definition (aus Basic): + SbiSymPool aParams; // Parameter + SbiSymPool aLabels; // lokale Sprungziele + String aLibName; // LIB "name" + String aAlias; // ALIAS "name" + USHORT 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 public: SbiProcDef( SbiParser*, const String&, BOOL bProcDecl=false ); virtual ~SbiProcDef(); virtual SbiProcDef* GetProcDef(); virtual void SetType( SbxDataType ); - SbiSymPool& GetParams() { return aParams; } - SbiSymPool& GetLabels() { return aLabels; } - 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; } - PropertyMode getPropertyMode() { return mePropMode; } + SbiSymPool& GetParams() { return aParams; } + SbiSymPool& GetLabels() { return aLabels; } + 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; } + PropertyMode getPropertyMode() { return mePropMode; } void setPropertyMode( PropertyMode ePropMode ); - const String& GetPropName() { return maPropName; } + const String& GetPropName() { return maPropName; } // Match mit einer Forward-Deklaration. Die Parameternamen // werden abgeglichen und die Forward-Deklaration wird @@ -242,8 +242,8 @@ public: virtual SbiConstDef* GetConstDef(); void Set( double, SbxDataType ); void Set( const String& ); - double GetValue() { return nVal; } - const String& GetString() { return aVal; } + double GetValue() { return nVal; } + const String& GetString() { return aVal; } }; diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx index 544eef119e01..333a20e10ee2 100644 --- a/basic/source/inc/token.hxx +++ b/basic/source/inc/token.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -65,7 +65,7 @@ enum SbiToken { _ERROR_, TBOOLEAN, TVARIANT, TBYTE, DATATYPE2 = TBYTE, - EACH, ELSE, ELSEIF, END, ERASE, EXIT, + EACH, ELSE, ELSEIF, END, ERASE, EXIT, FOR, FUNCTION, GET, GLOBAL, GOSUB, GOTO, IF, _IN_, INPUT, @@ -107,7 +107,7 @@ enum SbiToken { JS_ASS_DIV, JS_ASS_MOD, JS_ASS_LSHIFT, JS_ASS_RSHIFT, JS_ASS_RSHIFT_Z, JS_ASS_AND, JS_ASS_XOR, JS_ASS_OR, JS_COND_QUEST, JS_COND_SEL, JS_LOG_OR, JS_LOG_AND, JS_BIT_OR, - JS_BIT_XOR, JS_BIT_AND, JS_EQ, JS_NE, JS_LT, JS_LE, + JS_BIT_XOR, JS_BIT_AND, JS_EQ, JS_NE, JS_LT, JS_LE, JS_GT, JS_GE, JS_LSHIFT, JS_RSHIFT, JS_RSHIFT_Z, JS_PLUS, JS_MINUS, JS_MUL, JS_DIV, JS_MOD, JS_LOG_NOT, JS_BIT_NOT, JS_INC, JS_DEC, JS_LPAREN, JS_RPAREN, JS_LINDEX, JS_RINDEX @@ -136,32 +136,32 @@ public: }; class SbiTokenizer : public SbiScanner { - TokenLabelInfo m_aTokenLabelInfo; + TokenLabelInfo m_aTokenLabelInfo; protected: - SbiToken eCurTok; // aktuelles Token - SbiToken ePush; // Pushback-Token + 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 + 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 public: SbiTokenizer( const ::rtl::OUString&, StarBASIC* = NULL ); ~SbiTokenizer(); - inline BOOL IsEof() { return bEof; } - inline BOOL IsEos() { return bEos; } + inline BOOL IsEof() { return bEof; } + inline BOOL IsEos() { return bEos; } - void Push( SbiToken ); // Pushback eines Tokens + 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? + SbiToken Peek(); // das naechste Token lesen + SbiToken Next(); // Ein Token lesen + BOOL MayBeLabel( BOOL= FALSE ); // Kann es ein Label sein? - void Hilite( SbTextPortions& ); // Syntax-Highlighting + void Hilite( SbTextPortions& ); // Syntax-Highlighting void Error( SbError c ) { GenError( c ); } void Error( SbError, SbiToken ); |