summaryrefslogtreecommitdiff
path: root/basic/source/app/appwin.cxx
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
commita63e7873d33c9f73ee0150c57e7bb4dd9b63a471 (patch)
tree53a9c6098b2e7829498595db024df26bbd51f76f /basic/source/app/appwin.cxx
parentcad6150eabde5d454ccb48a7e759a420fb989480 (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/appwin.cxx')
-rw-r--r--basic/source/app/appwin.cxx61
1 files changed, 29 insertions, 32 deletions
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index 96ade04d06a9..099dcda03e37 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 )