diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-25 00:18:20 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-25 00:18:20 +0000 |
commit | a63e7873d33c9f73ee0150c57e7bb4dd9b63a471 (patch) | |
tree | 53a9c6098b2e7829498595db024df26bbd51f76f /basic/inc | |
parent | cad6150eabde5d454ccb48a7e759a420fb989480 (diff) |
CWS-TOOLING: integrate CWS cli005
2009-01-30 15:47:54 +0100 cli r267204 : Translated comments to English.
2009-01-30 11:46:57 +0100 cli r267188 : CWS-TOOLING: rebase CWS cli005 to trunk@267171 (milestone: DEV300:m41)
2009-01-29 17:57:42 +0100 cli r267165 : Translated comments to English.
2009-01-29 11:40:24 +0100 cli r267108 : Translated comments to English and fixed indentations.
2009-01-28 17:57:58 +0100 cli r267075 : Remove Java parsing method stubs from basic parser^^
2009-01-28 17:38:47 +0100 cli r267072 : Translated comments to English.
2009-01-28 16:55:51 +0100 cli r267066 : Translated comments to English.
2009-01-28 12:19:02 +0100 cli r267053 : Translated comments to English.
2009-01-27 13:24:28 +0100 cli r266987 : Quick fix for #i92947#
2009-01-27 12:48:19 +0100 cli r266983 : CWS-TOOLING: rebase CWS cli005 to trunk@266944 (milestone: DEV300:m40)
2009-01-26 18:20:48 +0100 cli r266941 : Translated comments.
2009-01-26 17:04:09 +0100 cli r266938 : Some translations. mgrtest.cxx needs HEAVY refactoring...
2009-01-26 16:49:09 +0100 cli r266936 : Translated comments in all include files.
2009-01-26 14:18:54 +0100 cli r266924 : Some comments translated.
2009-01-24 17:19:07 +0100 cli r266883 : Translation of german comments to english.
2009-01-24 16:00:05 +0100 cli r266881 : Indentation
2009-01-24 15:53:04 +0100 cli r266880 : Apply patch for issue #i96836#
Diffstat (limited to 'basic/inc')
-rw-r--r-- | basic/inc/basic/dispdefs.hxx | 10 | ||||
-rw-r--r-- | basic/inc/basic/mybasic.hxx | 9 | ||||
-rw-r--r-- | basic/inc/basic/process.hxx | 2 | ||||
-rw-r--r-- | basic/inc/basic/sbdef.hxx | 57 | ||||
-rw-r--r-- | basic/inc/basic/sberrors.hxx | 16 | ||||
-rw-r--r-- | basic/inc/basic/sbmod.hxx | 18 | ||||
-rw-r--r-- | basic/inc/basic/sbstar.hxx | 51 | ||||
-rw-r--r-- | basic/inc/basic/sbuno.hxx | 4 | ||||
-rw-r--r-- | basic/inc/basic/sbx.hxx | 36 | ||||
-rw-r--r-- | basic/inc/basic/sbxbase.hxx | 13 | ||||
-rw-r--r-- | basic/inc/basic/sbxcore.hxx | 19 | ||||
-rw-r--r-- | basic/inc/basic/sbxdef.hxx | 151 | ||||
-rw-r--r-- | basic/inc/basic/sbxfac.hxx | 2 | ||||
-rw-r--r-- | basic/inc/basic/sbxform.hxx | 82 | ||||
-rw-r--r-- | basic/inc/basic/sbxobj.hxx | 32 | ||||
-rw-r--r-- | basic/inc/basic/sbxvar.hxx | 46 | ||||
-rw-r--r-- | basic/inc/basic/testtool.hxx | 12 | ||||
-rw-r--r-- | basic/inc/basic/ttglobal.hrc | 20 | ||||
-rw-r--r-- | basic/inc/modsizeexceeded.hxx | 5 | ||||
-rw-r--r-- | basic/inc/svtmsg.hrc | 13 | ||||
-rw-r--r-- | basic/inc/ttmsg.hrc | 13 |
21 files changed, 298 insertions, 313 deletions
diff --git a/basic/inc/basic/dispdefs.hxx b/basic/inc/basic/dispdefs.hxx index 0745634b4604..e8b9fb211b63 100644 --- a/basic/inc/basic/dispdefs.hxx +++ b/basic/inc/basic/dispdefs.hxx @@ -30,12 +30,12 @@ #ifndef _BASIC_DISPDEFS_HXX #define _BASIC_DISPDEFS_HXX -#define DH_MODE_DATA_VALID 0x0001 // ModeData (fr Kompatibilitt mit altem Office) +#define DH_MODE_DATA_VALID 0x0001 // ModeData (for compatibility with old Office) -#define DH_MODE_KURZNAME 0x0002 // Anzeige des Kurznamens (wo mglich) anstatt der UniqueID -#define DH_MODE_LANGNAME 0x0004 // Langname immer Anzeigen -#define DH_MODE_ALLWIN 0x0008 // Alle Fenster anzeigen -#define DH_MODE_SEND_DATA 0x0010 // Daten an Testtool bermitteln +#define DH_MODE_KURZNAME 0x0002 // View short name instead of UniqueID (if possible) +#define DH_MODE_LANGNAME 0x0004 // Always view long name +#define DH_MODE_ALLWIN 0x0008 // View all windows +#define DH_MODE_SEND_DATA 0x0010 // Send data to Testtool #endif diff --git a/basic/inc/basic/mybasic.hxx b/basic/inc/basic/mybasic.hxx index a2231c105067..c441afcea9d2 100644 --- a/basic/inc/basic/mybasic.hxx +++ b/basic/inc/basic/mybasic.hxx @@ -77,12 +77,13 @@ public: void Reset(); SbError GetErrors() { return nError; } - // nicht mit #ifdefs klammern, da diese Headerdatei fr testtool und basic - // gleichermaen verwendet wird. - SbxObject *pTestObject; // fr das Testtool; ansonsten NULL + // Do not use #ifdefs here because this header file is both used for testtool and basic + SbxObject *pTestObject; // for Testool; otherwise NULL virtual void LoadIniFile(); - virtual SbTextType GetSymbolType( const String &Symbol, BOOL bWasTTControl ); // Besimmt den erweiterten Symboltyp fr das Syntaxhighlighting + + // Determines the extended symbol type for syntax highlighting + virtual SbTextType GetSymbolType( const String &Symbol, BOOL bWasTTControl ); virtual const String GetSpechialErrorText(); virtual void ReportRuntimeError( AppBasEd *pEditWin ); virtual void DebugFindNoErrors( BOOL bDebugFindNoErrors ); diff --git a/basic/inc/basic/process.hxx b/basic/inc/basic/process.hxx index 61fe5be40992..a56361f7fe8a 100644 --- a/basic/inc/basic/process.hxx +++ b/basic/inc/basic/process.hxx @@ -41,7 +41,7 @@ typedef Environment::value_type EnvironmentVariable; class Process { - // Interne Member und Methoden + // Internal members and methods NAMESPACE_VOS(OArgumentList) *pArgumentList; NAMESPACE_VOS(OEnvironment) *pEnvList; NAMESPACE_VOS(OProcess) *pProcess; diff --git a/basic/inc/basic/sbdef.hxx b/basic/inc/basic/sbdef.hxx index 6a3c38d8b8a0..dbb6e703b0c6 100644 --- a/basic/inc/basic/sbdef.hxx +++ b/basic/inc/basic/sbdef.hxx @@ -36,29 +36,33 @@ #define _BASIC_TEXTPORTIONS -enum SbTextType { // Typ eines Textteils (Syntax Hilite) - SB_KEYWORD = 1, // Keywords - SB_SYMBOL, // Symbole - SB_STRING, // Strings - SB_NUMBER, // Zahlen - SB_PUNCTUATION, // Klammern, Punkte etc - SB_COMMENT, // Kommentare - SB_DUMMY = 255 // workaround for #i31479 +// Type of a text token (syntax highlighting) +enum SbTextType +{ + SB_KEYWORD = 1, // Keywords + SB_SYMBOL, // Symbols + SB_STRING, // Strings + SB_NUMBER, // Numbers + SB_PUNCTUATION, // Brackets, points, etc. + SB_COMMENT, // Comments + SB_DUMMY = 255 // workaround for #i31479 }; -enum SbLanguageMode { // Aktive Sprache - SB_LANG_GLOBAL, // wie in SbiGlobals-Struktur - SB_LANG_BASIC, // StarBasic (Default) - SB_LANG_VBSCRIPT, // Visual-Basic-Script - SB_LANG_JAVASCRIPT // Java-Script +// Active language +enum SbLanguageMode +{ + SB_LANG_GLOBAL, // As in SbiGlobals struct + SB_LANG_BASIC, // StarBasic (Default) + SB_LANG_VBSCRIPT, // Visual-Basic-Script + SB_LANG_JAVASCRIPT // JavaScript }; #ifdef _BASIC_TEXTPORTIONS struct SbTextPortion -{ // Syntax Hiliting: eine Text-Portion - xub_StrLen nLine; // Zeilennummer - xub_StrLen nStart, nEnd; // 1. und letzte Spalte - SbTextType eType; // Type der Portion +{ // Syntax Highlighting: a text portion + xub_StrLen nLine; // Line number + xub_StrLen nStart, nEnd; // 1st and last column + SbTextType eType; // Type of the portion }; SV_DECL_VARARR(SbTextPortions, SbTextPortion,16,16) @@ -80,20 +84,19 @@ String getBasicObjectTypeName( SbxObject* pObj ); // implementation: basic/source/runtime/runtime.cxx void setBasicWatchMode( bool bOn ); -// Debug-Flags: - +// Debug Flags: #define SbDEBUG_BREAK 0x0001 // Break-Callback #define SbDEBUG_STEPINTO 0x0002 // Single Step-Callback -#define SbDEBUG_STEPOVER 0x0004 // Zusatzflag Step Over -#define SbDEBUG_CONTINUE 0x0008 // Flags nicht aendern -#define SbDEBUG_STEPOUT 0x0010 // Aus Sub raus +#define SbDEBUG_STEPOVER 0x0004 // Additional flag Step Over +#define SbDEBUG_CONTINUE 0x0008 // Do not change flags +#define SbDEBUG_STEPOUT 0x0010 // Leave Sub #define SBXID_BASIC 0x6273 // sb: StarBASIC -#define SBXID_BASICMOD 0x6d62 // bm: StarBASIC-Modul -#define SBXID_BASICPROP 0x7262 // pr: StarBASIC-Property -#define SBXID_BASICMETHOD 0x6d65 // me: StarBASIC-Methode -#define SBXID_JSCRIPTMOD 0x6a62 // jm: JavaScript-Modul -#define SBXID_JSCRIPTMETH 0x6a64 // jm: JavaScript-Modul +#define SBXID_BASICMOD 0x6d62 // bm: StarBASIC Module +#define SBXID_BASICPROP 0x7262 // pr: StarBASIC Property +#define SBXID_BASICMETHOD 0x6d65 // me: StarBASIC Method +#define SBXID_JSCRIPTMOD 0x6a62 // jm: JavaScript Module +#define SBXID_JSCRIPTMETH 0x6a64 // jm: JavaScript Module #define SBX_HINT_BASICSTART SFX_HINT_USER04 #define SBX_HINT_BASICSTOP SFX_HINT_USER05 diff --git a/basic/inc/basic/sberrors.hxx b/basic/inc/basic/sberrors.hxx index fb690de426cc..75fd3bd193e7 100644 --- a/basic/inc/basic/sberrors.hxx +++ b/basic/inc/basic/sberrors.hxx @@ -37,7 +37,7 @@ typedef ULONG SbError; #endif -// Abbildung auf SbxError +// Mapping to SbxError #define ERRCODE_BASIC_SYNTAX ERRCODE_SBX_SYNTAX // unspecified syntax error #define ERRCODE_BASIC_BAD_ARGUMENT ERRCODE_SBX_NOTIMP // Invalid procedure call #define ERRCODE_BASIC_MATH_OVERFLOW ERRCODE_SBX_OVERFLOW // Overflow @@ -68,7 +68,7 @@ typedef ULONG SbError; #define ERRCODE_BASIC_WRONG_ARGS ERRCODE_SBX_WRONG_ARGS // Wrong number of arguments #define ERRCODE_BASIC_NOT_A_COLL ERRCODE_SBX_NOT_A_COLL // Object not a collection -// Basic-spezifische Fehlermeldungen an ERRCODE_AREA_SBX anhaengen +// Append Basic specific error messages to ERRCODE_AREA_SBX #define ERRCODE_BASIC_NO_GOSUB ((LAST_SBX_ERROR_ID+1UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_RUNTIME) // Return without Gosub #define ERRCODE_BASIC_REDO_FROM_START ((LAST_SBX_ERROR_ID+2UL) | ERRCODE_AREA_SBX | \ @@ -200,8 +200,8 @@ typedef ULONG SbError; #define ERRCODE_BASIC_GETPROP_FAILED ((LAST_SBX_ERROR_ID+62UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_RUNTIME) // Unable to get property -// Compiler Errors (treten waehrend des Programmlaufs nicht auf) -// Diese IDs koennen sich jederzeit verschieben +// Compiler Errors (do not occure at runtime) +// These IDs can shift at any time #define ERRCODE_BASIC_UNEXPECTED ((LAST_SBX_ERROR_ID+63UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_COMPILER) // Unexpected symbol: xx @@ -233,7 +233,7 @@ typedef ULONG SbError; #define ERRCODE_BASIC_UNDEF_TYPE ((LAST_SBX_ERROR_ID+76UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_COMPILER) // Unknown user defined type xxx #define ERRCODE_BASIC_BAD_EXIT ((LAST_SBX_ERROR_ID+77UL) | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_COMPILER) // Exit XXX expexted + ERRCODE_CLASS_COMPILER) // Exit XXX expected #define ERRCODE_BASIC_BAD_BLOCK ((LAST_SBX_ERROR_ID+78UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_COMPILER) // Unterminated statement block: missing XX #define ERRCODE_BASIC_BAD_BRACKETS ((LAST_SBX_ERROR_ID+79UL) | ERRCODE_AREA_SBX | \ @@ -290,7 +290,7 @@ typedef ULONG SbError; #define ERRCODE_BASIC_LOOP_NOT_INIT ((LAST_SBX_ERROR_ID+109UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_COMPILER) // For loop not initialized -// Alte Codes auf neue mappen +// Map old codes to new codes #define SbERR_SYNTAX ERRCODE_BASIC_SYNTAX #define SbERR_NO_GOSUB ERRCODE_BASIC_NO_GOSUB #define SbERR_REDO_FROM_START ERRCODE_BASIC_REDO_FROM_START @@ -520,8 +520,8 @@ typedef ULONG SbError; #define SbERR_SETPROP_FAILED 1005 // Unable to set property #define SbERR_GETPROP_FAILED 1006 // Unable to get property -// Compiler Errors (treten waehrend des Programmlaufs nicht auf) -// Diese IDs koennen sich jederzeit verschieben +// Compiler Errors (do not happen at runtime) +// These IDs can shift at any time #define SbERR_COMPILER_BGN 950 #define SbERR_UNEXPECTED 951 // Unexpected symbol: xx diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index 09b354d1187e..5847ff4d98cb 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -51,7 +51,7 @@ class SbModuleImpl; class SbModule : public SbxObject { - friend class TestToolObj; // somit knnen Module nach laden zur Laufzeit initialisiert werden + friend class TestToolObj; // allows module initialisation at runtime friend class SbiCodeGen; friend class SbMethod; friend class SbiRuntime; @@ -61,11 +61,11 @@ class SbModule : public SbxObject SbModuleImpl* mpSbModuleImpl; // Impl data protected: - ::rtl::OUString aOUSource; - String aComment; - SbiImage* pImage; // das Image - SbiBreakpoints* pBreaks; // Breakpoints - SbClassData* pClassData; + ::rtl::OUString aOUSource; + String aComment; + SbiImage* pImage; // the Image + SbiBreakpoints* pBreaks; // Breakpoints + SbClassData* pClassData; void StartDefinitions(); SbMethod* GetMethod( const String&, SbxDataType ); @@ -76,7 +76,7 @@ protected: USHORT Run( SbMethod* ); void RunInit(); void ClearPrivateVars(); - void GlobalRunInit( BOOL bBasicStart ); // fuer alle Module + void GlobalRunInit( BOOL bBasicStart ); // for all modules void GlobalRunDeInit( void ); const BYTE* FindNextStmnt( const BYTE*, USHORT&, USHORT& ) const; const BYTE* FindNextStmnt( const BYTE*, USHORT&, USHORT&, @@ -116,7 +116,7 @@ public: virtual BOOL ClearBP( USHORT nLine ); virtual void ClearAllBP(); - // Zeilenbereiche von Subs + // Lines of Subs virtual SbMethod* GetFunctionForLine( USHORT ); // Store only image, no source (needed for new password protection) @@ -150,7 +150,7 @@ public: SbClassModuleObject( SbModule* pClassModule ); ~SbClassModuleObject(); - // Find ueberladen, um z.B. NameAccess zu unterstuetzen + // Overridden to support NameAccess etc. virtual SbxVariable* Find( const String&, SbxClassType ); virtual void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index c18e2175aa4c..d75a2ada855e 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -41,11 +41,11 @@ #include <basic/sbdef.hxx> #include <basic/sberrors.hxx> -class SbModule; // fertiges Modul -class SbiInstance; // Laufzeit-Instanz -class SbiRuntime; // aktuell laufende Prozedur -class SbiImage; // compiliertes Image -class BasicLibInfo; // Infoblock fuer Basic-Manager +class SbModule; // completed module +class SbiInstance; // runtime instance +class SbiRuntime; // currently running procedure +class SbiImage; // compiled image +class BasicLibInfo; // info block for basic manager class SbiBreakpoints; class SbTextPortions; class SbMethod; @@ -56,23 +56,24 @@ class StarBASICImpl; class StarBASIC : public SbxObject { friend class SbiScanner; - friend class SbiExpression; // Zugriff auf RTL + friend class SbiExpression; // Access to RTL friend class SbiInstance; friend class SbiRuntime; StarBASICImpl* mpStarBASICImpl; - SbxArrayRef pModules; // Liste aller Module + SbxArrayRef pModules; // List of all modules SbxObjectRef pRtl; // Runtime Library - SbxArrayRef xUnoListeners; // Listener handled by CreateUnoListener - // Handler-Support: - Link aErrorHdl; // Fehlerbehandlung - Link aBreakHdl; // Breakpoint-Handler - BOOL bNoRtl; // TRUE: RTL nicht durchsuchen - BOOL bBreak; // TRUE: Break, sonst Step + SbxArrayRef xUnoListeners; // Listener handled by CreateUnoListener + + // Handler-Support: + Link aErrorHdl; // Error handler + Link aBreakHdl; // Breakpoint handler + BOOL bNoRtl; // if TRUE: do not search RTL + BOOL bBreak; // if TRUE: Break, otherwise Step BOOL bDocBasic; - BasicLibInfo* pLibInfo; // Infoblock fuer Basic-Manager - SbLanguageMode eLanguageMode; // LanguageMode des Basic-Objekts + BasicLibInfo* pLibInfo; // Info block for basic manager + SbLanguageMode eLanguageMode; // LanguageMode of the basic object protected: BOOL CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); private: @@ -96,8 +97,8 @@ public: StarBASIC( StarBASIC* pParent = NULL, BOOL bIsDocBasic = FALSE ); - // #51727 SetModified ueberladen, damit der Modified- - // Zustand nicht an den Parent weitergegeben wird. + // #51727 SetModified overridden so that the Modfied-State is + // not delivered to Parent. virtual void SetModified( BOOL ); void* operator new( size_t ); @@ -122,7 +123,7 @@ public: static void FatalError( SbError ); static BOOL IsRunning(); static SbError GetErrBasic(); - // #66536 Zusatz-Message fuer RTL-Funktion Error zugreifbar machen + // #66536 make additional message accessible by RTL function Error static String GetErrorMsg(); static xub_StrLen GetErl(); // Highlighting @@ -134,24 +135,24 @@ public: SbxArray* GetModules() { return pModules; } SbxObject* GetRtl() { return pRtl; } SbModule* FindModule( const String& ); - // Init-Code aller Module ausfuehren (auch in inserteten Doc-Basics) + // Run init code of all modules (including the inserted Doc-Basics) void InitAllModules( StarBASIC* pBasicNotToInit = NULL ); void DeInitAllModules( void ); void ClearAllModuleVars( void ); void ActivateObject( const String*, BOOL ); BOOL LoadOldModules( SvStream& ); - // #43011 Fuer das TestTool, um globale Variablen loeschen zu koennen + // #43011 For TestTool; deletes global vars void ClearGlobalVars( void ); - // Abfragen fuer den Error-Handler und den Break-Handler: + // Calls for error and break handler static USHORT GetLine(); static USHORT GetCol1(); static USHORT GetCol2(); static void SetErrorData( SbError nCode, USHORT nLine, USHORT nCol1, USHORT nCol2 ); - // Spezifisch fuer den Error-Handler: + // Specific to error handler static void MakeErrorText( SbError, const String& aMsg ); static const String& GetErrorText(); static SbError GetErrorCode(); @@ -160,12 +161,12 @@ public: static SbError GetSfxFromVBError( USHORT nError ); static void SetGlobalLanguageMode( SbLanguageMode eLangMode ); static SbLanguageMode GetGlobalLanguageMode(); - // Lokale Einstellung + // Local settings void SetLanguageMode( SbLanguageMode eLangMode ) { eLanguageMode = eLangMode; } SbLanguageMode GetLanguageMode(); - // Spezifisch fuer den Break-Handler: + // Specific for break handler BOOL IsBreak() const { return bBreak; } static Link GetGlobalErrorHdl(); @@ -186,7 +187,7 @@ public: static SbMethod* GetActiveMethod( USHORT nLevel = 0 ); static SbModule* GetActiveModule(); - // #60175 TRUE: SFX-Resource wird bei Basic-Fehlern nicht angezogen + // #60175 TRUE: SFX-Resource is not displayed on basic errors static void StaticSuppressSfxResource( BOOL bSuppress ); // #91147 TRUE: Reschedule is enabled (default>, FALSE: No reschedule diff --git a/basic/inc/basic/sbuno.hxx b/basic/inc/basic/sbuno.hxx index 8e0b9dbbf60f..bf95e0b46080 100644 --- a/basic/inc/basic/sbuno.hxx +++ b/basic/inc/basic/sbuno.hxx @@ -35,8 +35,8 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; }}}} -// Liefert ein SbxObject, das ein Uno-Interface wrappt -// Implementiert in basic/source/classes/sbunoobj.cxx +// Returns a SbxObject that wrapps an Uno Interface +// Implementation in basic/source/classes/sbunoobj.cxx SbxObjectRef GetSbUnoObject( const String& aName, const com::sun::star::uno::Any& aUnoObj_ ); // Force creation of all properties for debugging diff --git a/basic/inc/basic/sbx.hxx b/basic/inc/basic/sbx.hxx index 18b28107d444..ce2e992da854 100644 --- a/basic/inc/basic/sbx.hxx +++ b/basic/inc/basic/sbx.hxx @@ -69,15 +69,14 @@ class SvDispatch; #ifndef __SBX_SBXPARAMINFO #define __SBX_SBXPARAMINFO -// Informationen ueber einen Parameter - +// Parameter information struct SbxParamInfo { - const String aName; // Name des Parameters - SbxBaseRef aTypeRef; // Objekt, falls Objekttyp - SbxDataType eType; // Datentyp - UINT16 nFlags; // Flag-Bits - UINT32 nUserData; // IDs etc. + const String aName; // Name of the parameter + SbxBaseRef aTypeRef; // Object, if object type + SbxDataType eType; // Data type + UINT16 nFlags; // Flag-Bits + UINT32 nUserData; // IDs etc. SbxParamInfo( const String& s, SbxDataType t, USHORT n, SbxBase* b = NULL ) : aName( s ), aTypeRef( b ), eType( t ), nFlags( n ), nUserData( 0 ) {} ~SbxParamInfo() {} @@ -114,7 +113,7 @@ public: void AddParam( const String&, SbxDataType, USHORT=SBX_READ ); void AddParam( const SbxParamInfo& ); - const SbxParamInfo* GetParam( USHORT n ) const; // ab 1! + const SbxParamInfo* GetParam( USHORT n ) const; // index starts with 1! const String& GetComment() const { return aComment; } const String& GetHelpFile() const { return aHelpFile; } UINT32 GetHelpId() const { return nHelpId; } @@ -143,8 +142,7 @@ public: #ifndef __SBX_SBXALIAS_HXX #define __SBX_SBXALIAS_HXX -// SbxAlias ist ein Alias fuer eine Variable oder ein Objekt - +// SbxAlias is an alias for a var or object class SbxAlias : public SbxVariable, public SfxListener { SbxVariableRef xAlias; @@ -180,11 +178,11 @@ class SbxArray : public SbxBase friend class SbClassModuleObject; void PutDirect( SbxVariable* pVar, UINT32 nIdx ); - SbxArrayImpl* mpSbxArrayImpl; // Impl data - SbxVarRefs* pData; // Die Variablen + SbxArrayImpl* mpSbxArrayImpl; // Impl data + SbxVarRefs* pData; // The variables protected: - SbxDataType eType; // Datentyp des Arrays + SbxDataType eType; // Data type of the array virtual ~SbxArray(); virtual BOOL LoadData( SvStream&, USHORT ); virtual BOOL StoreData( SvStream& ) const; @@ -225,19 +223,17 @@ public: #ifndef __SBX_SBXDIMARRAY_HXX #define __SBX_SBXDIMARRAY_HXX -// SbxDimArray ist ein Array, was nach BASIC-Konventionen -// dimensioniert werden kann. - +// SbxDimArray is an array that can dimensioned using BASIC conventions. struct SbxDim; class SbxDimArrayImpl; class SbxDimArray : public SbxArray { - SbxDimArrayImpl* mpSbxDimArrayImpl; // Impl data + SbxDimArrayImpl* mpSbxDimArrayImpl; // Impl data - SbxDim* pFirst, *pLast; // Links fuer Dimension-Tabelle - short nDim; // Anzahl Dimensionen + SbxDim* pFirst, *pLast; // Links to Dimension table + short nDim; // Number of dimensions void AddDimImpl32( INT32, INT32, BOOL bAllowSize0 ); bool mbHasFixedSize; protected: @@ -296,7 +292,7 @@ protected: virtual BOOL LoadData( SvStream&, USHORT ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); - // ueberladbare Methoden: + // Overridable methods (why not pure virtual?): virtual void CollAdd( SbxArray* pPar ); virtual void CollItem( SbxArray* pPar ); virtual void CollRemove( SbxArray* pPar ); diff --git a/basic/inc/basic/sbxbase.hxx b/basic/inc/basic/sbxbase.hxx index bd61bca0aab3..dc7707cce57d 100644 --- a/basic/inc/basic/sbxbase.hxx +++ b/basic/inc/basic/sbxbase.hxx @@ -43,17 +43,16 @@ class SbxBasicFormater; SV_DECL_PTRARR_DEL(SbxFacs,SbxFactory*,5,5) DECLARE_LIST(SbxVarList_Impl, SbxVariable*) -// AppData-Struktur fuer SBX: +// AppData-Struktur for SBX: struct SbxAppData { - SbxError eSbxError; // Fehlercode + SbxError eSbxError; // Error code SbxFacs aFacs; // Factories - SbxVarList_Impl aVars; // fuer Dump - SbxBasicFormater *pBasicFormater; // Zeiger auf Hilfsklasse f"ur den - // Format()-Befehl + SbxVarList_Impl aVars; // for Dump + SbxBasicFormater *pBasicFormater; // Pointer to Format()-Command helper class + LanguageType eBasicFormaterLangType; - // Bem.: es ist sinnvoll diese Klasse 'global' zu speichern, da - // einige Resourcen (Strings) in der Klasse gehalten werden. + // It might be useful to store this class 'global' because some string reosurces are saved here SbxAppData() : eSbxError( SbxERR_OK ), aFacs(), pBasicFormater( NULL ) {} ~SbxAppData(); diff --git a/basic/inc/basic/sbxcore.hxx b/basic/inc/basic/sbxcore.hxx index 183daa31d608..6c1e0bbdfb20 100644 --- a/basic/inc/basic/sbxcore.hxx +++ b/basic/inc/basic/sbxcore.hxx @@ -41,14 +41,12 @@ class SvStream; class String; class UniString; -// Das nachfolgende Makro definiert die vier (fuenf) notwendigen Methoden -// innerhalb eines SBX-Objekts. LoadPrivateData() und StorePrivateData() -// muessen selbst implementiert werden. Sie sind fuer das Laden/Speichern -// der Daten der abgeleiteten Klasse notwendig. Load() und Store() duerfen -// nicht ueberlagert werden. - -// Diese Version des Makros definiert keine Load/StorePrivateData()-Methoden +// The following Macro defines four (five) necessary methods within a +// SBX object. LoadPrivateData() and StorePrivateData() must be implemented. +// They are necessary for loading/storing the data of derived classes. +// Load() and Store() must not be overridden. +// This version of the Macros does not define Load/StorePrivateData()-methods #define SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer ) \ virtual UINT32 GetCreator() const { return nCre; } \ virtual UINT16 GetVersion() const { return nVer; } \ @@ -59,8 +57,7 @@ class UniString; virtual UINT16 GetVersion() const; \ virtual UINT16 GetSbxId() const; -// Diese Version des Makros definiert Load/StorePrivateData()-Methoden - +// This version of the macro defines Load/StorePrivateData()-methods #define SBX_DECL_PERSIST( nCre, nSbxId, nVer ) \ virtual BOOL LoadPrivateData( SvStream&, USHORT ); \ virtual BOOL StorePrivateData( SvStream& ) const; \ @@ -132,13 +129,13 @@ public: static BOOL IsError(); static void ResetError(); - // Setzen der Factory fuer Load/Store/Create + // Set the factory for Load/Store/Create static void AddFactory( SbxFactory* ); static void RemoveFactory( SbxFactory* ); static SbxBase* Create( UINT16, UINT32=SBXCR_SBX ); static SbxObject* CreateObject( const String& ); - // Sbx-Loesung als Ersatz fuer SfxBroadcaster::Enable() + // Sbx solution as replacement for SfxBroadcaster::Enable() static void StaticEnableBroadcasting( BOOL bEnable ); static BOOL StaticIsEnabledBroadcasting( void ); }; diff --git a/basic/inc/basic/sbxdef.hxx b/basic/inc/basic/sbxdef.hxx index 6b1cf8320ebe..ff19cdc43e54 100644 --- a/basic/inc/basic/sbxdef.hxx +++ b/basic/inc/basic/sbxdef.hxx @@ -42,14 +42,14 @@ #ifndef _SBX_CLASS_TYPE #define _SBX_CLASS_TYPE -enum SbxClassType { // SBX-Klassen-IDs (Reihenfolge ist wichtig) - SbxCLASS_DONTCARE = 1, // egal (bei der Suche, nicht 0 wg. StarBASIC) - SbxCLASS_ARRAY, // Array aus SbxVariablen - SbxCLASS_VALUE, // einfacher Wert - SbxCLASS_VARIABLE, // Variable (ab hier gibts einen Broadcaster) - SbxCLASS_METHOD, // Methode (Function oder Sub) +enum SbxClassType { // SBX-class-IDs (order is important!) + SbxCLASS_DONTCARE = 1, // don't care (search, not 0 due to StarBASIC) + SbxCLASS_ARRAY, // Array of SbxVariables + SbxCLASS_VALUE, // simple value + SbxCLASS_VARIABLE, // Variable (from here there is Broadcaster) + SbxCLASS_METHOD, // Method (Function or Sub) SbxCLASS_PROPERTY, // Property - SbxCLASS_OBJECT // Objekt + SbxCLASS_OBJECT // Object }; #endif @@ -114,25 +114,25 @@ enum SbxDataType { #define _SBX_OPERATOR enum SbxOperator { - // Arithmetik: + // Arithmetical: SbxEXP, // this ^ var SbxMUL, // this * var SbxDIV, // this / var SbxMOD, // this MOD var SbxPLUS, // this + var SbxMINUS, // this - var - SbxNEG, // -this (var wird ignoriert) - SbxIDIV, // this / var (beide Operanden sind max. INT32!) - // Boolesche Operatoren (auch max INT32!): + SbxNEG, // -this (var is ignored) + SbxIDIV, // this / var (both operands max. INT32!) + // Boolean operators (max INT32!): SbxAND, // this & var SbxOR, // this | var SbxXOR, // this ^ var SbxEQV, // ~this ^ var SbxIMP, // ~this | var - SbxNOT, // ~this (var wird ignoriert) - // String-Verkettung: + SbxNOT, // ~this (var is ignored) + // String-concat: SbxCAT, // this & var - // Vergleiche: + // Comparisons: SbxEQ, // this = var SbxNE, // this <> var SbxLT, // this < var @@ -146,8 +146,8 @@ enum SbxOperator { #ifndef _SBX_NAME_TYPE #define _SBX_NAME_TYPE -enum SbxNameType { // Art des erfragten Namens einer Variablen - SbxNAME_NONE, // der nackte Name +enum SbxNameType { // Type of the questioned name of a variable + SbxNAME_NONE, // plain name SbxNAME_SHORT, // Name(A,B) SbxNAME_SHORT_TYPES, // Name%(A%,B$) SbxNAME_LONG_TYPES // Name(A As Integer, B As String) As Integer @@ -155,41 +155,41 @@ enum SbxNameType { // Art des erfragten Namens einer Variablen #endif -// AB: 20.3.96: Neue Fehler-Meldungen -typedef ULONG SbxError; // Alten Typ erhalten +// AB: 20.3.96: New error messages +typedef ULONG SbxError; // Preserve old type #endif // von #ifndef __RSC -// Neue Fehler-Codes per define -#define ERRCODE_SBX_OK ERRCODE_NONE // durchgefuehrt +// New error codes per define +#define ERRCODE_SBX_OK ERRCODE_NONE // processed #define ERRCODE_SBX_SYNTAX (1UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_COMPILER) // Syntaxfehler im Parser + ERRCODE_CLASS_COMPILER) // Syntaxerror in parser (where else could syntax errors happen? ;-) #define ERRCODE_SBX_NOTIMP (2UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_NOTSUPPORTED) // nicht moeglich + ERRCODE_CLASS_NOTSUPPORTED) // not possible #define ERRCODE_SBX_OVERFLOW (3UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_SBX) // Ueberlauf + ERRCODE_CLASS_SBX) // overflow #define ERRCODE_SBX_BOUNDS (4UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_SBX) // Array-Index ungueltig + ERRCODE_CLASS_SBX) // Invalid array index #define ERRCODE_SBX_ZERODIV (5UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_SBX) // Division durch Null + ERRCODE_CLASS_SBX) // Division by zero #define ERRCODE_SBX_CONVERSION (6UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_SBX) // falscher Datentyp + ERRCODE_CLASS_SBX) // wrong data type #define ERRCODE_SBX_BAD_PARAMETER (7UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // ungueltiger Parameter + ERRCODE_CLASS_RUNTIME) // invalid Parameter #define ERRCODE_SBX_PROC_UNDEFINED (8UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // BASIC-Sub oder Function undefiniert + ERRCODE_CLASS_RUNTIME) // BASIC-Sub or Function undefined #define ERRCODE_SBX_ERROR (9UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_UNKNOWN) // andere Fehler, Objektbezogene Fehler + ERRCODE_CLASS_UNKNOWN) // other object-related error #define ERRCODE_SBX_NO_OBJECT (10UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // Objektvariable nicht belegt + ERRCODE_CLASS_RUNTIME) // Object variable unassigned #define ERRCODE_SBX_CANNOT_LOAD (11UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_CREATE) // Objekt kann nicht geladen/eingerichtet werden + ERRCODE_CLASS_CREATE) // Object cannot be loaded or initialized #define ERRCODE_SBX_BAD_INDEX (12UL | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_SBX) // Invalid object index #define ERRCODE_SBX_NO_ACTIVE_OBJECT (13UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_ACCESS) // Objekt ist nicht aktiviert + ERRCODE_CLASS_ACCESS) // Object ist not activated #define ERRCODE_SBX_BAD_PROP_VALUE (14UL | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_RUNTIME) // Bad property value #define ERRCODE_SBX_PROP_READONLY (15UL | ERRCODE_AREA_SBX | \ @@ -201,34 +201,34 @@ typedef ULONG SbxError; // Alten Typ erhalten #define ERRCODE_SBX_NO_METHOD (18UL | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_RUNTIME) // Property oder Methode unbekannt #define ERRCODE_SBX_INVALID_USAGE_OBJECT (19UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_ACCESS) // Falsche Verwendung eines Objekts + ERRCODE_CLASS_ACCESS) // Invalid object usage #define ERRCODE_SBX_NO_OLE (20UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_ACCESS) // Kein OLE-Objekt + ERRCODE_CLASS_ACCESS) // No OLE-Object #define ERRCODE_SBX_BAD_METHOD (21UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // Methode nicht untersttzt + ERRCODE_CLASS_RUNTIME) // Method not supported #define ERRCODE_SBX_OLE_ERROR (22UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // OLE Automation-Fehler + ERRCODE_CLASS_RUNTIME) // OLE Automation Error #define ERRCODE_SBX_BAD_ACTION (23UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_NOTSUPPORTED) // Aktion nicht untersttzt + ERRCODE_CLASS_NOTSUPPORTED) // Action not supported #define ERRCODE_SBX_NO_NAMED_ARGS (24UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // Keine benannten Argumente + ERRCODE_CLASS_RUNTIME) // No named arguments #define ERRCODE_SBX_BAD_LOCALE (25UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_NOTSUPPORTED) // Laenderspezifische Einstellungen nicht untersttzt + ERRCODE_CLASS_NOTSUPPORTED) // Locale settings not supported #define ERRCODE_SBX_NAMED_NOT_FOUND (26UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // Unbekanntes benanntes Argument + ERRCODE_CLASS_RUNTIME) // Unknown named argument #define ERRCODE_SBX_NOT_OPTIONAL (27UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // Argument nicht optional + ERRCODE_CLASS_RUNTIME) // Argument not optional #define ERRCODE_SBX_WRONG_ARGS (28UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_SBX) // Falsche Zahl von Argumenten + ERRCODE_CLASS_SBX) // Invalid number of arguments #define ERRCODE_SBX_NOT_A_COLL (29UL | ERRCODE_AREA_SBX | \ - ERRCODE_CLASS_RUNTIME) // Objekt enthaelt keine Elemente + ERRCODE_CLASS_RUNTIME) // Object contains no elements #define LAST_SBX_ERROR_ID 29UL -// Ab hier fuer Ressource wieder unwichtig +// Less important for resources #ifndef __RSC -// Alte Codes auf neue mappen +// Map old codes to new ones #define SbxERR_OK ERRCODE_SBX_OK #define SbxERR_SYNTAX ERRCODE_SBX_SYNTAX #define SbxERR_NOTIMP ERRCODE_SBX_NOTIMP @@ -261,7 +261,7 @@ typedef ULONG SbxError; // Alten Typ erhalten #define SbxERR_NOT_A_COLL ERRCODE_SBX_NOT_A_COLL -/* Alte Codes mit VB-Fehler-Codes +/* Old codes with VB error codes enum SbxError { // Ergebnis einer Rechenoperation/Konversion SbxERR_OK = 0, // durchgefuehrt SbxERR_SYNTAX = 2, // Syntaxfehler im Parser @@ -298,24 +298,24 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion */ // Flag-Bits: -#define SBX_READ 0x0001 // Leseerlaubnis -#define SBX_WRITE 0x0002 // Schreiberlaubnis -#define SBX_READWRITE 0x0003 // beides -#define SBX_DONTSTORE 0x0004 // Objekt nicht speichern -#define SBX_MODIFIED 0x0008 // Objekt ist geaendert -#define SBX_FIXED 0x0010 // fester Datentyp (SbxVariable) -#define SBX_CONST 0x0020 // Definition eines Const-Wertes -#define SBX_OPTIONAL 0x0040 // Parameter ist optional -#define SBX_HIDDEN 0x0080 // Element ist unsichtbar -#define SBX_INVISIBLE 0x0100 // Element wird mit Find() nicht gefunden -#define SBX_EXTSEARCH 0x0200 // Objekt wird komplett durchsucht -#define SBX_EXTFOUND 0x0400 // Variable wurde durch Extended Srch gefunden -#define SBX_GBLSEARCH 0x0800 // Globale Suche ueber Parents -#define SBX_RESERVED 0x1000 // reserviert +#define SBX_READ 0x0001 // Read permission +#define SBX_WRITE 0x0002 // Write permission +#define SBX_READWRITE 0x0003 // Read/Write permission +#define SBX_DONTSTORE 0x0004 // Don't store object +#define SBX_MODIFIED 0x0008 // Object was changed +#define SBX_FIXED 0x0010 // Fixed data type (SbxVariable) +#define SBX_CONST 0x0020 // Definition of const value +#define SBX_OPTIONAL 0x0040 // Parameter is optional +#define SBX_HIDDEN 0x0080 // Element is invisible +#define SBX_INVISIBLE 0x0100 // Element is not found by Find() +#define SBX_EXTSEARCH 0x0200 // Object is searched completely +#define SBX_EXTFOUND 0x0400 // Variable was found through extended search +#define SBX_GBLSEARCH 0x0800 // Global search via Parents +#define SBX_RESERVED 0x1000 // reserved #define SBX_PRIVATE 0x1000 // #110004, #112015, cannot conflict with SBX_RESERVED -#define SBX_NO_BROADCAST 0x2000 // kein Broadcast bei Get/Put -#define SBX_REFERENCE 0x4000 // Parameter ist Referenz (DLL-Aufruf) -#define SBX_NO_MODIFY 0x8000 // SetModified wird unterdrueckt +#define SBX_NO_BROADCAST 0x2000 // No broadcast on Get/Put +#define SBX_REFERENCE 0x4000 // Parameter is Reference (DLL-call) +#define SBX_NO_MODIFY 0x8000 // SetModified is suppressed // Broadcaster-IDs: #define SBX_HINT_DYING SFX_HINT_DYING @@ -325,13 +325,12 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion #define SBX_HINT_INFOWANTED SFX_HINT_USER02 #define SBX_HINT_OBJECTCHANGED SFX_HINT_USER03 -// Liste aller Creators fuer Load/Store +// List of all creators for Load/Store #define SBXCR_SBX 0x20584253 // SBX(blank) -// Liste der vordefinierten SBX-IDs. Eigene SBX-IDs muessen spezifisch -// so vergeben werden, dass sie innerhalb des Streams und der dazu passenden -// Factory eindeutig sind. +// List of predefined SBX-IDs. New SBX-IDs must be precisly defined so that +// they are unique within the Stream and appropriate Factory. #define SBXID_VALUE 0x4E4E // NN: SbxValue #define SBXID_VARIABLE 0x4156 // VA: SbxVariable @@ -343,10 +342,10 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion #define SBXID_METHOD 0x454D // ME: SbxMethod #define SBXID_PROPERTY 0x5250 // PR: SbxProperty -// StarBASIC begrenzt die Basis-Datentypen auf verschiedene -// Bereiche. Diese Bereiche sind zwecks Portabilitaet fest -// definiert, unabhaengig von der Implementation. Allein der -// Datentyp double nimmt auf, was er fassen kann. +// StarBASIC restricts the base data type to different intervals. +// These intervals are fixed due to portability and independent +// of the implementation. Only type double is greedy and takes +// what it gets. #define SbxMAXCHAR ((sal_Unicode)65535) #define SbxMINCHAR (0) @@ -372,17 +371,13 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion #define SbxMAXCURRLNG (SbxMAXLNG/CURRENCY_FACTOR) #define SbxMINCURRLNG (SbxMINLNG/CURRENCY_FACTOR) -// Der maximal zulaessige Offset-Index fuer Sbx-Arrays (wg. 64K-Limit) - +// Max valid offset index of a Sbx-Array (due to 64K limit) #define SBX_MAXINDEX 0x3FF0 #define SBX_MAXINDEX32 SbxMAXLNG -// Die numerischen Werte fuer TRUE und FALSE sind wie folgt definiert: - +// The numeric values of TRUE and FALSE enum SbxBOOL { SbxFALSE = 0, SbxTRUE = -1 }; -#endif -// von #ifndef __RSC - +#endif // __RSC #endif diff --git a/basic/inc/basic/sbxfac.hxx b/basic/inc/basic/sbxfac.hxx index ffe479ac6528..3b5b67bf0360 100644 --- a/basic/inc/basic/sbxfac.hxx +++ b/basic/inc/basic/sbxfac.hxx @@ -40,7 +40,7 @@ class UniString; class SbxFactory { - BOOL bHandleLast; // TRUE: Factory soll zuletzt gefragt werden, da teuer + BOOL bHandleLast; // TRUE: Factory is asked at last because of its expensiveness public: SbxFactory( BOOL bLast=FALSE ) { bHandleLast = bLast; } BOOL IsHandleLast( void ) { return bHandleLast; } diff --git a/basic/inc/basic/sbxform.hxx b/basic/inc/basic/sbxform.hxx index ace1dd874eb7..40d0d764cfd2 100644 --- a/basic/inc/basic/sbxform.hxx +++ b/basic/inc/basic/sbxform.hxx @@ -32,10 +32,10 @@ #define _SBXFORM_HXX //==================================================================== -// Klasse zur Implementation des Basic-Befehls: Format$( d,formatStr ) +// Implementation class for Basic command: Format$( d,formatStr ) //==================================================================== /* - Die Grammatik des Format-Strings (ein Versuch): + Grammar of format string (a try): ----------------------------------------------- format_string := {\special_char} general_format | scientific_format {\special_char} {;format_string} @@ -47,11 +47,11 @@ char := all_ascii_chars space_char := ' ' - {} mehrfach wiederholt, auch null-mal - [] genau einmal oder null-mal - () Klammer, z.B. (e | E) heisst e oder E, genau einmal + {} repeated multiple times (incl. zero times) + [] exactly one or zero times + () parenthesis, e.g. (e | E) means e or E times - Weitere vordefinierte Formate f"ur den Format-String im Format$()-Befehl: + Additional predefined formats for the format string: "General Number" "Currency" "Fixed" @@ -62,40 +62,36 @@ "True/False" "On/Off" - Bemerkung: fehlerhafte Format-Strings werden wie bei Visual-Basic ignoriert, - die Ausgabe ist dann ggf. 'undefiniert'. - Ascii-Buchstaben werden direkt ausgegeben. + Note: invalid format string are ignored just as in VisualBasic, the output is + probably 'undefined'. ASCII letters are outputted directly. - Einschr"ankungen in Visual-Basic: - - der Exponent (wiss. Schreibweise) kann maximal 3 Stellen haben ! + Constraints in VisualBasic: + - the exponent (scientific syntax) has a maximum of three digits! - Einschr"ankungen der neuen Implementation: - - das '+' Zeichen als Platzhalter bei der Mantisse ist nicht erlaubt + Constraints of new implementation: + - the '+' sign is not allowed as wildcard in the mantissa TODO: - - Datums-Formatierung - Platzhalter sind: 'h', 'm', 's', 'y' - vordefinierte String-Konstanten/Befehle: + - Date formatting + Wildcards are: 'h', 'm', 's', 'y' + predefined String-Constants/Commands: "AMPM", "Long Date", "Long Time" */ /* - es gibt zwei M"oglichkeiten eine Zahl auf einzelne - Ziffern zu untersuchen: + There are two possibilities to get the number of digits of a number: - a) verwende sprintf() - b) verwende log10() und pow() um Ziffer - 'selbst' zu pr"aparieren (hab Probleme mit Rundungsfehlern!) + a) use sprintf() + b) use log10() and pow() digit */ -#define _with_sprintf // verwende M"oglichkeit a) +#define _with_sprintf // use a) #include <tools/string.hxx> class SbxBasicFormater { public: - // der Konstruktor, nimmt die Zeichen f"ur den Dezimal-Punkt, - // das Tausender-Trenn-Zeichen sowie die notwendigen Resource - // Strings als Parameter. + // Constructor takes signs for decimal point, thousand separation sign + // and necessary resource strings. SbxBasicFormater( sal_Unicode _cDecPoint, sal_Unicode _cThousandSep, String _sOnStrg, String _sOffStrg, @@ -106,14 +102,14 @@ class SbxBasicFormater { String _sCurrencyStrg, String _sCurrencyFormatStrg ); - /* der Basic-Befehl: Format$( number,format-string ) + /* Basic command: Format$( number,format-string ) Parameter: - dNumber : die Zahl, die formatiert ausgegeben werden soll - sFormatStrg : der Format-String, z.B. ###0.0### + dNumber : number to be formated + sFormatStrg : the Format-String, e.g. ###0.0### - Return-Wert: - String mit der gew"unschten, formatierten Ausgabe + Return value: + String containing the formatted output */ String BasicFormat( double dNumber, String sFormatStrg ); String BasicFormatNull( String sFormatStrg ); @@ -121,7 +117,7 @@ class SbxBasicFormater { static BOOL isBasicFormat( String sFormatStrg ); private: - //*** einige Hilfsmethoden *** + //*** some helper methods *** //void ShowError( char *sErrMsg ); inline void ShiftString( String& sStrg, USHORT nStartPos ); inline void StrAppendChar( String& sStrg, sal_Unicode ch ); @@ -132,7 +128,7 @@ class SbxBasicFormater { void ParseBack( String& sStrg, const String& sFormatStrg, short nFormatPos ); #ifdef _with_sprintf - // Methoden "uber String-Konvertierung mit sprintf(): + // Methods for string conversion with sprintf(): void InitScan( double _dNum ); void InitExp( double _dNewExp ); short GetDigitAtPosScan( short nPos, BOOL& bFoundFirstDigit ); @@ -140,7 +136,7 @@ class SbxBasicFormater { BOOL& bFoundFirstDigit ); short GetDigitAtPosExpScan( short nPos, BOOL& bFoundFirstDigit ); #else - // Methoden "uber direktes 'ausrechen' mit log10() und pow(): + // Methods for direct 'calculation' with log10() and pow(): short GetDigitAtPos( double dNumber, short nPos, double& dNextNumber, BOOL& bFoundFirstDigit ); short RoundDigit( double dNumber ); @@ -160,10 +156,10 @@ class SbxBasicFormater { void ScanFormatString( double dNumber, const String& sFormatStrg, String& sReturnStrg, BOOL bCreateSign ); - //*** Daten *** - sal_Unicode cDecPoint; // das Zeichen f"ur den Dezimal-Punkt - sal_Unicode cThousandSep; // das Zeichen f"ur das Tausender-Trennzeichen - // Texte zur Ausgabe: + //*** Data *** + sal_Unicode cDecPoint; // sign for the decimal point + sal_Unicode cThousandSep; // sign for thousand delimiter + // Text for output: String sOnStrg; String sOffStrg; String sYesStrg; @@ -173,15 +169,15 @@ class SbxBasicFormater { String sCurrencyStrg; String sCurrencyFormatStrg; - //*** tempor"are Daten f"ur die Scan-Schleife *** + //*** temporary data for scan loop *** //----------------------------------------------- - // Zeichenkette, in dem die Zahl als Scientific-Format abgelegt wird + // String containing the number in scientific format String sSciNumStrg; - // Zeichenkette, in der der Exponent der Zahl abgelegt wird + // String containing the exponent of the number String sNumExpStrg; - double dNum; // die zu scannede Zahl - short nNumExp; // der Exponent der zu scannenden Zahl - short nExpExp; // die Anzahl der Stellen im Exponenten + double dNum; // the number that is scanned + short nNumExp; // the exponent of the number + short nExpExp; // the number of digits in the exponent }; #endif diff --git a/basic/inc/basic/sbxobj.hxx b/basic/inc/basic/sbxobj.hxx index 22625d382aaf..6a62f4a52978 100644 --- a/basic/inc/basic/sbxobj.hxx +++ b/basic/inc/basic/sbxobj.hxx @@ -46,14 +46,14 @@ class SbxObject : public SbxVariable, public SfxListener SbxObjectImpl* mpSbxObjectImpl; // Impl data SbxArray* FindVar( SbxVariable*, USHORT& ); - // AB 23.3.1997, Spezial-Methode fuer VCPtrRemove (s.u.) + // AB 23.3.1997, special method for VCPtrRemove (see below) SbxArray* VCPtrFindVar( SbxVariable*, USHORT& ); protected: - SbxArrayRef pMethods; // Methoden - SbxArrayRef pProps; // Properties - SbxArrayRef pObjs; // Objekte - SbxProperty* pDfltProp; // Default-Property - String aClassName; // Klassenname + SbxArrayRef pMethods; // Methods + SbxArrayRef pProps; // Properties + SbxArrayRef pObjs; // Objects + SbxProperty* pDfltProp; // Default-Property + String aClassName; // Classname String aDfltPropName; virtual BOOL LoadData( SvStream&, USHORT ); virtual BOOL StoreData( SvStream& ) const; @@ -77,34 +77,34 @@ public: SbxProperty* GetDfltProperty(); void SetDfltProperty( const String& r ); void SetDfltProperty( SbxProperty* ); - // Suchen eines Elements + // Search for an element virtual SbxVariable* FindUserData( UINT32 nUserData ); virtual SbxVariable* Find( const String&, SbxClassType ); SbxVariable* FindQualified( const String&, SbxClassType ); - // Quick-Call-Interface fuer Methoden + // Quick-Call-Interface for Methods virtual BOOL Call( const String&, SbxArray* = NULL ); - // Execution von DDE-Kommandos + // Execution of DDE-Commands SbxVariable* Execute( const String& ); - // Elemente verwalten + // Manage elements virtual BOOL GetAll( SbxClassType ) { return TRUE; } SbxVariable* Make( const String&, SbxClassType, SbxDataType ); virtual SbxObject* MakeObject( const String&, const String& ); virtual void Insert( SbxVariable* ); - // AB 23.4.1997, Optimierung, Einfuegen ohne Ueberpruefung auf doppelte - // Eintraege und ohne Broadcasts, wird nur in SO2/auto.cxx genutzt + // AB 23.4.1997, Optimization, Insertion without check for duplicate Entries and + // without Broadcasts, only used in SO2/auto.cxx void QuickInsert( SbxVariable* ); - // AB 23.3.1997, Spezial-Methode, gleichnamige Controls zulassen + // AB 23.3.1997, Special-Method, allow corresponding controls void VCPtrInsert( SbxVariable* ); virtual void Remove( const String&, SbxClassType ); virtual void Remove( SbxVariable* ); - // AB 23.3.1997, Loeschen per Pointer fuer Controls (doppelte Namen!) + // AB 23.3.1997, deletion per pointer for controls (duplicate names!) void VCPtrRemove( SbxVariable* ); void SetPos( SbxVariable*, USHORT ); - // Makro-Recording + // Macro-Recording virtual String GenerateSource( const String &rLinePrefix, const SbxObject *pRelativeTo ); - // Direktzugriff auf die Arrays + // Direct access on arrays SbxArray* GetMethods() { return pMethods; } SbxArray* GetProperties() { return pProps; } SbxArray* GetObjects() { return pObjs; } diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx index 0f3e1d79c5d5..4ae2f244c4b9 100644 --- a/basic/inc/basic/sbxvar.hxx +++ b/basic/inc/basic/sbxvar.hxx @@ -67,7 +67,7 @@ struct SbxINT64 nHigh++; } - // blc/os2i vertraegt kein operator = + // blc/os2i do not like operator = void Set(double n) { if( n >= 0 ) @@ -233,16 +233,16 @@ class SbxValueImpl; class SbxValue : public SbxBase { - friend class SbiDllMgr; // BASIC-Runtime, muss an aData ran + friend class SbiDllMgr; // BASIC-Runtime must access aData SbxValueImpl* mpSbxValueImplImpl; // Impl data - // #55226 Zusaetzliche Info transportieren + // #55226 Transport additional infos SbxValue* TheRealValue( BOOL bObjInObjError ) const; SbxValue* TheRealValue() const; protected: - SbxValues aData; // Daten - String aPic; // Picture-String + SbxValues aData; // Data + String aPic; // Picture-String virtual void Broadcast( ULONG ); // Broadcast-Call virtual ~SbxValue(); @@ -279,7 +279,7 @@ public: BOOL IsUInt() const { return BOOL( GetType() == SbxUINT ); } BOOL IspChar() const { return BOOL( GetType() == SbxLPSTR ); } BOOL IsNumeric() const; - BOOL IsNumericRTL() const; // #41692 Schnittstelle fuer Basic + BOOL IsNumericRTL() const; // #41692 Interface for Basic BOOL ImpIsNumeric( BOOL bOnlyIntntl ) const; // Implementation virtual SbxClassType GetClass() const; @@ -328,10 +328,10 @@ public: BOOL PutDate( double ); BOOL PutBool( BOOL ); BOOL PutErr( USHORT ); - BOOL PutStringExt( const String& ); // mit erweiterter Auswertung (International, "TRUE"/"FALSE") + BOOL PutStringExt( const String& ); // with extended analysis (International, "TRUE"/"FALSE") BOOL PutString( const String& ); - BOOL PutString( const sal_Unicode* ); // Typ = SbxSTRING - BOOL PutpChar( const sal_Unicode* ); // Typ = SbxLPSTR + BOOL PutString( const sal_Unicode* ); // Type = SbxSTRING + BOOL PutpChar( const sal_Unicode* ); // Type = SbxLPSTR BOOL PutDecimal( SbxDecimal* pDecimal ); BOOL PutObject( SbxBase* ); BOOL PutData( void* ); @@ -353,12 +353,12 @@ public: BOOL Scan( const String&, USHORT* = NULL ); void Format( String&, const String* = NULL ) const; - // Schnittstelle fuer CDbl im Basic + // Interface for CDbl in Basic static SbxError ScanNumIntnl( const String& rSrc, double& nVal, BOOL bSingle=FALSE ); - // Die folgenden Operatoren sind zwecks einfacherem - // Zugriff definiert. Fehlerkonditionen wie Ueberlauf - // oder Konversionen werden nicht beruecksichtigt. + // The following operators are definied for easier handling. + // Error conditions (overflow, conversions) are not + // taken into consideration. inline int operator ==( const SbxValue& ) const; inline int operator !=( const SbxValue& ) const; @@ -446,15 +446,14 @@ class SbxVariable : public SbxValue friend class SbMethod; SbxVariableImpl* mpSbxVariableImpl; // Impl data - - SfxBroadcaster* pCst; // Broadcaster, falls angefordert - String maName; // Name, falls vorhanden - SbxArrayRef mpPar; // Parameter-Array, falls gesetzt - USHORT nHash; // Hash-ID fuer die Suche + SfxBroadcaster* pCst; // Broadcaster, if needed + String maName; // Name, if available + SbxArrayRef mpPar; // Parameter-Array, if set + USHORT nHash; // Hash-ID for search protected: - SbxInfoRef pInfo; // Evtl. angeforderte Infos - sal_uIntPtr nUserData; // Benutzerdaten fuer Call() - SbxObject* pParent; // aktuell zugeordnetes Objekt + SbxInfoRef pInfo; // Probably called information + sal_uIntPtr nUserData; // User data for Call() + SbxObject* pParent; // Currently attached object virtual ~SbxVariable(); virtual BOOL LoadData( SvStream&, USHORT ); virtual BOOL StoreData( SvStream& ) const; @@ -480,15 +479,14 @@ public: virtual SbxDataType GetType() const; virtual SbxClassType GetClass() const; - // Das Parameter-Interface + // Parameter-Interface virtual SbxInfo* GetInfo(); void SetInfo( SbxInfo* p ); void SetParameters( SbxArray* p ); SbxArray* GetParameters() const { return mpPar; } // Sfx-Broadcasting-Support: - // Zwecks Einsparung von Daten und besserer DLL-Hierarchie - // erst einmal per Casting + // Due to data reduction and better DLL-hierarchie currently via casting SfxBroadcaster& GetBroadcaster(); BOOL IsBroadcaster() const { return BOOL( pCst != NULL ); } virtual void Broadcast( ULONG nHintId ); diff --git a/basic/inc/basic/testtool.hxx b/basic/inc/basic/testtool.hxx index e85241f7693c..1cdb42fd042c 100644 --- a/basic/inc/basic/testtool.hxx +++ b/basic/inc/basic/testtool.hxx @@ -64,7 +64,7 @@ BOOL IsTTSignatureForUnicodeTextfile( String aLine ); } \ P_FEHLERLISTE->C40_INSERT(ErrorEntry, pErr, P_FEHLERLISTE->Count());\ } -// Irgendwann noch was mit der UID anfangen !! +// ??? Irgendwann noch was mit der UID anfangen !! #define ADD_ERROR(nNr, aStr) { \ if ( !SbxBase::IsError() ) \ SbxBase::SetError( nNr ); \ @@ -75,7 +75,7 @@ BOOL IsTTSignatureForUnicodeTextfile( String aLine ); #define GET_ERROR() P_FEHLERLISTE->GetObject(0) #define IS_ERROR() ( P_FEHLERLISTE->Count() > 0 ) -// bertragen des Fehlerlogs +// Transmission of error logs enum TTLogType { LOG_RUN, LOG_TEST_CASE, LOG_ERROR, LOG_CALL_STACK, LOG_MESSAGE, LOG_WARNING, LOG_ASSERTION, LOG_QA_ERROR, LOG_ASSERTION_STACK }; struct TTDebugData @@ -96,7 +96,7 @@ public: TTDebugData aDebugData; }; -// Zum bertragen der Fensterinformation aus der Testapp +// For transmission of window information from the Testapp struct WinInfoRec { public: @@ -109,7 +109,7 @@ public: BOOL bIsReset; }; -/// defines fr syntax Highlighting +// Defines for syntax Highlighting #define TT_KEYWORD ((SbTextType)100) // Including locally executed commands like 'use' ... #define TT_REMOTECMD ((SbTextType)101) // Remotely executed commands like 'nodebug' #define TT_LOCALCMD ((SbTextType)102) // Locally executed commands like 'use' @@ -123,7 +123,7 @@ public: #define FILELIST3 ((SbTextType)113) // Symbols in file 3 #define FILELIST4 ((SbTextType)114) // Symbols in file 4 -/// defines fr hints vom TestToolObj an die Applikation +/// defines for hints from TestToolObj to the Application #define SBX_HINT_LANGUAGE_EXTENSION_LOADED SFX_HINT_USER06 #define SBX_HINT_EXECUTION_STATUS_INFORMATION SFX_HINT_USER07 @@ -160,4 +160,4 @@ public: USHORT GetType(){ return mnType; } }; -#endif //#ifndef _BASIC_TESTTOOL_HXX_ +#endif // _BASIC_TESTTOOL_HXX_ diff --git a/basic/inc/basic/ttglobal.hrc b/basic/inc/basic/ttglobal.hrc index 1ca5f45a1eda..8ebcd8bcf8a9 100644 --- a/basic/inc/basic/ttglobal.hrc +++ b/basic/inc/basic/ttglobal.hrc @@ -32,20 +32,20 @@ #define _TTGLOBAL_HXX /////////////////////////////// -// Fehlermeldungen, die in das Resultfile gelangen. +// Error message that go to the Resultfile. // ********************* -// *** !!ACHTUNG!! *** +// *** !!ATTENTION!! *** // ********************* -// Die Nummern drfen sich NIE! ndern, -// da sie in den Resultfiles gespeichert sind, und bei erneutem Anzeigen -// statdessen die entsprechenden neuen oder garkeine Strings angzeigt werden. +// Theses numbers MUST NOT change ever! +// Because they are stored in the Resultfiles and if you showed them again +// the appropriate new or no Strings are viewed. /////////////////////////////// -// Start der Ressourcen fr das Testtool (Eigene Datei) -// > 256 und > 9100 (Grsste res im TT selbst) -#define TT_START 20000 // Messages aus /basic/source/testtool -#define BAS_START 21000 // Messages aus /basic/source/app -#define SVT_START 22000 // Messages aus /svtools/source/plugapp +// Start of Ressources for the Testtool (own file) +// > 256 and > 9100 (Biggest res in TT itself) +#define TT_START 20000 // Messages from /basic/source/testtool +#define BAS_START 21000 // Messages from /basic/source/app +#define SVT_START 22000 // Messages from /svtools/source/plugapp #endif diff --git a/basic/inc/modsizeexceeded.hxx b/basic/inc/modsizeexceeded.hxx index 00756d812dc0..34915db3a95e 100644 --- a/basic/inc/modsizeexceeded.hxx +++ b/basic/inc/modsizeexceeded.hxx @@ -36,20 +36,21 @@ class ModuleSizeExceeded : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > { - // c++ interface + // C++ interface public: ModuleSizeExceeded( const com::sun::star::uno::Sequence< ::rtl::OUString>& sModules ); sal_Bool isAbort() const; sal_Bool isApprove() const; - // uno interface + // UNO interface public: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException ) { return m_lContinuations; } com::sun::star::uno::Any SAL_CALL getRequest() throw( com::sun::star::uno::RuntimeException ) { return m_aRequest; } + // member private: rtl::OUString m_sMods; diff --git a/basic/inc/svtmsg.hrc b/basic/inc/svtmsg.hrc index 6d2c368cea1a..89246aac575e 100644 --- a/basic/inc/svtmsg.hrc +++ b/basic/inc/svtmsg.hrc @@ -30,17 +30,16 @@ #include "basic/ttglobal.hrc" -// Hier sind die Messages aus dem Verzeichnis /basic/source/app enhalten - +// Here are the messages of /basic/source/app included /////////////////////////////// -// Fehlermeldungen, die in das Resultfile gelangen. +// Error message that go to the Resultfile. // ********************* -// *** !!ACHTUNG!! *** +// *** !!ATTENTION!! *** // ********************* -// Die Nummern drfen sich NIE! ndern, -// da sie in den Resultfiles gespeichert sind, und bei erneutem Anzeigen -// statdessen die entsprechenden neuen oder garkeine Strings angzeigt werden. +// Theses numbers MUST NOT change ever! +// Because they are stored in the Resultfiles and if you showed them again +// the appropriate new or no Strings are viewed. /////////////////////////////// #define S_GPF_ABORT ( SVT_START + 0 ) diff --git a/basic/inc/ttmsg.hrc b/basic/inc/ttmsg.hrc index 0d03333d57a8..46e0028d20c0 100644 --- a/basic/inc/ttmsg.hrc +++ b/basic/inc/ttmsg.hrc @@ -30,17 +30,16 @@ #include "basic/ttglobal.hrc" -// Hier sind die Messages aus dem Verzeichnis /basic/source/testtool enhalten - +// Here are the messages of directory /basic/source/testtool included /////////////////////////////// -// Fehlermeldungen, die in das Resultfile gelangen. +// Error message that go to the Resultfile. // ********************* -// *** !!ACHTUNG!! *** +// *** !!ATTENTION!! *** // ********************* -// Die Nummern drfen sich NIE! ndern, -// da sie in den Resultfiles gespeichert sind, und bei erneutem Anzeigen -// statdessen die entsprechenden neuen oder garkeine Strings angzeigt werden. +// Theses numbers MUST NOT change ever! +// Because they are stored in the Resultfiles and if you showed them again +// the appropriate new or no Strings are viewed. /////////////////////////////// #define S_NAME_NOT_THERE ( TT_START + 0 ) |