summaryrefslogtreecommitdiff
path: root/basic/source/app
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 /basic/source/app
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#
Diffstat (limited to 'basic/source/app')
-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
25 files changed, 472 insertions, 496 deletions
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);