summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-25 00:18:20 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-25 00:18:20 +0000
commita694f788b723e08c9977fdeb80113095939c6a89 (patch)
tree5bde2b68919b2d566eb90b85789eeffecba4533d
parentc2c40390517a885e5601304c59bc625a0e6e6331 (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#
-rw-r--r--basic/inc/basic/dispdefs.hxx10
-rw-r--r--basic/inc/basic/mybasic.hxx9
-rw-r--r--basic/inc/basic/process.hxx2
-rw-r--r--basic/inc/basic/sbdef.hxx61
-rw-r--r--basic/inc/basic/sberrors.hxx16
-rw-r--r--basic/inc/basic/sbmod.hxx18
-rw-r--r--basic/inc/basic/sbstar.hxx51
-rw-r--r--basic/inc/basic/sbuno.hxx4
-rw-r--r--basic/inc/basic/sbx.hxx36
-rw-r--r--basic/inc/basic/sbxbase.hxx13
-rw-r--r--basic/inc/basic/sbxcore.hxx19
-rw-r--r--basic/inc/basic/sbxdef.hxx151
-rw-r--r--basic/inc/basic/sbxfac.hxx2
-rw-r--r--basic/inc/basic/sbxform.hxx82
-rw-r--r--basic/inc/basic/sbxobj.hxx32
-rw-r--r--basic/inc/basic/sbxvar.hxx46
-rw-r--r--basic/inc/basic/testtool.hxx12
-rw-r--r--basic/inc/basic/ttglobal.hrc20
-rw-r--r--basic/inc/modsizeexceeded.hxx5
-rw-r--r--basic/inc/svtmsg.hrc13
-rw-r--r--basic/inc/ttmsg.hrc13
-rw-r--r--basic/source/app/app.cxx82
-rw-r--r--basic/source/app/app.hxx36
-rw-r--r--basic/source/app/appbased.cxx55
-rw-r--r--basic/source/app/appbased.hxx28
-rw-r--r--basic/source/app/appedit.cxx41
-rw-r--r--basic/source/app/appedit.hxx18
-rw-r--r--basic/source/app/apperror.cxx4
-rw-r--r--basic/source/app/apperror.hxx8
-rw-r--r--basic/source/app/appwin.cxx61
-rw-r--r--basic/source/app/appwin.hxx84
-rw-r--r--basic/source/app/basicrt.cxx46
-rw-r--r--basic/source/app/brkpnts.cxx14
-rw-r--r--basic/source/app/dataedit.hxx14
-rw-r--r--basic/source/app/dialogs.cxx107
-rw-r--r--basic/source/app/makefile.mk2
-rw-r--r--basic/source/app/msgedit.cxx43
-rw-r--r--basic/source/app/msgedit.hxx8
-rw-r--r--basic/source/app/mybasic.cxx36
-rw-r--r--basic/source/app/printer.cxx19
-rw-r--r--basic/source/app/process.cxx14
-rw-r--r--basic/source/app/processw.cxx127
-rw-r--r--basic/source/app/processw.hxx26
-rw-r--r--basic/source/app/status.cxx4
-rw-r--r--basic/source/app/status.hxx6
-rw-r--r--basic/source/app/textedit.cxx85
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx8
-rw-r--r--basic/source/basmgr/basmgr.cxx153
-rw-r--r--basic/source/classes/disas.cxx347
-rw-r--r--basic/source/classes/eventatt.cxx4
-rw-r--r--basic/source/classes/image.cxx75
-rw-r--r--basic/source/classes/propacc.cxx15
-rw-r--r--basic/source/classes/sb.cxx109
-rw-r--r--basic/source/comp/parser.cxx61
-rw-r--r--basic/source/inc/parser.hxx16
-rw-r--r--basic/util/makefile.mk2
-rw-r--r--basic/workben/mgrtest.cxx12
-rw-r--r--idl/source/prj/command.cxx6
58 files changed, 1115 insertions, 1276 deletions
diff --git a/basic/inc/basic/dispdefs.hxx b/basic/inc/basic/dispdefs.hxx
index 6b59272410..89dd6839fb 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 (für Kompatibilität mit altem Office)
+#define DH_MODE_DATA_VALID 0x0001 // ModeData (for compatibility with old Office)
-#define DH_MODE_KURZNAME 0x0002 // Anzeige des Kurznamens (wo möglich) 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 b334910ae9..c455783448 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 für testtool und basic
- // gleichermaßen verwendet wird.
- SbxObject *pTestObject; // für 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 für 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 3e4431198f..ccc0e003a0 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 87501927b6..c13cd69378 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 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 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 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 d9c4f2f7e0..bd0196708c 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 b6d706fac9..b309179ea5 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 können 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 2ec720e5b3..9bc79b7b08 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 a57c9599a5..b4f9f4b61f 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 3dc95db0e1..0a686e5d96 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 657ce19635..577e509b28 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 7b51f75ebe..2a424d94d2 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 749eb9b536..8797d8e912 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 untersttzt
+ 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 untersttzt
+ 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 untersttzt
+ 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 c691f63687..8354ff0b23 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 3c985357a5..326fb83acc 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 d3d09b0f53..a517b4375e 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 d84b885a11..57648fc025 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 0d40ec32f0..a425844ce5 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 für 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 für 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 429bb1fe0f..a79ca954da 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 dürfen 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 für das Testtool (Eigene Datei)
-// > 256 und > 9100 (Grösste 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 a8a1c91fd3..16c91c1027 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 fb98f004c3..e9cb0c715a 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 dürfen 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 fe81f08dd7..8d203d7ea9 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 dürfen 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 )
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 1252c5bc22..00a7877fcf 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -192,7 +192,7 @@ BOOL IsTTSignatureForUnicodeTextfile( String aLine )
return aLine.EqualsAscii( TT_SIGNATURE_FOR_UNICODE_TEXTFILES );
}
-BasicApp aBasicApp; // Applikations-Instanz
+BasicApp aBasicApp; // Application instance
static const char * const components[] =
{
@@ -202,7 +202,7 @@ static const char * const components[] =
, "sax.uno" SAL_DLLEXTENSION
, "stocservices.uno" SAL_DLLEXTENSION
, SAL_MODULENAME( "fileacc" )
- , SAL_MODULENAME( "mcnttype" ) //Clipboard Ask Oliver Braun
+ , SAL_MODULENAME( "mcnttype" ) // Clipboard Ask Oliver Braun
, "i18npool.uno" SAL_DLLEXTENSION
// Reading of files in specific encodings like UTF-8 using
// createUnoService( "com.sun.star.io.TextInputStream" ) and such
@@ -408,7 +408,6 @@ void BasicApp::Main( )
PostUserEvent( LINK( this, BasicApp, LateInit ) );
Execute();
- // Loeschen der Members:
// delete pHelp;
delete pFrame;
@@ -584,7 +583,7 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
nFlags = 0;
// Icon aAppIcon;
- if ( pBasic->pTestObject ) // also sid wir testtool
+ if ( pBasic->pTestObject ) // Are we the testtool?
{
// aAppIcon = Icon( ResId( RID_APPICON2 ) );
aAppName = String( SttResId( IDS_APPNAME2 ) );
@@ -608,9 +607,9 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
pFileMenu->SetHighlightHdl( LINK( this, BasicFrame, HighlightMenu ) );
pFileMenu->SetActivateHdl( LINK( this, BasicFrame, InitMenu ) );
pFileMenu->SetDeactivateHdl( LINK( this, BasicFrame, DeInitMenu ) );
- if (Basic().pTestObject ) // Wir sind also TestTool
+ if (Basic().pTestObject ) // Are we TestTool?
{
- pFileMenu->RemoveItem( pFileMenu->GetItemPos( RID_FILELOADLIB ) -1 ); // Der Trenner davor
+ pFileMenu->RemoveItem( pFileMenu->GetItemPos( RID_FILELOADLIB ) -1 ); // Separator before
pFileMenu->RemoveItem( pFileMenu->GetItemPos( RID_FILELOADLIB ) );
pFileMenu->RemoveItem( pFileMenu->GetItemPos( RID_FILESAVELIB ) );
}
@@ -625,14 +624,14 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
pRunMenu->SetHighlightHdl( LINK( this, BasicFrame, HighlightMenu ) );
pRunMenu->SetActivateHdl( LINK( this, BasicFrame, InitMenu ) );
pRunMenu->SetDeactivateHdl( LINK( this, BasicFrame, DeInitMenu ) );
- if (Basic().pTestObject ) // Wir sind also TestTool
+ if (Basic().pTestObject ) // Are we TestTool?
{
pRunMenu->RemoveItem( pRunMenu->GetItemPos( RID_RUNDISAS ) );
pRunMenu->RemoveItem( pRunMenu->GetItemPos( RID_RUNCOMPILE ) );
}
PopupMenu *pExtras;
- if (Basic().pTestObject ) // Wir sind also TestTool
+ if (Basic().pTestObject ) // Are we TestTool?
{
pExtras = new PopupMenu( SttResId( RID_TT_EXTRAS ) );
pBar->InsertItem( RID_TT_EXTRAS, String( SttResId( RID_TT_EXTRAS_NAME ) ), 0, pBar->GetItemPos( RID_APPWINDOW ) );
@@ -666,7 +665,7 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
UpdateTitle();
// SetIcon( aAppIcon );
- // Groesse: halbe Breite, dreiviertel Hoehe minus 2 * IconSize
+ // Size: half width, 0.75 * height - 2 * IconSize
{
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
aConf.SetGroup("WinGeom");
@@ -748,7 +747,7 @@ BasicFrame::~BasicFrame()
delete pList;
// delete pExecutionStatus;
// delete pBasic;
- pBasic.Clear(); // Da jetzt REF
+ pBasic.Clear();
}
void BasicFrame::Command( const CommandEvent& rCEvt )
@@ -887,12 +886,12 @@ void BasicFrame::Resize()
pStatus->SetSizePixel( aStatusSize );
- // Eventuell Maximized window resizen
+ // Resize possibly maximized window
ULONG i;
for( i = pList->Count(); i > 0 ; i-- )
{
if ( pList->GetObject( i-1 )->GetWinState() == TT_WIN_STATE_MAX )
- pList->GetObject( i-1 )->Maximize(); // resized auch
+ pList->GetObject( i-1 )->Maximize();
}
}
@@ -950,10 +949,8 @@ void BasicFrame::WinShow_Hide()
{
if ( p->pDataEdit )
{
- if ( p->GetWinState() & TT_WIN_STATE_HIDE // Versteckt
- || ( bWasFullscreen
- && ( !p->IsPined() || p->GetWinState() & TT_WIN_STATE_MAX )
- )
+ if ( p->GetWinState() & TT_WIN_STATE_HIDE // Hidden
+ || ( bWasFullscreen && ( !p->IsPined() || p->GetWinState() & TT_WIN_STATE_MAX ))
)
p->Hide( SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
else
@@ -965,7 +962,7 @@ void BasicFrame::WinShow_Hide()
void BasicFrame::WinMax_Restore()
{
- // Die ApplicationButtons
+ // The application buttons
AppWin* p;
BOOL bHasFullscreenWin = FALSE;
for( p = pList->First(); p && !bHasFullscreenWin ; p = pList->Next() )
@@ -998,7 +995,7 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
pWinMenu->RemoveItem( pWinMenu->GetItemPos( pWin->GetWinId() ) );
- // Trenner entfernen
+ // Remove separator
if ( pWinMenu->GetItemType( pWinMenu->GetItemCount() - 1 ) == MENUITEM_SEPARATOR )
pWinMenu->RemoveItem( pWinMenu->GetItemCount() - 1 );
@@ -1007,13 +1004,12 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
void BasicFrame::AddWindow( AppWin *pWin )
{
- // Eintragen:
pList->Insert( pWin, LIST_APPEND );
pWork = pWin;
WinMax_Restore();
- // Hauptmenue aktivieren:
+ // Enable main menu
MenuBar* pMenu = GetMenuBar();
if( pList->Count() > 0 ) {
pMenu->EnableItem( RID_APPEDIT, TRUE );
@@ -1024,11 +1020,11 @@ void BasicFrame::AddWindow( AppWin *pWin )
PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW );
USHORT nLastID = pWinMenu->GetItemId( pWinMenu->GetItemCount() - 1 );
- // Trenner erforderlich
+ // Separator necessary
if ( nLastID < RID_WIN_FILE1 && pWinMenu->GetItemType( pWinMenu->GetItemCount() - 1 ) != MENUITEM_SEPARATOR )
pWinMenu->InsertSeparator();
- // Freie ID finden
+ // Find free ID
USHORT nFreeID = RID_WIN_FILE1;
while ( pWinMenu->GetItemPos( nFreeID ) != MENU_ITEM_NOTFOUND && nFreeID < RID_WIN_FILEn )
nFreeID++;
@@ -1076,7 +1072,7 @@ BOOL BasicFrame::Close()
{
aLineNum.Stop();
- // Alle übrigen Dialoge schliessen um assertions zu vermeiden!!
+ // Close remaining dialogs to avoid assertions
while ( GetWindow( WINDOW_OVERLAP )->GetWindow( WINDOW_FIRSTOVERLAP ) )
{
delete GetWindow( WINDOW_OVERLAP )->GetWindow( WINDOW_FIRSTOVERLAP )->GetWindow( WINDOW_CLIENT );
@@ -1105,8 +1101,7 @@ BOOL BasicFrame::CompileAll()
return TRUE;
}
-// Menu aufsetzen
-
+// Setup menu
#define MENU2FILENAME( Name ) Name.Copy( Name.SearchAscii(" ") +1).EraseAllChars( '~' )
#define LRUNr( nNr ) CByteString("LRU").Append( ByteString::CreateFromInt32( nNr ) )
String FILENAME2MENU( USHORT nNr, String aName )
@@ -1121,6 +1116,7 @@ String FILENAME2MENU( USHORT nNr, String aName )
return aRet.AppendAscii(" ").Append( aName );
}
+
void BasicFrame::AddToLRU(String const& aFile)
{
Config aConfig(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
@@ -1203,7 +1199,7 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
BOOL bHasEdit = BOOL( /*bNormal &&*/ pWork != NULL );
-// pMenu->EnableItem( RID_FILENEW, bNormal ); // immer möglich
+// pMenu->EnableItem( RID_FILENEW, bNormal ); // always possible
// pMenu->EnableItem( RID_FILEOPEN, bNormal );
pMenu->EnableItem( RID_FILECLOSE, bHasEdit );
pMenu->EnableItem( RID_FILESAVE, bHasEdit );
@@ -1216,15 +1212,19 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
BOOL bHasErr = BOOL( bNormal && pBasic->GetErrors() != 0 );
BOOL bNext = bHasErr & bNormal;
BOOL bPrev = bHasErr & bNormal;
- if( bHasErr ) {
+ if( bHasErr )
+ {
ULONG n = pBasic->aErrors.GetCurPos();
- if( n == 0 ) bPrev = FALSE;
- if( USHORT(n+1) == pBasic->GetErrors() ) bNext = FALSE;
+ if( n == 0 )
+ bPrev = FALSE;
+ if( USHORT(n+1) == pBasic->GetErrors() )
+ bNext = FALSE;
}
pMenu->EnableItem( RID_RUNNEXTERR, bNext );
pMenu->EnableItem( RID_RUNPREVERR, bPrev );
pMenu->CheckItem( RID_RUNDISAS, bDisas );
- if( pWork ) pWork->InitMenu( pMenu );
+ if( pWork )
+ pWork->InitMenu( pMenu );
return TRUE;
}
@@ -1369,8 +1369,7 @@ BOOL BasicFrame::LoadFile( String aFilename )
return bSuccess;
}
-// Kommando ausfuehren
-
+// Execute command
long BasicFrame::Command( short nID, BOOL bChecked )
{
BasicError* pErr;
@@ -1477,7 +1476,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
}
if( bInBreak )
- // Nur das Flag zuruecksetzen
+ // Reset the flag
bInBreak = FALSE;
else
{
@@ -1491,12 +1490,12 @@ long BasicFrame::Command( short nID, BOOL bChecked )
Basic().ClearGlobalVars();
p->Run();
BasicDLL::SetDebugMode( FALSE );
- // Falls waehrend Interactive=FALSE abgebrochen
+ // If cancelled during Interactive=FALSE
// BasicDLL::EnableBreak( TRUE );
}
}}
}
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN )); // nach run
+// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN )); // after run
break;
case RID_RUNCOMPILE:
if( pWork && pWork->ISA(AppBasEd) && SaveAll() )
@@ -1639,7 +1638,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
*/ case RID_HELPABOUT:
{
SttResId aResId( IDD_ABOUT_DIALOG );
- if ( Basic().pTestObject ) // Wir sind also TestTool
+ if ( Basic().pTestObject ) // Are we TestTool?
aResId = SttResId( IDD_TT_ABOUT_DIALOG );
else
aResId = SttResId( IDD_ABOUT_DIALOG );
@@ -1785,7 +1784,7 @@ void NewFileDialog::FilterSelect()
if ( aLastPath.Len() == 0 )
aLastPath = DirEntry( GetPath() ).GetPath().GetFull();
if ( aLastPath.CompareIgnoreCaseToAscii( DirEntry( GetPath() ).GetPath().GetFull() ) != COMPARE_EQUAL )
- return; // Der Benutzer entscheidet sich nachdem er den Pfad geändert hat.
+ return; // User decides after he has changed the path
String aCurFilter = GetCurFilter();
USHORT nFilterNr = 0;
@@ -1860,7 +1859,7 @@ BOOL BasicFrame::QueryFileName
else
aDlg.SetCurFilter( String( SttResId( IDS_BASFILTER ) ) );
- aDlg.FilterSelect(); // Setzt den Pfad vom letzten mal.
+ aDlg.FilterSelect(); // Selects the last used path
// if ( bSave )
if ( rName.Len() > 0 )
aDlg.SetPath( rName );
@@ -1904,7 +1903,7 @@ void BasicFrame::LoadLibrary()
if( pNew && pNew->ISA( MyBasic ) )
{
pBasic = pNew;
- // Alle Inhalte - sofern vorhanden - anzeigen
+ // Show all contents if existing
SbxArray* pMods = pBasic->GetModules();
for( USHORT i = 0; i < pMods->Count(); i++ )
{
@@ -1962,7 +1961,7 @@ String BasicFrame::GenRealString( const String &aResString )
aString = String( SttResId( (USHORT)(aValue.ToInt32()) ) );
// else
{
-// DBG_ERROR( "Ressource konnte nicht geladen werden" );
+// DBG_ERROR( "Could not load resource!" );
// return aResString;
}
nInsertPos = nStart;
@@ -1970,8 +1969,9 @@ String BasicFrame::GenRealString( const String &aResString )
aResult.Erase( nStart, nEnd-nStart+1 );
bFound = TRUE;
}
- else if ( aType.Search(BaseArgKenn) == 0 ) // Fängt mit BaseArgKenn an
+ else if ( aType.Search(BaseArgKenn) == 0 ) // Starts with BaseArgKenn
{
+ // TODO: What the hell is that for??
USHORT nArgNr = USHORT( aType.Copy( BaseArgKenn.Len() ).ToInt32() );
DBG_ASSERT( aString.Search( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")") ) != STRING_NOTFOUND, "Extra Argument given in String");
aString.SearchAndReplace( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")"), aValue );
diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx
index f6d4f03549..f348689773 100644
--- a/basic/source/app/app.hxx
+++ b/basic/source/app/app.hxx
@@ -81,8 +81,8 @@ public:
typedef USHORT FileType;
-#define FT_NO_FILE (FileType)0x00 // Ein Fehler ist aufgetreten ...
-#define FT_BASIC_SOURCE (FileType)0x01
+#define FT_NO_FILE (FileType)0x00 // An error has occurred ...
+#define FT_BASIC_SOURCE (FileType)0x01
#define FT_BASIC_INCLUDE (FileType)0x02
#define FT_RESULT_FILE (FileType)0x04
#define FT_RESULT_FILE_TXT (FileType)0x08
@@ -98,10 +98,10 @@ class BasicFrame : public WorkWindow, public SfxBroadcaster, public SfxListener
using SystemWindow::Notify;
using Window::Command;
-virtual BOOL Close(); // Schliessen
- BOOL CloseAll(); // Alle Fenster schliessen
- BOOL CompileAll(); // Alle Texte compilieren
- AutoTimer aLineNum; // Zeigt die Zeilennummer an
+virtual BOOL Close();
+ BOOL CloseAll(); // Close all windows
+ BOOL CompileAll(); // Compile all texts
+ AutoTimer aLineNum; // Show the line numbers
virtual void Resize();
virtual void Move();
virtual void GetFocus();
@@ -116,14 +116,14 @@ virtual void GetFocus();
- Timer aCheckFiles; // Prüfen der Dateien auf Änderungen
+ Timer aCheckFiles; // Checks the files for changes
BOOL bAutoReload;
BOOL bAutoSave;
DECL_LINK( CheckAllFiles, Timer* );
MyBasicRef pBasic; // BASIC-Engine
- String aAppName; // Inhalt der Titelteile der App:
+ String aAppName; // Title bar content
String aAppFile; // AppName AppFile [AppMode]
String aAppMode;
void UpdateTitle();
@@ -136,14 +136,14 @@ virtual void GetFocus();
public:
BOOL IsAutoRun();
void SetAutoRun( BOOL bAuto );
- BOOL bInBreak; // TRUE, wenn im Break-Handler
- StatusLine* pStatus; // Statuszeile
- EditList* pList; // List der Edit-Fenster
- AppWin* pWork; // aktuelles Edit-Fenster
- BasicPrinter* pPrn; // Drucker
+ BOOL bInBreak; // TRUE if in Break-Handler
+ StatusLine* pStatus; // Status line
+ EditList* pList; // List of edit windows
+ AppWin* pWork; // Current edit window
+ BasicPrinter* pPrn; // Printer
BOOL bDisas; // TRUE: disassemble
USHORT nFlags; // Debugging-Flags
- USHORT nMaximizedWindows; // Anzahl der Fenster, die maximized sind
+ USHORT nMaximizedWindows; // Number of maximized windows
void FocusWindow( AppWin *pWin );
void WinMax_Restore();
void WinShow_Hide();
@@ -166,10 +166,10 @@ public:
DECL_LINK( Log, TTLogMsg * );
DECL_LINK( WinInfo, WinInfoRec * );
BOOL LoadFile( String aFilename );
- long Command( short,BOOL=FALSE );// Kommando-Handler
- virtual void Command( const CommandEvent& rCEvt ); // Kommando-Handler
- BOOL SaveAll(); // Alle Fenster speichern
- BOOL QueryFileName( String& rName, FileType nFileType, BOOL bSave );// Dateinamen ermitteln
+ long Command( short,BOOL=FALSE ); // Command handler
+ virtual void Command( const CommandEvent& rCEvt ); // Command handler
+ BOOL SaveAll(); // Save all windows
+ BOOL QueryFileName( String& rName, FileType nFileType, BOOL bSave ); // Query for filename
DECL_LINK( ModuleWinExists, String* );
DECL_LINK( WriteString, String* );
AppBasEd* CreateModuleWin( SbModule* pMod );
diff --git a/basic/source/app/appbased.cxx b/basic/source/app/appbased.cxx
index 292b97e720..657b44e55a 100644
--- a/basic/source/app/appbased.cxx
+++ b/basic/source/app/appbased.cxx
@@ -48,7 +48,7 @@
#include "status.hxx"
#include "appbased.hxx"
#include "brkpnts.hxx"
-#include <basic/testtool.hxx> // defines für das Syntaxhighlighting
+#include <basic/testtool.hxx> // defines for Syntaxhighlighting
#include "basrid.hxx"
@@ -82,21 +82,21 @@ AppBasEd::AppBasEd( BasicFrame* pParent, SbModule* p )
pBreakpoints->SetModule( pMod );
- // Icon definieren:
+ // Define icon:
// pIcon = new Icon( ResId( RID_WORKICON ) );
// if( pIcon ) SetIcon( *pIcon );
SetText( pMod->GetName() );
pDataEdit->SetText( pMod->GetSource() );
- // Wurde ein Modul übergeben, dann den Quelltext von Platte laden
+ // If a module was given, load the source from harddisk
if ( p )
LoadSource();
- // Erst nach Laden des Quelltextes die Events weiterleiten
+ // Dispatch event AFTER loading the sourcecode
((TextEdit*)pDataEdit)->SetBreakpointWindow( pBreakpoints );
- // Compiled-Flag pflegen:
+ // Touch compile flag
pDataEdit->SetModifyHdl( LINK( this, AppBasEd, EditChange ) );
}
@@ -151,7 +151,6 @@ long AppBasEd::DeInitMenu( Menu* pMenu )
}
// Menu Handler
-
void AppBasEd::Command( const CommandEvent& rCEvt )
{
switch( rCEvt.GetCommand() ) {
@@ -163,27 +162,26 @@ void AppBasEd::Command( const CommandEvent& rCEvt )
}
}
-// Sourcecode-Datei laden
-
void AppBasEd::Resize()
{
- if( pDataEdit ) {
- AppEdit::Resize();
+ if( pDataEdit )
+ {
+ AppEdit::Resize();
- // Breakpoint window einfügen
- Size aEditSize = pDataEdit->GetSizePixel();
- Point aEditPos = pDataEdit->GetPosPixel();
+ // Insert breakpoint window
+ Size aEditSize = pDataEdit->GetSizePixel();
+ Point aEditPos = pDataEdit->GetPosPixel();
- pBreakpoints->SetPosPixel( aEditPos );
+ pBreakpoints->SetPosPixel( aEditPos );
- aEditPos.X() += BREAKPOINTSWIDTH;
- pDataEdit->SetPosPixel( aEditPos );
- aEditSize.Width() -= BREAKPOINTSWIDTH;
- pDataEdit->SetSizePixel( aEditSize );
+ aEditPos.X() += BREAKPOINTSWIDTH;
+ pDataEdit->SetPosPixel( aEditPos );
+ aEditSize.Width() -= BREAKPOINTSWIDTH;
+ pDataEdit->SetSizePixel( aEditSize );
- aEditSize.Width() = BREAKPOINTSWIDTH;
- pBreakpoints->SetSizePixel( aEditSize );
- }
+ aEditSize.Width() = BREAKPOINTSWIDTH;
+ pBreakpoints->SetSizePixel( aEditSize );
+ }
}
void AppBasEd::PostLoad()
@@ -210,7 +208,7 @@ void AppBasEd::Reload()
pDataEdit->SetSelection( aSelMemo );
}
-// Sourcecode-Datei nach Änderung auf Platte neu laden
+// Reload source code file after change
void AppBasEd::LoadSource()
{
BOOL bErr;
@@ -226,15 +224,14 @@ void AppBasEd::LoadSource()
bCompiled = FALSE; // because the code might have changed in the meantime
}
-// mit neuem Namen speichern
+// Save as (new name)
void AppBasEd::PostSaveAs()
{
pMod->SetName( GetText() );
AppEdit::PostSaveAs();
}
-// Compilieren
-
+// Compile
BOOL AppBasEd::Compile()
{
if( !pDataEdit->HasText() || bCompiled )
@@ -277,7 +274,8 @@ void AppBasEd::Run()
{
if ( (pAllModules->Get(i)->GetName()).Copy(0,2).CompareToAscii( "--" ) == COMPARE_EQUAL )
{
- SbxVariableRef pRMod = pAllModules->Get(i); // Kleiner Hack um ums basic rumzukommen. Sollte demnächst wieder dirkt gehen.
+ // Little hack to get around basic
+ SbxVariableRef pRMod = pAllModules->Get(i);
pFrame->Basic().Remove(pRMod);
i--;
}
@@ -287,13 +285,14 @@ void AppBasEd::Run()
if( pMain )
{
pMain->SetDebugFlags( pFrame->nFlags );
- // Loest Call aus!
+ // Triggers a call!
pFrame->SetAppMode( String( SttResId( IDS_APPMODE_RUN ) ) );
pMain->Run();
if (aBasicApp.pFrame)
{
BasicError* pErr = aBasicApp.pFrame->Basic().aErrors.First();
- if( pErr ) pErr->Show();
+ if( pErr )
+ pErr->Show();
aBasicApp.pFrame->SetAppMode( String() );
}
pMain->SetDebugFlags( 0 );
diff --git a/basic/source/app/appbased.hxx b/basic/source/app/appbased.hxx
index 58ada53240..f12b805240 100644
--- a/basic/source/app/appbased.hxx
+++ b/basic/source/app/appbased.hxx
@@ -45,31 +45,31 @@ class BreakpointWindow;
class AppBasEd : public AppEdit { // Editor-Window:
using DockingWindow::Notify;
- SbModuleRef pMod; // compiliertes Modul
- BOOL bCompiled; // TRUE, wenn compiliert
+ SbModuleRef pMod; // compile module
+ BOOL bCompiled; // TRUE if compiled
protected:
DECL_LINK( EditChange, void * );
#define BREAKPOINTSWIDTH 15
BreakpointWindow *pBreakpoints;
- virtual USHORT ImplSave(); // Datei speichern
+ virtual USHORT ImplSave(); // Save file
public:
TYPEINFO();
AppBasEd( BasicFrame*, SbModule* );
~AppBasEd();
- FileType GetFileType(); // Liefert den Filetype
+ FileType GetFileType(); // Returns Filetype
SbModule* GetModule() { return pMod; }
- long InitMenu( Menu* ); // Initialisierung des Menues
- virtual long DeInitMenu( Menu* ); // rücksetzen, so daß wieder alle Shortcuts enabled sind
- virtual void Command( const CommandEvent& rCEvt ); // Kommando-Handler
- virtual void Resize(); // Berücksichtigt die Breakpointleiste
- virtual void PostLoad(); // Nachbearbeiten des geladenen (Source am Modul setzen)
- virtual void PostSaveAs(); // Nachbearbeiten des Modils ...
+ long InitMenu( Menu* ); // Initialision of the menus
+ virtual long DeInitMenu( Menu* ); // Reset to enable all shortcuts
+ virtual void Command( const CommandEvent& rCEvt ); // Command handler
+ virtual void Resize(); // Includes the breakpoint bar
+ virtual void PostLoad(); // Set source of module
+ virtual void PostSaveAs(); // Postprocess of module...
void Reload();
- void LoadSource(); // Quelltext zu Objekt laden
- BOOL Compile(); // Text compilieren
- void Run(); // Image laufenlassen
- void Disassemble(); // Image disassemblieren
+ void LoadSource(); // Load source for object
+ BOOL Compile(); // Compile text
+ void Run(); // Run image
+ void Disassemble(); // Disassemble image
const String& GetModName() const { return pMod->GetName(); }
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
};
diff --git a/basic/source/app/appedit.cxx b/basic/source/app/appedit.cxx
index c5b22f9ccd..122aa9c7a1 100644
--- a/basic/source/app/appedit.cxx
+++ b/basic/source/app/appedit.cxx
@@ -52,11 +52,11 @@ AppEdit::AppEdit( BasicFrame* pParent )
, nCurTextWidth(5)
{
String aEmpty;
- // evtl. den Untitled-String laden:
+ // perhaps load the Untitled-String:
pDataEdit = new TextEdit( this, WB_LEFT );
LoadIniFile();
- // Icon definieren:
+ // define Icon:
// pIcon = new Icon( ResId( RID_WORKICON ) );
// if( pIcon ) SetIcon( *pIcon );
@@ -76,11 +76,11 @@ AppEdit::AppEdit( BasicFrame* pParent )
AppEdit::~AppEdit()
{
- DataEdit *pHold = pDataEdit;
- pDataEdit = NULL; // Erst abklemmen, dann löschen
- delete pHold;
- delete pHScroll;
- delete pVScroll;
+ DataEdit *pHold = pDataEdit;
+ pDataEdit = NULL;
+ delete pHold;
+ delete pHScroll;
+ delete pVScroll;
}
void AppEdit::LoadIniFile()
@@ -117,7 +117,7 @@ void AppEdit::LoadIniFile()
((TextEdit*)pDataEdit)->GetBreakpointWindow()->Invalidate();
}
- pTextView->GetTextEngine()->SetModified( bWasModified ); // Eventuell wieder setzen
+ pTextView->GetTextEngine()->SetModified( bWasModified ); // Perhaps reset the flag
}
void AppEdit::Command( const CommandEvent& rCEvt )
@@ -157,7 +157,7 @@ void AppEdit::InitScrollBars()
return;
TextView *pTextView = ((TextEdit*)pDataEdit)->aEdit.pTextView;
-// Kopiert und angepasst.
+
SetScrollBarRanges();
Size aOutSz( pTextView->GetWindow()->GetOutputSizePixel() );
@@ -176,23 +176,25 @@ void AppEdit::InitScrollBars()
void AppEdit::SetScrollBarRanges()
{
- // Extra-Methode, nicht InitScrollBars, da auch fuer EditEngine-Events.
-
- if ( !pHScroll || !pVScroll )
- return;
+ // Extra-Method, not InitScrollBars, but for EditEngine-Events.
- pHScroll->SetRange( Range( 0, nCurTextWidth ) );
+ if ( !pHScroll || !pVScroll )
+ return;
- pVScroll->SetRange( Range( 0, ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetTextHeight() ) );
+ pHScroll->SetRange( Range( 0, nCurTextWidth ) );
+ pVScroll->SetRange( Range( 0, ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetTextHeight() ) );
}
-USHORT AppEdit::GetLineNr(){ return pDataEdit->GetLineNr(); }
+USHORT AppEdit::GetLineNr()
+{
+ return pDataEdit->GetLineNr();
+}
FileType AppEdit::GetFileType()
{
- return FT_BASIC_SOURCE;
+ return FT_BASIC_SOURCE;
}
// Set up the menu
@@ -222,8 +224,6 @@ long AppEdit::DeInitMenu( Menu* pMenu )
return TRUE;
}
-// Sourcecode-Datei laden
-
void AppEdit::Resize()
{
if( !pDataEdit )
@@ -268,7 +268,6 @@ void AppEdit::Resize()
TextView *pTextView = ((TextEdit*)pDataEdit)->aEdit.pTextView;
-// Kopiert und adaptiert
long nVisY = pTextView->GetStartDocPos().Y();
pTextView->ShowCursor();
Size aOutSz( pTextView->GetWindow()->GetOutputSizePixel() );
@@ -293,8 +292,6 @@ void AppEdit::PostLoad()
{
}
-// mit neuem Namen speichern
-
void AppEdit::PostSaveAs()
{
}
diff --git a/basic/source/app/appedit.hxx b/basic/source/app/appedit.hxx
index 50a4642868..3eb128da77 100644
--- a/basic/source/app/appedit.hxx
+++ b/basic/source/app/appedit.hxx
@@ -40,7 +40,7 @@
class BasicFrame;
-class AppEdit : public AppWin { // Editor-Window:
+class AppEdit : public AppWin { // Editor window
using Window::Scroll;
public:
@@ -56,15 +56,15 @@ public:
TYPEINFO();
AppEdit( BasicFrame* );
~AppEdit();
- USHORT GetLineNr(); // Aktuelle Zeilennummer
- FileType GetFileType(); // Liefert den Filetype
- virtual long InitMenu( Menu* ); // Initialisierung des Menues
- virtual long DeInitMenu( Menu* ); // rücksetzen, so daß wieder alle Shortcuts enabled sind
- virtual void Command( const CommandEvent& rCEvt ); // Kommando-Handler
+ USHORT GetLineNr(); // Current line number
+ FileType GetFileType(); // Returns the file type
+ virtual long InitMenu( Menu* ); // Inits the menu
+ virtual long DeInitMenu( Menu* ); // Reset to enable all Shortcuts
+ virtual void Command( const CommandEvent& rCEvt ); // Command Handler
void Resize();
- void PostLoad(); // Nachbearbeiten des geladenen (Source am Modul setzen)
- void PostSaveAs(); // Nachbearbeiten des Modils ...
- void Mark( short, short, short );// Text markieren
+ void PostLoad();
+ void PostSaveAs();
+ void Mark( short, short, short ); // Select text
void Highlight( USHORT nLine, USHORT nCol1, USHORT nCol2 );
virtual BOOL ReloadAllowed(){ return !StarBASIC::IsRunning(); }
virtual void LoadIniFile(); // (re)load ini file after change
diff --git a/basic/source/app/apperror.cxx b/basic/source/app/apperror.cxx
index 69c73ced8b..d6bb483588 100644
--- a/basic/source/app/apperror.cxx
+++ b/basic/source/app/apperror.cxx
@@ -42,13 +42,13 @@ TYPEINIT1(AppError,AppWin);
AppError::AppError( BasicFrame* pParent, String aFileName )
: AppWin( pParent )
{
- SetText( aFileName ); // Muß vor new MsgEdit stehen!!
+ SetText( aFileName ); // Call before MsgEdit!!
pDataEdit = new MsgEdit( this, pParent, WB_HSCROLL | WB_VSCROLL | WB_LEFT );
LoadIniFile();
bHasFile = pDataEdit->Load( aFileName );
DirEntry aEntry( aFileName );
UpdateFileInfo( HAS_BEEN_LOADED );
- // Icon definieren:
+ // Define icon
// pIcon = new Icon( ResId( RID_WORKICON ) );
// if( pIcon ) SetIcon( *pIcon );
diff --git a/basic/source/app/apperror.hxx b/basic/source/app/apperror.hxx
index ae3960946e..c560b1fd7d 100644
--- a/basic/source/app/apperror.hxx
+++ b/basic/source/app/apperror.hxx
@@ -40,10 +40,10 @@ public:
AppError( BasicFrame*, String );
~AppError();
// long Command( short nID );
- virtual long InitMenu( Menu* ); // Initialisierung des Menues
- virtual long DeInitMenu( Menu* ); // rücksetzen, so daß wieder alle Shortcuts enabled sind
- USHORT GetLineNr(); // Aktuelle Zeilennummer
- FileType GetFileType(); // Liefert den Filetype
+ virtual long InitMenu( Menu* );
+ virtual long DeInitMenu( Menu* );
+ USHORT GetLineNr();
+ FileType GetFileType();
MsgEdit* GetMsgTree() { return ((MsgEdit*)pDataEdit); }
virtual BOOL ReloadAllowed(){ return !StarBASIC::IsRunning(); }
virtual void LoadIniFile(); // (re)load ini file after change
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index b187e95e44..ad65d45395 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -47,9 +47,9 @@
#include "dialogs.hxx"
#include "basrid.hxx"
-String *AppWin::pNoName = NULL; // enthaelt den "Untitled"-String
-short AppWin::nNumber = 0; // fortlaufende Nummer
-short AppWin::nCount = 0; // Anzahl Editfenster
+String *AppWin::pNoName = NULL; // contains the "Untitled"-String
+short AppWin::nNumber = 0; // consecutive number
+short AppWin::nCount = 0; // number of edit windows
TYPEINIT0(AppWin);
AppWin::AppWin( BasicFrame* pParent )
@@ -61,12 +61,12 @@ AppWin::AppWin( BasicFrame* pParent )
, bFind( TRUE )
, pDataEdit(NULL)
{
- // evtl. den Untitled-String laden:
+ // Load the Untitled string if not yet loaded
if( !pNoName )
pNoName = new String( SttResId( IDS_NONAME ) );
nCount++;
- // Maximized Status von aktuellem Fenster holen
+ // Get maximized state from current window
USHORT nInitialWinState;
if ( pFrame->pWork )
{
@@ -92,7 +92,7 @@ AppWin::~AppWin()
{
nCount--;
pFrame->RemoveWindow( this );
- pFrame = NULL; // So daß nach BasicRun nicht mehr versucht wird Fenstertext zu setzen
+ pFrame = NULL; // Set to stop setting window text after BasicRun
}
void AppWin::SetText( const XubString& rStr )
@@ -175,8 +175,8 @@ void AppWin::Cascade( USHORT nNr )
}
Size aWinSize = pFrame->GetOutputSizePixel();
- aWinSize.Width() -= aWinSize.Width() / 5; // auf 80 % reduzieren
- aWinSize.Height() -= nTitleHeight * nNr; // Unten entsprechen kürzen
+ aWinSize.Width() -= aWinSize.Width() / 5; // reduce to 80 %
+ aWinSize.Height() -= nTitleHeight * nNr; // snip height to appropriate value
aWinSize.Height() -= 2;
Point nPos( nTitleHeight * nNr, nTitleHeight * nNr );
@@ -191,14 +191,18 @@ void AppWin::RequestHelp( const HelpEvent& )
void AppWin::Help()
{
- String s = pDataEdit->GetSelected();
- if( s.Len() ) {
- // Leerstellen davor weg:
- while( s.GetChar(0) == ' ' ) s.Erase( 0, 1 );
+ String s = pDataEdit->GetSelected();
+ if( s.Len() > 0 )
+ {
+ // Trim leading whitespaces
+ while( s.GetChar(0) == ' ' )
+ s.Erase( 0, 1 );
// aBasicApp.pHelp->Start( s );
- } else {
+ }
+ else
+ {
// aBasicApp.pHelp->Start( OOO_HELP_INDEX );
- }
+ }
}
void AppWin::Resize()
@@ -213,10 +217,10 @@ void AppWin::Resize()
void AppWin::GetFocus()
{
pFrame->FocusWindow( this );
- if( pDataEdit ) // Im Destruktor wird GetFocus gerufen, daher diese Abfrage
+ if( pDataEdit ) // GetFocus is called by the destructor, so this check
{
pDataEdit->GrabFocus();
-// InitMenu(GetpApp()->GetAppMenu()->GetPopupMenu( RID_APPEDIT )); // So daß Delete richtig ist
+// InitMenu(GetpApp()->GetAppMenu()->GetPopupMenu( RID_APPEDIT ));
}
}
@@ -460,8 +464,7 @@ void AppWin::Reload()
SkipReload( FALSE );
}
-// Datei laden
-
+// Load file
BOOL AppWin::Load( const String& aName )
{
SkipReload();
@@ -500,8 +503,7 @@ BOOL AppWin::Load( const String& aName )
return !bErr;
}
-// Datei speichern
-
+// Save file
USHORT AppWin::ImplSave()
{
SkipReload();
@@ -528,8 +530,7 @@ USHORT AppWin::ImplSave()
return nResult;
}
-// mit neuem Namen speichern
-
+// Save to new file name
USHORT AppWin::SaveAs()
{
SkipReload();
@@ -551,8 +552,7 @@ USHORT AppWin::SaveAs()
}
}
-// Soll gespeichert werden?
-
+// Should we save the file?
USHORT AppWin::QuerySave( QueryBits nBits )
{
BOOL bQueryDirty = ( nBits & QUERY_DIRTY ) != 0;
@@ -594,7 +594,7 @@ USHORT AppWin::QuerySave( QueryBits nBits )
nReturn = SAVE_RES_CANCEL;
break;
default:
- DBG_ERROR("switch default where no default should be: Interneal error");
+ DBG_ERROR("switch default where no default should be: Internal error");
nReturn = SAVE_RES_CANCEL;
}
SkipReload( FALSE );
@@ -614,7 +614,7 @@ BOOL AppWin::Close()
}
// uncomment to avoid compiler warning
// break;
- case SAVE_RES_ERROR: // Fehlermeldung schon ausgegeben
+ case SAVE_RES_ERROR:
return FALSE;
// uncomment to avoid compiler warning
// break;
@@ -628,8 +628,7 @@ BOOL AppWin::Close()
}
}
-// Text suchen
-
+// Search and find text
void AppWin::Find()
{
SttResId aResId( IDD_FIND_DIALOG );
@@ -640,8 +639,7 @@ void AppWin::Find()
}
}
-// Text ersetzen
-
+// Replace text
void AppWin::Replace()
{
SttResId aResId( IDD_REPLACE_DIALOG );
@@ -653,8 +651,7 @@ void AppWin::Replace()
}
}
-// Suchen/ersetzen wiederholen
-
+// Repeat search/replace operation
void AppWin::Repeat()
{
if( (aFind.Len() != 0 ) && ( pDataEdit->Find( aFind ) || (ErrorBox(this,SttResId(IDS_PATTERNNOTFOUND)).Execute() && FALSE) ) && !bFind )
diff --git a/basic/source/app/appwin.hxx b/basic/source/app/appwin.hxx
index 6ea33e35a9..95439f2f06 100644
--- a/basic/source/app/appwin.hxx
+++ b/basic/source/app/appwin.hxx
@@ -64,30 +64,30 @@ typedef USHORT QueryBits;
class BasicFrame;
-class AppWin : public DockingWindow, public SfxListener // Dokumentfenster
+class AppWin : public DockingWindow, public SfxListener // Document window
{
friend class MsgEdit;
protected:
- static short nNumber; // fortlaufende Nummer
- static short nCount; // Anzahl Editfenster
+ static short nNumber; // serial number
+ static short nCount; // number of edit windows
static String *pNoName; // "Untitled"
- FileStat aLastAccess; // Wann wurde die geladene Dateiversion verändert
- USHORT nSkipReload; // Manchmal darf kein Reload erfolgen
- BOOL bHasFile; // Ansonsten hat reload auch keinen Sinn
- BOOL bReloadAborted; // Wird gesetzt, wenn reload abgelehnt wurde, so daß beim Schließen nochmal gefragt werden kann
+ FileStat aLastAccess; // Last access time of loaded file
+ USHORT nSkipReload; // Sometimes there must not be a reload
+ BOOL bHasFile; // Otherwise reload does not make sense
+ BOOL bReloadAborted; // Is set if reload was cancelled so that we can ask again wehn closing
- short nId; // ID-Nummer( "Unbenannt n" )
+ short nId; // ID-Nummer( "Unnamed n" )
BasicFrame* pFrame; // Parent-Window
-// Icon* pIcon; // Dokument-Icon
- String aFind; // Suchstring
- String aReplace; // Ersetze-String
- BOOL bFind; // TRUE, wenn Suchen und nicht Ersetzen
- void RequestHelp( const HelpEvent& );// Hilfe-Handler
- void GetFocus(); // aktivieren
- virtual USHORT ImplSave(); // Datei speichern
- USHORT nWinState; // Maximized, Iconized oder Normal
- Point nNormalPos; // Position wenn Normal
- Size nNormalSize; // Größe wenn Normal
+// Icon* pIcon; // Document icon
+ String aFind; // Search string
+ String aReplace; // Replace string
+ BOOL bFind; // TRUE if search not replace
+ void RequestHelp( const HelpEvent& ); // Help handler
+ void GetFocus(); // activate
+ virtual USHORT ImplSave(); // Save file
+ USHORT nWinState; // Maximized, Iconized or Normal
+ Point nNormalPos; // Position if normal
+ Size nNormalSize; // Size if Normal
virtual long PreNotify( NotifyEvent& rNEvt );
USHORT nWinId;
@@ -95,30 +95,30 @@ public:
TYPEINFO();
AppWin( BasicFrame* );
~AppWin();
- DataEdit* pDataEdit; // Daten-Flaeche
- virtual USHORT GetLineNr()=0; // Aktuelle Zeilennummer
- virtual long InitMenu( Menu* ); // Initialisierung des Menues
- virtual long DeInitMenu( Menu* ); // rücksetzen, so daß wieder alle Shortcuts enabled sind
- virtual void Command( const CommandEvent& rCEvt ); // Kommando-Handler
- virtual void Resize(); // Aenderung Fenstergroesse
- virtual void Help(); // Hilfe aktivieren
- virtual BOOL Load( const String& ); // Datei laden
- virtual void PostLoad(){} // Nachbearbeiten des geladenen (Source am Modul setzen)
- virtual USHORT SaveAs(); // Datei unter neuem Namen speichern
- virtual void PostSaveAs(){} // Nachbearbeiten des Moduls ...
- virtual void Find(); // Text suchen
- virtual void Replace(); // Text ersetzen
- virtual void Repeat(); // Suche wiederholen
- virtual BOOL Close(); // Fenster schliessen
- virtual void Activate(); // Fenster wurde aktiviert
- virtual FileType GetFileType()=0; // Liefert den Filetype
- virtual BOOL ReloadAllowed(){ return TRUE; } // Ermöglicht dem Dok temporär NEIN zu sagen
- virtual void Reload(); // Reload nach änderung auf Platte
+ DataEdit* pDataEdit; // Data area
+ virtual USHORT GetLineNr()=0; // Current line number
+ virtual long InitMenu( Menu* ); // Init of the menu
+ virtual long DeInitMenu( Menu* ); // reset to enable all shortcuts
+ virtual void Command( const CommandEvent& rCEvt ); // Command handler
+ virtual void Resize();
+ virtual void Help();
+ virtual BOOL Load( const String& ); // Load file
+ virtual void PostLoad(){} // Set source at module
+ virtual USHORT SaveAs(); // Save file as
+ virtual void PostSaveAs(){}
+ virtual void Find(); // find text
+ virtual void Replace(); // replace text
+ virtual void Repeat(); // repeat find/replace
+ virtual BOOL Close(); // close window
+ virtual void Activate(); // window was activated
+ virtual FileType GetFileType()=0; // returns the filetype
+ virtual BOOL ReloadAllowed(){ return TRUE; }
+ virtual void Reload(); // Reload after change on disk
virtual void LoadIniFile(){;} // (re)load ini file after change
- void CheckReload(); // Prüft und Fragt ob reloaded werden soll
- BOOL DiskFileChanged( USHORT nWhat ); // Prüft ob die Datei sich verändert hat
- void UpdateFileInfo( USHORT nWhat ); // Merkt sich den aktuellen Zustand der Datei
- BOOL IsSkipReload(); // Soll reload getestet werden
+ void CheckReload(); // Checks and asks if reload should performed
+ BOOL DiskFileChanged( USHORT nWhat ); // Checks file for changes
+ void UpdateFileInfo( USHORT nWhat ); // Remembers last file state
+ BOOL IsSkipReload(); // Should we test reload?
void SkipReload( BOOL bSkip = TRUE );
USHORT GetWinState(){ return nWinState; }
void Maximize();
@@ -126,7 +126,7 @@ public:
void Minimize( BOOL bMinimize );
void Cascade( USHORT nNr );
- USHORT QuerySave( QueryBits nBits = QUERY_ALL ); // Speichern
+ USHORT QuerySave( QueryBits nBits = QUERY_ALL );
BOOL IsModified() { return pDataEdit->IsModified(); }
BasicFrame* GetBasicFrame() { return pFrame; }
virtual void TitleButtonClick( USHORT nButton );
diff --git a/basic/source/app/basicrt.cxx b/basic/source/app/basicrt.cxx
index 8204adc167..a2aa1ff9c9 100644
--- a/basic/source/app/basicrt.cxx
+++ b/basic/source/app/basicrt.cxx
@@ -38,112 +38,110 @@
const String BasicRuntime::GetSourceRevision()
{
- return pRun->GetModule()->GetComment();
+ return pRun->GetModule()->GetComment();
}
const String BasicRuntime::GetModuleName( SbxNameType nType )
{
- return pRun->GetModule()->GetName( nType );
+ return pRun->GetModule()->GetName( nType );
}
const String BasicRuntime::GetMethodName( SbxNameType nType )
{
- return pRun->GetMethod()->GetName( nType );
+ return pRun->GetMethod()->GetName( nType );
}
xub_StrLen BasicRuntime::GetLine()
{
- return pRun->nLine;
+ return pRun->nLine;
}
xub_StrLen BasicRuntime::GetCol1()
{
- return pRun->nCol1;
+ return pRun->nCol1;
}
xub_StrLen BasicRuntime::GetCol2()
{
- return pRun->nCol2;
+ return pRun->nCol2;
}
BOOL BasicRuntime::IsRun()
{
- return pRun->IsRun();
+ return pRun->IsRun();
}
BasicRuntime BasicRuntime::GetNextRuntime()
{
- return BasicRuntime ( pRun->pNext );
+ return BasicRuntime ( pRun->pNext );
}
-
const String BasicErrorStackEntry::GetSourceRevision()
{
- return pEntry->aMethod->GetModule()->GetComment();
+ return pEntry->aMethod->GetModule()->GetComment();
}
const String BasicErrorStackEntry::GetModuleName( SbxNameType nType )
{
- return pEntry->aMethod->GetModule()->GetName( nType );
+ return pEntry->aMethod->GetModule()->GetName( nType );
}
const String BasicErrorStackEntry::GetMethodName( SbxNameType nType )
{
- return pEntry->aMethod->GetName( nType );
+ return pEntry->aMethod->GetName( nType );
}
xub_StrLen BasicErrorStackEntry::GetLine()
{
- return pEntry->nLine;
+ return pEntry->nLine;
}
xub_StrLen BasicErrorStackEntry::GetCol1()
{
- return pEntry->nCol1;
+ return pEntry->nCol1;
}
xub_StrLen BasicErrorStackEntry::GetCol2()
{
- return pEntry->nCol2;
+ return pEntry->nCol2;
}
-
BasicRuntime BasicRuntimeAccess::GetRuntime()
{
- return BasicRuntime( pINST->pRun );
+ return BasicRuntime( pINST->pRun );
}
bool BasicRuntimeAccess::HasRuntime()
{
- return pINST && pINST->pRun != NULL;
+ return pINST && pINST->pRun != NULL;
}
USHORT BasicRuntimeAccess::GetStackEntryCount()
{
- return GetSbData()->pErrStack->Count();
+ return GetSbData()->pErrStack->Count();
}
BasicErrorStackEntry BasicRuntimeAccess::GetStackEntry( USHORT nIndex )
{
- return BasicErrorStackEntry( GetSbData()->pErrStack->GetObject( nIndex ) );
+ return BasicErrorStackEntry( GetSbData()->pErrStack->GetObject( nIndex ) );
}
BOOL BasicRuntimeAccess::HasStack()
{
- return GetSbData()->pErrStack != NULL;
+ return GetSbData()->pErrStack != NULL;
}
void BasicRuntimeAccess::DeleteStack()
{
- delete GetSbData()->pErrStack;
- GetSbData()->pErrStack = NULL;
+ delete GetSbData()->pErrStack;
+ GetSbData()->pErrStack = NULL;
}
BOOL BasicRuntimeAccess::IsRunInit()
{
- return GetSbData()->bRunInit;
+ return GetSbData()->bRunInit;
}
diff --git a/basic/source/app/brkpnts.cxx b/basic/source/app/brkpnts.cxx
index 3982b66f44..ca75c2dd03 100644
--- a/basic/source/app/brkpnts.cxx
+++ b/basic/source/app/brkpnts.cxx
@@ -142,11 +142,10 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine )
else
pBrk = Next();
}
- // Keine Einfuegeposition gefunden => LIST_APPEND
+ // No insert position found => LIST_APPEND
if ( pNewBrk )
Insert( pNewBrk, LIST_APPEND );
- // vielleicht mal etwas genauer...
Invalidate();
if ( pModule->SetBP( nLine ) )
@@ -314,16 +313,16 @@ Breakpoint* BreakpointWindow::FindBreakpoint( const Point& rMousePos )
void BreakpointWindow::ToggleBreakpoint( USHORT nLine )
{
Breakpoint* pBrk = FindBreakpoint( nLine );
- if ( pBrk ) // entfernen
+ if ( pBrk ) // remove
{
pModule->ClearBP( nLine );
delete Remove( pBrk );
}
- else // einen erzeugen
+ else // create one
{
InsertBreakpoint( nLine );
}
- // vielleicht mal etwas genauer...
+
Invalidate();
}
@@ -366,7 +365,6 @@ void BreakpointWindow::MouseButtonDown( const MouseEvent& rMEvt )
long nYPos = aMousePos.Y() + nCurYOffset;
long nLine = nYPos / nLineHeight + 1;
ToggleBreakpoint( sal::static_int_cast< USHORT >(nLine) );
- // vielleicht mal etwas genauer...
Invalidate();
}
}
@@ -374,10 +372,10 @@ void BreakpointWindow::MouseButtonDown( const MouseEvent& rMEvt )
void BreakpointWindow::SetMarkerPos( USHORT nLine, BOOL bError )
{
- ShowMarker( FALSE ); // Alten wegzeichen...
+ ShowMarker( FALSE ); // Remove old one
nMarkerPos = nLine;
bErrorMarker = bError;
- ShowMarker( TRUE ); // Neuen zeichnen...
+ ShowMarker( TRUE ); // Draw new one
Update();
}
diff --git a/basic/source/app/dataedit.hxx b/basic/source/app/dataedit.hxx
index 12f28f6853..cdf6ba679a 100644
--- a/basic/source/app/dataedit.hxx
+++ b/basic/source/app/dataedit.hxx
@@ -39,8 +39,8 @@
class String;
class Font;
-// Find, Load und Save müssen implementiert werden,
-// die anderen müssen in MemberType existieren
+// Find, Load and Save must be implemented,
+// the others must exist in MemberType
#define DATA_FUNC_DEF( MemberName, MemberType ) \
public: \
MemberType MemberName; \
@@ -88,9 +88,9 @@ public:
virtual void Undo()=0;
virtual void Redo()=0;
- virtual BOOL Find( const String& )=0; // Text suchen & markieren
- virtual BOOL Load( const String& )=0; // Text aus Datei laden
- virtual BOOL Save( const String& )=0; // Text in Datei speichern
+ virtual BOOL Find( const String& )=0; // Find and select text
+ virtual BOOL Load( const String& )=0; // Load text from file
+ virtual BOOL Save( const String& )=0; // Save text to file
virtual String GetSelected()=0;
virtual void GrabFocus()=0;
virtual TextSelection GetSelection() const=0;
@@ -98,7 +98,7 @@ public:
virtual USHORT GetLineNr() const=0;
virtual String GetText() const=0;
virtual void SetText( const String& rStr )=0;
- virtual BOOL HasText() const=0; // damit vermeiden wir GetText.Len()
+ virtual BOOL HasText() const=0; // to avoid GetText.Len()
virtual void ReplaceSelected( const String& rStr )=0;
virtual BOOL IsModified()=0;
virtual void SetModifyHdl( Link )=0;
@@ -113,7 +113,7 @@ public:
virtual void BuildKontextMenu( PopupMenu *&pMenu )
{
(void) pMenu; /* avoid warning about unused parameter */
- } // Wer will kann hier eigene Einträge hinzufügen
+ }
};
#endif
diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx
index e38c399604..fa770f985f 100644
--- a/basic/source/app/dialogs.cxx
+++ b/basic/source/app/dialogs.cxx
@@ -283,20 +283,20 @@ OptionsDialog::~OptionsDialog()
BOOL OptionsDialog::Close()
{
- if ( TabDialog::Close() )
- {
- delete this;
- return TRUE;
- }
- else
- return FALSE;
+ if ( TabDialog::Close() )
+ {
+ delete this;
+ return TRUE;
+ }
+ else
+ return FALSE;
}
IMPL_LINK( OptionsDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
USHORT nId = pTabCtrl->GetCurPageId();
- // Wenn TabPage noch nicht erzeugt wurde, dann erzeugen
+ // If TabPage was not yet created, do it
if ( !pTabCtrl->GetTabPage( nId ) )
{
TabPage *pNewTabPage = NULL;
@@ -629,7 +629,7 @@ MiscOptions::MiscOptions( Window* pParent, Config &aConfig )
aNFUNOPort.SetValue( aTemp.ToInt32() );
aConfig.SetGroup("Misc");
- aTemp = aConfig.ReadKey( "ServerTimeout", "10000" ); // Vorgabe 1 Minute
+ aTemp = aConfig.ReadKey( "ServerTimeout", "10000" ); // Default 1 Minute
aServerTimeout.SetTime( Time(aTemp.ToInt32()) );
aConfig.SetGroup("LRU");
@@ -831,7 +831,7 @@ void GenericOptions::LoadData()
aCbArea.SetText( aCbArea.GetEntry( 0 ) );
CheckButtons( aCbArea, aPbNewArea, aPbDelArea );
- // Und auch die Daten laden
+ // Add load the data
LINK( this, GenericOptions, LoadGroup ).Call( NULL );
}
@@ -897,10 +897,10 @@ IMPL_LINK( GenericOptions, LoadGroup, ComboBox*, EMPTYARG )
String aType;
if ( aLastGroupName.Len() )
- { // Werte zwischenspeichern?
+ { // Cache values?
aCurrentValue = aCbValue.GetText();
if ( aCbValue.GetEntryPos( aCurrentValue ) == COMBOBOX_ENTRY_NOTFOUND )
- { // Dann legen wir mal einen neuen Wert an
+ { // Create a new value
LINK( this, GenericOptions, NewValue ).Call( NULL );
}
@@ -909,7 +909,7 @@ IMPL_LINK( GenericOptions, LoadGroup, ComboBox*, EMPTYARG )
USHORT i;
for ( i=0 ; i < aCbValue.GetEntryCount() ; i++ )
{
- if ( i ) // ab Entry 1
+ if ( i > 0 )
aAllValues += ';';
aAllValues += aCbValue.GetEntry( i );
}
@@ -1012,7 +1012,7 @@ void GenericOptions::Save( Config &aConfig )
(void) aConfig; /* avoid warning about unused parameter */
DBG_ASSERT( &aConfig == &aConf, "Saving to different Configuration" );
- // eventuelle �nderungen Speichern
+ // Save changes
LINK( this, GenericOptions, LoadGroup ).Call( NULL );
}
@@ -1023,7 +1023,7 @@ class TextAndWin : public DockingWindow
Window *pWin;
Window* pFtOriginalParent;
Window* pWinOriginalParent;
- long nSpace; // Standardabstand
+ long nSpace; // default space
BOOL bAlignTop;
public:
@@ -1068,16 +1068,16 @@ void TextAndWin::Resize()
pFt->Show();
nFixedTextOffset = pFt->GetSizePixel().Height() + nSpace;
- // FixedText Positionieren
+ // FixedText positioning
pFt->SetPosPixel( Point( 0, nTopSpace ) );
}
- // Window Positionieren
+ // Window positioning
long nWinPosY = nFixedTextOffset;
nWinPosY += nTopSpace;
pWin->SetPosPixel( Point( 0, nWinPosY ) );
- // Gr��e des Window anpassen
+ // Set size of window
long nWinHeight = GetOutputSizePixel().Height();
nWinHeight -= nWinPosY;
nWinHeight -= nBottomSpace;
@@ -1095,7 +1095,7 @@ DisplayHidDlg::DisplayHidDlg( Window * pParent )
, aPbBenennen( this, SttResId( RID_PB_BENENNEN ) )
, aPbSelectAll( this, SttResId( RID_PB_SELECTALL ) )
, aOKClose( this, SttResId( RID_OK_CLOSE ) )
-, nDisplayMode( DH_MODE_KURZNAME | DH_MODE_LANGNAME ) // Falls wir ein altes Office haben diesen Default verwenden
+, nDisplayMode( DH_MODE_KURZNAME | DH_MODE_LANGNAME ) // If we have an old office use this default
{
FreeResource();
@@ -1200,8 +1200,8 @@ void DisplayHidDlg::AddData( WinInfoRec* pWinInfo )
aMlbControls.Clear();
aMlbSlots.Clear();
- if ( pWinInfo->nRType & DH_MODE_DATA_VALID ) // kein altes Office
- nDisplayMode = pWinInfo->nRType; // Wird im Reset zur �bermittlung des Modus verwendet
+ if ( pWinInfo->nRType & DH_MODE_DATA_VALID ) // no old office
+ nDisplayMode = pWinInfo->nRType; // Is used for mode transmission while reset
// if ( pWinInfo->aUId.GetULONG() & DH_MODE_DATA_VALID ) // kein altes Office
// nDisplayMode = pWinInfo->aUId.GetULONG(); // Wird im Reset zur �bermittlung des Modus verwendet
@@ -1227,7 +1227,7 @@ void DisplayHidDlg::AddData( WinInfoRec* pWinInfo )
aMsg += pWinInfo->aUId;
aMsg.Expand(13);
}
- aMsg.AppendAscii( " " ); // Mindestens 3 Blanks sollten schon sein.
+ aMsg.AppendAscii( " " ); // At least three blanks
if ( nDisplayMode & DH_MODE_LANGNAME )
{
@@ -1240,12 +1240,12 @@ void DisplayHidDlg::AddData( WinInfoRec* pWinInfo )
aMlbControls.InsertEntry( aMsg );
- // Haben wir noch einen Slotname?
+ // Do we have a Slotname?
if ( ( nDisplayMode & DH_MODE_KURZNAME ) && pWinInfo->aSlotname.Len() > 0 )
{
aMsg = pWinInfo->aSlotname;
aMsg.Expand(20);
- aMsg.AppendAscii( " " ); // Mindestens 3 Blanks sollten schon sein.
+ aMsg.AppendAscii( " " );
if ( nDisplayMode & DH_MODE_LANGNAME )
{
@@ -1264,62 +1264,62 @@ void DisplayHidDlg::Resize()
if ( IsRollUp() )
{
- // Wir wollen nur die Toolbox sehen
+ // We want only the toolbox to be seend
SetOutputSizePixel( aTbConf.GetSizePixel() );
}
else
{
// SetUpdateMode( FALSE );
- // Minimalgr��e
+ // Minimum size
Size aSize( GetOutputSizePixel() );
aSize.Width() = std::max( aSize.Width(), (long)(aOKClose.GetSizePixel().Width() * 3 ));
aSize.Height() = std::max( aSize.Height(), (long)(aOKClose.GetSizePixel().Height() * 8 ));
SetOutputSizePixel( aSize );
- // Standardabstand
+ // Default space
long nSpace = pSplit->GetPosPixel().X();
- // ToolBox Breite anpassen
+ // Adapt ToolBox width
aTbConf.SetSizePixel( Size ( GetSizePixel().Width(), aTbConf.CalcWindowSizePixel().Height() ) );
- aTbConf.SetSizePixel( Size() ); // Vorerst verstecken!
+ aTbConf.SetSizePixel( Size() ); // Hide at first
- // SplitWindow Positionieren
+ // SplitWindow positioning
pSplit->SetPosPixel( Point( nSpace, nSpace + aTbConf.GetPosPixel().Y() + aTbConf.GetSizePixel().Height() ) );
- // Breite des SplitWindows bestimmen
+ // Calculate width of SplitWindows
long nSplitWidth = GetSizePixel().Width();
nSplitWidth -= aPbBenennen.GetSizePixel().Width();
- nSplitWidth -= 3 * nSpace; // Die Zwischenr�ume
- nSplitWidth -= nSpace / 2; // Etwas mehr Platz am rechten Rand
+ nSplitWidth -= 3 * nSpace; // Spaces
+ nSplitWidth -= nSpace / 2; // Little more space at right margin
- // H�he des SplitWindows bestimmen
+ // Calculate hight of SplitWindows
long nSplitHeight = GetOutputSizePixel().Height();
nSplitHeight -= pSplit->GetPosPixel().Y();
- nSplitHeight -= nSpace; // der Abstand unten
+ nSplitHeight -= nSpace; // bottom margin
- // Gr��e des SplitWindows setzen
+ // Set size of SplitWindows
pSplit->SetSizePixel( Size( nSplitWidth, nSplitHeight ) );
Point aPos;
- // Button "Kopieren" Positionieren
+ // Button "Copy" positioning
aPos = pSplit->GetPosPixel();
aPos.Move( nSplitWidth, 0 );
aPos.Move( nSpace, 0 );
aPbKopieren.SetPosPixel( aPos );
- // Button "Alles W�hlen" gleich darunter positionieren
+ // Button "Get all"
aPos.Move( 0, aPbKopieren.GetSizePixel().Height() );
aPos.Move( 0, nSpace );
aPbSelectAll.SetPosPixel( aPos );
- // Button "Benennen" gleich darunter positionieren
+ // Button "Name"
aPos.Move( 0, aPbSelectAll.GetSizePixel().Height() );
aPos.Move( 0, nSpace );
aPbBenennen.SetPosPixel( aPos );
- // Und zum Schlu� noch den "Close" Button positionieren
+ // "Close" Button
aPos = pSplit->GetPosPixel();
aPos.Move( nSpace, -aOKClose.GetSizePixel().Height() );
aPos.Move( pSplit->GetSizePixel().Width(), pSplit->GetSizePixel().Height() );
@@ -1378,16 +1378,16 @@ VarEditDialog::VarEditDialog( Window * pParent, SbxVariable *pPVar )
aNumericFieldRID_NF_NEW_LONG.Show();
aNumericFieldRID_NF_NEW_LONG.SetText( pVar->GetString() );
aNumericFieldRID_NF_NEW_LONG.Reformat();
- // M�ssen hart gesetzt werden, da der Rsc Compiler damit nicht klar kommt.
+ // Must be hardcoded otherwise the Rsc Compiler will fail
aNumericFieldRID_NF_NEW_LONG.SetMin( -aNumericFieldRID_NF_NEW_LONG.GetMax()-1 );
aNumericFieldRID_NF_NEW_LONG.SetFirst( -aNumericFieldRID_NF_NEW_LONG.GetLast()-1 );
break;
-// case SbxOBJECT: // kann nicht editiert werden
+// case SbxOBJECT: // cannot be edited
// break;
case SbxSINGLE:
case SbxDOUBLE:
case SbxSTRING:
- case SbxVARIANT: // Taucht wohl auch nicht auf. stattdessen SbxEMPTY
+ case SbxVARIANT:
case SbxEMPTY:
aEditRID_ED_NEW_STRING.Show();
aEditRID_ED_NEW_STRING.SetText( pVar->GetString() );
@@ -1405,7 +1405,7 @@ VarEditDialog::VarEditDialog( Window * pParent, SbxVariable *pPVar )
IMPL_LINK( VarEditDialog, OKClick, Button *, pButton )
{
(void) pButton; /* avoid warning about unused parameter */
- BOOL bWasError = SbxBase::IsError(); // Da eventuell ein Fehler geschmissen wird.
+ BOOL bWasError = SbxBase::IsError(); // Probably an error is thrown
SbxDataType eType = pVar->GetType();
@@ -1433,15 +1433,15 @@ SvNumberformat::
const International& rIntl,
int& nErrno,
const xub_Unicode** ppEnd = NULL );
- // Konvertiert analog strtod einen dezimalen String in einen double,
- // Dezimalseparator und Tausenderseparator werden aus International
- // genommen, fuehrende Leerzeichen werden weggeparst.
- // Ist ppEnd!=NULL wird *ppEnd hinter das Weggeparste gesetzt.
- // Enthaelt pStr nur den zu parsenden String, ist also bei Erfolg
- // **ppEnd=='\0' und *ppEnd-pStr==strlen(pStr).
- // Bei Ueberlauf wird fVal=+/-HUGE_VAL gesetzt, bei Unterlauf 0,
- // nErrno wird in diesen Faellen auf ERANGE gesetzt, sonst 0.
- // "+/-1.#INF" werden als +/-HUGE_VAL erkannt.
+ // Converts just as strtod a decimal string to a double.
+ // Decimal and thousand separators come from International,
+ // leading spaces are omitted.
+ // If ppEnd!=NULL then *ppEnd is set after the parsed data.
+ // If pStr contains only the String to be parsed, then if success:
+ // **ppEnd=='\0' and *ppEnd-pStr==strlen(pStr).
+ // If overflow fVal=+/-HUGE_VAL, if underflow 0,
+ // nErrno is in this cases set to ERANGE otherwise 0.
+ // "+/-1.#INF" are recognized as +/-HUGE_VAL.
*/
@@ -1491,7 +1491,6 @@ SvNumberformat::
if ( bError )
{
-// ErrorBox( this, WB_OK | WB_DEF_OK, "Der Wert ist ung�ltig und kann daher nicht gesetzt werden" ).Execute();
ErrorBox( this, SttResId( IDS_INVALID_VALUE ) ).Execute();
return 1;
}
diff --git a/basic/source/app/makefile.mk b/basic/source/app/makefile.mk
index 590bd7f151..13c3b4a8b5 100644
--- a/basic/source/app/makefile.mk
+++ b/basic/source/app/makefile.mk
@@ -40,7 +40,7 @@ LIBTARGET = NO
.INCLUDE : settings.mk
-# --- Allgemein ------------------------------------------------------------
+# --- Common ------------------------------------------------------------
OBJFILES = \
$(OBJ)$/ttbasic.obj \
diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx
index 4de5f13591..1ef046170d 100644
--- a/basic/source/app/msgedit.cxx
+++ b/basic/source/app/msgedit.cxx
@@ -179,7 +179,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg )
}
if ( !bFileLoading )
- { // Kommt vom Testtool und muß gleich geschrieben werden.
+ { // Comes from Testtool and must be written immediately
BOOL bFileWasChanged = pAppError->DiskFileChanged( SINCE_LAST_LOAD );
DBG_ASSERT( aLogFileName == LogMsg->aLogFileName, "Logging to different logfile as before" );
@@ -253,8 +253,8 @@ void MsgEdit::AddRun( String aMsg, TTDebugData aDebugData )
COPY_TTDEBUGDATA( LOG_RUN );
if ( !bFileLoading || ( bFileLoading && nVersion >= 2 ) )
pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, FALSE, 0, pTTDebugData );
- else // Erstes Dateiformat
- pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, FALSE, LIST_APPEND, pTTDebugData ); // und damit an Ende!
+ else // First file format
+ pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, FALSE, LIST_APPEND, pTTDebugData ); // and therefor at the end
aEditTree.ShowEntry( pCurrentRun );
pCurrentTestCase = NULL;
@@ -266,7 +266,7 @@ void MsgEdit::AddTestCase( String aMsg, TTDebugData aDebugData )
{
if ( pCurrentRun )
{
- if ( aMsg.Len() == 0 ) // Am Ende des Testcase
+ if ( aMsg.Len() == 0 ) // End of Testcase
{
pCurrentTestCase = NULL;
}
@@ -494,7 +494,7 @@ String MsgEdit::Impl_MakeText( SvLBoxEntry *pEntry ) const
case LOG_ASSERTION: break;
case LOG_ASSERTION_STACK:aRet.AppendAscii("--> "); break;
case LOG_QA_ERROR: break;
- default:DBG_ERROR("Unbekannter Typ im ResultFenster");
+ default:DBG_ERROR("Unknown type in ResultWindow!");
}
aRet += aEditTree.GetEntryText( pEntry );
return aRet;
@@ -527,7 +527,7 @@ String MsgEdit::Impl_MakeSaveText( SvLBoxEntry *pEntry ) const
TTDebugData *aData = (TTDebugData*)pEntry->GetUserData();
if ( aEditTree.PrevSibling( pEntry ) && LOGTYPE( aEditTree.PrevSibling( pEntry ) ) == LOG_TEST_CASE )
- { // Um Cases richtig abzuschliessen, so daß Warnings und Msgs in Hirarchie richtig.
+ { // To properly finish cases and warnings/msgs are in correct hierarchie
aRet += String::CreateFromInt32( (int)LOG_TEST_CASE );
aRet.AppendAscii(";;0;0;0;\"\"\n");
}
@@ -620,14 +620,18 @@ void MsgEdit::SetText( const String& rStr )
DBG_ERROR("Not Implemented");
}
-BOOL MsgEdit::HasText() const { return aEditTree.First() != NULL; }
+BOOL MsgEdit::HasText() const
+{
+ return aEditTree.First() != NULL;
+}
-// Es wird entweder ab Beginn oder ab Markierungsbegin + 1 gesucht.
+// Search from the beginning or mark start + 1
BOOL MsgEdit::Find( const String& s )
{
TextSelection r = GetSelection();
USHORT bgn = (USHORT) r.GetStart().GetPara() + 1;
- if ( r.GetStart().GetPara() == 0 ) bgn = 0; // Suchen ganz von Anfang
+ if ( r.GetStart().GetPara() == 0 )
+ bgn = 0; // Search from the beginning
SvLBoxEntry *pEntry = aEditTree.GetModel()->GetEntryAtAbsPos( bgn );
while ( pEntry )
@@ -641,11 +645,12 @@ BOOL MsgEdit::Find( const String& s )
}
return FALSE;
}
+
/******************************************************************
-Zum Fileformat der *.res Dateien:
-Die Informationenn werden als Semikolon getrennte Strings
-zusammengebastelt. Reihenfolge:
+ Fileformat of *.res file:
+ Information are stored as semicolon separated strings
+ Order:
LogType;Filename;Line;Col1;Col2;Message
@@ -661,11 +666,11 @@ BOOL MsgEdit::Load( const String& aName )
{
aEditTree.Clear();
String aLine;
- bFileLoading = TRUE; // So daß nicht gleich wieder auf Platte mitgelogt wird.
+ bFileLoading = TRUE; // To avoid logging to disk
TTLogMsg *pLogMsg = new TTLogMsg;
while( !aStrm.IsEof() && bOk )
{
- if ( nVersion >= 3 ) // Wir habe utf8
+ if ( nVersion >= 3 ) // utf8
aStrm.ReadByteStringLine( aLine, RTL_TEXTENCODING_UTF8 );
else
aStrm.ReadByteStringLine( aLine, RTL_TEXTENCODING_IBM_850 );
@@ -685,7 +690,9 @@ BOOL MsgEdit::Load( const String& aName )
aDebugData.nCol1 = USHORT( TOKEN(3).ToInt32() );
aDebugData.nCol2 = USHORT( TOKEN(4).ToInt32() );
aDebugData.aMsg = aLine.GetQuotedToken( 5, CUniString("\"\"") );
- aDebugData.aMsg.Erase(0,1); // Anführungszeichen entfernen
+
+ // Remove leading and trailing quotes
+ aDebugData.aMsg.Erase(0,1);
aDebugData.aMsg.Erase(aDebugData.aMsg.Len()-1,1);
pLogMsg->aLogFileName.Erase();
@@ -704,7 +711,7 @@ BOOL MsgEdit::Load( const String& aName )
delete pLogMsg;
aStrm.Close();
if ( nVersion < 2 && !bLoadError )
- Save( aName ); // Muß sein, sonst passiert beim mitloggen Blödsinn.
+ Save( aName ); // Necessary to avoid mess
}
else
@@ -918,7 +925,7 @@ TTFeatures TTTreeListBox::GetFeatures( SvLBoxEntry* pEntry )
case LOG_QA_ERROR:
return HasQAError;
default:
- DBG_ERROR("Unbekannter Typ im ResultFenster");
+ DBG_ERROR("Unknown type in ResultWindow");
}
return HasNothing;
}
@@ -986,7 +993,7 @@ void TTTreeListBox::InitEntry(SvLBoxEntry* pEntry,
const String& rStr ,const Image& rImg1, const Image& rImg2,
SvLBoxButtonKind eButtonKind )
{
- USHORT nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+ USHORT nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2"
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
TTLBoxString* pStr = new TTLBoxString( pEntry, 0, pCol->GetText() );
diff --git a/basic/source/app/msgedit.hxx b/basic/source/app/msgedit.hxx
index ec93d1fdce..764228341b 100644
--- a/basic/source/app/msgedit.hxx
+++ b/basic/source/app/msgedit.hxx
@@ -40,7 +40,7 @@ class AppError;
#define SelectChildren SelectChilds // Sonst wird mir schlecht
-typedef USHORT TTFeatures; // Bitfeld für Features der Entrys
+typedef USHORT TTFeatures; // Bitfield for features of the entries
#define HasNothing TTFeatures(0x00)
#define HasError TTFeatures(0x01)
#define HasWarning TTFeatures(0x02)
@@ -84,13 +84,13 @@ class MsgEdit : public DataEdit
SvLBoxEntry *pCurrentError;
BOOL bModified;
Link lModify;
- BOOL bFileLoading; // TRUE während eine Datei geladen wird.
+ BOOL bFileLoading; // TRUE while loading a file
String Impl_MakeText( SvLBoxEntry *pEntry ) const;
String Impl_MakeSaveText( SvLBoxEntry *pEntry ) const;
String Impl_MakeSaveText( TTDebugData aData ) const;
- USHORT nVersion; // Speichert die Dateiversion
+ USHORT nVersion; // Stores file version
AppError* pAppError;
- String aLogFileName; // Name der Logdatei
+ String aLogFileName;
static USHORT nMaxLogLen;
static BOOL bLimitLogLen;
diff --git a/basic/source/app/mybasic.cxx b/basic/source/app/mybasic.cxx
index 8dad4da153..335db6c21c 100644
--- a/basic/source/app/mybasic.cxx
+++ b/basic/source/app/mybasic.cxx
@@ -99,13 +99,13 @@ MyBasic::MyBasic() : StarBASIC()
// AB-Uno-Test
#ifdef unotest
- // Uno-Service-Manager holenReflection Service bolen
- createAndSetDefaultServiceManager(); // spaeter schon erledigt
+ // Get Uno-Service-Manager and Reflection Service
+ createAndSetDefaultServiceManager(); // done later
- // Uno-Test-Objekt holen
+ // Get Uno-Test-Object
UsrAny aObjAny = getIntrospectionTestObject();
- // Objekt verpacken in ein SbUnoObject packen
+ // Box object into SbUnoObject
String aName( "UnoObject" );
SbxObjectRef xSbUnoObj = GetSbUnoObject( aName, aObjAny );
//SbxObjectRef xSbUnoObj = new SbUnoObject( aName, aObjAny );
@@ -161,9 +161,9 @@ void MyBasic::LoadIniFile()
SbTextType MyBasic::GetSymbolType( const String &rSymbol, BOOL bWasTTControl )
{
- (void) rSymbol; /* avoid warning about unused parameter */
+ (void) rSymbol; /* avoid warning about unused parameter */
(void) bWasTTControl; /* avoid warning about unused parameter */
- return SB_SYMBOL; // Alles was hier landet ist vom Typ SB_SYMBOL und bleibt es auch
+ return SB_SYMBOL; // Everything here is of type SB_SYMBOL and continues to be so
}
@@ -194,7 +194,7 @@ BOOL MyBasic::ErrorHdl()
{
AppBasEd* pWin = aBasicApp.pFrame->FindModuleWin( GetActiveModule()->GetName() );
if( !pWin )
- { // erstmal Fenster aufmachen
+ { // open a window
pWin = aBasicApp.pFrame->CreateModuleWin( GetActiveModule() );
}
else
@@ -207,7 +207,7 @@ BOOL MyBasic::ErrorHdl()
0, StarBASIC::GetErrorText(), GetLine(), GetCol1(), GetCol2() ),
LIST_APPEND );
nError++;
- return BOOL( nError < 20 ); // Abbruch nach 20 Fehlern
+ return BOOL( nError < 20 ); // Cancel after 20 errors
}
else
{
@@ -246,7 +246,7 @@ USHORT MyBasic::BreakHdl()
{
AppBasEd* pWin = aBasicApp.pFrame->FindModuleWin( pMod->GetName() );
if( !pWin )
- { // erstmal Fenster aufmachen
+ { // open a window
pWin = aBasicApp.pFrame->CreateModuleWin( pMod );
}
else
@@ -254,7 +254,7 @@ USHORT MyBasic::BreakHdl()
pWin->Highlight( GetLine(), GetCol1(), GetCol2() );
}
- if( IsBreak() ) // Wenn Breakpoint (oder "Run to Cursor")
+ if( IsBreak() ) // If Breakpoint (or "Run to Cursor")
{
// if ( GetActiveModule()->IsBP(GetLine()) )
// GetActiveModule()->ClearBP(GetLine());
@@ -268,7 +268,7 @@ USHORT MyBasic::BreakHdl()
/***************************************************************************
|*
-|* class BasicError
+|* class BasicError
|*
***************************************************************************/
@@ -290,16 +290,18 @@ BasicError::BasicError
aText = r;
}
-// Dies ist ein Beispiel, wie die Fehler-Information geschickt
-// aufgebaut werden kann, um ein Statement zu highlighten.
-
+// This is a sample how to build the error information
+// to highlight a statement
void BasicError::Show()
{
- if( pWin && aBasicApp.pFrame->IsWinValid( pWin ) ) {
+ if( pWin && aBasicApp.pFrame->IsWinValid( pWin ) )
+ {
pWin->Highlight( nLine, nCol1, nCol2 );
aBasicApp.pFrame->pStatus->Message( aText );
- } else MessBox( aBasicApp.pFrame, WB_OK, aBasicApp.pFrame->GetText(),
- aText ).Execute();
+ }
+ else
+ MessBox( aBasicApp.pFrame, WB_OK, aBasicApp.pFrame->GetText(),
+ aText ).Execute();
}
diff --git a/basic/source/app/printer.cxx b/basic/source/app/printer.cxx
index 8db7660b3a..424089c27e 100644
--- a/basic/source/app/printer.cxx
+++ b/basic/source/app/printer.cxx
@@ -69,11 +69,11 @@ BasicPrinter::BasicPrinter() : Printer()
nPage = 0; nLine = 9999;
SetMapMode( MapMode( MAP_POINT ) );
Size s( GetOutputSize() );
- // 10-Punkt-Schrift verwenden
+ // Use 10 point font
Font aFont( FAMILY_MODERN, Size( 0, 10 ) );
aFont.SetPitch( PITCH_FIXED );
SetFont( aFont );
- // Ausgabe: 6 Zeilen/Zoll = 12 Punkt
+ // Output: 6 Lines/Inch = 12 Point
nLines = (short) s.Height() / 12;
nYoff = 12;
SetStartPrintHdl( LINK( this, BasicPrinter, StartPrintHdl ) );
@@ -100,16 +100,16 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame *
{
nPage = 0; nLine = 9999;
aFile = rFile;
- // Dialog einrichten
+ // Setup dialog
SttResId aResId( IDD_PRINT_DIALOG );
pDlg = new PrintingDialog
( aBasicApp.pFrame, this, aResId, aFile );
- // Position des Dialogs setzen
+ // Set position of dialog
Size s1 = aBasicApp.pFrame->GetSizePixel();
Size s2 = pDlg->GetSizePixel();
pDlg->SetPosPixel( Point( (s1.Width() - s2.Width() ) / 2,
(s1.Height()- s2.Height() ) / 2 ) );
- // PRINT-Menu disablen
+ // Disable PRINT-Menu
MenuBar* pBar = pFrame->GetMenuBar();
Menu* pFileMenu = pBar->GetPopupMenu( RID_APPFILE );
pFileMenu->EnableItem( RID_FILEPRINT, FALSE );
@@ -141,7 +141,8 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame *
IMPL_LINK_INLINE_START( BasicPrinter, StartPrintHdl, Printer *, pPrinter )
{
(void) pPrinter; /* avoid warning about unused parameter */
- if( pDlg ) pDlg->Show();
+ if( pDlg != NULL )
+ pDlg->Show();
return 0;
}
IMPL_LINK_INLINE_END( BasicPrinter, StartPrintHdl, Printer *, pPrinter )
@@ -149,7 +150,8 @@ IMPL_LINK_INLINE_END( BasicPrinter, StartPrintHdl, Printer *, pPrinter )
IMPL_LINK_INLINE_START( BasicPrinter, EndPrintHdl, Printer *, pPrinter )
{
(void) pPrinter; /* avoid warning about unused parameter */
- if( pDlg ) pDlg->Hide();
+ if( pDlg != NULL)
+ pDlg->Hide();
return 0;
}
IMPL_LINK_INLINE_END( BasicPrinter, EndPrintHdl, Printer *, pPrinter )
@@ -157,7 +159,8 @@ IMPL_LINK_INLINE_END( BasicPrinter, EndPrintHdl, Printer *, pPrinter )
IMPL_LINK_INLINE_START( BasicPrinter, PrintPageHdl, Printer *, pPrinter )
{
(void) pPrinter; /* avoid warning about unused parameter */
- if( pDlg ) pDlg->ChangeMessage( nPage );
+ if( pDlg != NULL)
+ pDlg->ChangeMessage( nPage );
return 0;
}
IMPL_LINK_INLINE_END( BasicPrinter, PrintPageHdl, Printer *, pPrinter )
diff --git a/basic/source/app/process.cxx b/basic/source/app/process.cxx
index 1dffedf331..01491f9e9d 100644
--- a/basic/source/app/process.cxx
+++ b/basic/source/app/process.cxx
@@ -54,7 +54,6 @@
#include <basic/process.hxx>
-// Konstruktor für den Process
Process::Process()
: pArgumentList( NULL )
, pEnvList( NULL )
@@ -64,7 +63,6 @@ Process::Process()
{
}
-// Destruktor
Process::~Process()
{
// delete pArgumentList;
@@ -106,9 +104,8 @@ long Process::ImplGetExitCode()
////////////////////////////////////////////////////////////////////////////
-// Die Methoden:
void Process::SetImage( const String &aAppPath, const String &aAppParams, const Environment *pEnv )
-{ // Imagedatei des Executables
+{ // Set image file of executable
if ( pProcess && ImplIsRunning() )
SbxBase::SetError( SbxERR_NO_ACTIVE_OBJECT );
else
@@ -163,7 +160,7 @@ void Process::SetImage( const String &aAppPath, const String &aAppParams, const
}
BOOL Process::Start()
-{ // Programm wird gestartet
+{ // Start program
BOOL bSuccess=FALSE;
if ( pProcess && !ImplIsRunning() )
{
@@ -196,6 +193,7 @@ BOOL Process::Start()
catch( ... )
{
bWasGPF = TRUE;
+ // TODO: Output debug message !!
}
nErrorMode = SetErrorMode(nErrorMode);
#endif
@@ -207,17 +205,17 @@ BOOL Process::Start()
}
ULONG Process::GetExitCode()
-{ // ExitCode des Programms(nachdem es beendet ist)
+{ // ExitCode of program after execution
return ImplGetExitCode();
}
BOOL Process::IsRunning()
-{ // Programm läuft noch
+{
return ImplIsRunning();
}
BOOL Process::WasGPF()
-{ // Programm mit GPF o.ä. abgebrochen
+{ // Did the process fail?
#ifdef WNT
return ImplGetExitCode() == 3221225477;
#else
diff --git a/basic/source/app/processw.cxx b/basic/source/app/processw.cxx
index ae315eabb0..9caf34148c 100644
--- a/basic/source/app/processw.cxx
+++ b/basic/source/app/processw.cxx
@@ -46,10 +46,10 @@
#include "processw.hxx"
-// Der Process hat folgende Elemente:
+// Process has the following elements:
// 1) Properties:
-// Keine
-// 2) Methoden:
+// none
+// 2) Methods:
// SetImage( Filename )
// BOOL Start
// USHORT GetExitCode
@@ -57,56 +57,53 @@
// BOOL WasGPF
-// Diese Implementation ist ein Beispiel fuer eine tabellengesteuerte
-// Version, die sehr viele Elemente enthalten kann. Die Elemente werden
-// je nach Bedarf aus der Tabelle in das Objekt uebernommen.
+// This implementation is a sample for a table driven version that
+// can contain lots of elements. The elements are taken into the object
+// when they are needed.
-// Das nArgs-Feld eines Tabelleneintrags ist wie folgt verschluesselt:
+// The nArgs field of a table entry is scrambled as follows:
+#define _ARGSMASK 0x00FF // Up to 255 arguments
+#define _RWMASK 0x0F00 // Mask for R/W-Bits
+#define _TYPEMASK 0xF000 // Mask for entry type
-#define _ARGSMASK 0x00FF // Bis zu 255 Argumente
-#define _RWMASK 0x0F00 // Maske fuer R/W-Bits
-#define _TYPEMASK 0xF000 // Maske fuer den Typ des Eintrags
+#define _READ 0x0100 // can be read
+#define _BWRITE 0x0200 // can be used as Lvaluen
+#define _LVALUE _BWRITE
+#define _READWRITE 0x0300 // can read and written
+#define _OPT 0x0400 // TRUE: optional parameter
+#define _METHOD 0x1000 // Mask-Bit for a method
+#define _PROPERTY 0x2000 // Mask-Bit for a property
+#define _COLL 0x4000 // Mask-Bit for a collection
-#define _READ 0x0100 // kann gelesen werden
-#define _BWRITE 0x0200 // kann as Lvalue verwendet werden
-#define _LVALUE _BWRITE // kann as Lvalue verwendet werden
-#define _READWRITE 0x0300 // beides
-#define _OPT 0x0400 // TRUE: optionaler Parameter
-#define _METHOD 0x1000 // Masken-Bit fuer eine Methode
-#define _PROPERTY 0x2000 // Masken-Bit fuer eine Property
-#define _COLL 0x4000 // Masken-Bit fuer eine Collection
- // Kombination von oberen Bits:
-#define _FUNCTION 0x1100 // Maske fuer Function
-#define _LFUNCTION 0x1300 // Maske fuer Function, die auch als Lvalue geht
-#define _ROPROP 0x2100 // Maske Read Only-Property
-#define _WOPROP 0x2200 // Maske Write Only-Property
-#define _RWPROP 0x2300 // Maske Read/Write-Property
-#define _COLLPROP 0x4100 // Maske Read-Collection-Element
-
-#define COLLNAME "Elements" // Name der Collection, hier mal hart verdrahtet
+// Combination of the bits above:
+#define _FUNCTION 0x1100 // Mask for a Function
+#define _LFUNCTION 0x1300 // Mask for a Function, that can be uses as Lvalue
+#define _ROPROP 0x2100 // Mask Read Only-Property
+#define _WOPROP 0x2200 // Mask Write Only-Property
+#define _RWPROP 0x2300 // Mask Read/Write-Property
+#define _COLLPROP 0x4100 // Mask Read-Collection-Element
+#define COLLNAME "Elements" // Name of the collection, hard coded
ProcessWrapper::Methods ProcessWrapper::aProcessMethods[] = {
-// Imagedatei des Executables
+// Imagefile of the Executable
{ "SetImage", SbxEMPTY, &ProcessWrapper::PSetImage, 1 | _FUNCTION },
- // Zwei Named Parameter
+ // Two Named Parameter
{ "Filename", SbxSTRING, NULL, 0 },
{ "Params", SbxSTRING, NULL, _OPT },
-// Programm wird gestartet
+// Program is started
{ "Start", SbxBOOL, &ProcessWrapper::PStart, 0 | _FUNCTION },
-// ExitCode des Programms(nachdem es beendet ist)
+// ExitCode of the program
{ "GetExitCode", SbxULONG, &ProcessWrapper::PGetExitCode, 0 | _FUNCTION },
-// Programm läuft noch
+// Program is running
{ "IsRunning", SbxBOOL, &ProcessWrapper::PIsRunning, 0 | _FUNCTION },
-// Programm mit GPF o.ä. abgebrochen
+// Program has faulted with GPF etc.
{ "WasGPF", SbxBOOL, &ProcessWrapper::PWasGPF, 0 | _FUNCTION },
-{ NULL, SbxNULL, NULL, -1 }}; // Tabellenende
-
+{ NULL, SbxNULL, NULL, -1 }}; // End of table
-// Konstruktor für den Process
ProcessWrapper::ProcessWrapper() : SbxObject( CUniString("Process") )
{
pProcess = new Process();
@@ -114,26 +111,24 @@ ProcessWrapper::ProcessWrapper() : SbxObject( CUniString("Process") )
pMethods = &aProcessMethods[0];
}
-// Destruktor
ProcessWrapper::~ProcessWrapper()
{
delete pProcess;
}
-// Suche nach einem Element:
-// Hier wird linear durch die Methodentabelle gegangen, bis eine
-// passende Methode gefunden wurde.
-// Wenn die Methode/Property nicht gefunden wurde, nur NULL ohne
-// Fehlercode zurueckliefern, da so auch eine ganze Chain von
-// Objekten nach der Methode/Property befragt werden kann.
-
+// Search for an element:
+// Linear search through the method table until an appropriate one
+// can be found.
+// If the the method/property cannot be found, NULL is return
+// without an error code, so that we can ask the whole
+// chain of objects for the method/property.
SbxVariable* ProcessWrapper::Find( const String& rName, SbxClassType t )
{
- // Ist das Element bereits vorhanden?
+ // Is the element already available?
SbxVariable* pRes = SbxObject::Find( rName, t );
if( !pRes && t != SbxCLASS_OBJECT )
{
- // sonst suchen
+ // otherwise search
Methods* p = pMethods;
short nIndex = 0;
BOOL bFound = FALSE;
@@ -148,7 +143,7 @@ SbxVariable* ProcessWrapper::Find( const String& rName, SbxClassType t )
}
if( bFound )
{
- // Args-Felder isolieren:
+ // isolate Args fields:
short nAccess = ( p->nArgs & _RWMASK ) >> 8;
short nType = ( p->nArgs & _TYPEMASK );
String aMethodName( p->pName, RTL_TEXTENCODING_ASCII_US );
@@ -158,9 +153,8 @@ SbxVariable* ProcessWrapper::Find( const String& rName, SbxClassType t )
else if( nType & _METHOD )
eCT = SbxCLASS_METHOD;
pRes = Make( aMethodName, eCT, p->eType );
- // Wir setzen den Array-Index + 1, da ja noch andere
- // Standard-Properties existieren, die auch aktiviert
- // werden muessen.
+ // We set array index + 1 because there are other
+ // default properties that must be activated
pRes->SetUserData( nIndex + 1 );
pRes->SetFlags( nAccess );
}
@@ -168,8 +162,7 @@ SbxVariable* ProcessWrapper::Find( const String& rName, SbxClassType t )
return pRes;
}
-// Aktivierung eines Elements oder Anfordern eines Infoblocks
-
+// Activation of an element or request for an info block
void ProcessWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
const SfxHint& rHint, const TypeId& rHT )
{
@@ -179,7 +172,7 @@ void ProcessWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
SbxVariable* pVar = pHint->GetVar();
SbxArray* pNotifyPar = pVar->GetParameters();
USHORT nIndex = (USHORT) pVar->GetUserData();
- // kein Index: weiterreichen!
+ // No index: put through
if( nIndex )
{
ULONG t = pHint->GetId();
@@ -192,13 +185,13 @@ void ProcessWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
bWrite = TRUE;
if( t == SBX_HINT_DATAWANTED || bWrite )
{
- // Parameter-Test fuer Methoden:
+ // Parameter-Test for methods:
USHORT nPar = pMethods[ --nIndex ].nArgs & 0x00FF;
- // Element 0 ist der Returnwert
+ // Element 0 is the return value
if( ( !pNotifyPar && nPar )
|| ( pNotifyPar && pNotifyPar->Count() < nPar+1 ) )
SetError( SbxERR_WRONG_ARGS );
- // Alles klar, man kann den Call ausfuehren
+ // ready for call
else
{
(this->*(pMethods[ nIndex ].pFunc))( pVar, pNotifyPar, bWrite );
@@ -210,8 +203,7 @@ void ProcessWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
}
}
-// Zusammenbau der Infostruktur fuer einzelne Elemente
-
+// Building the info struct for single elements
SbxInfo* ProcessWrapper::GetInfo( short nIdx )
{
Methods* p = &pMethods[ nIdx ];
@@ -237,13 +229,11 @@ SbxInfo* ProcessWrapper::GetInfo( short nIdx )
////////////////////////////////////////////////////////////////////////////
-// Properties und Methoden legen beim Get (bPut = FALSE) den Returnwert
-// im Element 0 des Argv ab; beim Put (bPut = TRUE) wird der Wert aus
-// Element 0 gespeichert.
+// Properties and methods save the return value in argv[0] (Get, bPut = FALSE)
+// and store the value from argv[0] (Put, bPut = TRUE)
-// Die Methoden:
void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
-{ // Imagedatei des Executables
+{ // Imagefile of the executable
(void) pVar; /* avoid warning about unused parameter */
(void) bWriteIt; /* avoid warning about unused parameter */
if ( pMethodePar->Count() >= 2 )
@@ -253,28 +243,28 @@ void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, BOOL b
}
void ProcessWrapper::PStart( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
-{ // Programm wird gestartet
+{ // Program is started
(void) pMethodePar; /* avoid warning about unused parameter */
(void) bWriteIt; /* avoid warning about unused parameter */
pVar->PutBool( pProcess->Start() );
}
void ProcessWrapper::PGetExitCode( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
-{ // ExitCode des Programms(nachdem es beendet ist)
+{ // ExitCode of the program after it was finished
(void) pMethodePar; /* avoid warning about unused parameter */
(void) bWriteIt; /* avoid warning about unused parameter */
pVar->PutULong( pProcess->GetExitCode() );
}
void ProcessWrapper::PIsRunning( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
-{ // Programm läuft noch
+{ // Program is still running
(void) pMethodePar; /* avoid warning about unused parameter */
(void) bWriteIt; /* avoid warning about unused parameter */
pVar->PutBool( pProcess->IsRunning() );
}
void ProcessWrapper::PWasGPF( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt )
-{ // Programm mit GPF o.ä. abgebrochen
+{ // Program faulted with GPF etc.
(void) pMethodePar; /* avoid warning about unused parameter */
(void) bWriteIt; /* avoid warning about unused parameter */
pVar->PutBool( pProcess->WasGPF() );
@@ -285,8 +275,7 @@ void ProcessWrapper::PWasGPF( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWr
-// Die Factory legt unser Objekte an.
-
+// The factory creates our object
SbxObject* ProcessFactory::CreateObject( const String& rClass )
{
if( rClass.CompareIgnoreCaseToAscii( "Process" ) == COMPARE_EQUAL )
diff --git a/basic/source/app/processw.hxx b/basic/source/app/processw.hxx
index 3c6f2b2ad9..ce8d0dcde0 100644
--- a/basic/source/app/processw.hxx
+++ b/basic/source/app/processw.hxx
@@ -41,9 +41,8 @@
class ProcessWrapper : public SbxObject
{
using SbxVariable::GetInfo;
- // Definition eines Tabelleneintrags. Dies wird hier gemacht,
- // da dadurch die Methoden und Properties als private deklariert
- // werden koennen.
+// Definition of a table entry. This is done here because
+// through this methods and property can declared as private.
#if defined ( ICC ) || defined ( HPUX ) || defined ( C50 ) || defined ( C52 )
public:
#endif
@@ -54,25 +53,24 @@ private:
#endif
struct Methods {
- const char* pName; // Name des Eintrags
- SbxDataType eType; // Datentyp
+ const char* pName; // Name of the entry
+ SbxDataType eType; // Data type
pMeth pFunc; // Function Pointer
- short nArgs; // Argumente und Flags
+ short nArgs; // Arguments and flags
};
- static Methods aProcessMethods[]; // Methodentabelle
- Methods *pMethods; // Aktuelle Methodentabelle
+ static Methods aProcessMethods[]; // Method table
+ Methods *pMethods; // Current method table
- // Methoden
void PSetImage( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
void PStart( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
void PGetExitCode( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
void PIsRunning( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
void PWasGPF( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite );
- // Interne Member und Methoden
+ // Internal members and methods
Process *pProcess;
- // Infoblock auffuellen
+ // Fill info block
SbxInfo* GetInfo( short nIdx );
// Broadcaster Notification
@@ -81,13 +79,11 @@ private:
public:
ProcessWrapper();
~ProcessWrapper();
- // Suchen eines Elements
+ // Search for an element
virtual SbxVariable* Find( const String&, SbxClassType );
};
-
-// Die dazugehoerige Factory:
-
+// Factory
class ProcessFactory : public SbxFactory
{
public:
diff --git a/basic/source/app/status.cxx b/basic/source/app/status.cxx
index c18479435f..6a90321b0d 100644
--- a/basic/source/app/status.cxx
+++ b/basic/source/app/status.cxx
@@ -48,7 +48,7 @@ StatusLine::StatusLine( BasicFrame* p )
// initialize TaskStatusBar
TaskStatusBar* pTempStatusBar = GetStatusBar();
- long nCharWidth = GetTextWidth( '0' ); // Angenommen, alle Zahlen sind gleich breit
+ long nCharWidth = GetTextWidth( '0' ); // We state: All numbers has the same width
pTempStatusBar->InsertItem( ST_MESSAGE, GetTextWidth( 'X' ) * 20, SIB_LEFT | SIB_IN | SIB_AUTOSIZE );
pTempStatusBar->InsertItem( ST_LINE, 5*nCharWidth );
pTempStatusBar->InsertItem( ST_PROF, GetTextWidth( 'X' ) * 10 );
@@ -111,7 +111,7 @@ void StatusLine::LoadTaskToolBox()
pTaskToolBox->StartUpdateTask();
while ( nFirstWinPos < pWinMenu->GetItemCount() )
- { // Es gibt Fenster
+ { // There are windows
Window* pWin = pFrame->FindWin( pWinMenu->GetItemId( nFirstWinPos ) );
if ( pWin )
diff --git a/basic/source/app/status.hxx b/basic/source/app/status.hxx
index c05b6c106f..9daa9229aa 100644
--- a/basic/source/app/status.hxx
+++ b/basic/source/app/status.hxx
@@ -48,9 +48,9 @@ protected:
public:
StatusLine( BasicFrame* );
- void Message( const String& ); // Text anzeigen
- void Pos( const String& s ); // Textposition anzeigen
- void SetProfileName( const String& s ); // Current Profile
+ void Message( const String& ); // Show text
+ void Pos( const String& s ); // Show text position
+ void SetProfileName( const String& s ); // Current Profile
void LoadTaskToolBox();
};
diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx
index 48865c209f..bf118d1f2c 100644
--- a/basic/source/app/textedit.cxx
+++ b/basic/source/app/textedit.cxx
@@ -43,7 +43,7 @@
#include "textedit.hxx"
#include "appedit.hxx"
#include "brkpnts.hxx"
-#include <basic/testtool.hxx> // defines für das Syntaxhighlighting
+#include <basic/testtool.hxx> // defines for syntax highlighting
TextEditImp::TextEditImp( AppEdit* pParent, const WinBits& aBits )
: Window( pParent, aBits )
@@ -70,8 +70,8 @@ TextEditImp::TextEditImp( AppEdit* pParent, const WinBits& aBits )
StartListening( *pTextEngine );
- HideTipTimer.SetTimeout( 5000 ); // 5 Sekunden
- ShowTipTimer.SetTimeout( 500 ); // 1/2 Sekunde
+ HideTipTimer.SetTimeout( 5000 ); // 5 seconds
+ ShowTipTimer.SetTimeout( 500 ); // 1/2 seconds
HideTipTimer.SetTimeoutHdl( LINK( this, TextEditImp, HideVarContents ) );
ShowTipTimer.SetTimeoutHdl( LINK( this, TextEditImp, ShowVarContents ) );
}
@@ -123,7 +123,7 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
pAppEdit->nCurTextWidth = nWidth;
if ( pAppEdit->pHScroll )
- { // Initialisierung abgeschlossen?
+ { // Initialization finished?
pAppEdit->pHScroll->SetRange( Range( 0, (long)nWidth) );
pAppEdit->pHScroll->SetThumbPos( pTextView->GetStartDocPos().X() );
}
@@ -139,7 +139,7 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow() )
((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, FALSE );
- // Lästiges anpassen für 2 Zeichen am Zeilenende statt einem(Hartverdrateter Default)
+ // Itchy adaption for two signs at line ends instead of one (hard coded default)
pTextEngine->SetMaxTextLen( STRING_MAXLEN - pTextEngine->GetParagraphCount() );
}
else if( rTextHint.GetId() == TEXT_HINT_FORMATPARA )
@@ -159,9 +159,9 @@ private:
FontWeight maFontWeight;
public:
- TextAttribSpechial( const FontWeight& rFontWeight );
- TextAttribSpechial( const TextAttribSpechial& rAttr );
- ~TextAttribSpechial() {;}
+ TextAttribSpechial( const FontWeight& rFontWeight );
+ TextAttribSpechial( const TextAttribSpechial& rAttr );
+ ~TextAttribSpechial() {;}
virtual void SetFont( Font& rFont ) const;
virtual TextAttrib* Clone() const;
@@ -213,7 +213,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
return;
}
- /// hier werden die Type für das Testtool nachbearbeitet
+ // here is the postprocessing for types for the TestTool
USHORT i;
BOOL bWasTTControl = FALSE;
for ( i = 0; i < aPortionList.Count(); i++ )
@@ -250,15 +250,9 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
}
}
- // Evtl. Optimieren:
- // Wenn haufig gleiche Farbe, dazwischen Blank ohne Farbe,
- // ggf. zusammenfassen, oder zumindest das Blank,
- // damit weniger Attribute
- if ( TRUE /*bOptimizeHighlight*/ )
- {
// Es muessen nur die Blanks und Tabs mit attributiert werden.
- // Wenn zwei gleiche Attribute hintereinander eingestellt werden,
- // optimiert das die EditEngine.
+ // If there are two equal attributes one after another,
+ // they are optimized by the EditEngine.
xub_StrLen nLastEnd = 0;
#ifdef DBG_UTIL
xub_StrLen nLine = aPortionList[0].nLine;
@@ -281,7 +275,6 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
if ( ( i == (nCount-1) ) && ( r.nEnd < rSource.Len() ) )
r.nEnd = rSource.Len()-1;
}
- }
BOOL bWasModified = pTextEngine->IsModified();
for ( i = 0; i < aPortionList.Count(); i++ )
@@ -293,7 +286,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
SbTextType eCol = r.eType;
Color aColor;
- ULONG nLine = nLineOff+r.nLine-1; // -1, weil Basic bei 1 beginnt
+ ULONG nLine = nLineOff+r.nLine-1; // -1, because BASIC starts with 1
switch ( +eCol )
{
case SB_KEYWORD:
@@ -337,19 +330,19 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
default:
{
aColor = Color( RGB_COLORDATA( 0xff, 0x80, 0x80 ) );
- DBG_ERROR( "Unbekannte Syntax-Farbe?" );
+ DBG_ERROR( "Unknown syntax color" );
}
}
pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1 );
}
- // Das Highlighten soll kein Modify setzen
+ // Highlighting should not modify the text
pTextEngine->SetModified( bWasModified );
}
void TextEditImp::DoSyntaxHighlight( ULONG nPara )
{
- // Durch das DelayedSyntaxHighlight kann es passieren,
- // dass die Zeile nicht mehr existiert!
+ // Due to delayed syntax highlight it can happend that the
+ // paragraph does no longer exist
if ( nPara < pTextEngine->GetParagraphCount() )
{
// leider weis ich nicht, ob genau diese Zeile Modified() ...
@@ -363,8 +356,8 @@ void TextEditImp::DoSyntaxHighlight( ULONG nPara )
void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara )
{
- // Zeile wird nur in 'Liste' aufgenommen, im TimerHdl abgearbeitet.
- // => Nicht Absaetze manipulieren, waehrend EditEngine formatiert.
+ // Paragraph is added to 'List', processed in TimerHdl.
+ // => Do not manipulate paragraphs while EditEngine is formatting
// if ( pProgress )
// pProgress->StepProgress();
@@ -382,7 +375,7 @@ void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara )
IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
{
- DBG_ASSERT( pTextView, "Noch keine View, aber Syntax-Highlight ?!" );
+ DBG_ASSERT( pTextView, "Not yet a View but Syntax-Highlight ?!" );
pTextEngine->SetUpdateMode( FALSE );
bHighlightning = TRUE;
@@ -405,13 +398,13 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
}
BOOL bWasModified = pTextEngine->IsModified();
- if ( aSyntaxLineTable.Count() > 3 ) // Ohne VDev
+ if ( aSyntaxLineTable.Count() > 3 ) // Without VDev
{
pTextEngine->SetUpdateMode( TRUE );
pTextView->ShowCursor( TRUE, TRUE );
}
else
- pTextEngine->SetUpdateMode( TRUE ); // ! Mit VDev
+ pTextEngine->SetUpdateMode( TRUE ); // ! With VDev
// pTextView->ForceUpdate();
// SetUpdateMode( TRUE ) soll kein Modify setzen
@@ -489,7 +482,7 @@ void TextEditImp::KeyInput( const KeyEvent& rKeyEvent )
if ( pTextView->GetTextEngine()->IsModified() )
ModifyHdl.Call( NULL );
else
- pTextView->GetTextEngine()->SetModified( bWasModified ); // Eventuell wieder setzen
+ pTextView->GetTextEngine()->SetModified( bWasModified );
}
void TextEditImp::Paint( const Rectangle& rRect ){ pTextView->Paint( rRect );}
@@ -559,8 +552,8 @@ SbxBase* TextEditImp::GetSbxAtMousePos( String &aWord )
String aSuffixes = CUniString( cSuffixes );
if ( aSuffixes.Search( aWord.GetChar(nLastChar) ) != STRING_NOTFOUND )
aWord.Erase( nLastChar, 1 );
-
- BOOL bWasError = SbxBase::IsError(); // Da eventuell im Testtool ein Fehler geschmissen wird.
+ // because perhaps TestTools throws an error
+ BOOL bWasError = SbxBase::IsError();
pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( TRUE );
SbxBase* pSBX = StarBASIC::FindSBXInCurrentScope( aWord );
pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( FALSE );
@@ -587,8 +580,7 @@ IMPL_LINK( TextEditImp, ShowVarContents, void*, EMPTYARG )
SbxDataType eType = pVar->GetType();
if ( eType == SbxOBJECT )
{
- // Kann zu Absturz, z.B. bei Selections-Objekt fuehren
- // Type == Object heisst nicht, dass pVar == Object!
+ // Can cause a crash: Type == Object does not mean pVar == Object
if ( pVar->GetObject() && pVar->GetObject()->ISA( SbxObject ) )
aHelpText = ((SbxObject*)(pVar->GetObject()))->GetClassName();
else
@@ -599,7 +591,7 @@ IMPL_LINK( TextEditImp, ShowVarContents, void*, EMPTYARG )
else if ( eType != SbxEMPTY )
{
aHelpText = pVar->GetName();
- if ( !aHelpText.Len() ) // Bei Uebergabeparametern wird der Name nicht kopiert
+ if ( !aHelpText.Len() ) // Name is not copied in arguments
aHelpText = aWord;
aHelpText += '=';
aHelpText += pVar->GetString();
@@ -660,11 +652,11 @@ Variant(Empty)
case SbxDOUBLE:
case SbxINTEGER:
case SbxLONG:
-// case SbxOBJECT: // kann nicht editiert werden
+// case SbxOBJECT: // cannot be edited
case SbxSINGLE:
case SbxSTRING:
- case SbxVARIANT: // Taucht wohl auch nicht auf. stattdessen SbxEMPTY
+ case SbxVARIANT: // does not occure, instead SbxEMPTY
case SbxEMPTY:
{
pAppEdit->GetBasicFrame()->SetEditVar( pVar );
@@ -702,28 +694,30 @@ TextEdit::~TextEdit()
void TextEdit::Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 )
{
- if ( nLine ) // Kann eigentlich nicht vorkommen, außer bei Fehler 'Sub erwartet' in erster Zeile
+ if ( nLine ) // Should not occure but at 'Sub expected' in first line
nLine--;
String s = aEdit.pTextEngine->GetText( nLine );
if( nCol1 == STRING_NOTFOUND )
- // Keine Spalte angegeben
- nCol1 = 0, nCol2 = STRING_NOTFOUND;
+ {
+ // No column given
+ nCol1 = 0;
+ nCol2 = STRING_NOTFOUND;
+ }
if( nCol2 == STRING_NOTFOUND )
{
nCol2 = s.Len();
}
- // Anpassung an den Precompiler | EditText != Compilierter Text
+ // Adaption to the Precompiler | EditText != Compilied Text
if ( nCol2 > s.Len() )
nCol2 = s.Len();
if ( nCol1 >= nCol2 )
nCol1 = 0;
- // Da nCol2 u.U. hinter das aktuelle Statement zeigt
- // (weil dort schon das naechste beginnt), muessen
- // wird am Ende evtl. Whitespace, einen Doppelpunkt
- // und mehr Whitespace entfernen
+ // Because nCol2 *may* point after the current statement
+ // (because the next one starts there) there are space
+ // that must be removed
BOOL bColon = FALSE;
while ( s.GetChar( nCol2 ) == ' ' && nCol2 > nCol1 && !bColon )
@@ -775,8 +769,7 @@ void TextEdit::SetText( const String& rStr ){ aEdit.pTextEngine->SetText(rStr);
void TextEdit::SetModifyHdl( Link l ){ aEdit.SetModifyHdl(l); }
BOOL TextEdit::HasText() const { return aEdit.pTextEngine->GetTextLen() > 0; }
-// Es wird entweder ab Beginn oder ab Markierungsbegin + 1 gesucht.
-
+// Search from the beginning or at mark + 1
BOOL TextEdit::Find( const String& s )
{
DBG_CHKTHIS(TextEdit,0);
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 2bb1bc75a4..3c4980e266 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -283,17 +283,17 @@ namespace basic
::osl::MutexGuard aGuard( m_aMutex );
OSL_PRECOND( getApplicationBasicManager( false ) == NULL, "ImplRepository::impl_createApplicationBasicManager: there already is one!" );
- // Directory bestimmen
+ // Determine Directory
SvtPathOptions aPathCFG;
String aAppBasicDir( aPathCFG.GetBasicPath() );
if ( !aAppBasicDir.Len() )
aPathCFG.SetBasicPath( String::CreateFromAscii("$(prog)") );
- // #58293# soffice.new nur im User-Dir suchen => erstes Verzeichnis
+ // #58293# soffice.new search only in user dir => first dir
String aAppFirstBasicDir = aAppBasicDir.GetToken(1);
- // Basic erzeugen und laden
- // MT: #47347# AppBasicDir ist jetzt ein PATH!
+ // Create basic and load it
+ // MT: #47347# AppBasicDir is now a PATH
INetURLObject aAppBasic( SvtPathOptions().SubstituteVariable( String::CreateFromAscii("$(progurl)") ) );
aAppBasic.insertName( Application::GetAppName() );
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 3853120938..9c690f1c8d 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -430,14 +430,14 @@ class BasicLibInfo
private:
StarBASICRef xLib;
String aLibName;
- String aStorageName; // String reicht, da zur Laufzeit eindeutig.
+ String aStorageName; // String is sufficient, unique at runtime
String aRelStorageName;
String aPassword;
BOOL bDoLoad;
BOOL bReference;
BOOL bPasswordVerified;
- BOOL bFoundInPath; // Darf dann nicht neu relativiert werden!
+ BOOL bFoundInPath; // Must not relativated again!
// Lib represents library in new UNO library container
Reference< XLibraryContainer > mxScriptCont;
@@ -471,7 +471,7 @@ public:
const String& GetLibName() const { return aLibName; }
void SetLibName( const String& rName ) { aLibName = rName; }
- // Nur temporaer fuer Laden/Speichern....
+ // Only temporary for Load/Save
BOOL DoLoad() { return bDoLoad; }
BOOL HasPassword() const { return aPassword.Len() != 0; }
@@ -498,7 +498,7 @@ DECLARE_LIST( BasicLibsBase, BasicLibInfo* )
class BasicLibs : public BasicLibsBase
{
public:
- String aBasicLibPath; // soll eigentlich Member vom Manager werden, aber jetzt nicht inkompatibel!
+ String aBasicLibPath; // TODO: Should be member of manager, but currently not incompatible
};
BasicLibInfo::BasicLibInfo()
@@ -536,20 +536,20 @@ void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStora
String aCurStorageName = INetURLObject(rBasMgrStorageName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
DBG_ASSERT(aCurStorageName.Len() != 0, "Bad storage name");
- // Falls nicht gesetzt, StorageName initialisieren
+ // If not set initialize StorageName
if ( aStorageName.Len() == 0 )
aStorageName = aCurStorageName;
- // Wieder laden?
+ // Load again?
BOOL bDoLoad_ = xLib.Is();
if ( bUseOldReloadInfo )
bDoLoad_ = DoLoad();
rSStream << bDoLoad_;
- // Den Namen der Lib...
+ // The name of the lib...
rSStream.WriteByteString(GetLibName());
- // Absoluter Pfad....
+ // Absolute path...
if ( ! GetStorageName().EqualsAscii(szImbedded) )
{
String aSName = INetURLObject( GetStorageName(), INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
@@ -559,14 +559,14 @@ void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStora
else
rSStream.WriteByteString( szImbedded );
- // Relativer Pfad...
+ // Relative path...
if ( ( aStorageName == aCurStorageName ) || ( aStorageName.EqualsAscii(szImbedded) ) )
rSStream.WriteByteString( szImbedded );
else
{
- // Nicht den relativen Pfad ermitteln, wenn die Datei nur im Pfad
- // gefunden wurde: Dann andert sich der relative Pfad und nach einem
- // verschieben der Libs in einen anderen Pfad werden sie nicht gefunden.
+ // Do not determine the relative path if the file was only found in path:
+ // because the relative path would change and after moving the lib the
+ // the file cannot be found.
if ( !IsFoundInPath() )
CalcRelStorageName( aCurStorageName );
rSStream.WriteByteString(aRelStorageName);
@@ -576,11 +576,11 @@ void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStora
// Version 2
// ------------------------------
- // Referenz...
+ // reference...
rSStream << bReference;
// ------------------------------
- // Schluss
+ // End
// ------------------------------
nEndPos = rSStream.Tell();
@@ -604,22 +604,22 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
DBG_ASSERT( nId == LIBINFO_ID, "Keine BasicLibInfo !?" );
if( nId == LIBINFO_ID )
{
- // Wieder laden?
+ // Reload?
BOOL bDoLoad;
rSStream >> bDoLoad;
pInfo->bDoLoad = bDoLoad;
- // Den Namen der Lib...
+ // The name of the lib...
String aName;
rSStream.ReadByteString(aName);
pInfo->SetLibName( aName );
- // Absoluter Pfad....
+ // Absolute path...
String aStorageName;
rSStream.ReadByteString(aStorageName);
pInfo->SetStorageName( aStorageName );
- // Relativer Pfad...
+ // Relative path...
String aRelStorageName;
rSStream.ReadByteString(aRelStorageName);
pInfo->SetRelStorageName( aRelStorageName );
@@ -667,17 +667,16 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
// DBG_ASSERT( aStorName.Len(), "No Storage Name!" );
// DBG_ASSERT(aStorageName.Len() != 0, "Bad storage name");
- // Wenn es den Manager-Stream nicht gibt, sind keine weiteren
- // Aktionen noetig.
+ // If there is no Manager Stream, no further actions are necessary
if ( rStorage.IsStream( ManagerStreamName ) )
{
LoadBasicManager( rStorage, rBaseURL );
- // StdLib erhaelt gewuenschten Parent:
+ // StdLib contains Parent:
StarBASIC* pStdLib = GetStdLib();
- DBG_ASSERT( pStdLib, "Standard-Lib nicht geladen?" );
+ DBG_ASSERT( pStdLib, "Standard-Lib not loaded?" );
if ( !pStdLib )
{
- // Sollte eigentlich nie passieren, aber dann wenigstens nicht abstuerzen...
+ // Should never happen, but if it happens we wont crash...
pStdLib = new StarBASIC( NULL, mbDocMgr );
BasicLibInfo* pStdLibInfo = pLibs->GetObject( 0 );
if ( !pStdLibInfo )
@@ -692,7 +691,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
else
{
pStdLib->SetParent( pParentFromStdLib );
- // Die anderen erhalten die StdLib als Parent:
+ // The other get StdLib as parent:
for ( USHORT nBasic = 1; nBasic < GetLibCount(); nBasic++ )
{
StarBASIC* pBasic = GetLib( nBasic );
@@ -703,7 +702,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
pBasic->SetFlag( SBX_EXTSEARCH );
}
}
- // Durch das Insert modified:
+ // Modified through insert
pStdLib->SetModified( FALSE );
}
@@ -863,7 +862,7 @@ BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, BOOL bDocMgr ) :
{
DBG_CTOR( BasicManager, 0 );
Init();
- DBG_ASSERT( pSLib, "BasicManager kann nicht mit einem NULL-Pointer erzeugt werden!" );
+ DBG_ASSERT( pSLib, "BasicManager cannot be created with a NULL-Pointer!" );
if( pLibPath )
pLibs->aBasicLibPath = *pLibPath;
@@ -875,7 +874,7 @@ BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, BOOL bDocMgr ) :
pStdLibInfo->SetLibName( String::CreateFromAscii(szStdLibName) );
pSLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
- // Speichern lohnt sich nur, wenn sich das Basic aendert.
+ // Save is only necessary if basic has changed
xStdLib->SetModified( FALSE );
bBasMgrModified = FALSE;
}
@@ -883,22 +882,19 @@ BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, BOOL bDocMgr ) :
BasicManager::BasicManager()
{
DBG_CTOR( BasicManager, 0 );
- // Diese CTOR darf nur verwendet werden um bei 'Speichern unter'
- // die relativen Pfade anzupassen, das gibt kein AppBasic und somit
- // duerfen auch keine Libs geladen werden...
+ // This ctor may only be used to adapt relative paths for 'Save As'.
+ // There is no AppBasic so libs must not be loaded...
Init();
}
void BasicManager::ImpMgrNotLoaded( const String& rStorageName )
{
- // pErrInf wird nur zerstoert, wenn der Fehler von einem ErrorHandler
- // gehandelt wird!
-// String aErrorText( BasicResId( IDS_SBERR_MGROPEN ) );
-// aErrorText.SearchAndReplace( "XX", rStorageName );
- StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, rStorageName, ERRCODE_BUTTON_OK );
+ // pErrInf is only destroyed if the error os processed by an
+ // ErrorHandler
+ StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, rStorageName, ERRCODE_BUTTON_OK );
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENMGRSTREAM, rStorageName ) );
- // Eine STD-Lib erzeugen, sonst macht es Peng!
+ // Create a stdlib otherwise we crash!
BasicLibInfo* pStdLibInfo = CreateLibInfo();
pStdLibInfo->SetLib( new StarBASIC( NULL, mbDocMgr ) );
StarBASICRef xStdLib = pStdLibInfo->GetLib();
@@ -941,9 +937,9 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
maStorageName = INetURLObject(aStorName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
// #i13114 removed, DBG_ASSERT(aStorageName.Len() != 0, "Bad storage name");
- String aRealStorageName = maStorageName; // fuer relative Pfade, kann durch BaseURL umgebogen werden.
+ String aRealStorageName = maStorageName; // for relative paths, can be modified through BaseURL
- // Wenn aus Vorlagen geladen wird, gilt nur die BaseURL:
+ // If loaded from template, only BaseURL is used:
//String aBaseURL = INetURLObject::GetBaseURL();
if ( rBaseURL.Len() )
{
@@ -963,15 +959,15 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
// Plausi!
if( nLibs & 0xF000 )
{
- DBG_ASSERT( !this, "BasicManager-Stream defekt!" );
+ DBG_ASSERT( !this, "BasicManager-Stream defect!" );
return;
}
for ( USHORT nL = 0; nL < nLibs; nL++ )
{
BasicLibInfo* pInfo = BasicLibInfo::Create( *xManagerStream );
- // ggf. absoluten Pfad-Namen korrigieren, wenn rel. existiert
- // Immer erst den relativen versuchen, falls zwei Staende auf der Platte
+ // Correct absolute pathname if relative is existing.
+ // Always try relative first if there are two stands on disk
if ( pInfo->GetRelStorageName().Len() && ( ! pInfo->GetRelStorageName().EqualsAscii(szImbedded) ) )
{
INetURLObject aObj( aRealStorageName, INET_PROT_FILE );
@@ -986,7 +982,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
//*** TODO-End
if ( pLibs->aBasicLibPath.Len() )
{
- // Lib im Pfad suchen...
+ // Search lib in path
String aSearchFile = pInfo->GetRelStorageName();
SvtPathOptions aPathCFG;
if( aPathCFG.SearchFile( aSearchFile, SvtPathOptions::PATH_BASIC ) )
@@ -998,9 +994,8 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
}
pLibs->Insert( pInfo, LIST_APPEND );
- // Libs aus externen Dateien sollen erst bei Bedarf geladen werden.
- // Aber Referenzen werden gleich geladen, sonst bekommen die Grosskunden
- // vielleicht Probleme...
+ // Libs from external files should be loaded only when necessary.
+ // But references are loaded at once, otherwise some big customers get into trouble
if ( bLoadLibs && pInfo->DoLoad() &&
( ( !pInfo->IsExtern() ) || ( pInfo->IsReference() ) ) )
{
@@ -1048,11 +1043,11 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENMGRSTREAM, aStorName ) );
// und es geht weiter...
}
- xManagerStream->Seek( nBasicEndOff+1 ); // +1: 0x00 als Trenner
+ xManagerStream->Seek( nBasicEndOff+1 ); // +1: 0x00 as separator
String aLibs;
xManagerStream->ReadByteString(aLibs);
xManagerStream->SetBufferSize( 0 );
- xManagerStream.Clear(); // Sream schliessen
+ xManagerStream.Clear(); // Close stream
if ( aLibs.Len() )
{
@@ -1062,7 +1057,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
for ( USHORT nLib = 0; nLib < nLibs; nLib++ )
{
String aLibInfo( aLibs.GetToken( nLib, LIB_SEP ) );
- // == 2 soll irgendwann weg!
+ // TODO: Remove == 2
DBG_ASSERT( ( aLibInfo.GetTokenCount( LIBINFO_SEP ) == 2 ) || ( aLibInfo.GetTokenCount( LIBINFO_SEP ) == 3 ), "Ungueltige Lib-Info!" );
String aLibName( aLibInfo.GetToken( 0, LIBINFO_SEP ) );
String aLibAbsStorageName( aLibInfo.GetToken( 1, LIBINFO_SEP ) );
@@ -1103,12 +1098,11 @@ BasicManager::~BasicManager()
{
DBG_DTOR( BasicManager, 0 );
- // Listener benachrichtigen, falls noch etwas zu Speichern...
+ // Notify listener if something needs to be saved
Broadcast( SfxSimpleHint( SFX_HINT_DYING) );
- // Basic-Infos zerstoeren...
- // In umgekehrter Reihenfolge, weil die StdLib Referenzen haelt, die
- // anderen nur die StdLib als Parent haben.
+ // Destroy Basic-Infos...
+ // In reverse order
BasicLibInfo* pInf = pLibs->Last();
while ( pInf )
{
@@ -1157,7 +1151,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
aStorageName = GetStorageName();
SotStorageRef xStorage;
- // Der aktuelle darf nicht nochmal geoffnet werden...
+ // The current must not be opened again...
if ( pCurStorage )
{
String aStorName( pCurStorage->GetName() );
@@ -1186,7 +1180,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
}
else
{
- // In dem Basic-Storage liegt jede Lib in einem Stream...
+ // In the Basic-Storage every lib is in a Stream...
SotStorageStreamRef xBasicStream = xBasicStorage->OpenSotStream( pLibInfo->GetLibName(), eStreamReadMode );
if ( !xBasicStream.Is() || xBasicStream->GetError() )
{
@@ -1213,7 +1207,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
}
else
{
- // Das Basic skippen...
+ // Skip Basic...
xBasicStream->Seek( STREAM_SEEK_TO_BEGIN );
ImplEncryptStream( *xBasicStream );
SbxBase::Skip( *xBasicStream );
@@ -1227,7 +1221,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
}
else
{
- // Ggf. stehen weitere Informationen im Stream...
+ // Perhaps there are additional information in the stream...
xBasicStream->SetKey( szCryptingKey );
xBasicStream->RefreshBuffer();
sal_uInt32 nPasswordMarker = 0;
@@ -1241,7 +1235,6 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
xBasicStream->SetKey( ByteString() );
CheckModules( pLibInfo->GetLib(), pLibInfo->IsReference() );
}
-// bBasMgrModified = TRUE; // Warum?
return bLoaded;
}
}
@@ -1257,7 +1250,7 @@ BOOL BasicManager::ImplEncryptStream( SvStream& rStrm ) const
BOOL bProtected = FALSE;
if ( nCreator != SBXCR_SBX )
{
- // sollte nur bei verschluesselten Streams nicht stimmen.
+ // Should only be the case for encrypted Streams
bProtected = TRUE;
rStrm.SetKey( szCryptingKey );
rStrm.RefreshBuffer();
@@ -1265,7 +1258,8 @@ BOOL BasicManager::ImplEncryptStream( SvStream& rStrm ) const
return bProtected;
}
-// Dieser Code ist notwendig, um das BASIC der Beta 1 laden zu koennen
+// This code is necessary to load the BASIC of Beta 1
+// TODO: Which Beta 1?
BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const
{
BOOL bProtected = ImplEncryptStream( rStrm );
@@ -1276,7 +1270,7 @@ BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con
if( xNew->IsA( TYPE(StarBASIC) ) )
{
StarBASIC* pNew = (StarBASIC*)(SbxBase*) xNew;
- // Den Parent des alten BASICs uebernehmen
+ // Use the Parent of the old BASICs
if( rOldBasic.Is() )
{
pNew->SetParent( rOldBasic->GetParent() );
@@ -1320,8 +1314,8 @@ void BasicManager::CheckModules( StarBASIC* pLib, BOOL bReference ) const
pLib->Compile( pModule );
}
- // #67477, AB 8.12.99 On demand Compilieren bei referenzierten
- // Libraries sollte nicht zu modified fuehren
+ // #67477, AB 8.12.99 On demand compile in referenced libs should not
+ // cause modified
if( !bModified && bReference )
{
DBG_ERROR( "Per Reference eingebundene Basic-Library ist nicht compiliert!" );
@@ -1344,13 +1338,13 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B
aNewLibName += '_';
BasicLibInfo* pLibInfo = CreateLibInfo();
- // Erstmal mit dem Original-Namen, da sonst ImpLoadLibary nicht geht...
+ // Use original name otherwise ImpLoadLibary failes...
pLibInfo->SetLibName( rLibName );
// Funktioniert so aber nicht, wenn Name doppelt
// USHORT nLibId = GetLibId( rLibName );
USHORT nLibId = (USHORT) pLibs->GetPos( pLibInfo );
- // Vorm Laden StorageNamen setzen, da er mit pCurStorage verglichen wird.
+ // Set StorageName before load because it is compared with pCurStorage
pLibInfo->SetStorageName( aStorageName );
BOOL bLoaded = ImpLoadLibary( pLibInfo, &rStorage );
@@ -1361,15 +1355,15 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B
if ( bReference )
{
- pLibInfo->GetLib()->SetModified( FALSE ); // Dann nicht speichern
+ pLibInfo->GetLib()->SetModified( FALSE ); // Don't save in this case
pLibInfo->SetRelStorageName( String() );
// pLibInfo->CalcRelStorageName( GetStorageName() );
pLibInfo->IsReference() = TRUE;
}
else
{
- pLibInfo->GetLib()->SetModified( TRUE ); // Muss nach Add gespeichert werden!
- pLibInfo->SetStorageName( String::CreateFromAscii(szImbedded) ); // Im BasicManager-Storage speichern
+ pLibInfo->GetLib()->SetModified( TRUE ); // Must be saved after Add!
+ pLibInfo->SetStorageName( String::CreateFromAscii(szImbedded) ); // Save in BasicManager-Storage
}
bBasMgrModified = TRUE;
}
@@ -1399,17 +1393,17 @@ BOOL BasicManager::IsReference( USHORT nLib )
BOOL BasicManager::RemoveLib( USHORT nLib )
{
- // Nur physikalisch loeschen, wenn keine Referenz.
+ // Only pyhsical deletion if no reference
return RemoveLib( nLib, !IsReference( nLib ) );
}
BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
{
DBG_CHKTHIS( BasicManager, 0 );
- DBG_ASSERT( nLib, "Standard-Lib kann nicht entfernt werden!" );
+ DBG_ASSERT( nLib, "Standard-Lib cannot be removed!" );
BasicLibInfo* pLibInfo = pLibs->GetObject( nLib );
- DBG_ASSERT( pLibInfo, "Lib nicht gefunden!" );
+ DBG_ASSERT( pLibInfo, "Lib not found!" );
if ( !pLibInfo || !nLib )
{
@@ -1419,9 +1413,8 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
return FALSE;
}
- // Wenn einer der Streams nicht geoeffnet werden kann, ist es kein
- // Fehler, es gibt halt noch nichts zum loeschen, weil das Basic noch
- // nie geschrieben wurde...
+ // If one of the streams cannot be opened, this is not an error,
+ // because BASIC was never written before...
if ( bDelBasicFromStorage && !pLibInfo->IsReference() &&
( !pLibInfo->IsExtern() || SotStorage::IsStorageFile( pLibInfo->GetStorageName() ) ) )
{
@@ -1447,8 +1440,8 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
xBasicStorage->Remove( pLibInfo->GetLibName() );
xBasicStorage->Commit();
- // Wenn kein weiterer Stream vorhanden,
- // dann auch den SubStorage loeschen.
+ // If no further stream available,
+ // delete the SubStorage.
SvStorageInfoList aInfoList( 0, 4 );
xBasicStorage->FillInfoList( &aInfoList );
if ( !aInfoList.Count() )
@@ -1456,8 +1449,8 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
xBasicStorage.Clear();
xStorage->Remove( BasicStreamName );
xStorage->Commit();
- // Wenn kein weiterer Streams oder SubStorages vorhanden,
- // dann auch den Storage loeschen.
+ // If no further Streams or SubStorages available,
+ // delete the Storage, too.
aInfoList.Clear();
xStorage->FillInfoList( &aInfoList );
if ( !aInfoList.Count() )
@@ -1476,7 +1469,7 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
if ( pLibInfo->GetLib().Is() )
GetStdLib()->Remove( pLibInfo->GetLib() );
delete pLibs->Remove( pLibInfo );
- return TRUE; // Remove hat geklappt, Del unwichtig.
+ return TRUE; // Remove was successful, del unimportant
}
USHORT BasicManager::GetLibCount() const
@@ -1509,7 +1502,7 @@ StarBASIC* BasicManager::GetLib( const String& rName ) const
BasicLibInfo* pInf = pLibs->First();
while ( pInf )
{
- if ( pInf->GetLibName().CompareIgnoreCaseToAscii( rName ) == COMPARE_EQUAL ) // prueffen, ob vorhanden...
+ if ( pInf->GetLibName().CompareIgnoreCaseToAscii( rName ) == COMPARE_EQUAL )// Check if available...
return pInf->GetLib();
pInf = pLibs->Next();
@@ -2306,7 +2299,7 @@ Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
::rtl::OUString aPassword = pLibInfo->GetPassword();
- // TODO Nur extern-Info liefern!
+ // TODO Only provide extern info!
::rtl::OUString aExternaleSourceURL;
::rtl::OUString aLinkTargetURL;
if( pLibInfo->IsReference() )
diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx
index 2fc29cac06..0e5a376bac 100644
--- a/basic/source/classes/disas.cxx
+++ b/basic/source/classes/disas.cxx
@@ -43,51 +43,51 @@
static const char* pOp1[] = {
"NOP",
- // Operatoren
- // die folgenden Operatoren sind genauso angeordnet
- // wie der enum SbxVarOp
+ // Operators
+ // the following operators have the same order as in
+ // enum SbxVarOp
"EXP", "MUL", "DIV", "MOD", "PLUS", "MINUS", "NEG",
"EQ", "NE", "LT", "GT", "LE", "GE",
"IDIV", "AND", "OR", "XOR", "EQV", "IMP", "NOT",
"CAT",
- // Ende enum SbxVarOp
+ // End enum SbxVarOp
"LIKE", "IS",
- // Laden/speichern
- "ARGC", // neuen Argv einrichten
- "ARGV", // TOS ==> aktueller Argv
- "INPUT", // Input ==> TOS
- "LINPUT", // Line Input ==> TOS
- "GET", // TOS anfassen
- "SET", // Speichern Objekt TOS ==> TOS-1
- "PUT", // TOS ==> TOS-1
- "CONST", // TOS ==> TOS-1, dann ReadOnly
- "DIM", // DIM
- "REDIM", // REDIM
- "REDIMP", // REDIM PRESERVE
- "ERASE", // TOS loeschen
- // Verzweigen
- "STOP", // Programmende
- "INITFOR", // FOR-Variable initialisieren
- "NEXT", // FOR-Variable inkrementieren
- "CASE", // Anfang CASE
- "ENDCASE", // Ende CASE
- "STDERR", // Standard-Fehlerbehandlung
- "NOERROR", // keine Fehlerbehandlung
- "LEAVE", // UP verlassen
- // E/A
- "CHANNEL", // TOS = Kanalnummer
- "PRINT", // print TOS
- "PRINTF", // print TOS in field
- "WRITE", // write TOS
- "RENAME", // Rename Tos+1 to Tos
- "PROMPT", // TOS = Prompt for Input
- "RESTART", // Restartpunkt definieren
- "STDIO", // E/A-Kanal 0 einstellen
- // Sonstiges
- "EMPTY", // Leeren Ausdruck auf Stack
- "ERROR", // TOS = Fehlercode
- "LSET", // Speichern Objekt TOS ==> TOS-1
- "RSET", // Speichern Objekt TOS ==> TOS-1
+ // Load/Store
+ "ARGC", // Create new Argv
+ "ARGV", // TOS ==> current Argv
+ "INPUT", // Input ==> TOS
+ "LINPUT", // Line Input ==> TOS
+ "GET", // get TOS
+ "SET", // Save Object TOS ==> TOS-1
+ "PUT", // TOS ==> TOS-1
+ "CONST", // TOS ==> TOS-1, then ReadOnly
+ "DIM", // DIM
+ "REDIM", // REDIM
+ "REDIMP", // REDIM PRESERVE
+ "ERASE", // delete TOS
+ // Branch
+ "STOP", // End of program
+ "INITFOR", // FOR-Variable init
+ "NEXT", // FOR-Variable increment
+ "CASE", // Begin CASE
+ "ENDCASE", // End CASE
+ "STDERR", // Default error handling
+ "NOERROR", // No error handling
+ "LEAVE", // leave UP
+ // I/O
+ "CHANNEL", // TOS = Channelnumber
+ "PRINT", // print TOS
+ "PRINTF", // print TOS in field
+ "WRITE", // write TOS
+ "RENAME", // Rename Tos+1 to Tos
+ "PROMPT", // TOS = Prompt for Input
+ "RESTART", // Define restart point
+ "STDIO", // Switch to I/O channel 0
+ // Misc
+ "EMPTY", // Empty statement to stack
+ "ERROR", // TOS = error code
+ "LSET", // Save object TOS ==> TOS-1
+ "RSET", // Save object TOS ==> TOS-1 (TODO: Same as above?)
"REDIMP_ERASE",
"INITFOREACH",
"VBASET",
@@ -96,127 +96,135 @@ static const char* pOp1[] = {
};
static const char* pOp2[] = {
- "NUMBER", // Laden einer numerischen Konstanten (+ID)
- "STRING", // Laden einer Stringkonstanten (+ID)
- "CONSTANT", // Immediate Load (+Wert)
- "ARGN", // Speichern eines named Args in Argv (+StringID)
- "PAD", // String auf feste Laenge bringen (+Laenge)
- // Verzweigungen
- "JUMP", // Sprung (+Target)
- "JUMP.T", // TOS auswerten, bedingter Sprung (+Target)
- "JUMP.F", // TOS auswerten, bedingter Sprung (+Target)
- "ONJUMP", // TOS auswerten, Sprung in JUMP-Tabelle (+MaxVal)
- "GOSUB", // UP-Aufruf (+Target)
- "RETURN", // UP-Return (+0 oder Target)
- "TESTFOR", // FOR-Variable testen, inkrementieren (+Endlabel)
- "CASETO", // Tos+1 <= Case <= Tos, 2xremove (+Target)
- "ERRHDL", // Fehler-Handler (+Offset)
- "RESUME", // Resume nach Fehlern (+0 or 1 or Label)
- // E/A
- "CLOSE", // (+Kanal/0)
- "PRCHAR", // (+char)
- // Objekte
- "SETCLASS", // Set + Klassennamen testen (+StringId)
- "TESTCLASS", // Check TOS class (+StringId)
- "LIB", // Libnamen fuer Declare-Procs setzen (+StringId)
- // Neues ab Beta 3
- "BASED", // TOS wird um BASE erhoeht, BASE davor gepusht
- "ARGTYP", // Letzten Parameter in Argv konvertieren (+Typ)
+ "NUMBER", // Load a numeric constant (+ID)
+ "STRING", // Load a string constant (+ID)
+ "CONSTANT", // Immediate Load (+value)
+ "ARGN", // Save named args in argv (+StringID)
+ "PAD", // Pad String to defined length (+length)
+ // Branches
+ "JUMP", // Jump to target (+Target)
+ "JUMP.T", // evaluate TOS, conditional jump (+Target)
+ "JUMP.F", // evaluate TOS, conditional jump (+Target)
+ "ONJUMP", // evaluate TOS, jump into JUMP-table (+MaxVal)
+ "GOSUB", // UP-Call (+Target)
+ "RETURN", // UP-Return (+0 or Target)
+ "TESTFOR", // Test FOR-Variable, increment (+Endlabel)
+ "CASETO", // Tos+1 <= Case <= Tos, 2xremove (+Target)
+ "ERRHDL", // Error-Handler (+Offset)
+ "RESUME", // Resume after errors (+0 or 1 or Label)
+ // I/O
+ "CLOSE", // (+channel/0)
+ "PRCHAR", // (+char)
+ // Objects
+ "SETCLASS", // Test Set + Classname (+StringId)
+ "TESTCLASS", // Check TOS class (+StringId)
+ "LIB", // Set Libname for Declare-Procs (+StringId)
+ // New since Beta 3 (TODO: Which Beta3?)
+ "BASED", // TOS is incremted about BASE, push BASE before
+ "ARGTYP", // Convert last parameter in argv (+Type)
"VBASETCLASS",
};
static const char* pOp3[] = {
- // Alle Opcodes mit zwei Operanden
- "RTL", // Laden aus RTL (+StringID+Typ)
- "FIND", // Laden (+StringID+Typ)
- "ELEM", // Laden Element (+StringID+Typ)
- "PARAM", // Parameter (+Offset+Typ)
- // Verzweigen
- "CALL", // DECLARE-Methode rufen (+StringID+Typ)
- "CALL.C", // Cdecl-DECLARE-Methode rufen (+StringID+Typ)
- "CASEIS", // Case-Test (+Test-Opcode+False-Target)
- "STMNT", // Beginn eines Statements (+Line+Col)
- // E/A
- "OPEN", // (+SvStreamFlags+Flags)
- // Objekte und Variable
- "LOCAL", // Lokale Variable (+StringID+Typ)
- "PUBLIC", // Modulglobale Variable (+StringID+Typ)
- "GLOBAL", // Globale Variable (+StringID+Typ)
- "CREATE", // Objekt kreieren (+StringId+StringId)
- "STATIC", // Objekt kreieren (+StringId+StringId)
- "TCREATE", // User defined Objekt kreieren (+StringId+StringId)
- "DCREATE", // User defined 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", // User defined Objekt-Array redimensionieren (+StringId+StringId)
- "FIND_CM", // Search inside a class module (CM) to enable global search in time
+ // All opcodes with two operands
+ "RTL", // Load from RTL (+StringID+Typ)
+ "FIND", // Load (+StringID+Typ)
+ "ELEM", // Load element (+StringID+Typ)
+ "PARAM", // Parameter (+Offset+Typ)
+
+ // Branching
+ "CALL", // Call DECLARE method (+StringID+Typ)
+ "CALL.C", // Call Cdecl-DECLARE method (+StringID+Typ)
+ "CASEIS", // Case-Test (+Test-Opcode+False-Target)
+ "STMNT", // Start of a statement (+Line+Col)
+
+ // I/O
+ "OPEN", // (+SvStreamFlags+Flags)
+
+ // Objects and variables
+ "LOCAL", // Local variables (+StringID+Typ)
+ "PUBLIC", // Modul global var (+StringID+Typ)
+ "GLOBAL", // Global var (+StringID+Typ)
+ "CREATE", // Create object (+StringId+StringId)
+ "STATIC", // Create static object (+StringId+StringId)
+ "TCREATE", // Create User defined Object (+StringId+StringId)
+ "DCREATE", // Create User defined Object-Array kreieren (+StringId+StringId)
+ "GLOBAL_P", // Define persistent global var (existing after basic restart)
+ // P=PERSIST (+StringID+Typ)
+ "FIND_G", // Searches for global var with special handling due to _GLOBAL_P
+ "DCREATE_REDIMP", // Change dimensions of a user defined Object-Array (+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)
};
static const char** pOps[3] = { pOp1, pOp2, pOp3 };
-typedef void( SbiDisas::*Func )( String& ); // Verarbeitungsroutine
+typedef void( SbiDisas::*Func )( String& ); // Processing routines
static const Func pOperand2[] = {
- &SbiDisas::StrOp, // Laden einer numerischen Konstanten (+ID)
- &SbiDisas::StrOp, // Laden einer Stringkonstanten (+ID)
+ &SbiDisas::StrOp, // Load a numeric constant (+ID)
+ &SbiDisas::StrOp, // Load a string constant (+ID)
&SbiDisas::ImmOp, // Immediate Load (+Wert)
- &SbiDisas::StrOp, // Speichern eines benannten Arguments(+ID)
- &SbiDisas::ImmOp, // String auf feste Laenge bringen (+Laenge)
- // Verzweigungen
- &SbiDisas::LblOp, // Sprung (+Target)
- &SbiDisas::LblOp, // TOS auswerten), bedingter Sprung (+Target)
- &SbiDisas::LblOp, // TOS auswerten), bedingter Sprung (+Target)
- &SbiDisas::OnOp, // TOS auswerten), Sprung in JUMP-Tabelle (+MaxVal)
- &SbiDisas::LblOp, // UP-Aufruf (+Target)
- &SbiDisas::ReturnOp, // UP-Return (+0 oder Target)
- &SbiDisas::LblOp, // FOR-Variable testen), inkrementieren (+Endlabel)
+ &SbiDisas::StrOp, // Save a named argument (+ID)
+ &SbiDisas::ImmOp, // Strip String to fixed size (+length)
+
+ // Branches
+ &SbiDisas::LblOp, // Jump (+Target)
+ &SbiDisas::LblOp, // eval TOS, conditional jump (+Target)
+ &SbiDisas::LblOp, // eval TOS, conditional jump (+Target)
+ &SbiDisas::OnOp, // eval TOS, jump in JUMP table (+MaxVal)
+ &SbiDisas::LblOp, // UP call (+Target)
+ &SbiDisas::ReturnOp, // UP Return (+0 or Target)
+ &SbiDisas::LblOp, // test FOR-Variable, increment (+Endlabel)
&SbiDisas::LblOp, // Tos+1 <= Case <= Tos), 2xremove (+Target)
- &SbiDisas::LblOp, // Fehler-Handler (+Offset)
- &SbiDisas::ResumeOp, // Resume nach Fehlern (+0 or 1 or Label)
- // E/A
- &SbiDisas::CloseOp, // (+Kanal/0)
+ &SbiDisas::LblOp, // Error handler (+Offset)
+ &SbiDisas::ResumeOp, // Resume after errors (+0 or 1 or Label)
+
+ // I/O
+ &SbiDisas::CloseOp, // (+channel/0)
&SbiDisas::CharOp, // (+char)
- // Objekte
- &SbiDisas::StrOp, // Klassennamen testen (+StringId)
- &SbiDisas::StrOp, // TESTCLASS, Check TOS class (+StringId)
- &SbiDisas::StrOp, // Libnamen fuer Declare-Procs setzen (+StringId)
- &SbiDisas::ImmOp, // TOS wird um BASE erhoeht, BASE davor gepusht
- &SbiDisas::TypeOp, // Letzten Parameter in Argv konvertieren (+Typ)
- &SbiDisas::StrOp, // VBASETCLASS (+StringId)
+
+ // Objects
+ &SbiDisas::StrOp, // Test classname (+StringId)
+ &SbiDisas::StrOp, // TESTCLASS, Check TOS class (+StringId)
+ &SbiDisas::StrOp, // Set libname for declare procs (+StringId)
+ &SbiDisas::ImmOp, // TOS is incremented about BASE erhoeht, BASE pushed before
+ &SbiDisas::TypeOp, // Convert last parameter to/in(?) argv (+Typ)
+ &SbiDisas::StrOp, // VBASETCLASS (+StringId)
};
static const Func pOperand3[] = {
- // Alle Opcodes mit zwei Operanden
- &SbiDisas::VarOp, // Laden aus RTL (+StringID+Typ)
- &SbiDisas::VarOp, // Laden (+StringID+Typ)
- &SbiDisas::VarOp, // Laden Element (+StringID+Typ)
+ // All opcodes with two operands
+ &SbiDisas::VarOp, // Load from RTL (+StringID+Typ)
+ &SbiDisas::VarOp, // Load (+StringID+Typ)
+ &SbiDisas::VarOp, // Load Element (+StringID+Typ)
&SbiDisas::OffOp, // Parameter (+Offset+Typ)
- // Verzweigen
- &SbiDisas::VarOp, // DECLARE-Methode rufen (+StringID+Typ)
- &SbiDisas::VarOp, // CDecl-DECLARE-Methode rufen (+StringID+Typ)
+
+ // Branch
+ &SbiDisas::VarOp, // Call DECLARE-Method (+StringID+Typ)
+ &SbiDisas::VarOp, // Call CDecl-DECLARE-Methode (+StringID+Typ)
&SbiDisas::CaseOp, // Case-Test (+Test-Opcode+False-Target)
- &SbiDisas::StmntOp, // Statement (+Zeilen+Spalte)
- // E/A
+ &SbiDisas::StmntOp, // Statement (+Row+Column)
+
+ // I/O
&SbiDisas::StrmOp, // (+SvStreamFlags+Flags)
- // Objekte
- &SbiDisas::VarDefOp, // Lokale Variable definieren (+StringID+Typ)
- &SbiDisas::VarDefOp, // Modulglobale Variable definieren (+StringID+Typ)
- &SbiDisas::VarDefOp, // Globale Variable definieren (+StringID+Typ)
- &SbiDisas::Str2Op, // Objekt kreieren (+StringId+StringId)
- &SbiDisas::VarDefOp, // Statische Variable definieren (+StringID+Typ)
- &SbiDisas::Str2Op, // User defined Objekt kreieren (+StringId+StringId)
- &SbiDisas::Str2Op, // User defined Objekt-Array kreieren (+StringId+StringId)
- &SbiDisas::VarDefOp, // Globale Variable definieren, die beim Neustart von Basic
- // nicht ueberschrieben wird, P=PERSIST (+StringID+Typ)
- &SbiDisas::VarOp, // Sucht globale Variable mit Spezialbehandlung wegen _GLOBAL_P
- &SbiDisas::Str2Op, // User defined Objekt-Array redimensionieren (+StringId+StringId)
+
+ // Objects
+ &SbiDisas::VarDefOp, // Define local var (+StringID+Typ)
+ &SbiDisas::VarDefOp, // Define Module global var (+StringID+Typ)
+ &SbiDisas::VarDefOp, // Define global var (+StringID+Typ)
+ &SbiDisas::Str2Op, // Create object (+StringId+StringId)
+ &SbiDisas::VarDefOp, // Define static object (+StringID+Typ)
+ &SbiDisas::Str2Op, // Create User defined Object (+StringId+StringId)
+ &SbiDisas::Str2Op, // Create User defined Object-Array (+StringId+StringId)
+ &SbiDisas::VarDefOp, // Define persistent global var P=PERSIST (+StringID+Typ)
+ &SbiDisas::VarOp, // Searches for global var with special handling due to _GLOBAL_P
+ &SbiDisas::Str2Op, // Redimensionate User defined Object-Array (+StringId+StringId)
&SbiDisas::VarOp, // FIND_CM
&SbiDisas::VarDefOp, // PUBLIC_P
};
-
+// TODO: Why as method? Isn't a simple define sufficient?
static const char* _crlf()
{
#if defined (UNX) || defined( PM2 )
@@ -226,9 +234,7 @@ static const char* _crlf()
#endif
}
-// Diese Methode ist hier, damit die Datei als eigenes Segment geladen werden
-// kann.
-
+// This method exists because we want to load the file as own segment
BOOL SbModule::Disassemble( String& rText )
{
rText.Erase();
@@ -248,7 +254,7 @@ SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p )
nPC = 0;
nOp1 = nOp2 = nParts = 0;
eOp = _NOP;
- // Label-Bits setzen
+ // Set Label-Bits
nOff = 0;
while( Fetch() )
{
@@ -270,7 +276,7 @@ SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p )
}
}
nOff = 0;
- // Die Publics noch dazu
+ // Add the publics
for( USHORT i = 0; i < pMod->GetMethods()->Count(); i++ )
{
SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
@@ -282,8 +288,7 @@ SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p )
}
}
-// Aktuellen Opcode auslesen
-
+// Read current opcode
BOOL SbiDisas::Fetch()
{
nPC = nOff;
@@ -356,10 +361,10 @@ BOOL SbiDisas::DisasLine( String& rText )
rText.Erase();
if( !Fetch() )
return FALSE;
- // Neue Zeile?
+ // New line?
if( eOp == _STMNT && nOp1 != nLine )
{
- // Zeile raussuchen
+ // Find line
String aSource = rImg.aOUSource;
nLine = nOp1;
USHORT n = 0;
@@ -369,7 +374,7 @@ BOOL SbiDisas::DisasLine( String& rText )
if( n == STRING_NOTFOUND ) break;
else n++;
}
- // Stelle anzeigen
+ // Show position
if( n != STRING_NOTFOUND )
{
USHORT n2 = aSource.SearchAscii( "\n", n );
@@ -444,9 +449,7 @@ BOOL SbiDisas::DisasLine( String& rText )
return TRUE;
}
-
-// Auslesen aus StringPool
-
+// Read from StringPool
void SbiDisas::StrOp( String& rText )
{
String aStr = rImg.GetString( (USHORT)nOp1 );
@@ -476,14 +479,12 @@ void SbiDisas::Str2Op( String& rText )
}
// Immediate Operand
-
void SbiDisas::ImmOp( String& rText )
{
rText += String::CreateFromInt32(nOp1);
}
// OnGoto Operand
-
void SbiDisas::OnOp( String& rText )
{
rText += String::CreateFromInt32(nOp1 & 0x7FFF);
@@ -492,7 +493,6 @@ void SbiDisas::OnOp( String& rText )
}
// Label
-
void SbiDisas::LblOp( String& rText )
{
char cBuf[ 10 ];
@@ -500,16 +500,14 @@ void SbiDisas::LblOp( String& rText )
rText.AppendAscii( cBuf );
}
-// 0 oder Label
-
+// 0 or Label
void SbiDisas::ReturnOp( String& rText )
{
if( nOp1 )
LblOp( rText );
}
-// 0, 1 oder Label
-
+// 0, 1 or Label
void SbiDisas::ResumeOp( String& rText )
{
switch( nOp1 )
@@ -519,24 +517,21 @@ void SbiDisas::ResumeOp( String& rText )
}
}
-// Prompt ausgeben
+// print Prompt
// FALSE/TRUE
-
void SbiDisas::PromptOp( String& rText )
{
if( nOp1 )
rText.AppendAscii( "\"? \"" );
}
-// 0 oder 1
-
+// 0 or 1
void SbiDisas::CloseOp( String& rText )
{
rText.AppendAscii( nOp1 ? "Channel" : "All" );
}
-// Zeichen ausgeben
-
+// Print character
void SbiDisas::CharOp( String& rText )
{
const char* p = NULL;
@@ -558,13 +553,12 @@ void SbiDisas::CharOp( String& rText )
rText += (USHORT)nOp1;
}
-// Variable ausgeben: String-ID und Typ
-
+// Print var: String-ID and type
void SbiDisas::VarOp( String& rText )
{
rText += rImg.GetString( (USHORT)(nOp1 & 0x7FFF) );
rText.AppendAscii( "\t; " );
- // Der Typ
+ // The type
UINT32 n = nOp1;
nOp1 = nOp2;
TypeOp( rText );
@@ -572,24 +566,22 @@ void SbiDisas::VarOp( String& rText )
rText.AppendAscii( ", Args" );
}
-// Variable definieren: String-ID und Typ
-
+// Define variable: String-ID and type
void SbiDisas::VarDefOp( String& rText )
{
rText += rImg.GetString( (USHORT)(nOp1 & 0x7FFF) );
rText.AppendAscii( "\t; " );
- // Der Typ
+ // The Typ
nOp1 = nOp2;
TypeOp( rText );
}
-// Variable ausgeben: Offset und Typ
-
+// Print variable: Offset and Typ
void SbiDisas::OffOp( String& rText )
{
rText += String::CreateFromInt32( nOp1 & 0x7FFF );
rText.AppendAscii( "\t; " );
- // Der Typ
+ // The type
UINT32 n = nOp1;
nOp1 = nOp2;
TypeOp( rText );
@@ -597,8 +589,8 @@ void SbiDisas::OffOp( String& rText )
rText.AppendAscii( ", Args" );
}
-// Datentyp
-#ifdef HP9000
+// Data type
+#ifdef HP9000 // TODO: remove this!
static char* SbiDisas_TypeOp_pTypes[13] = {
"Empty","Null","Integer","Long","Single","Double",
"Currency","Date","String","Object","Error","Boolean",
@@ -633,8 +625,7 @@ void SbiDisas::TypeOp( String& rText )
#undef pTypes
#endif
-// TRUE-Label, Bedingungs-Opcode
-
+// TRUE-Label, condition Opcode
void SbiDisas::CaseOp( String& rText )
{
LblOp( rText );
@@ -642,8 +633,7 @@ void SbiDisas::CaseOp( String& rText )
rText.AppendAscii( pOp1[ nOp2 - SbxEQ + _EQ ] );
}
-// Zeile, Spalte
-
+// Row, column
void SbiDisas::StmntOp( String& rText )
{
rText += String::CreateFromInt32( nOp1 );
@@ -657,7 +647,6 @@ void SbiDisas::StmntOp( String& rText )
}
// open mode, flags
-
void SbiDisas::StrmOp( String& rText )
{
char cBuf[ 10 ];
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index d9269cf084..7776b57829 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -235,13 +235,13 @@ public:
BasicScriptListener_Impl( StarBASIC* pBasic, const Reference< frame::XModel >& xModel )
: maBasicRef( pBasic ), m_xModel( xModel ) {}
- // Methoden von XAllListener
+ // Methods of XAllListener
virtual void SAL_CALL firing(const ScriptEvent& aScriptEvent)
throw( RuntimeException );
virtual Any SAL_CALL approveFiring(const ScriptEvent& aScriptEvent)
throw( InvocationTargetException, RuntimeException );
- // Methoden von XEventListener
+ // Methods of XEventListener
virtual void SAL_CALL disposing(const EventObject& Source)
throw( RuntimeException );
};
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 7467846c00..d799050724 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -81,7 +81,7 @@ void SbiImage::Clear()
/**************************************************************************
*
-* Service-Routinen fuer das Laden und Speichern
+* Service-Routines for Load/Store
*
**************************************************************************/
@@ -90,8 +90,7 @@ BOOL SbiGood( SvStream& r )
return BOOL( !r.IsEof() && r.GetError() == SVSTREAM_OK );
}
-// Oeffnen eines Records
-
+// Open Record
ULONG SbiOpenRecord( SvStream& r, UINT16 nSignature, UINT16 nElem )
{
ULONG nPos = r.Tell();
@@ -99,8 +98,7 @@ ULONG SbiOpenRecord( SvStream& r, UINT16 nSignature, UINT16 nElem )
return nPos;
}
-// Schliessen eines Records
-
+// Close Record
void SbiCloseRecord( SvStream& r, ULONG nOff )
{
ULONG nPos = r.Tell();
@@ -111,16 +109,15 @@ void SbiCloseRecord( SvStream& r, ULONG nOff )
/**************************************************************************
*
-* Laden und Speichern
+* Load/Store
*
**************************************************************************/
-// Falls die Versionsnummer nicht passt, werden die binaeren Teile
-// nicht geladen, wohl aber Source, Kommentar und Name.
-
+// If the version number does not find, binary parts are omitted, but not
+// source, comments and name
BOOL SbiImage::Load( SvStream& r )
{
- UINT32 nVersion = 0; // Versionsnummer
+ UINT32 nVersion = 0; // Versionsnumber
return Load( r, nVersion );
}
BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
@@ -130,10 +127,10 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
UINT32 nLen, nOff;
Clear();
- // Master-Record einlesen
+ // Read Master-Record
r >> nSign >> nLen >> nCount;
ULONG nLast = r.Tell() + nLen;
- UINT32 nCharSet; // System-Zeichensatz
+ UINT32 nCharSet; // System charset
UINT32 lDimBase;
UINT16 nReserved1;
UINT32 nReserved2;
@@ -275,7 +272,7 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
aEmptyImg.Save( r, B_LEGACYVERSION );
return TRUE;
}
- // Erst mal der Header:
+ // First of all the header
ULONG nStart = SbiOpenRecord( r, B_MODULE, 1 );
ULONG nPos;
@@ -299,7 +296,7 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
//r << aName;
SbiCloseRecord( r, nPos );
}
- // Kommentar?
+ // Comment?
if( aComment.Len() && SbiGood( r ) )
{
nPos = SbiOpenRecord( r, B_COMMENT, 1 );
@@ -340,7 +337,7 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
}
#endif
}
- // Binaere Daten?
+ // Binary data?
if( pCode && SbiGood( r ) )
{
nPos = SbiOpenRecord( r, B_PCODE, 1 );
@@ -361,14 +358,14 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
if( nStrings )
{
nPos = SbiOpenRecord( r, B_STRINGPOOL, nStrings );
- // Fuer jeden String:
- // UINT32 Offset des Strings im Stringblock
+ // For every String:
+ // UINT32 Offset of the Strings in the Stringblock
short i;
for( i = 0; i < nStrings && SbiGood( r ); i++ )
r << (UINT32) pStringOff[ i ];
- // Danach der String-Block
+ // Then the String-Block
char* pByteStrings = new char[ nStringSize ];
for( i = 0; i < nStrings; i++ )
{
@@ -382,7 +379,7 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
delete[] pByteStrings;
SbiCloseRecord( r, nPos );
}
- // Und die Gesamtlaenge setzen
+ // Set overall length
SbiCloseRecord( r, nStart );
if( !SbiGood( r ) )
bError = TRUE;
@@ -391,7 +388,7 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
/**************************************************************************
*
-* Routinen, die auch vom Compiler gerufen werden
+* Routines called by the compiler
*
**************************************************************************/
@@ -415,9 +412,8 @@ void SbiImage::MakeStrings( short nSize )
// Hinzufuegen eines Strings an den StringPool. Der String-Puffer
// waechst dynamisch in 1K-Schritten
-
-
-
+// Add a string to StringPool. The String buffer is dynamically
+// growing in 1K-Steps
void SbiImage::AddString( const String& r )
{
if( nStringIdx >= nStrings )
@@ -451,26 +447,25 @@ void SbiImage::AddString( const String& r )
//ByteString aByteStr( r, eCharSet );
memcpy( pStrings + nStringOff, r.GetBuffer(), len * sizeof( sal_Unicode ) );
nStringOff = nStringOff + len;
- // war das der letzte String? Dann die Groesse
- // des Puffers aktualisieren
+ // Last String? The update the size of the buffer
if( nStringIdx >= nStrings )
nStringSize = nStringOff;
}
}
}
-// Codeblock hinzufuegen
-// Der Block wurde vom Compiler aus der Klasse SbBuffer herausgeholt
-// und ist bereits per new angelegt. Ausserdem enthaelt er alle Integers
-// im Big Endian-Format, kann also direkt gelesen/geschrieben werden.
-
+// Add code block
+// The block was fetched by the compiler from class SbBuffer and
+// is already created with new. Additionally it contains all Integers
+// in Big Endian format, so can be directly read/written.
void SbiImage::AddCode( char* p, UINT32 s )
{
pCode = p;
nCodeSize = s;
}
-void SbiImage::AddType(SbxObject* pObject) // User-Type mit aufnehmen
+// Add user type
+void SbiImage::AddType(SbxObject* pObject)
{
if( !rTypes.Is() )
rTypes = new SbxArray;
@@ -488,12 +483,11 @@ void SbiImage::AddEnum(SbxObject* pObject) // Register enum type
/**************************************************************************
*
-* Zugriffe auf das Image
+* Accessing the image
*
**************************************************************************/
-// IDs zaehlen ab 1!!
-
+// Note: IDs start with 1
String SbiImage::GetString( short nId ) const
{
if( nId && nId <= nStrings )
@@ -528,27 +522,24 @@ const SbxObject* SbiImage::FindType (String aTypeName) const
return rTypes.Is() ? (SbxObject*)rTypes->Find(aTypeName,SbxCLASS_OBJECT) : NULL;
}
-UINT16
-SbiImage::CalcLegacyOffset( INT32 nOffset )
+UINT16 SbiImage::CalcLegacyOffset( INT32 nOffset )
{
return SbiCodeGen::calcLegacyOffSet( (BYTE*)pCode, nOffset ) ;
}
-UINT32
-SbiImage::CalcNewOffset( INT16 nOffset )
+
+UINT32 SbiImage::CalcNewOffset( INT16 nOffset )
{
return SbiCodeGen::calcNewOffSet( (BYTE*)pLegacyPCode, nOffset ) ;
}
-void
-SbiImage::ReleaseLegacyBuffer()
+void SbiImage::ReleaseLegacyBuffer()
{
delete[] pLegacyPCode;
pLegacyPCode = NULL;
nLegacyCodeSize = 0;
}
-BOOL
-SbiImage::ExceedsLegacyLimits()
+BOOL SbiImage::ExceedsLegacyLimits()
{
if ( ( nStringSize > 0xFF00L ) || ( CalcLegacyOffset( nCodeSize ) > 0xFF00L ) )
return TRUE;
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index feceb9612f..aed5b2b3c5 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -48,7 +48,7 @@ using namespace cppu;
//========================================================================
-// Deklaration Konvertierung von Sbx nach Uno mit bekannter Zielklasse
+// Declaration conversion from Sbx to UNO with known target type
Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty = NULL );
//========================================================================
@@ -383,14 +383,15 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite
(void)pBasic;
(void)bWrite;
- // Wir brauchen mindestens 1 Parameter
+ // We need at least one parameter
+ // TODO: In this case < 2 is not correct ;-)
if ( rPar.Count() < 2 )
{
StarBASIC::Error( SbERR_BAD_ARGUMENT );
return;
}
- // Klassen-Name der struct holen
+ // Get class names of struct
String aServiceName( RTL_CONSTASCII_USTRINGPARAM("stardiv.uno.beans.PropertySet") );
#if 0
@@ -406,7 +407,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite
SbxVariableRef refVar = rPar.Get(0);
if( xInterface.is() )
{
- // PropertyValues setzen
+ // Set PropertyValues
Any aArgAsAny = sbxToUnoValue( rPar.Get(1),
getCppuType( (Sequence<PropertyValue>*)0 ) );
Sequence<PropertyValue> *pArg =
@@ -414,19 +415,19 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite
Reference< XPropertyAccess > xPropAcc = Reference< XPropertyAccess >::query( xInterface );
xPropAcc->setPropertyValues( *pArg );
- // SbUnoObject daraus basteln und zurueckliefern
+ // Build a SbUnoObject and return it
Any aAny;
aAny <<= xInterface;
SbUnoObjectRef xUnoObj = new SbUnoObject( aServiceName, aAny );
if( xUnoObj->getUnoAny().getValueType().getTypeClass() != TypeClass_VOID )
{
- // Objekt zurueckliefern
+ // Return object
refVar->PutObject( (SbUnoObject*)xUnoObj );
return;
}
}
- // Objekt konnte nicht erzeugt werden
+ // Object could not be created
refVar->PutObject( NULL );
}
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 1c0f70dbb4..6dedae6bdc 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -66,10 +66,7 @@ TYPEINIT1(StarBASIC,SbxObject)
#define RTLNAME "@SBRTL"
-
-//========================================================================
-// Array zur Umrechnung SFX <-> VB-Fehlercodes anlegen
-
+// Create array for conversion SFX <-> VB error code
struct SFX_VB_ErrorItem
{
USHORT nErrorVB;
@@ -199,17 +196,13 @@ const SFX_VB_ErrorItem __FAR_DATA SFX_VB_ErrorTab[] =
{ 1004, SbERR_METHOD_FAILED },
{ 1005, SbERR_SETPROP_FAILED },
{ 1006, SbERR_GETPROP_FAILED },
- { 0xFFFF, 0xFFFFFFFFL } // End-Marke
+ { 0xFFFF, 0xFFFFFFFFL } // End mark
};
-
-////////////////////////////////////////////////////////////////////////////
-
-// Die StarBASIC-Factory hat einen Hack. Wenn ein SbModule eingerichtet wird,
-// wird der Pointer gespeichert und an nachfolgende SbProperties/SbMethods
-// uebergeben. Dadurch wird die Modul-Relationship wiederhergestellt. Das
-// klappt aber nur, wenn ein Modul geladen wird. Fuer getrennt geladene
-// Properties kann es Probleme geben!
+// The StarBASIC factory is a hack. When a SbModule is created, its pointer
+// is saved and given to the following SbProperties/SbMethods. This restores
+// the Modul-relationshop. But it works only when a modul is loaded.
+// Can cause troubles with separately loaded properties!
SbxBase* SbiFactory::Create( UINT16 nSbxId, UINT32 nCreator )
{
@@ -637,9 +630,6 @@ SbModule* SbClassFactory::FindClass( const String& rClassName )
return pMod;
}
-
-////////////////////////////////////////////////////////////////////////////
-
StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic )
: SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic )
{
@@ -662,19 +652,17 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic )
AddFactory( pOLEFAC );
}
pRtl = new SbiStdObject( String( RTL_CONSTASCII_USTRINGPARAM(RTLNAME) ), this );
- // Suche ueber StarBASIC ist immer global
+ // Search via StarBasic is always global
SetFlag( SBX_GBLSEARCH );
}
-// #51727 SetModified ueberladen, damit der Modified-
-// Zustand nicht an den Parent weitergegeben wird.
+// #51727 Override SetModified so that the modified state
+// is not given to the parent
void StarBASIC::SetModified( BOOL b )
{
SbxBase::SetModified( b );
}
-//***
-
StarBASIC::~StarBASIC()
{
if( !--GetSbData()->nInst )
@@ -691,9 +679,9 @@ StarBASIC::~StarBASIC()
pOLEFAC = NULL;
#ifdef DBG_UTIL
- // SbiData braucht am Programm-Ende nicht abgeraeumt werden,
- // aber wir wollen keine MLK's beim Purify
- // Wo sollte es sonst geschehen???
+ // There is no need to clean SbiData at program end,
+ // but we dislike MLK's at Purify
+ // TODO: Where else???
SbiGlobals** pp = (SbiGlobals**) ::GetAppData( SHL_SBC );
SbiGlobals* p = *pp;
if( p )
@@ -717,9 +705,7 @@ StarBASIC::~StarBASIC()
}
}
-// operator new() wird hier versenkt, damit jeder eine Instanz
-// anlegen kann, ohne neu zu bilden.
-
+// Override new() operator, so that everyone can create a new instance
void* StarBASIC::operator new( size_t n )
{
if( n < sizeof( StarBASIC ) )
@@ -737,7 +723,7 @@ void StarBASIC::operator delete( void* p )
/**************************************************************************
*
-* Erzeugen/Verwalten von Modulen
+* Creation/Managment of modules
*
**************************************************************************/
@@ -817,10 +803,10 @@ SbModule* StarBASIC::FindModule( const String& rName )
return NULL;
}
-// Init-Code aller Module ausfuehren (auch in inserteten Bibliotheken)
+// Run Init-Code of all modules (including inserted libraries)
void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
{
- // Eigene Module initialisieren
+ // Init own modules
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
{
SbModule* pModule = (SbModule*)pModules->Get( nMod );
@@ -836,8 +822,8 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
pModule->RunInit();
}
- // Alle Objekte ueberpruefen, ob es sich um ein Basic handelt
- // Wenn ja, auch dort initialisieren
+ // Check all objects if they are BASIC,
+ // if yes initialize
for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ )
{
SbxVariable* pVar = pObjs->Get( nObj );
@@ -851,15 +837,14 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
// force reinitialisation at next start
void StarBASIC::DeInitAllModules( void )
{
- // Eigene Module initialisieren
+ // Deinit own modules
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
{
SbModule* pModule = (SbModule*)pModules->Get( nMod );
if( pModule->pImage )
pModule->pImage->bInit = false;
}
- // Alle Objekte ueberpruefen, ob es sich um ein Basic handelt
- // Wenn ja, auch dort initialisieren
+
for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ )
{
SbxVariable* pVar = pObjs->Get( nObj );
@@ -869,7 +854,7 @@ void StarBASIC::DeInitAllModules( void )
}
}
-// #43011 Fuer das TestTool, um globale Variablen loeschen zu koennen
+// #43011 For TestTool, to delete global vars
void StarBASIC::ClearGlobalVars( void )
{
SbxArrayRef xProps( GetProperties() );
@@ -882,14 +867,12 @@ void StarBASIC::ClearGlobalVars( void )
SetModified( TRUE );
}
-
-// Diese Implementation sucht erst innerhalb der Runtime-Library, dann
-// nach einem Element innerhalb eines Moduls. Dieses Element kann eine
-// Public-Variable oder ein Entrypoint sein. Wenn nicht gefunden, wird,
-// falls nach einer Methode gesucht wird und ein Modul mit dem angege-
-// benen Namen gefunden wurde, der Entrypoint "Main" gesucht. Wenn das
-// auch nicht klappt, laeuft die traditionelle Suche ueber Objekte an.
-
+// This implementation at first searches within the runtime library,
+// then it looks for an element within one module. This moudle can be
+// a public var or an entrypoint. If it is not found and we look for a
+// method and a module with the given name is found the search continues
+// for entrypoint "Main".
+// If this fails again a conventional search over objects is performend.
SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
{
static String aMainStr( RTL_CONSTASCII_USTRINGPARAM("Main") );
@@ -897,7 +880,7 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
SbxVariable* pRes = NULL;
SbModule* pNamed = NULL;
// "Extended" search in Runtime Lib
- // aber nur, wenn SbiRuntime nicht das Flag gesetzt hat
+ // but only if SbiRuntime has not set the flag
if( !bNoRtl )
{
if( t == SbxCLASS_DONTCARE || t == SbxCLASS_OBJECT )
@@ -910,15 +893,15 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
if( pRes )
pRes->SetFlag( SBX_EXTFOUND );
}
- // Module durchsuchen
+ // Search module
if( !pRes )
for( USHORT i = 0; i < pModules->Count(); i++ )
{
SbModule* p = (SbModule*) pModules->Get( i );
if( p->IsVisible() )
{
- // Modul merken fuer Main()-Aufruf
- // oder stimmt etwa der Name ueberein?!?
+ // Remember modul fpr Main() call
+ // or is the name equal?!?
if( p->GetName().EqualsIgnoreCaseAscii( rName ) )
{
if( t == SbxCLASS_OBJECT || t == SbxCLASS_DONTCARE )
@@ -927,8 +910,8 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
}
pNamed = p;
}
- // Sonst testen, ob das Element vorhanden ist
- // GBLSEARCH-Flag rausnehmen (wg. Rekursion)
+ // otherwise check if the element is available
+ // unset GBLSEARCH-Flag (due to Rekursion)
USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
p->ResetFlag( SBX_GBLSEARCH );
pRes = p->Find( rName, t );
@@ -958,7 +941,7 @@ BOOL StarBASIC::Call( const String& rName, SbxArray* pParam )
return bRes;
}
-// Find-Funktion ueber Name (z.B. Abfrage aus BASIC-IDE)
+// Find method via name (e.g. query via BASIC IDE)
SbxBase* StarBASIC::FindSBXInCurrentScope( const String& rName )
{
if( !pINST )
@@ -968,11 +951,11 @@ SbxBase* StarBASIC::FindSBXInCurrentScope( const String& rName )
return pINST->pRun->FindElementExtern( rName );
}
-// Alte Schnittstelle vorerst erhalten
+// Preserve old interface
SbxVariable* StarBASIC::FindVarInCurrentScopy
( const String& rName, USHORT& rStatus )
{
- rStatus = 1; // Annahme: Nichts gefunden
+ rStatus = 1; // Presumption: nothing found
SbxVariable* pVar = NULL;
SbxBase* pSbx = FindSBXInCurrentScope( rName );
if( pSbx )
@@ -981,7 +964,7 @@ SbxVariable* StarBASIC::FindVarInCurrentScopy
pVar = PTR_CAST(SbxVariable,pSbx);
}
if( pVar )
- rStatus = 0; // doch gefunden
+ rStatus = 0; // We found something
return pVar;
}
@@ -1002,14 +985,12 @@ BOOL StarBASIC::IsRunning()
/**************************************************************************
*
-* Objekt-Factories etc.
+* Object factories and others
*
**************************************************************************/
-// Aktivierung eines Objekts. Aktive Objekte muessen nicht mehr
-// von BASIC aus ueber den Namen angesprochen werden. Ist
-// NULL angegeben, wird alles aktiviert.
-
+// Activation of an object. There is no need to access active objects
+// with name via BASIC. If NULL is given, everything is activated.
void StarBASIC::ActivateObject( const String* pName, BOOL bActivate )
{
if( pName )
@@ -1038,7 +1019,7 @@ void StarBASIC::ActivateObject( const String* pName, BOOL bActivate )
/**************************************************************************
*
-* Debugging und Fehlerbehandlung
+* Debugging and error handling
*
**************************************************************************/
@@ -1084,12 +1065,12 @@ USHORT __EXPORT StarBASIC::BreakHdl()
? aBreakHdl.Call( this ) : SbDEBUG_CONTINUE );
}
-// Abfragen fuer den Error-Handler und den Break-Handler:
+// Calls for error handler and break handler
USHORT StarBASIC::GetLine() { return GetSbData()->nLine; }
USHORT StarBASIC::GetCol1() { return GetSbData()->nCol1; }
USHORT StarBASIC::GetCol2() { return GetSbData()->nCol2; }
-// Spezifisch fuer den Error-Handler:
+// Specific to error handler
SbError StarBASIC::GetErrorCode() { return GetSbData()->nCode; }
const String& StarBASIC::GetErrorText() { return GetSbData()->aErrMsg; }
BOOL StarBASIC::IsCompilerError() { return GetSbData()->bCompiler; }
@@ -1101,10 +1082,10 @@ SbLanguageMode StarBASIC::GetGlobalLanguageMode()
{
return GetSbData()->eLanguageMode;
}
-// Lokale Einstellung
+// Local settings
SbLanguageMode StarBASIC::GetLanguageMode()
{
- // Globale Einstellung nehmen?
+ // Use global settings?
if( eLanguageMode == SB_LANG_GLOBAL )
return GetSbData()->eLanguageMode;
else
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 6880f704e6..c6e9b42c45 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -817,64 +817,3 @@ void SbiParser::ErrorStmnt()
aGen.Gen( _ERROR );
}
-
-// AB 22.5.1996
-// JavaScript-Parsing zunaechst provisorisch hier implementiert
-void SbiParser::OpenJavaBlock( SbiToken, SbiExprNode* )
-{
-}
-
-void SbiParser::CloseJavaBlock()
-{
-}
-
-void SbiParser::JavaStmntBlock( SbiToken )
-{
-}
-
-void SbiParser::JavaBreak()
-{
-}
-
-void SbiParser::JavaContinue()
-{
-}
-
-void SbiParser::JavaFor()
-{
-}
-
-void SbiParser::JavaFunction()
-{
-}
-
-void SbiParser::JavaIf()
-{
-}
-
-void SbiParser::JavaNew()
-{
-}
-
-void SbiParser::JavaReturn()
-{
-}
-
-void SbiParser::JavaThis()
-{
-}
-
-void SbiParser::JavaVar()
-{
-}
-
-void SbiParser::JavaWhile()
-{
-}
-
-void SbiParser::JavaWith()
-{
-}
-
-
-
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index 45b48631a4..a12a8690dd 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -143,22 +143,6 @@ public:
void While(); // WHILE/WEND
void With(); // WITH
void Write(); // WRITE
-
- // JavaScript-Parsing
- void OpenJavaBlock( SbiToken, SbiExprNode* = NULL ); // Block oeffnen
- void CloseJavaBlock(); // Block aufloesen
- void JavaStmntBlock( SbiToken ); // Statement-Block abarbeiten
- void JavaBreak();
- void JavaContinue();
- void JavaFor();
- void JavaFunction();
- void JavaIf();
- void JavaNew();
- void JavaReturn();
- void JavaThis();
- void JavaVar();
- void JavaWhile();
- void JavaWith();
};
diff --git a/basic/util/makefile.mk b/basic/util/makefile.mk
index 7cc775a435..76385e91c1 100644
--- a/basic/util/makefile.mk
+++ b/basic/util/makefile.mk
@@ -103,7 +103,7 @@ SRS1FILES= \
$(SRS)$/sbx.srs
# --- TESTTOOL IDE ------------------------------------------------------
-# die ressourcen werden hier gelinkt
+# The resources are linked here
RESLIB1NAME=stt
RESLIB1IMAGES=$(PRJ)$/res
diff --git a/basic/workben/mgrtest.cxx b/basic/workben/mgrtest.cxx
index 76b7cafdba..fb02dda748 100644
--- a/basic/workben/mgrtest.cxx
+++ b/basic/workben/mgrtest.cxx
@@ -44,7 +44,7 @@
//#include <basic.hxx>
//#include <sostor.hxx>
-// Defines fuer ToolBox-Id's
+// Defines for ToolBox-Id's
#define TB_NEW 1
#define TB_OPENSTORAGE 2
#define TB_SAVESTORAGE 3
@@ -71,7 +71,7 @@ const char* pLib1Str = "Lib1";
const char* pLib2Str = "Lib2";
const char* pLib3Str = "Lib3";
-// Test-Applikation
+// Test-Application
class TestApp : public Application
{
public:
@@ -79,8 +79,8 @@ public:
virtual void Main( int, char*[] );
};
-// Test-Fenster mit ToolBox zur Auswahl eines Tests
-// und den typischerweise verwendeten virtuellen Methoden
+// Test-Window with a ToolBox to choose a test from
+// and the typically used virtual methods
class TestWindow : public WorkWindow
{
private:
@@ -224,8 +224,8 @@ void TestWindow::ShowInfo()
void TestWindow::UpdateToolBox()
{
- // Darstellung bestimmter Buttons als gecheckt oder disabled,
- // falls fuer Test gewuenscht
+ // View of some buttons as checked or disabled if
+ // wished by tests
aToolBox.EnableItem( TB_ORG, (BOOL)(ULONG)pBasMgr );
aToolBox.EnableItem( TB_CREATELIB1, (BOOL)(ULONG)pBasMgr );
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 50360ece5c..9bae4b7478 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -351,7 +351,7 @@ SvCommand::SvCommand( int argc, char ** argv )
}
else if( aParam.EqualsIgnoreCaseAscii( "help" ) || aParam.EqualsIgnoreCaseAscii( "?" ) )
{ // Hilfe
- printf( CommandLineSyntax );
+ printf( "%s", CommandLineSyntax );
}
else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) )
{ // Hilfe
@@ -391,7 +391,7 @@ SvCommand::SvCommand( int argc, char ** argv )
}
else
{
- printf( CommandLineSyntax );
+ printf( "%s", CommandLineSyntax );
}
String * pStr = aList.First();