summaryrefslogtreecommitdiff
path: root/basic/source/app
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/app')
-rwxr-xr-x[-rw-r--r--]basic/source/app/app.cxx353
-rwxr-xr-x[-rw-r--r--]basic/source/app/app.hxx25
-rwxr-xr-x[-rw-r--r--]basic/source/app/appbased.cxx17
-rwxr-xr-x[-rw-r--r--]basic/source/app/appbased.hxx7
-rwxr-xr-x[-rw-r--r--]basic/source/app/appedit.cxx12
-rwxr-xr-x[-rw-r--r--]basic/source/app/appedit.hxx5
-rwxr-xr-x[-rw-r--r--]basic/source/app/apperror.cxx5
-rwxr-xr-x[-rw-r--r--]basic/source/app/apperror.hxx2
-rwxr-xr-x[-rw-r--r--]basic/source/app/appwin.cxx14
-rwxr-xr-x[-rw-r--r--]basic/source/app/appwin.hxx9
-rwxr-xr-x[-rw-r--r--]basic/source/app/basic.hrc0
-rwxr-xr-x[-rw-r--r--]basic/source/app/basic.src10
-rwxr-xr-x[-rw-r--r--]basic/source/app/basicrt.cxx3
-rwxr-xr-x[-rw-r--r--]basic/source/app/basmsg.hrc12
-rwxr-xr-x[-rw-r--r--]basic/source/app/basmsg.src13
-rwxr-xr-x[-rw-r--r--]basic/source/app/brkpnts.cxx150
-rwxr-xr-x[-rw-r--r--]basic/source/app/brkpnts.hxx49
-rwxr-xr-x[-rw-r--r--]basic/source/app/dataedit.hxx3
-rwxr-xr-x[-rw-r--r--]basic/source/app/dialogs.cxx40
-rwxr-xr-x[-rw-r--r--]basic/source/app/dialogs.hxx25
-rwxr-xr-x[-rw-r--r--]basic/source/app/makefile.mk54
-rwxr-xr-x[-rw-r--r--]basic/source/app/msgedit.cxx27
-rwxr-xr-x[-rw-r--r--]basic/source/app/msgedit.hxx5
-rwxr-xr-x[-rw-r--r--]basic/source/app/mybasic.cxx52
-rwxr-xr-x[-rw-r--r--]basic/source/app/printer.cxx12
-rwxr-xr-x[-rw-r--r--]basic/source/app/printer.hxx15
-rwxr-xr-x[-rw-r--r--]basic/source/app/process.cxx137
-rwxr-xr-x[-rw-r--r--]basic/source/app/processw.cxx10
-rwxr-xr-x[-rw-r--r--]basic/source/app/processw.hxx9
-rwxr-xr-x[-rw-r--r--]basic/source/app/resids.hrc0
-rwxr-xr-x[-rw-r--r--]basic/source/app/status.cxx4
-rwxr-xr-x[-rw-r--r--]basic/source/app/status.hxx3
-rwxr-xr-x[-rw-r--r--]basic/source/app/svtmsg.src12
-rwxr-xr-x[-rw-r--r--]basic/source/app/testbasi.cxx3
-rwxr-xr-x[-rw-r--r--]basic/source/app/testtool.idl0
-rwxr-xr-x[-rw-r--r--]basic/source/app/testtool.src0
-rwxr-xr-x[-rw-r--r--]basic/source/app/textedit.cxx69
-rwxr-xr-x[-rw-r--r--]basic/source/app/textedit.hxx4
-rwxr-xr-x[-rw-r--r--]basic/source/app/ttbasic.cxx3
-rwxr-xr-x[-rw-r--r--]basic/source/app/ttbasic.hxx2
-rwxr-xr-x[-rw-r--r--]basic/source/app/ttmsg.src13
41 files changed, 528 insertions, 660 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index cd3e1dd0061f..7786914f85df 100644..100755
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,20 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basic.hxx"
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <tools/fsys.hxx>
-#ifndef _SV_FILEDLG_HXX //autogen
#include <svtools/filedlg.hxx>
-#endif
#include <tools/config.hxx>
#include <vcl/font.hxx>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include <basic/sbx.hxx>
#include <svtools/filedlg.hxx>
@@ -60,9 +55,7 @@
#include <basic/basrdll.hxx>
#include "basrid.hxx"
-#ifndef _RUNTIME_HXX
#include "runtime.hxx"
-#endif
#include "sbintern.hxx"
#ifdef _USE_UNO
@@ -81,13 +74,15 @@
using namespace comphelper;
using namespace cppu;
-using namespace rtl;
using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::ucb;
using namespace com::sun::star::beans;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+
#endif /* _USE_UNO */
IMPL_GEN_RES_STR;
@@ -161,20 +156,20 @@ void TestToolDebugMessageFilter( const sal_Char *pString, sal_Bool bIsOsl )
printf("DbgPrintMsgBox failed: %s\n", pString );
}
}
-/* DBG_INSTOUTERROR( DBG_OUT_MSGBOX )
- DBG_ERROR( pString );
- DBG_INSTOUTERROR( DBG_OUT_TESTTOOL )*/
static_bInsideFilter = sal_False;
}
+
void SAL_CALL DBG_TestToolDebugMessageFilter( const sal_Char *pString )
{
TestToolDebugMessageFilter( pString, sal_False );
}
+
extern "C" void SAL_CALL osl_TestToolDebugMessageFilter( const sal_Char *pString )
{
if ( !getenv( "DISABLE_SAL_DBGBOX" ) )
TestToolDebugMessageFilter( pString, sal_True );
}
+
#endif
// #94145# Due to a tab in TT_SIGNATURE_FOR_UNICODE_TEXTFILES which is changed to blanks by some editors
@@ -209,38 +204,18 @@ uno::Reference< XContentProviderManager > InitializeUCB( void )
}
- //////////////////////////////////////////////////////////////////////
// set global factory
setProcessServiceFactory( xSMgr );
-/* // Create simple ConfigManager
- Sequence< Any > aConfArgs(3);
- aConfArgs[0] <<= PropertyValue( OUString::createFromAscii("servertype"), 0, makeAny( OUString::createFromAscii("local") ), ::com::sun::star::beans::PropertyState_DIRECT_VALUE );
- aConfArgs[1] <<= PropertyValue( OUString::createFromAscii("sourcepath"), 0, makeAny( OUString::createFromAscii("g:\\") ), ::com::sun::star::beans::PropertyState_DIRECT_VALUE );
- aConfArgs[2] <<= PropertyValue( OUString::createFromAscii("updatepath"), 0, makeAny( OUString::createFromAscii("g:\\") ), ::com::sun::star::beans::PropertyState_DIRECT_VALUE );
-
- uno::Reference< XContentProvider > xConfProvider
- ( xSMgr->createInstanceWithArguments( OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ), aConfArgs), UNO_QUERY );
-*/
-
-
// Create unconfigured Ucb:
-/* Sequence< Any > aArgs(1);
- aArgs[1] = makeAny ( xConfProvider );*/
Sequence< Any > aArgs;
::ucbhelper::ContentBroker::initialize( xSMgr, aArgs );
uno::Reference< XContentProviderManager > xUcb =
::ucbhelper::ContentBroker::get()->getContentProviderManagerInterface();
uno::Reference< XContentProvider > xFileProvider
- ( xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ) ), UNO_QUERY );
- xUcb->registerContentProvider( xFileProvider, OUString::createFromAscii( "file" ), sal_True );
-
-
-/* uno::Reference< XContentProvider > xPackageProvider
- ( xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.ucb.PackageContentProvider" ) ), UNO_QUERY );
- xUcb->registerContentProvider( xPackageProvider, OUString::createFromAscii( "vnd.sun.star.pkg" ), sal_True );
- */
+ ( xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.FileContentProvider" )) ), UNO_QUERY );
+ xUcb->registerContentProvider( xFileProvider, OUString(RTL_CONSTASCII_USTRINGPARAM( "file" )), sal_True );
return xUcb;
}
@@ -252,17 +227,10 @@ static void ReplaceStringHookProc( UniString& rStr )
if ( rStr.SearchAscii( "%PRODUCT" ) != STRING_NOTFOUND )
{
rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", aTestToolName );
- /*
- rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion );
- rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion );
- rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension );
- rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATNAME", rXMLFileFormatName );
- rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATVERSION", rXMLFileFormatVersion );
- */
}
}
-void BasicApp::Main( )
+int BasicApp::Main( )
{
#ifdef DBG_UTIL
// Install filter for OSLAsserts
@@ -271,7 +239,7 @@ void BasicApp::Main( )
DBG_INSTOUTERROR( DBG_OUT_TESTTOOL );
if ( osl_setDebugMessageFunc( osl_TestToolDebugMessageFilter ) )
- DBG_ERROR("osl_setDebugMessageFunc returns non NULL pointer");
+ OSL_FAIL("osl_setDebugMessageFunc returns non NULL pointer");
#endif
ResMgr::SetReadStringHook( ReplaceStringHookProc );
@@ -289,8 +257,8 @@ void BasicApp::Main( )
DirEntry aAppFileName( GetAppFileName() );
String aAppDir ( aAppFileName.GetPath().GetFull() );
-// DirEntry aDefIniPath( Config::GetConfigName( aAppDir, CUniString("testtool") ) );
-// Do not use Config::GetConfigName here because is uses a hidden file for UNIX
+ // Do not use Config::GetConfigName here because is uses a hidden
+ // file for UNIX
DirEntry aDefIniPath( aAppDir );
ByteString aFileName;
@@ -322,31 +290,12 @@ void BasicApp::Main( )
AllSettings aSettings = GetSettings();
aSettings.SetUILanguage( aRequestedLanguage );
aSettings.SetLanguage( aRequestedLanguage );
-// International aInternational;
-// aInternational = GetSettings().GetInternational();
-// aInternational = International( aRequestedLanguage );
-// aSettings.SetInternational( aInternational );
SetSettings( aSettings );
-// aInternational = GetSettings().GetInternational();
}
-// ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt ), )
-//const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio )
-
-// ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt )
-// ResMgr *pRes = new ResMgr( "testtool.res" );
-// Resource::SetResManager( pRes );
-
BasicDLL aBasicDLL;
nWait = 0;
- // Hilfe:
-// pHelp = new Help;
-// SetHelp( pHelp );
-// Help::EnableContextHelp();
-// Help::EnableExtHelp();
-// DeactivateExtHelp();
-
// Acceleratoren
Accelerator aAccel( SttResId( MAIN_ACCEL ) );
InsertAccel( &aAccel );
@@ -370,7 +319,6 @@ void BasicApp::Main( )
PostUserEvent( LINK( this, BasicApp, LateInit ) );
Execute();
-// delete pHelp;
delete pFrame;
RemoveAccel( pMainAccel );
@@ -390,6 +338,7 @@ void BasicApp::Main( )
InfoBox( NULL, String::CreateFromAscii( "unknown Exception not caught" ) ).Execute();
throw;
}
+ return EXIT_SUCCESS;
}
void BasicApp::LoadIniFile()
@@ -547,12 +496,10 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
if ( pBasic->pTestObject ) // Are we the testtool?
{
-// aAppIcon = Icon( ResId( RID_APPICON2 ) );
aAppName = String( SttResId( IDS_APPNAME2 ) );
}
else
{
-// aAppIcon = Icon( ResId( RID_APPICON ) );
aAppName = String( SttResId( IDS_APPNAME ) );
}
@@ -625,7 +572,6 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
LoadIniFile();
UpdateTitle();
-// SetIcon( aAppIcon );
// Size: half width, 0.75 * height - 2 * IconSize
{
@@ -634,15 +580,10 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
SetWindowState( aConf.ReadKey("WinParams", "") );
}
-// pWork = new AppEdit( this, NULL );
-// pWork->Show();
-// pWork->Close();
-
aLineNum.SetTimeoutHdl( LINK( this, BasicFrame, ShowLineNr ) );
aLineNum.SetTimeout(200);
aLineNum.Start();
-
aCheckFiles.SetTimeout( 10000 );
aCheckFiles.SetTimeoutHdl( LINK( this, BasicFrame, CheckAllFiles ) );
aCheckFiles.Start();
@@ -688,17 +629,15 @@ void BasicFrame::LoadIniFile()
if ( pBasic )
pBasic->LoadIniFile();
- for ( i = 0 ; i < pList->Count() ; i++ )
- pList->GetObject( i )->LoadIniFile();
+ for ( i = 0 ; i < pList->size() ; i++ )
+ pList->at( i )->LoadIniFile();
}
BasicFrame::~BasicFrame()
{
- AppWin* p = pList->First();
- DBG_ASSERT( !p, "Still open FileWindows");
- if( p )
- while( (p = pList->Remove() ) != NULL )
- delete p;
+ for ( size_t i = 0, n = pList->size(); i < n; ++i )
+ delete pList->at( i );
+ pList->clear();
MenuBar *pBar = GetMenuBar();
SetMenuBar( NULL );
@@ -707,8 +646,6 @@ BasicFrame::~BasicFrame()
delete pStatus;
delete pPrn;
delete pList;
-// delete pExecutionStatus;
-// delete pBasic;
pBasic.Clear();
}
@@ -762,8 +699,8 @@ IMPL_LINK( BasicFrame, CheckAllFiles, Timer*, pTimer )
{
AppWin* pStartWin = pWork;
Window* pFocusWin = Application::GetFocusWindow();
- for ( int i = pList->Count()-1 ; i >= 0 ; i-- )
- pList->GetObject( i )->CheckReload();
+ for ( size_t i = pList->size() ; i > 0 ; )
+ pList->at( --i )->CheckReload();
if ( pWork != pStartWin )
{
@@ -810,19 +747,10 @@ void BasicFrame::Notify( SfxBroadcaster&, const SfxHint& rHint )
aTotalStatus.AppendAscii( " " );
aTotalStatus.Append( pStatusHint->GetAdditionalExecutionStatus() );
pStatus->Message( aTotalStatus );
-/* if ( !pExecutionStatus )
- pExecutionStatus = new FloatingExecutionStatus( this );
- pExecutionStatus->SetStatus( pStatusHint->GetExecutionStatus() );
- pExecutionStatus->SetAdditionalInfo( pStatusHint->GetAdditionalExecutionStatus() );*/
}
break;
case TT_EXECUTION_HIDE_ACTION:
{
-/* if ( pExecutionStatus )
- {
- delete pExecutionStatus;
- pExecutionStatus = NULL;
- }*/
}
break;
}
@@ -849,11 +777,10 @@ void BasicFrame::Resize()
// Resize possibly maximized window
- sal_uIntPtr i;
- for( i = pList->Count(); i > 0 ; i-- )
+ for( size_t i = pList->size(); i > 0 ; i-- )
{
- if ( pList->GetObject( i-1 )->GetWinState() == TT_WIN_STATE_MAX )
- pList->GetObject( i-1 )->Maximize();
+ if ( pList->at( i-1 )->GetWinState() == TT_WIN_STATE_MAX )
+ pList->at( i-1 )->Maximize();
}
}
@@ -873,42 +800,58 @@ void BasicFrame::GetFocus()
IMPL_LINK( BasicFrame, CloseButtonClick, void*, EMPTYARG )
{
AppWin* p;
- for ( p = pList->Last() ; p && p->GetWinState() != TT_WIN_STATE_MAX ; p = pList->Prev() )
- {};
- if ( p )
- p->GrabFocus();
+ for ( size_t i = pList->size(); i > 0; --i )
+ {
+ p = pList->at( i - 1 );
+ if ( p->GetWinState() == TT_WIN_STATE_MAX )
+ {
+ p->GrabFocus();
+ break;
+ }
+ }
return Command( RID_FILECLOSE, sal_False );
}
IMPL_LINK( BasicFrame, FloatButtonClick, void*, EMPTYARG )
{
AppWin* p;
- for ( p = pList->Last() ; p && p->GetWinState() != TT_WIN_STATE_MAX ; p = pList->Prev() )
- {};
- if ( p )
- p->TitleButtonClick( TITLE_BUTTON_DOCKING );
+ for ( size_t i = pList->size(); i > 0; --i )
+ {
+ p = pList->at( i - 1 );
+ if ( p->GetWinState() == TT_WIN_STATE_MAX )
+ {
+ p->TitleButtonClick( TITLE_BUTTON_DOCKING );
+ break;
+ }
+ }
return 1;
}
IMPL_LINK( BasicFrame, HideButtonClick, void*, EMPTYARG )
{
AppWin* p;
- for ( p = pList->Last() ; p && p->GetWinState() != TT_WIN_STATE_MAX ; p = pList->Prev() )
- {};
- if ( p )
- p->TitleButtonClick( TITLE_BUTTON_HIDE );
+ for ( size_t i = pList->size(); i > 0; --i )
+ {
+ p = pList->at( i - 1 );
+ if ( p->GetWinState() == TT_WIN_STATE_MAX )
+ {
+ p->TitleButtonClick( TITLE_BUTTON_HIDE );
+ break;
+ }
+ }
return 1;
}
void BasicFrame::WinShow_Hide()
{
- if ( !pList->Count() )
+ if ( pList->empty() )
return;
AppWin* p;
sal_Bool bWasFullscreen = sal_False;
- for ( p = pList->Last() ; p ; p = pList->Prev() )
+ for ( size_t i = pList->size(); i > 0; --i )
{
+ p = pList->at( i - 1 );
if ( p->pDataEdit )
{
if ( p->GetWinState() & TT_WIN_STATE_HIDE // Hidden
@@ -927,17 +870,26 @@ void BasicFrame::WinMax_Restore()
// The application buttons
AppWin* p;
sal_Bool bHasFullscreenWin = sal_False;
- for( p = pList->First(); p && !bHasFullscreenWin ; p = pList->Next() )
- bHasFullscreenWin |= ( p->GetWinState() == TT_WIN_STATE_MAX );
+ for ( size_t i = 0, n = pList->size(); i < n && !bHasFullscreenWin; ++i )
+ {
+ p = pList->at( i );
+ bHasFullscreenWin = ( p->GetWinState() == TT_WIN_STATE_MAX );
+ }
GetMenuBar()->ShowButtons( bHasFullscreenWin, sal_False, sal_False );
WinShow_Hide();
}
void BasicFrame::RemoveWindow( AppWin *pWin )
{
-// delete pIcon;
- pList->Remove( pWin );
- pWork = pList->Last();
+ for ( EditList::iterator it = pList->begin(); it < pList->end(); ++it )
+ {
+ if ( *it == pWin )
+ {
+ pList->erase( it );
+ break;
+ }
+ }
+ pWork = ( pList->empty() ) ? NULL : pList->back();
WinShow_Hide();
@@ -947,7 +899,8 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
WinMax_Restore();
Menu* pMenu = GetMenuBar();
- if( pList->Count() == 0 ) {
+ if( pList->empty() )
+ {
pMenu->EnableItem( RID_APPEDIT, sal_False );
pMenu->EnableItem( RID_APPRUN, sal_False );
pMenu->EnableItem( RID_APPWINDOW, sal_False );
@@ -966,14 +919,15 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
void BasicFrame::AddWindow( AppWin *pWin )
{
- pList->Insert( pWin, LIST_APPEND );
+ pList->push_back( pWin );
pWork = pWin;
WinMax_Restore();
// Enable main menu
MenuBar* pMenu = GetMenuBar();
- if( pList->Count() > 0 ) {
+ if( !pList->empty() )
+ {
pMenu->EnableItem( RID_APPEDIT, sal_True );
pMenu->EnableItem( RID_APPRUN, sal_True );
pMenu->EnableItem( RID_APPWINDOW, sal_True );
@@ -1011,8 +965,15 @@ void BasicFrame::WindowRenamed( AppWin *pWin )
void BasicFrame::FocusWindow( AppWin *pWin )
{
pWork = pWin;
- pList->Remove( pWin );
- pList->Insert( pWin, LIST_APPEND );
+ for ( EditList::iterator it = pList->begin(); it < pList->end(); ++it )
+ {
+ if ( *it == pWin )
+ {
+ pList->erase( it );
+ break;
+ }
+ }
+ pList->push_back( pWin );
pWin->Minimize( sal_False );
aAppFile = pWin->GetText();
@@ -1049,8 +1010,8 @@ sal_Bool BasicFrame::Close()
sal_Bool BasicFrame::CloseAll()
{
- while ( pList->Count() )
- if ( !pList->Last()->Close() )
+ while ( !pList->empty() )
+ if ( !pList->back()->Close() )
return sal_False;
return sal_True;
}
@@ -1058,8 +1019,11 @@ sal_Bool BasicFrame::CloseAll()
sal_Bool BasicFrame::CompileAll()
{
AppWin* p;
- for( p = pList->First(); p; p = pList->Next() )
- if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return sal_False;
+ for ( size_t i = 0, n = pList->size(); i < n; ++i )
+ {
+ p = pList->at( i );
+ if ( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return sal_False;
+ }
return sal_True;
}
@@ -1159,10 +1123,8 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
sal_Bool bNormal = sal_Bool( !bInBreak );
pMenu->EnableItem( RID_RUNCOMPILE, bNormal );
- sal_Bool bHasEdit = sal_Bool( /*bNormal &&*/ pWork != NULL );
+ sal_Bool bHasEdit = sal_Bool( pWork != NULL );
-// pMenu->EnableItem( RID_FILENEW, bNormal ); // always possible
-// pMenu->EnableItem( RID_FILEOPEN, bNormal );
pMenu->EnableItem( RID_FILECLOSE, bHasEdit );
pMenu->EnableItem( RID_FILESAVE, bHasEdit );
pMenu->EnableItem( RID_FILESAVEAS, bHasEdit );
@@ -1176,10 +1138,10 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
sal_Bool bPrev = bHasErr & bNormal;
if( bHasErr )
{
- sal_uIntPtr n = pBasic->aErrors.GetCurPos();
+ size_t n = pBasic->GetCurrentError();
if( n == 0 )
bPrev = sal_False;
- if( sal_uInt16(n+1) == pBasic->GetErrors() )
+ if( SbError(n+1) == pBasic->GetErrors() )
bNext = sal_False;
}
pMenu->EnableItem( RID_RUNNEXTERR, bNext );
@@ -1194,20 +1156,7 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu )
{
(void) pMenu; /* avoid warning about unused parameter */
-/* pMenu->EnableItem( RID_RUNCOMPILE );
-
- pMenu->EnableItem( RID_FILECLOSE );
- pMenu->EnableItem( RID_FILESAVE );
- pMenu->EnableItem( RID_FILESAVEAS );
- pMenu->EnableItem( RID_FILEPRINT );
- pMenu->EnableItem( RID_FILESETUP );
- pMenu->EnableItem( RID_FILELOADLIB );
- pMenu->EnableItem( RID_FILESAVELIB );
-
- pMenu->EnableItem( RID_RUNNEXTERR );
- pMenu->EnableItem( RID_RUNPREVERR );
- if( pWork ) pWork->DeInitMenu( pMenu );
-*/
+
SetAutoRun( sal_False );
String aString;
pStatus->Message( aString );
@@ -1341,7 +1290,6 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
AppBasEd* p = new AppBasEd( this, NULL );
p->Show();
p->GrabFocus();
- // InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
} break;
case RID_FILEOPEN:
{
@@ -1349,7 +1297,6 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
if( QueryFileName( s, FT_BASIC_SOURCE | FT_RESULT_FILE, sal_False ) ) {
AddToLRU( s );
LoadFile( s );
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
}
} break;
case RID_FILELOADLIB:
@@ -1360,7 +1307,6 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
break;
case RID_FILECLOSE:
if( pWork && pWork->Close() ){};
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
break;
case RID_FILEPRINT:
if( pWork )
@@ -1405,7 +1351,6 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
nFlags = SbDEBUG_BREAK;
goto start;
start: {
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
if ( !Basic().IsRunning() || bInBreak )
{
AppBasEd* p = NULL;
@@ -1417,7 +1362,14 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
else
{
AppWin *w = NULL;
- for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : sal_False ; w = pList->Prev() ) ;
+ for ( size_t i = pList->size(); i > 0; --i )
+ {
+ if ( pList->at( i-1 )->ISA( AppBasEd ) )
+ {
+ w = pList->at( i-1 );
+ break;
+ }
+ }
if ( w )
{
p = ((AppBasEd*)w);
@@ -1444,11 +1396,9 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
p->Run();
BasicDLL::SetDebugMode( sal_False );
// If cancelled during Interactive=FALSE
-// BasicDLL::EnableBreak( sal_True );
}
}}
}
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN )); // after run
break;
case RID_RUNCOMPILE:
if( pWork && pWork->ISA(AppBasEd) && SaveAll() )
@@ -1464,7 +1414,6 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
case RID_RUNBREAK:
if ( Basic().IsRunning() && !bInBreak )
{
-// pINST->CalcBreakCallLevel(SbDEBUG_STEPINTO);
pINST->nBreakCallLvl = pINST->nCallLvl;
}
break;
@@ -1473,11 +1422,11 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
bInBreak = sal_False;
break;
case RID_RUNNEXTERR:
- pErr = pBasic->aErrors.Next();
+ pErr = pBasic->NextError();
if( pErr ) pErr->Show();
break;
case RID_RUNPREVERR:
- pErr = pBasic->aErrors.Prev();
+ pErr = pBasic->PrevError();
if( pErr ) pErr->Show();
break;
@@ -1494,13 +1443,12 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
case RID_WINTILE:
{
WindowArrange aArange;
- for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
- aArange.AddWindow( pList->GetObject( i ) );
- pList->GetObject( i )->Restore();
+ aArange.AddWindow( pList->at( i ) );
+ pList->at( i )->Restore();
}
-
sal_Int32 nTitleHeight;
{
sal_Int32 nDummy1, nDummy2, nDummy3;
@@ -1518,10 +1466,10 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
case RID_WINTILEHORZ:
{
WindowArrange aArange;
- for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
- aArange.AddWindow( pList->GetObject( i ) );
- pList->GetObject( i )->Restore();
+ aArange.AddWindow( pList->at( i ) );
+ pList->at( i )->Restore();
}
@@ -1540,16 +1488,12 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
}
break;
case RID_WINTILEVERT:
-//#define WINDOWARRANGE_TILE 1
-//#define WINDOWARRANGE_HORZ 2
-//#define WINDOWARRANGE_VERT 3
-//#define WINDOWARRANGE_CASCADE 4
{
WindowArrange aArange;
- for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
- aArange.AddWindow( pList->GetObject( i ) );
- pList->GetObject( i )->Restore();
+ aArange.AddWindow( pList->at( i ) );
+ pList->at( i )->Restore();
}
@@ -1569,26 +1513,14 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
break;
case RID_WINCASCADE:
{
- for ( sal_uInt16 i = 0 ; i < pList->Count() ; i++ )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
- pList->GetObject( i )->Cascade( i );
+ pList->at( i )->Cascade( i );
}
}
break;
-/* case RID_HELPTOPIC:
- if( pWork ) pWork->Help();
- break;
- case RID_HELPKEYS:
- aBasicApp.pHelp->Start( CUniString( "Keyboard" ) );
- break;
- case RID_HELPINDEX:
- aBasicApp.pHelp->Start( OOO_HELP_INDEX );
- break;
- case RID_HELPINTRO:
- aBasicApp.pHelp->Start( OOO_HELP_HELPONHELP );
- break;
-*/ case RID_HELPABOUT:
+ case RID_HELPABOUT:
{
SttResId aResId( IDD_ABOUT_DIALOG );
if ( Basic().pTestObject ) // Are we TestTool?
@@ -1621,14 +1553,11 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
AddToLRU( s );
LoadFile( s );
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
}
else
{
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPEDIT )); // So daß Delete richtig ist
if( pWork )
pWork->Command( CommandEvent( Point(), nID ) );
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPEDIT )); // So daß Delete richtig ist
}
}
return sal_True;
@@ -1637,8 +1566,9 @@ long BasicFrame::Command( short nID, sal_Bool bChecked )
sal_Bool BasicFrame::SaveAll()
{
AppWin* p, *q = pWork;
- for( p = pList->First(); p; p = pList->Next() )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
+ p = pList->at( i );
sal_uInt16 nRes = p->QuerySave( QUERY_DISK_CHANGED );
if( (( nRes == SAVE_RES_ERROR ) && QueryBox(this,SttResId(IDS_ASKSAVEERROR)).Execute() == RET_NO )
|| ( nRes == SAVE_RES_CANCEL ) )
@@ -1657,8 +1587,9 @@ IMPL_LINK( BasicFrame, ModuleWinExists, String*, pFilename )
AppBasEd* BasicFrame::FindModuleWin( const String& rName )
{
AppWin* p;
- for( p = pList->First(); p; p = pList->Next() )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
+ p = pList->at( i );
if( p->ISA(AppBasEd) && ((AppBasEd*)p)->GetModName() == rName )
return ((AppBasEd*)p);
}
@@ -1668,8 +1599,9 @@ AppBasEd* BasicFrame::FindModuleWin( const String& rName )
AppError* BasicFrame::FindErrorWin( const String& rName )
{
AppWin* p;
- for( p = pList->First(); p; p = pList->Next() )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
+ p = pList->at( i );
if( p->ISA(AppError) && ((AppError*)p)->GetText() == rName )
return ((AppError*)p);
}
@@ -1679,8 +1611,9 @@ AppError* BasicFrame::FindErrorWin( const String& rName )
AppWin* BasicFrame::FindWin( const String& rName )
{
AppWin* p;
- for( p = pList->First(); p; p = pList->Next() )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
+ p = pList->at( i );
if( p->GetText() == rName )
return p;
}
@@ -1690,8 +1623,9 @@ AppWin* BasicFrame::FindWin( const String& rName )
AppWin* BasicFrame::FindWin( sal_uInt16 nWinId )
{
AppWin* p;
- for( p = pList->First(); p; p = pList->Next() )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
+ p = pList->at( i );
if( p->GetWinId() == nWinId )
return p;
}
@@ -1701,8 +1635,9 @@ AppWin* BasicFrame::FindWin( sal_uInt16 nWinId )
AppWin* BasicFrame::IsWinValid( AppWin* pMaybeWin )
{
AppWin* p;
- for( p = pList->First(); p; p = pList->Next() )
+ for ( size_t i = 0, n = pList->size(); i < n ; i++ )
{
+ p = pList->at( i );
if( p == pMaybeWin )
return p;
}
@@ -1711,9 +1646,9 @@ AppWin* BasicFrame::IsWinValid( AppWin* pMaybeWin )
IMPL_LINK( BasicFrame, WriteString, String*, pString )
{
- if ( pList->Last() )
+ if ( !pList->empty() )
{
- pList->Last()->pDataEdit->ReplaceSelected( *pString );
+ pList->back()->pDataEdit->ReplaceSelected( *pString );
return sal_True;
}
else
@@ -1753,8 +1688,6 @@ void NewFileDialog::FilterSelect()
aConf.SetGroup( aCurrentProfile );
aLastPath = UniString( aConf.ReadKey( aFilterType, aConf.ReadKey( "BaseDir" ) ), RTL_TEXTENCODING_UTF8 );
SetPath( aLastPath );
-// if ( IsInExecute() )
-// SetPath( "" );
}
short NewFileDialog::Execute()
@@ -1813,19 +1746,12 @@ sal_Bool BasicFrame::QueryFileName
aDlg.SetCurFilter( String( SttResId( IDS_BASFILTER ) ) );
aDlg.FilterSelect(); // Selects the last used path
-// if ( bSave )
if ( rName.Len() > 0 )
aDlg.SetPath( rName );
if( aDlg.Execute() )
{
rName = aDlg.GetPath();
-/* rExtension = aDlg.GetCurrentFilter();
- var i:integer;
- for ( i = 0 ; i < aDlg.GetFilterCount() ; i++ )
- if ( rExtension == aDlg.GetFilterName( i ) )
- rExtension = aDlg.GetFilterType( i );
-*/
return sal_True;
} else return sal_False;
}
@@ -1833,15 +1759,14 @@ sal_Bool BasicFrame::QueryFileName
sal_uInt16 BasicFrame::BreakHandler()
{
bInBreak = sal_True;
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
-// MenuBar aBar( ResId( RID_APPMENUBAR ) );
-// aBar.EnableItem( RID_APPEDIT, sal_False );
SetAppMode( String( SttResId ( IDS_APPMODE_BREAK ) ) );
- while( bInBreak )
+
+ while( bInBreak ) {
GetpApp()->Yield();
+ }
+
SetAppMode( String( SttResId ( IDS_APPMODE_RUN ) ) );
-// aBar.EnableItem( RID_APPEDIT, sal_True );
-// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
+
return nFlags;
}
@@ -1910,13 +1835,8 @@ String BasicFrame::GenRealString( const String &aResString )
nEnd = nEnd + aString.Len();
aString.Erase();
}
-// if ( Resource::GetResManager()->IsAvailable( ResId( aValue ) ) )
- aString = String( SttResId( (sal_uInt16)(aValue.ToInt32()) ) );
-// else
- {
-// DBG_ERROR( "Could not load resource!" );
-// return aResString;
- }
+
+ aString = String( SttResId( (sal_uInt16)(aValue.ToInt32()) ) );
nInsertPos = nStart;
nStartPos = nStart;
aResult.Erase( nStart, nEnd-nStart+1 );
@@ -1946,3 +1866,4 @@ String BasicFrame::GenRealString( const String &aResString )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx
index 5a501ec5efcf..983e979c5021 100644..100755
--- a/basic/source/app/app.hxx
+++ b/basic/source/app/app.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,23 +30,17 @@
#define _BASICAPP_HXX
#include <vcl/svapp.hxx>
-#ifndef _HELP_HXX //autogen
#include <vcl/help.hxx>
-#endif
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <vcl/timer.hxx>
#include <svl/brdcst.hxx>
#include <svl/lstner.hxx>
class BasicFrame;
#include <basic/mybasic.hxx>
+#include <vector>
-class EditList;
class AppWin;
class AppEdit;
class AppBasEd;
@@ -55,15 +50,15 @@ class StatusLine;
class BasicPrinter;
struct TTLogMsg;
+typedef ::std::vector< AppWin* > EditList;
+
class BasicApp : public Application {
short nWait; // Wait-Zaehler
public:
-// Help* pHelp; // Hilfesystem
BasicFrame* pFrame; // Frame Window
-// MenuBar* pMainMenu; // Hauptmenue
Accelerator* pMainAccel; // Acceleratoren
- void Main( );
+ int Main( );
void LoadIniFile();
void SetFocus();
@@ -95,13 +90,13 @@ class BasicFrame : public WorkWindow, public SfxBroadcaster, public SfxListener
using SystemWindow::Notify;
using Window::Command;
-virtual sal_Bool Close();
+ virtual sal_Bool Close();
sal_Bool CloseAll(); // Close all windows
sal_Bool CompileAll(); // Compile all texts
AutoTimer aLineNum; // Show the line numbers
-virtual void Resize();
-virtual void Move();
-virtual void GetFocus();
+ virtual void Resize();
+ virtual void Move();
+ virtual void GetFocus();
void LoadLibrary();
void SaveLibrary();
sal_Bool bIsAutoRun;
@@ -194,3 +189,5 @@ public:
extern BasicApp aBasicApp;
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/appbased.cxx b/basic/source/app/appbased.cxx
index fd7637fe26bf..4a3b94d057ec 100644..100755
--- a/basic/source/app/appbased.cxx
+++ b/basic/source/app/appbased.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basic.hxx"
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <basic/sbx.hxx>
#include <svtools/texteng.hxx>
#include <svtools/textview.hxx>
#include <basic/sbmeth.hxx>
#include <svtools/stringtransfer.hxx>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include "basic.hrc"
#include "status.hxx"
@@ -59,10 +56,8 @@ AppBasEd::AppBasEd( BasicFrame* pParent, SbModule* p )
pBreakpoints->Show();
-
((TextEdit*)pDataEdit)->GetTextEditImp().pTextView->SetAutoIndentMode( sal_True );
((TextEdit*)pDataEdit)->GetTextEditImp().pTextEngine->SetMaxTextLen( STRING_MAXLEN );
-// ((TextEdit*)pDataEdit)->GetTextEditImp().pTextEngine->SetWordDelimiters( CUniString(" ,.;:(){}[]\"'+-*/<>^\\") );
((TextEdit*)pDataEdit)->GetTextEditImp().SyntaxHighlight( sal_True );
((TextEdit*)pDataEdit)->SaveAsUTF8( sal_True );
@@ -79,10 +74,6 @@ AppBasEd::AppBasEd( BasicFrame* pParent, SbModule* p )
pBreakpoints->SetModule( pMod );
- // Define icon:
-// pIcon = new Icon( ResId( RID_WORKICON ) );
-// if( pIcon ) SetIcon( *pIcon );
-
SetText( pMod->GetName() );
pDataEdit->SetText( pMod->GetSource() );
@@ -210,7 +201,6 @@ void AppBasEd::LoadSource()
{
sal_Bool bErr;
-// if( pDataEdit->GetText().Len() != 0 ) return;
String aName = pMod->GetName();
bErr = !pDataEdit->Load( aName );
pBreakpoints->LoadBreakpoints( GetText() );
@@ -250,7 +240,7 @@ sal_Bool AppBasEd::Compile()
}
else
{
- BasicError* pErr = pFrame->Basic().aErrors.First();
+ BasicError* pErr = pFrame->Basic().FirstError();
if( pErr ) pErr->Show();
}
return bCompiled = bRes;
@@ -287,7 +277,7 @@ void AppBasEd::Run()
pMain->Run();
if (aBasicApp.pFrame)
{
- BasicError* pErr = aBasicApp.pFrame->Basic().aErrors.First();
+ BasicError* pErr = aBasicApp.pFrame->Basic().FirstError();
if( pErr )
pErr->Show();
aBasicApp.pFrame->SetAppMode( String() );
@@ -297,3 +287,4 @@ void AppBasEd::Run()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/appbased.hxx b/basic/source/app/appbased.hxx
index ccda8ce68c69..22e9afa37bc1 100644..100755
--- a/basic/source/app/appbased.hxx
+++ b/basic/source/app/appbased.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,12 +30,8 @@
#define _APPBASED_HXX
#include <basic/sbmod.hxx>
-#ifndef _SB_APPEDIT_HXX
#include "appedit.hxx"
-#endif
-#ifndef _SB_TEXTEDIT_HXX
#include "textedit.hxx"
-#endif
class BasicFrame;
class BreakpointWindow;
@@ -72,3 +69,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/appedit.cxx b/basic/source/app/appedit.cxx
index 9aa06ffad38e..1cf75d13c58a 100644..100755
--- a/basic/source/app/appedit.cxx
+++ b/basic/source/app/appedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include <svtools/texteng.hxx>
#include <svl/undo.hxx>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include "basic.hrc"
#include "appedit.hxx"
@@ -53,9 +52,6 @@ AppEdit::AppEdit( BasicFrame* pParent )
pDataEdit = new TextEdit( this, WB_LEFT );
LoadIniFile();
- // define Icon:
-// pIcon = new Icon( ResId( RID_WORKICON ) );
-// if( pIcon ) SetIcon( *pIcon );
pDataEdit->SetText( aEmpty );
@@ -93,9 +89,7 @@ void AppEdit::LoadIniFile()
String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 );
String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 );
Font aFont = aFontList.Get( aFontName, aFontStyle );
-// sal_uIntPtr nFontSize = aFontSize.GetValue( FUNIT_POINT );
sal_uIntPtr nFontSize = aFontSize.ToInt32();
-// aFont.SetSize( Size( nFontSize, nFontSize ) );
aFont.SetHeight( nFontSize );
#if OSL_DEBUG_LEVEL > 1
@@ -104,8 +98,6 @@ void AppEdit::LoadIniFile()
}
#endif
aFont.SetTransparent( sal_False );
-// aFont.SetAlign( ALIGN_BOTTOM );
-// aFont.SetHeight( aFont.GetHeight()+2 );
pDataEdit->SetFont( aFont );
if ( ((TextEdit*)pDataEdit)->GetBreakpointWindow() )
@@ -277,7 +269,6 @@ void AppEdit::Resize()
aStartDocPos.Y() = nMaxVisAreaStart;
pTextView->SetStartDocPos( aStartDocPos );
pTextView->ShowCursor();
-// pModulWindow->GetBreakPointWindow().GetCurYOffset() = aStartDocPos.Y();
}
InitScrollBars();
if ( nVisY != pTextView->GetStartDocPos().Y() )
@@ -299,3 +290,4 @@ void AppEdit::Highlight( sal_uInt16 nLine, sal_uInt16 nCol1, sal_uInt16 nCol2 )
ToTop();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/appedit.hxx b/basic/source/app/appedit.hxx
index b2c71c09c454..67cb4337c6b0 100644..100755
--- a/basic/source/app/appedit.hxx
+++ b/basic/source/app/appedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _APPEDIT_HXX
#define _APPEDIT_HXX
-#ifndef _SCRBAR_HXX //autogen
#include <vcl/scrbar.hxx>
-#endif
#include "appwin.hxx"
#include "textedit.hxx"
@@ -68,3 +67,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/apperror.cxx b/basic/source/app/apperror.cxx
index 03c8aebd0bbe..48781eab1767 100644..100755
--- a/basic/source/app/apperror.cxx
+++ b/basic/source/app/apperror.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "precompiled_basic.hxx"
#include <tools/config.hxx>
#include <svtools/ctrltool.hxx>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include "basic.hrc"
#include "apperror.hxx"
@@ -113,3 +112,5 @@ void AppError::LoadIniFile()
// aFont.SetHeight( aFont.GetHeight()+2 );
pDataEdit->SetFont( aFont );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/apperror.hxx b/basic/source/app/apperror.hxx
index 3a7028aeae4b..c55015a1964d 100644..100755
--- a/basic/source/app/apperror.hxx
+++ b/basic/source/app/apperror.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,4 @@ public:
DirEntry aBaseDir;
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index 4d0a5f95fca4..984637af5178 100644..100755
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "precompiled_basic.hxx"
#include <stdio.h>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <tools/fsys.hxx>
#include <svtools/stringtransfer.hxx>
@@ -227,7 +226,7 @@ long AppWin::PreNotify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
Activate();
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- if ( pFrame->pList->Last() != this )
+ if ( pFrame->pList->back() != this )
Activate();
return sal_False; // Der event soll weiter verarbeitet werden
}
@@ -391,7 +390,7 @@ sal_Bool AppWin::DiskFileChanged( sal_uInt16 nWhat )
// uncomment to avoid compiler warning
// break;
default:
- DBG_ERROR("Not Implemented in AppWin::DiskFileChanged");
+ OSL_FAIL("Not Implemented in AppWin::DiskFileChanged");
}
return sal_True;
}
@@ -416,7 +415,7 @@ void AppWin::UpdateFileInfo( sal_uInt16 nWhat )
}
break;
default:
- DBG_ERROR("Not Implemented in AppWin::UpdateFileInfo");
+ OSL_FAIL("Not Implemented in AppWin::UpdateFileInfo");
}
}
@@ -591,7 +590,7 @@ sal_uInt16 AppWin::QuerySave( QueryBits nBits )
nReturn = SAVE_RES_CANCEL;
break;
default:
- DBG_ERROR("switch default where no default should be: Internal error");
+ OSL_FAIL("switch default where no default should be: Internal error");
nReturn = SAVE_RES_CANCEL;
}
SkipReload( sal_False );
@@ -620,7 +619,7 @@ sal_Bool AppWin::Close()
// uncomment to avoid compiler warning
// break;
default:
- DBG_ERROR("Not Implemented in AppWin::Close");
+ OSL_FAIL("Not Implemented in AppWin::Close");
return sal_False;
}
}
@@ -655,3 +654,4 @@ void AppWin::Repeat()
pDataEdit->ReplaceSelected( aReplace );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/appwin.hxx b/basic/source/app/appwin.hxx
index 928380d50df8..e5a79e042d8b 100644..100755
--- a/basic/source/app/appwin.hxx
+++ b/basic/source/app/appwin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,14 +29,15 @@
#ifndef _APPWIN_HXX
#define _APPWIN_HXX
-//#include <sb.hxx>
#include <vcl/dockwin.hxx>
#include <tools/fsys.hxx>
#include "app.hxx"
#include "dataedit.hxx"
+#include <vector>
typedef sal_uInt16 QueryBits;
+
#define QUERY_NONE ( QueryBits ( 0x00 ) )
#define QUERY_DIRTY ( QueryBits ( 0x01 ) )
#define QUERY_DISK_CHANGED ( QueryBits ( 0x02 ) )
@@ -75,7 +77,6 @@ protected:
short nId; // ID-Nummer( "Unnamed n" )
BasicFrame* pFrame; // Parent-Window
-// Icon* pIcon; // Document icon
String aFind; // Search string
String aReplace; // Replace string
sal_Bool bFind; // sal_True if search not replace
@@ -133,6 +134,8 @@ public:
void SetWinId( sal_uInt16 nWId ) { nWinId = nWId; }
};
-DECLARE_LIST( EditList, AppWin* )
+typedef ::std::vector< AppWin* > EditList;
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/basic.hrc b/basic/source/app/basic.hrc
index e4a69d9d2942..e4a69d9d2942 100644..100755
--- a/basic/source/app/basic.hrc
+++ b/basic/source/app/basic.hrc
diff --git a/basic/source/app/basic.src b/basic/source/app/basic.src
index 7f83ba8db2ba..28cffcbae5b7 100644..100755
--- a/basic/source/app/basic.src
+++ b/basic/source/app/basic.src
@@ -91,7 +91,7 @@ ModalDialog IDD_ABOUT_DIALOG {
FixedText {
Pos = MAP_APPFONT( 40, 60 );
Size = MAP_APPFONT( 110, 10 );
- TEXT = "®1995-2010 Oracle";
+ TEXT = "�1995-2010 Oracle";
CENTER = TRUE;
};
};
@@ -148,7 +148,7 @@ ModalDialog IDD_FIND_DIALOG {
Size = MAP_APPFONT( 185, 70 );
SVLook = TRUE;
MOVEABLE = TRUE;
- // CLOSEABLE = TRUE; // Hat cancelbutton
+ // CLOSEABLE = TRUE; // It has a cancelbutton
FixedText RID_FIXEDTEXT1 {
Pos = MAP_APPFONT( 5, 10 );
@@ -184,7 +184,7 @@ ModalDialog IDD_REPLACE_DIALOG {
Size = MAP_APPFONT( 185, 88 );
SVLook = TRUE;
MOVEABLE = TRUE;
- // CLOSEABLE = TRUE; // Hat cancelbutton
+ // CLOSEABLE = TRUE; // It has a cancelbutton
FixedText RID_FIXEDTEXT1 {
Pos = MAP_APPFONT( 5, 10 );
Size = MAP_APPFONT( 55, 10 );
@@ -652,9 +652,9 @@ Menu RID_RUN {
};
};
};
-// Wird nur beim Test Tool eingef³gt
+// This will be inserted from the Test Tool
-// unter Folgendem Name
+// under the following name
String RID_TT_EXTRAS_NAME
{
Text[ en-US ] = "E~xtra";
diff --git a/basic/source/app/basicrt.cxx b/basic/source/app/basicrt.cxx
index 2df8df0d53fe..bd1638587c13 100644..100755
--- a/basic/source/app/basicrt.cxx
+++ b/basic/source/app/basicrt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,3 +143,5 @@ sal_Bool BasicRuntimeAccess::IsRunInit()
{
return GetSbData()->bRunInit;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/basmsg.hrc b/basic/source/app/basmsg.hrc
index 5f66605dc725..bfabe2c9759e 100644..100755
--- a/basic/source/app/basmsg.hrc
+++ b/basic/source/app/basmsg.hrc
@@ -27,17 +27,17 @@
#include "basic/ttglobal.hrc"
-// Hier sind die Messages aus dem Verzeichnis /basic/source/app enhalten
+// Here are included the messages of the folder /basic/source/app
///////////////////////////////
-// Fehlermeldungen, die in das Resultfile gelangen.
+// Error messages which go to the result file.
// *********************
-// *** !!ACHTUNG!! ***
+// *** !!ATTENTION!! ***
// *********************
-// Die Nummern dürfen sich NIE! ändern,
-// da sie in den Resultfiles gespeichert sind, und bei erneutem Anzeigen
-// statdessen die entsprechenden neuen oder garkeine Strings angzeigt werden.
+// The numbers must NEVER(!) change,
+// because they are saved in the result files and a renewed display
+// would display new strings or no strings.
///////////////////////////////
#define S_PROG_START ( BAS_START + 0 )
diff --git a/basic/source/app/basmsg.src b/basic/source/app/basmsg.src
index 6de25e82a170..e2179afd4c34 100644..100755
--- a/basic/source/app/basmsg.src
+++ b/basic/source/app/basmsg.src
@@ -27,18 +27,19 @@
#include "basmsg.hrc"
-// Hier sind die Messages aus dem Verzeichnis /basic/source/app enhalten
+// Here are included the messages of the folder /basic/source/app
///////////////////////////////
-// Fehlermeldungen, die in das Resultfile gelangen.
+// Error messages which go to the result file.
// *********************
-// *** !!ACHTUNG!! ***
+// *** !!ATTENTION!! ***
// *********************
-// Die Nummern dürfen sich NIE! ändern,
-// da sie in den Resultfiles gespeichert sind, und bei erneutem Anzeigen
-// statdessen die entsprechenden neuen oder garkeine Strings angzeigt werden.
+// The numbers must NEVER(!) change,
+// because they are saved in the result files and a renewed display
+// would display new strings or no strings.
///////////////////////////////
+
String S_PROG_START
{
Text[ en-US ] = "Program start: ($Arg1); ($Arg2)";
diff --git a/basic/source/app/brkpnts.cxx b/basic/source/app/brkpnts.cxx
index e7687222d5da..134c5194b7aa 100644..100755
--- a/basic/source/app/brkpnts.cxx
+++ b/basic/source/app/brkpnts.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basic.hxx"
-#include <tools/list.hxx>
#include <basic/sbx.hxx>
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
@@ -37,9 +37,7 @@
#include <tools/config.hxx>
#include <vcl/gradient.hxx>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include "brkpnts.hxx"
#include "basic.hrc"
@@ -48,15 +46,12 @@
struct Breakpoint
{
- sal_uInt16 nLine;
-
- Breakpoint( sal_uInt16 nL ) { nLine = nL; }
+ sal_uInt32 nLine;
+ Breakpoint( sal_uInt32 nL ) { nLine = nL; }
};
-
ImageList* BreakpointWindow::pImages = NULL;
-
BreakpointWindow::BreakpointWindow( Window *pParent )
: Window( pParent )
, nCurYOffset( 0 )
@@ -76,13 +71,9 @@ BreakpointWindow::BreakpointWindow( Window *pParent )
void BreakpointWindow::Reset()
{
- Breakpoint* pBrk = First();
- while ( pBrk )
- {
- delete pBrk;
- pBrk = Next();
- }
- Clear();
+ for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
+ delete BreakpointList[ i ];
+ BreakpointList.clear();
pModule->ClearAllBP();
}
@@ -103,14 +94,13 @@ void BreakpointWindow::SetBPsInModule()
{
pModule->ClearAllBP();
- Breakpoint* pBrk = First();
- while ( pBrk )
+ for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
{
+ Breakpoint* pBrk = BreakpointList[ i ];
pModule->SetBP( (sal_uInt16)pBrk->nLine );
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
+ DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (sal_uInt16)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
#endif
- pBrk = Next();
}
for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
{
@@ -121,27 +111,30 @@ void BreakpointWindow::SetBPsInModule()
}
-void BreakpointWindow::InsertBreakpoint( sal_uInt16 nLine )
+void BreakpointWindow::InsertBreakpoint( sal_uInt32 nLine )
{
Breakpoint* pNewBrk = new Breakpoint( nLine );
- Breakpoint* pBrk = First();
- while ( pBrk )
+
+ for ( ::std::vector< Breakpoint* >::iterator i = BreakpointList.begin();
+ i < BreakpointList.end();
+ ++ i
+ )
{
+ Breakpoint* pBrk = *i;
if ( nLine <= pBrk->nLine )
{
- if ( pBrk->nLine != nLine )
- Insert( pNewBrk );
+ if ( nLine != pBrk->nLine )
+ BreakpointList.insert( i, pNewBrk );
else
delete pNewBrk;
pNewBrk = NULL;
- pBrk = NULL;
+ break;
}
- else
- pBrk = Next();
}
+
// No insert position found => LIST_APPEND
if ( pNewBrk )
- Insert( pNewBrk, LIST_APPEND );
+ BreakpointList.push_back( pNewBrk );
Invalidate();
@@ -166,35 +159,34 @@ void BreakpointWindow::InsertBreakpoint( sal_uInt16 nLine )
}
-Breakpoint* BreakpointWindow::FindBreakpoint( sal_uIntPtr nLine )
+Breakpoint* BreakpointWindow::FindBreakpoint( sal_uInt32 nLine )
{
- Breakpoint* pBrk = First();
- while ( pBrk )
+ for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
{
- if ( pBrk->nLine == nLine )
- return pBrk;
-
- pBrk = Next();
+ Breakpoint* pBP = BreakpointList[ i ];
+ if ( pBP->nLine == nLine )
+ return pBP;
}
-
- return (Breakpoint*)0;
+ return NULL;
}
-void BreakpointWindow::AdjustBreakpoints( sal_uIntPtr nLine, sal_Bool bInserted )
+void BreakpointWindow::AdjustBreakpoints( sal_uInt32 nLine, bool bInserted )
{
if ( nLine == 0 ) //TODO: nLine == TEXT_PARA_ALL+1
return;
- Breakpoint* pBrk = First();
- while ( pBrk )
+
+ for ( size_t i = 0; i < BreakpointList.size(); )
{
- sal_Bool bDelBrk = sal_False;
+ Breakpoint* pBrk = BreakpointList[ i ];
+ bool bDelBrk = false;
+
if ( pBrk->nLine == nLine )
{
if ( bInserted )
pBrk->nLine++;
else
- bDelBrk = sal_True;
+ bDelBrk = true;
}
else if ( pBrk->nLine > nLine )
{
@@ -203,18 +195,19 @@ void BreakpointWindow::AdjustBreakpoints( sal_uIntPtr nLine, sal_Bool bInserted
else
pBrk->nLine--;
}
-
if ( bDelBrk )
{
- sal_uIntPtr n = GetCurPos();
- delete Remove( pBrk );
- pBrk = Seek( n );
+ delete pBrk;
+ ::std::vector< Breakpoint* >::iterator it = BreakpointList.begin();
+ ::std::advance( it, i );
+ BreakpointList.erase( it );
}
else
{
- pBrk = Next();
+ ++i;
}
}
+
Invalidate();
}
@@ -241,14 +234,12 @@ void BreakpointWindow::SaveBreakpoints( String aFilename )
{
ByteString aBreakpoints;
- Breakpoint* pBrk = First();
- while ( pBrk )
+ for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
{
+ Breakpoint* pBrk = BreakpointList[ i ];
if ( aBreakpoints.Len() )
aBreakpoints += ';';
-
aBreakpoints += ByteString::CreateFromInt32( pBrk->nLine );
- pBrk = Next();
}
Config aConfig(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
@@ -274,16 +265,15 @@ void BreakpointWindow::Paint( const Rectangle& )
aBmpOff.X() = ( aOutSz.Width() - aBmpSz.Width() ) / 2;
aBmpOff.Y() = ( nLineHeight - aBmpSz.Height() ) / 2;
- Breakpoint* pBrk = First();
- while ( pBrk )
+ for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
{
+ Breakpoint* pBrk = BreakpointList[ i ];
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
#endif
- sal_uIntPtr nLine = pBrk->nLine-1;
- sal_uIntPtr nY = nLine*nLineHeight - nCurYOffset;
+ sal_Int32 nLine = pBrk->nLine-1;
+ sal_Int32 nY = nLine*nLineHeight - nCurYOffset;
DrawImage( Point( 0, nY ) + aBmpOff, aBrk );
- pBrk = Next();
}
ShowMarker( sal_True );
}
@@ -291,39 +281,46 @@ void BreakpointWindow::Paint( const Rectangle& )
Breakpoint* BreakpointWindow::FindBreakpoint( const Point& rMousePos )
{
- long nLineHeight = GetTextHeight();
- long nYPos = rMousePos.Y() + nCurYOffset;
+ sal_Int32 nLineHeight = GetTextHeight();
+ sal_Int32 nYPos = rMousePos.Y() + nCurYOffset;
- Breakpoint* pBrk = First();
- while ( pBrk )
+ for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
{
- sal_uIntPtr nLine = pBrk->nLine-1;
- long nY = nLine*nLineHeight;
+ Breakpoint* pBrk = BreakpointList[ i ];
+ sal_Int32 nLine = pBrk->nLine-1;
+ sal_Int32 nY = nLine * nLineHeight;
if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) )
return pBrk;
- pBrk = Next();
}
- return 0;
+ return NULL;
}
-void BreakpointWindow::ToggleBreakpoint( sal_uInt16 nLine )
+void BreakpointWindow::ToggleBreakpoint( sal_uInt32 nLine )
{
- Breakpoint* pBrk = FindBreakpoint( nLine );
- if ( pBrk ) // remove
+ bool Removed = false;
+ for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
{
- pModule->ClearBP( nLine );
- delete Remove( pBrk );
+ Breakpoint* pBP = BreakpointList[ i ];
+ if ( pBP->nLine == nLine ) // remove
+ {
+ pModule->ClearBP( nLine );
+ delete pBP;
+ ::std::vector< Breakpoint* >::iterator it = BreakpointList.begin();
+ ::std::advance( it, i );
+ BreakpointList.erase( it );
+ Removed = true;
+ break;
+ }
}
- else // create one
- {
+
+ if ( !Removed ) // create one
InsertBreakpoint( nLine );
- }
Invalidate();
}
-void BreakpointWindow::ShowMarker( sal_Bool bShow )
+void BreakpointWindow::ShowMarker( bool bShow )
{
if ( nMarkerPos == MARKER_NOMARKER )
return;
@@ -367,12 +364,12 @@ void BreakpointWindow::MouseButtonDown( const MouseEvent& rMEvt )
}
-void BreakpointWindow::SetMarkerPos( sal_uInt16 nLine, sal_Bool bError )
+void BreakpointWindow::SetMarkerPos( sal_uInt32 nLine, bool bError )
{
- ShowMarker( sal_False ); // Remove old one
+ ShowMarker( false ); // Remove old one
nMarkerPos = nLine;
bErrorMarker = bError;
- ShowMarker( sal_True ); // Draw new one
+ ShowMarker( true ); // Draw new one
Update();
}
@@ -384,3 +381,4 @@ void BreakpointWindow::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nF
Window::Scroll( nHorzScroll, nVertScroll );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/brkpnts.hxx b/basic/source/app/brkpnts.hxx
index 64d5c0a9d0d7..0ea0fc9b45ad 100644..100755
--- a/basic/source/app/brkpnts.hxx
+++ b/basic/source/app/brkpnts.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,18 +27,15 @@
************************************************************************/
#include <vcl/window.hxx>
+#include <vector>
#define MARKER_NOMARKER 0xFFFF
-
class SbModule;
-class BreakpointListe;
struct Breakpoint;
class ImageList;
-DECLARE_LIST( BreakpointList, Breakpoint* )
-
-class BreakpointWindow : public Window, public BreakpointList
+class BreakpointWindow : public Window
{
using Window::Scroll;
@@ -50,45 +48,32 @@ public:
void SetModule( SbModule *pMod );
void SetBPsInModule();
- void InsertBreakpoint( sal_uInt16 nLine );
- void ToggleBreakpoint( sal_uInt16 nLine );
- void AdjustBreakpoints( sal_uIntPtr nLine, sal_Bool bInserted );
+ void InsertBreakpoint( sal_uInt32 nLine );
+ void ToggleBreakpoint( sal_uInt32 nLine );
+ void AdjustBreakpoints( sal_uInt32 nLine, bool bInserted );
void LoadBreakpoints( String aFilename );
void SaveBreakpoints( String aFilename );
-protected:
- Breakpoint* FindBreakpoint( sal_uIntPtr nLine );
-
private:
- long nCurYOffset;
- sal_uInt16 nMarkerPos;
- SbModule* pModule;
- sal_Bool bErrorMarker;
- static ImageList *pImages;
+ ::std::vector< Breakpoint* > BreakpointList;
+ long nCurYOffset;
+ sal_uInt32 nMarkerPos;
+ SbModule* pModule;
+ bool bErrorMarker;
+ static ImageList* pImages;
protected:
virtual void Paint( const Rectangle& );
Breakpoint* FindBreakpoint( const Point& rMousePos );
- void ShowMarker( sal_Bool bShow );
+ Breakpoint* FindBreakpoint( sal_uInt32 nLine );
+ void ShowMarker( bool bShow );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
public:
-
-// void SetModulWindow( ModulWindow* pWin )
-// { pModulWindow = pWin; }
-
- void SetMarkerPos( sal_uInt16 nLine, sal_Bool bErrorMarker = sal_False );
-
- virtual void Scroll( long nHorzScroll, long nVertScroll,
- sal_uInt16 nFlags = 0 );
+ void SetMarkerPos( sal_uInt32 nLine, bool bErrorMarker = false );
+ virtual void Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags = 0 );
long& GetCurYOffset() { return nCurYOffset; }
};
-
-
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/dataedit.hxx b/basic/source/app/dataedit.hxx
index 29148bc79919..60ab6626a85f 100644..100755
--- a/basic/source/app/dataedit.hxx
+++ b/basic/source/app/dataedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,3 +115,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx
index 85f09b6b6cd0..dc8a57516b20 100644..100755
--- a/basic/source/app/dialogs.cxx
+++ b/basic/source/app/dialogs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,36 +33,22 @@
#include <algorithm>
#include <tools/rc.hxx>
#include <vcl/metric.hxx>
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <tools/config.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <tools/debug.hxx>
-#ifndef _SV_FILEDLG_HXX //autogen
#include <svtools/filedlg.hxx>
-#endif
#include <tools/stream.hxx>
#include <tools/fsys.hxx>
#include <svtools/stringtransfer.hxx>
#include <vcl/splitwin.hxx>
-#ifndef _ZFORLIST_HXX //autogen
#include <svl/zformat.hxx>
-#endif
#include <svtools/ctrltool.hxx>
-// Ohne Includeschutz
+
#include <svtools/svtdata.hxx>
#include <svl/solar.hrc>
@@ -314,7 +301,7 @@ IMPL_LINK( OptionsDialog, ActivatePageHdl, TabControl *, pTabCtrl )
case RID_TP_FON:
pNewTabPage = new FontOptions( pTabCtrl, aConfig );
break;
- default: DBG_ERROR( "PageHdl: Unbekannte ID!" );
+ default: OSL_FAIL( "PageHdl: Unbekannte ID!" );
}
DBG_ASSERT( pNewTabPage, "Keine Page!" );
pTabCtrl->SetTabPage( nId, pNewTabPage );
@@ -805,7 +792,7 @@ StringList* GenericOptions::GetAllGroups()
for ( sal_uInt16 i = 0 ; i < aConf.GetGroupCount() ; i++ )
{
String *pGroup = new String( aConf.GetGroupName( i ), RTL_TEXTENCODING_UTF8 );
- pGroups->Insert( pGroup );
+ pGroups->push_back( pGroup );
}
return pGroups;
}
@@ -813,31 +800,29 @@ StringList* GenericOptions::GetAllGroups()
void GenericOptions::LoadData()
{
StringList* pGroups = GetAllGroups();
- String* pGroup;
- while ( (pGroup = pGroups->First()) != NULL )
+ for ( size_t i = 0, n = pGroups->size(); i < n; ++i )
{
- pGroups->Remove( pGroup );
+ String* pGroup = pGroups->at( i );
aConf.SetGroup( ByteString( *pGroup, RTL_TEXTENCODING_UTF8 ) );
if ( aConf.ReadKey( C_KEY_AKTUELL ).Len() > 0 )
- {
aCbArea.InsertEntry( *pGroup );
- }
delete pGroup;
}
+ pGroups->clear();
delete pGroups;
- aCbArea.SetText( aCbArea.GetEntry( 0 ) );
+ aCbArea.SetText( aCbArea.GetEntry( 0 ) );
CheckButtons( aCbArea, aPbNewArea, aPbDelArea );
// Add load the data
LINK( this, GenericOptions, LoadGroup ).Call( NULL );
}
-void GenericOptions::ShowSelectPath( const String aType )
+void GenericOptions::ShowSelectPath( const String &rType )
{
Point aNPos = aPbNewValue.GetPosPixel();
Point aDPos = aPbDelValue.GetPosPixel();
long nDelta = aDPos.Y() - aNPos.Y();
- if ( aType.EqualsIgnoreCaseAscii( "PATH" ) && !bShowSelectPath )
+ if ( rType.EqualsIgnoreCaseAscii( "PATH" ) && !bShowSelectPath )
{ // Show Path button
nMoveButtons += nDelta;
aMoveTimer.Start();
@@ -845,7 +830,7 @@ void GenericOptions::ShowSelectPath( const String aType )
aPbSelectPath.Show( sal_True );
aPbSelectPath.Enable( sal_True );
}
- else if ( !aType.EqualsIgnoreCaseAscii( "PATH" ) && bShowSelectPath )
+ else if ( !rType.EqualsIgnoreCaseAscii( "PATH" ) && bShowSelectPath )
{ // Hide Path button
nMoveButtons -= nDelta;
aMoveTimer.Start();
@@ -1199,8 +1184,6 @@ void DisplayHidDlg::AddData( WinInfoRec* pWinInfo )
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
return;
}
@@ -1505,3 +1488,4 @@ SvNumberformat::
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/dialogs.hxx b/basic/source/app/dialogs.hxx
index e0a2409ad937..108aaa5de062 100644..100755
--- a/basic/source/app/dialogs.hxx
+++ b/basic/source/app/dialogs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,37 +29,25 @@
#ifndef _DIALOGS_HXX
#define _DIALOGS_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
#include <vcl/fixed.hxx>
#include <vcl/tabdlg.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabpage.hxx>
#include <tools/config.hxx>
-#ifndef _TOOLS_LIST_HXX
-#include <tools/list.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/toolbox.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/ctrlbox.hxx>
+#include <vector>
class SbxVariable;
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
class AboutDialog : public ModalDialog {
FixedText a1,a4,aVersionString;
@@ -250,8 +239,7 @@ public:
void Save( Config &aConfig );
};
-
-DECLARE_LIST( StringList, String * )
+typedef ::std::vector< String* > StringList;
#define C_KEY_ALLE CByteString("All")
#define C_KEY_AKTUELL CByteString("Current")
#define C_KEY_TYPE CByteString("Type")
@@ -284,7 +272,7 @@ class GenericOptions : public TabPage
StringList* GetAllGroups();
void LoadData();
- void ShowSelectPath( const String aType );
+ void ShowSelectPath( const String& rType );
DECL_LINK( LoadGroup, ComboBox* );
DECL_LINK( DelGroup, Button* );
@@ -360,12 +348,11 @@ protected:
DECL_LINK( OKClick, Button * );
-// sal_Bool bCompare = sal_False;
-// String aCompareString;
-
public:
VarEditDialog( Window * pParent, SbxVariable *pPVar );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/makefile.mk b/basic/source/app/makefile.mk
index 07ceed6e5116..e62b11c0beb4 100644..100755
--- a/basic/source/app/makefile.mk
+++ b/basic/source/app/makefile.mk
@@ -38,32 +38,21 @@ LIBTARGET = NO
# --- Common ------------------------------------------------------------
-OBJFILES = \
- $(OBJ)$/ttbasic.obj \
- $(OBJ)$/basicrt.obj \
- $(OBJ)$/processw.obj \
- $(OBJ)$/process.obj \
- $(OBJ)$/brkpnts.obj \
- $(OBJ)$/mybasic.obj \
- $(OBJ)$/status.obj \
- $(OBJ)$/printer.obj \
- $(OBJ)$/appwin.obj \
- $(OBJ)$/appedit.obj \
- $(OBJ)$/appbased.obj \
- $(OBJ)$/apperror.obj \
- $(OBJ)$/textedit.obj \
- $(OBJ)$/msgedit.obj \
- $(OBJ)$/dialogs.obj \
-
EXCEPTIONSFILES = \
- $(OBJ)$/app.obj \
- $(OBJ)$/printer.obj \
- $(OBJ)$/process.obj
-
-.IF "$(GUI)" == "WNT"
-EXCEPTIONSFILES += \
- $(OBJ)$/process.obj
-.ENDIF
+ $(OBJ)$/app.obj \
+ $(OBJ)$/appbased.obj \
+ $(OBJ)$/appedit.obj \
+ $(OBJ)$/apperror.obj \
+ $(OBJ)$/appwin.obj \
+ $(OBJ)$/basicrt.obj \
+ $(OBJ)$/brkpnts.obj \
+ $(OBJ)$/dialogs.obj \
+ $(OBJ)$/msgedit.obj \
+ $(OBJ)$/mybasic.obj \
+ $(OBJ)$/printer.obj \
+ $(OBJ)$/process.obj \
+ $(OBJ)$/status.obj \
+ $(OBJ)$/textedit.obj
SRS1NAME=$(TARGET)
SRC1FILES = \
@@ -76,21 +65,8 @@ SRC1FILES = \
LIB1TARGET=$(LB)$/app.lib
LIB1ARCHIV=$(LB)$/libapp.a
LIB1OBJFILES = \
- $(OBJ)$/basicrt.obj \
+ $(EXCEPTIONSFILES) \
$(OBJ)$/processw.obj \
- $(OBJ)$/process.obj \
- $(OBJ)$/brkpnts.obj \
- $(OBJ)$/app.obj \
- $(OBJ)$/mybasic.obj \
- $(OBJ)$/status.obj \
- $(OBJ)$/printer.obj \
- $(OBJ)$/appwin.obj \
- $(OBJ)$/appedit.obj \
- $(OBJ)$/appbased.obj \
- $(OBJ)$/apperror.obj \
- $(OBJ)$/textedit.obj \
- $(OBJ)$/msgedit.obj \
- $(OBJ)$/dialogs.obj \
$(OBJ)$/sbintern.obj
# --- Targets ------------------------------------------------------------
diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx
index 21febe8b3393..1ebc24d560a0 100644..100755
--- a/basic/source/app/msgedit.cxx
+++ b/basic/source/app/msgedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,18 +38,12 @@ Version 3 Changed Charset from CHARSET_IBMPC to RTL_TEXTENCODING_UTF8
#include <cstdio>
#include <tools/time.hxx>
#include <tools/stream.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SOUND_HXX //autogen
#include <vcl/sound.hxx>
-#endif
#include <tools/fsys.hxx>
#include <svtools/stringtransfer.hxx>
#include <unotools/syslocale.hxx>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include "basic.hrc"
#include "msgedit.hxx"
#include "app.hxx"
@@ -172,7 +167,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg )
case LOG_ASSERTION: AddAssertion( aUILogMsg, LogMsg->aDebugData ); break;
case LOG_ASSERTION_STACK: AddAssertionStack( aUILogMsg, LogMsg->aDebugData ); break;
case LOG_QA_ERROR: AddQAError( aUILogMsg, LogMsg->aDebugData ); break;
- default:DBG_ERROR("Unbekannter Typ in ResultFile. Speichern des ResultFile resultiert in Informationsverlust");
+ default:OSL_FAIL("Unbekannter Typ in ResultFile. Speichern des ResultFile resultiert in Informationsverlust");
}
if ( !bFileLoading )
@@ -217,7 +212,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg )
// restore Original Msg
LogMsg->aDebugData.aMsg = aOriginalMsg;
- printf( ByteString( aPrintMsg, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
+ printf( "%s", ByteString( aPrintMsg, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
}
}
}
@@ -491,7 +486,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("Unknown type in ResultWindow!");
+ default:OSL_FAIL("Unknown type in ResultWindow!");
}
aRet += aEditTree.GetEntryText( pEntry );
return aRet;
@@ -548,10 +543,9 @@ String MsgEdit::GetSelected()
TextSelection MsgEdit::GetSelection() const
{
- sal_uIntPtr nStart=0,nEnd=0;
-
if ( aEditTree.FirstSelected() )
{
+ sal_uIntPtr nStart=0,nEnd=0;
nStart = aEditTree.GetModel()->GetAbsPos(aEditTree.FirstSelected() );
if ( aEditTree.LastSelected() )
nEnd = aEditTree.GetModel()->GetAbsPos(aEditTree.LastSelected() );
@@ -590,7 +584,7 @@ void MsgEdit::ReplaceSelected( const String& rStr )
{
(void) rStr; /* avoid warning about unused parameter */
Sound::Beep();
- DBG_ERROR("Not Implemented");
+ OSL_FAIL("Not Implemented");
}
sal_Bool MsgEdit::IsModified(){ return bModified; }
@@ -614,7 +608,7 @@ void MsgEdit::SetText( const String& rStr )
{
(void) rStr; /* avoid warning about unused parameter */
Sound::Beep();
- DBG_ERROR("Not Implemented");
+ OSL_FAIL("Not Implemented");
}
sal_Bool MsgEdit::HasText() const
@@ -846,7 +840,7 @@ void TTTreeListBox::SelectHdl()
SelectChildren( pHdlEntry, sal_True );
Select( pHdlEntry, sal_True );
-// InitMenu(pApp->GetAppMenu()->GetPopupMenu( RID_APPEDIT )); // So daß Delete richtig ist
+// InitMenu(pApp->GetAppMenu()->GetPopupMenu( RID_APPEDIT )); // so that delete works correct
}
void TTTreeListBox::DeselectHdl()
@@ -922,7 +916,7 @@ TTFeatures TTTreeListBox::GetFeatures( SvLBoxEntry* pEntry )
case LOG_QA_ERROR:
return HasQAError;
default:
- DBG_ERROR("Unknown type in ResultWindow");
+ OSL_FAIL("Unknown type in ResultWindow");
}
return HasNothing;
}
@@ -953,7 +947,7 @@ void TTLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
if ( ( aFeatures & HasError ) == HasError )
aCol = Color( 255, 130, 130 ); // Red
else if ( ( aFeatures & HasWarning ) == HasWarning )
- aCol = Color( 255, 200, 120 ); // Ocker oder so
+ aCol = Color( 255, 200, 120 ); // Ochre or so
else if ( ( aFeatures & HasAssertion ) == HasAssertion )
aCol = Color( 0xd0, 0xd0, 0xff ); // blueish
else
@@ -997,3 +991,4 @@ void TTTreeListBox::InitEntry(SvLBoxEntry* pEntry,
pEntry->ReplaceItem( pStr, nColToHilite );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/msgedit.hxx b/basic/source/app/msgedit.hxx
index c3e4d6413db4..442ff3034c19 100644..100755
--- a/basic/source/app/msgedit.hxx
+++ b/basic/source/app/msgedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
class BasicFrame;
class AppError;
-#define SelectChildren SelectChilds // Sonst wird mir schlecht
+#define SelectChildren SelectChilds
typedef sal_uInt16 TTFeatures; // Bitfield for features of the entries
#define HasNothing TTFeatures(0x00)
@@ -112,3 +113,5 @@ DATA_FUNC_DEF( aEditTree, TTTreeListBox )
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/mybasic.cxx b/basic/source/app/mybasic.cxx
index 791c267cda44..9e2a32fe751f 100644..100755
--- a/basic/source/app/mybasic.cxx
+++ b/basic/source/app/mybasic.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,26 +29,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basic.hxx"
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <basic/sbx.hxx>
// AB-Uno-Test
//#define unotest
#ifdef unotest
-#ifndef _USR_UNO_HXX
#include <usr/uno.hxx>
-#endif
#include <basic/sbuno.hxx>
#include <sbunoobj.hxx>
#endif
#include "sbintern.hxx"
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include <basic/mybasic.hxx>
#include "basic.hrc"
#include "appbased.hxx"
@@ -84,6 +79,7 @@ SbxBase* MyFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCr )
MyBasic::MyBasic() : StarBASIC()
{
nError = 0;
+ CurrentError = 0;
if( !nInst++ )
{
AddFactory( &aFac1 );
@@ -166,7 +162,7 @@ SbTextType MyBasic::GetSymbolType( const String &rSymbol, sal_Bool bWasTTControl
MyBasic::~MyBasic()
{
- aErrors.Clear();
+ Reset();
if( !--nInst )
{
RemoveFactory( &aFac1 );
@@ -177,8 +173,10 @@ MyBasic::~MyBasic()
void MyBasic::Reset()
{
- aErrors.Clear();
+ for ( size_t i = 0, n = aErrors.size(); i < n; ++i ) delete aErrors[ i ];
+ aErrors.clear();
nError = 0;
+ CurrentError = 0;
}
sal_Bool MyBasic::Compile( SbModule* p )
@@ -187,6 +185,36 @@ sal_Bool MyBasic::Compile( SbModule* p )
return StarBASIC::Compile( p );
}
+BasicError* MyBasic::NextError()
+{
+ if ( CurrentError < ( aErrors.size() - 1 ) )
+ {
+ ++CurrentError;
+ return aErrors[ CurrentError ];
+ }
+ return NULL;
+}
+
+BasicError* MyBasic::PrevError()
+{
+ if ( !aErrors.empty() && CurrentError > 0 )
+ {
+ --CurrentError;
+ return aErrors[ CurrentError ];
+ }
+ return NULL;
+}
+
+BasicError* MyBasic::FirstError()
+{
+ if ( !aErrors.empty() )
+ {
+ CurrentError = 0;
+ return aErrors[ CurrentError ];
+ }
+ return NULL;
+}
+
sal_Bool MyBasic::ErrorHdl()
{
AppBasEd* pWin = aBasicApp.pFrame->FindModuleWin( GetActiveModule()->GetName() );
@@ -198,12 +226,13 @@ sal_Bool MyBasic::ErrorHdl()
pWin->ToTop();
if( IsCompilerError() )
{
- aErrors.Insert(
+ aErrors.push_back(
new BasicError
( pWin,
- 0, StarBASIC::GetErrorText(), GetLine(), GetCol1(), GetCol2() ),
- LIST_APPEND );
+ 0, StarBASIC::GetErrorText(), GetLine(), GetCol1(), GetCol2() )
+ );
nError++;
+ CurrentError = aErrors.size() - 1;
return sal_Bool( nError < 20 ); // Cancel after 20 errors
}
else
@@ -302,3 +331,4 @@ void BasicError::Show()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/printer.cxx b/basic/source/app/printer.cxx
index 8e89f5d90c03..675aeed2c7e0 100644..100755
--- a/basic/source/app/printer.cxx
+++ b/basic/source/app/printer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,21 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basic.hxx"
-#ifndef _PRINT_HXX //autogen
#include <vcl/print.hxx>
-#endif
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include <algorithm>
@@ -120,3 +111,4 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame *
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/printer.hxx b/basic/source/app/printer.hxx
index 505835278234..b884a642e76f 100644..100755
--- a/basic/source/app/printer.hxx
+++ b/basic/source/app/printer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,13 +37,13 @@ class BasicPrinter
boost::shared_ptr<Printer> mpPrinter;
boost::shared_ptr<vcl::OldStylePrintAdaptor> mpListener;
- short nLine; // aktuelle Zeile
- short nPage; // aktuelle Seite
- short nLines; // Zeilen pro Seite
- short nYoff; // Zeilenabstand in Points
- String aFile; // Dateiname
+ short nLine; // current row
+ short nPage; // current page
+ short nLines; // lines per page
+ short nYoff; // line spacing in points
+ String aFile; // file name
- void Header(); // Seitenkopf drucken
+ void Header(); // print page header
void StartPage();
public:
BasicPrinter();
@@ -50,3 +51,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/process.cxx b/basic/source/app/process.cxx
index 703f684b38de..02d27e3a7ba6 100644..100755
--- a/basic/source/app/process.cxx
+++ b/basic/source/app/process.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,51 +31,60 @@
#ifdef WNT
-#include <tools/prewin.h>
-#include "winbase.h"
-#include <tools/postwin.h>
+#include <prewin.h>
+#include <postwin.h>
#endif
#include <tools/errcode.hxx>
-#include <vos/process.hxx>
#include <basic/sbxcore.hxx>
#include <tools/string.hxx>
#include <osl/file.hxx>
+#include <osl/process.h>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
-
-//#ifndef _BYTE_STRING_LIST
-//DECLARE_LIST( ByteStringList, ByteString * );
-//#define _BYTE_STRING_LIST
-//#endif
-
#include <basic/process.hxx>
Process::Process()
-: pArgumentList( NULL )
-, pEnvList( NULL )
-, pProcess( NULL )
+: m_nArgumentCount( 0 )
+, m_pArgumentList( NULL )
+, m_nEnvCount( 0 )
+, m_pEnvList( NULL )
+, m_aProcessName()
, bWasGPF( sal_False )
, bHasBeenStarted( sal_False )
+, m_pProcess( NULL )
{
}
+#define FREE_USTRING_LIST( count, list ) \
+ if ( count && list ) \
+ { \
+ for ( unsigned int i = 0; i < count; ++i ) \
+ { \
+ rtl_uString_release( list[i] ); \
+ list[i] = NULL; \
+ } \
+ delete[] list; \
+ } \
+ count = 0; \
+ list = NULL;
+
Process::~Process()
{
-// delete pArgumentList;
-// delete pEnvList;
- delete pProcess;
+ FREE_USTRING_LIST( m_nArgumentCount, m_pArgumentList );
+ FREE_USTRING_LIST( m_nEnvCount, m_pEnvList );
+ if ( m_pProcess )
+ osl_freeProcessHandle( m_pProcess );
}
sal_Bool Process::ImplIsRunning()
{
- if ( pProcess && bHasBeenStarted )
+ if ( m_pProcess && bHasBeenStarted )
{
- vos::OProcess::TProcessInfo aProcessInfo;
- pProcess->getInfo( vos::OProcess::TData_ExitCode, &aProcessInfo );
- if ( !(aProcessInfo.Fields & vos::OProcess::TData_ExitCode) )
+ oslProcessInfo aProcessInfo;
+ aProcessInfo.Size = sizeof(oslProcessInfo);
+ osl_getProcessInfo(m_pProcess, osl_Process_EXITCODE, &aProcessInfo );
+ if ( !(aProcessInfo.Fields & osl_Process_EXITCODE) )
return sal_True;
else
return sal_False;
@@ -85,11 +95,12 @@ sal_Bool Process::ImplIsRunning()
long Process::ImplGetExitCode()
{
- if ( pProcess )
+ if ( m_pProcess )
{
- vos::OProcess::TProcessInfo aProcessInfo;
- pProcess->getInfo( vos::OProcess::TData_ExitCode, &aProcessInfo );
- if ( !(aProcessInfo.Fields & vos::OProcess::TData_ExitCode) )
+ oslProcessInfo aProcessInfo;
+ aProcessInfo.Size = sizeof(oslProcessInfo);
+ osl_getProcessInfo(m_pProcess, osl_Process_EXITCODE, &aProcessInfo );
+ if ( !(aProcessInfo.Fields & osl_Process_EXITCODE) )
SbxBase::SetError( SbxERR_NO_ACTIVE_OBJECT );
return aProcessInfo.Code;
}
@@ -103,13 +114,14 @@ long Process::ImplGetExitCode()
void Process::SetImage( const String &aAppPath, const String &aAppParams, const Environment *pEnv )
{ // Set image file of executable
- if ( pProcess && ImplIsRunning() )
+ if ( m_pProcess && ImplIsRunning() )
SbxBase::SetError( SbxERR_NO_ACTIVE_OBJECT );
else
{
- delete pArgumentList; pArgumentList = NULL;
- delete pEnvList; pEnvList = NULL;
- delete pProcess; pProcess = NULL;
+ FREE_USTRING_LIST( m_nArgumentCount, m_pArgumentList );
+ FREE_USTRING_LIST( m_nEnvCount, m_pEnvList );
+ osl_freeProcessHandle( m_pProcess );
+ m_pProcess = NULL;
xub_StrLen i, nCount = aAppParams.GetQuotedTokenCount( CUniString("\"\"" ), ' ' );
::rtl::OUString *pParamList = new ::rtl::OUString[nCount];
@@ -124,67 +136,65 @@ void Process::SetImage( const String &aAppPath, const String &aAppParams, const
nParamCount++;
}
}
- pArgumentList = new vos::OArgumentList( pParamList, nCount );
-
+ m_nArgumentCount = nParamCount;
+ m_pArgumentList = new rtl_uString*[m_nArgumentCount];
+ for ( i = 0 ; i < m_nArgumentCount ; i++ )
+ {
+ m_pArgumentList[i] = NULL;
+ rtl_uString_assign( &(m_pArgumentList[i]), pParamList[i].pData );
+ }
+ delete [] pParamList;
- ::rtl::OUString *pEnvArray = NULL;
if ( pEnv )
{
- pEnvArray = new ::rtl::OUString[pEnv->size()];
+ m_pEnvList = new rtl_uString*[pEnv->size()];
- xub_StrLen nEnvCount = 0;
+ m_nEnvCount = 0;
Environment::const_iterator aIter = pEnv->begin();
while ( aIter != pEnv->end() )
{
::rtl::OUString aTemp = ::rtl::OUString( (*aIter).first );
- aTemp += ::rtl::OUString::createFromAscii( "=" );
+ aTemp += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "=" ));
aTemp += ::rtl::OUString( (*aIter).second );
- pEnvArray[nEnvCount] = aTemp;
- nEnvCount++;
- aIter++;
+ m_pEnvList[m_nEnvCount] = NULL;
+ rtl_uString_assign( &(m_pEnvList[m_nEnvCount]), aTemp.pData );
+ ++m_nEnvCount;
+ ++aIter;
}
- pEnvList = new vos::OEnvironment( pEnvArray, nEnvCount );
}
::rtl::OUString aNormalizedAppPath;
osl::FileBase::getFileURLFromSystemPath( ::rtl::OUString(aAppPath), aNormalizedAppPath );
- pProcess = new vos::OProcess( aNormalizedAppPath );
+ m_aProcessName = aNormalizedAppPath;;
bHasBeenStarted = sal_False;
- delete [] pParamList;
- delete [] pEnvArray;
}
}
sal_Bool Process::Start()
{ // Start program
sal_Bool bSuccess=sal_False;
- if ( pProcess && !ImplIsRunning() )
+ if ( m_aProcessName.getLength() && !ImplIsRunning() )
{
bWasGPF = sal_False;
#ifdef WNT
-// sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX);
try
{
#endif
- if ( pEnvList )
- {
- bSuccess = pProcess->execute( (vos::OProcess::TProcessOption)
- ( vos::OProcess::TOption_SearchPath
- /*| vos::OProcess::TOption_Detached*/
- /*| vos::OProcess::TOption_Wait*/ ),
- *pArgumentList,
- *pEnvList ) == vos::OProcess::E_None;
- }
- else
- {
- bSuccess = pProcess->execute( (vos::OProcess::TProcessOption)
- ( vos::OProcess::TOption_SearchPath
- /*| vos::OProcess::TOption_Detached*/
- /*| vos::OProcess::TOption_Wait*/ ),
- *pArgumentList ) == vos::OProcess::E_None;
- }
+ bSuccess = osl_executeProcess(
+ m_aProcessName.pData,
+ m_pArgumentList,
+ m_nArgumentCount,
+ osl_Process_SEARCHPATH
+ /*| osl_Process_DETACHED*/
+ /*| osl_Process_WAIT*/,
+ NULL,
+ NULL,
+ m_pEnvList,
+ m_nEnvCount,
+ &m_pProcess ) == osl_Process_E_None;
+
#ifdef WNT
}
catch( ... )
@@ -223,7 +233,8 @@ sal_Bool Process::WasGPF()
sal_Bool Process::Terminate()
{
if ( ImplIsRunning() )
- return pProcess->terminate() == vos::OProcess::E_None;
+ return osl_terminateProcess(m_pProcess) == osl_Process_E_None;
return sal_True;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/processw.cxx b/basic/source/app/processw.cxx
index 0abf5afc0d57..4bf428b6a0ac 100644..100755
--- a/basic/source/app/processw.cxx
+++ b/basic/source/app/processw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,14 +33,9 @@
#include <tools/errcode.hxx>
#include <basic/sbxobj.hxx>
#include <basic/sbx.hxx>
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
-#endif
-//#include <osl/thread.h>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include "processw.hxx"
@@ -204,8 +200,7 @@ void ProcessWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT,
SbxInfo* ProcessWrapper::GetInfo( short nIdx )
{
Methods* p = &pMethods[ nIdx ];
- // Wenn mal eine Hilfedatei zur Verfuegung steht:
- // SbxInfo* pResultInfo = new SbxInfo( Hilfedateiname, p->nHelpId );
+ // In case there is a help file available:
SbxInfo* pResultInfo = new SbxInfo;
short nPar = p->nArgs & _ARGSMASK;
for( short i = 0; i < nPar; i++ )
@@ -280,3 +275,4 @@ SbxObject* ProcessFactory::CreateObject( const String& rClass )
return NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/processw.hxx b/basic/source/app/processw.hxx
index 69f6eb73a793..f5d60b8d783c 100644..100755
--- a/basic/source/app/processw.hxx
+++ b/basic/source/app/processw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define _PROCESSW_HXX
#include <basic/sbxfac.hxx>
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
-#endif
#include <basic/sbxobj.hxx>
#include <basic/process.hxx>
@@ -40,12 +39,12 @@ class ProcessWrapper : public SbxObject
using SbxVariable::GetInfo;
// 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 )
+#if defined ( ICC ) || defined ( C50 ) || defined ( C52 )
public:
#endif
typedef void( ProcessWrapper::*pMeth )
( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite );
-#if defined ( ICC ) || defined ( HPUX )
+#if defined ( ICC )
private:
#endif
@@ -88,3 +87,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/resids.hrc b/basic/source/app/resids.hrc
index 5d3fbb098dde..5d3fbb098dde 100644..100755
--- a/basic/source/app/resids.hrc
+++ b/basic/source/app/resids.hrc
diff --git a/basic/source/app/status.cxx b/basic/source/app/status.cxx
index beb43ec1de18..f545538a84bd 100644..100755
--- a/basic/source/app/status.cxx
+++ b/basic/source/app/status.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,7 +113,7 @@ void StatusLine::LoadTaskToolBox()
Window* pWin = pFrame->FindWin( pWinMenu->GetItemId( nFirstWinPos ) );
if ( pWin )
- pTaskToolBox->UpdateTask( Image(), pWin->GetText(), pWin == pFrame->pList->Last() && !( pFrame->pList->Last()->GetWinState() & TT_WIN_STATE_HIDE ) );
+ pTaskToolBox->UpdateTask( Image(), pWin->GetText(), pWin == pFrame->pList->back() && !( pFrame->pList->back()->GetWinState() & TT_WIN_STATE_HIDE ) );
nFirstWinPos++;
}
@@ -123,3 +124,4 @@ void StatusLine::LoadTaskToolBox()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/status.hxx b/basic/source/app/status.hxx
index fd9ab033009e..7c3b04bed8cc 100644..100755
--- a/basic/source/app/status.hxx
+++ b/basic/source/app/status.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/svtmsg.src b/basic/source/app/svtmsg.src
index 748256bb5564..365f5f3d4ee6 100644..100755
--- a/basic/source/app/svtmsg.src
+++ b/basic/source/app/svtmsg.src
@@ -27,17 +27,17 @@
#include "basic/svtmsg.hrc"
-// Hier sind die Messages aus dem Verzeichnis /basic/source/app enhalten
+// Here are included the messages of the folder /basic/source/app
///////////////////////////////
-// Fehlermeldungen, die in das Resultfile gelangen.
+// Error messages which go to the result file.
// *********************
-// *** !!ACHTUNG!! ***
+// *** !!ATTENTION!! ***
// *********************
-// Die Nummern dürfen sich NIE! ändern,
-// da sie in den Resultfiles gespeichert sind, und bei erneutem Anzeigen
-// statdessen die entsprechenden neuen oder garkeine Strings angzeigt werden.
+// The numbers must NEVER(!) change,
+// because they are saved in the result files and a renewed display
+// would display new strings or no strings.
///////////////////////////////
String S_GPF_ABORT
{
diff --git a/basic/source/app/testbasi.cxx b/basic/source/app/testbasi.cxx
index b63986b63b2d..05818806c8a8 100644..100755
--- a/basic/source/app/testbasi.cxx
+++ b/basic/source/app/testbasi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,3 +30,5 @@
#include "precompiled_basic.hxx"
#define testtool
#include "mybasic.cxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/testtool.idl b/basic/source/app/testtool.idl
index acda657881c7..acda657881c7 100644..100755
--- a/basic/source/app/testtool.idl
+++ b/basic/source/app/testtool.idl
diff --git a/basic/source/app/testtool.src b/basic/source/app/testtool.src
index 090cb735c139..090cb735c139 100644..100755
--- a/basic/source/app/testtool.src
+++ b/basic/source/app/testtool.src
diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx
index 55e91ea879b5..4ffbef7121f8 100644..100755
--- a/basic/source/app/textedit.cxx
+++ b/basic/source/app/textedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <svtools/textview.hxx>
#include <svtools/txtattr.hxx>
#include <basic/sbxmeth.hxx>
-#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
-#endif
#include "basic.hrc"
#include "textedit.hxx"
@@ -199,10 +198,10 @@ void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
return;
SbTextPortion& rLast = aPortionList[nCount-1];
- if ( rLast.nStart > rLast.nEnd ) // Nur bis Bug von MD behoben
+ if ( rLast.nStart > rLast.nEnd ) // Only up to the bug of MD repaired
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ERROR( "MD-Bug nicht beseitigt!" );
+ OSL_FAIL( "MD-Bug is not repaired!" );
#endif
nCount--;
aPortionList.Remove( nCount);
@@ -216,8 +215,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
for ( i = 0; i < aPortionList.Count(); i++ )
{
SbTextPortion& r = aPortionList[i];
-// DBG_ASSERT( r.nStart <= r.nEnd, "Highlight: Start > End?" );
- if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoben
+ if ( r.nStart > r.nEnd ) // Only up to the bug of MD repaired
continue;
SbTextType eType = r.eType;
@@ -247,7 +245,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
}
}
- // Es muessen nur die Blanks und Tabs mit attributiert werden.
+ // Only the blanks and tabs had to be attributed.
// If there are two equal attributes one after another,
// they are optimized by the EditEngine.
xub_StrLen nLastEnd = 0;
@@ -264,8 +262,8 @@ void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
if ( r.nStart > nLastEnd )
{
- // Kann ich mich drauf verlassen, dass alle ausser
- // Blank und Tab gehighlightet wird ?!
+ // can I trust that all of them except
+ // blank und tab will be highlighted?!
r.nStart = nLastEnd;
}
nLastEnd = r.nEnd+1;
@@ -277,8 +275,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
for ( i = 0; i < aPortionList.Count(); i++ )
{
SbTextPortion& r = aPortionList[i];
-// DBG_ASSERT( r.nStart <= r.nEnd, "Highlight: Start > End?" );
- if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoben
+ if ( r.nStart > r.nEnd ) // Only up to the bug of MD repaired
continue;
SbTextType eCol = r.eType;
@@ -327,7 +324,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
default:
{
aColor = Color( RGB_COLORDATA( 0xff, 0x80, 0x80 ) );
- DBG_ERROR( "Unknown syntax color" );
+ OSL_FAIL( "Unknown syntax color" );
}
}
pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1 );
@@ -338,13 +335,11 @@ void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff )
void TextEditImp::DoSyntaxHighlight( sal_uIntPtr nPara )
{
- // Due to delayed syntax highlight it can happend that the
- // paragraph does no longer exist
+ // Due to delayed syntax highlight it can happen that the
+ // paragraph does no longer exist
if ( nPara < pTextEngine->GetParagraphCount() )
{
- // leider weis ich nicht, ob genau diese Zeile Modified() ...
-// if ( pProgress )
-// pProgress->StepProgress();
+ // unfortunatly I don't know if exact this line Modified() ...
pTextEngine->RemoveAttribs( nPara );
String aSource( pTextEngine->GetText( nPara ) );
ImpDoHighlight( aSource, nPara );
@@ -355,8 +350,6 @@ void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara )
{
// Paragraph is added to 'List', processed in TimerHdl.
// => Do not manipulate paragraphs while EditEngine is formatting
-// if ( pProgress )
-// pProgress->StepProgress();
if ( !bHighlightning && bDoSyntaxHighlight )
{
@@ -382,16 +375,6 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
DoSyntaxHighlight( nLine );
aSyntaxLineTable.Remove( nLine );
-/* if ( Application::AnyInput() )
- {
- aSyntaxIdleTimer.Start(); // Starten, falls wir in einem Dialog landen
- pTextView->ShowCursor( sal_True, sal_True );
- pTextEngine->SetUpdateMode( sal_True );
- bHighlightning = sal_False;
- GetpApp()->Reschedule();
- bHighlightning = sal_True;
- pTextEngine->SetUpdateMode( sal_False );
- }*/
}
sal_Bool bWasModified = pTextEngine->IsModified();
@@ -402,25 +385,17 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
}
else
pTextEngine->SetUpdateMode( sal_True ); // ! With VDev
-// pTextView->ForceUpdate();
// SetUpdateMode( sal_True ) soll kein Modify setzen
pTextEngine->SetModified( bWasModified );
// SyntaxTimerHdl wird gerufen, wenn Text-Aenderung
// => gute Gelegenheit, Textbreite zu ermitteln!
-// long nPrevTextWidth = nCurTextWidth;
-// nCurTextWidth = pTextEngine->CalcTextWidth();
-// if ( nCurTextWidth != nPrevTextWidth )
-// SetScrollBarRanges();
bHighlightning = sal_False;
if ( aSyntaxLineTable.First() )
aImplSyntaxIdleTimer.Start();
-// while ( Application::AnyInput() )
-// Application::Reschedule(); // Reschedule, da der UserEvent keine Paints etc. durchlässt
-
return 0;
}
@@ -451,7 +426,6 @@ void TextEditImp::SyntaxHighlight( sal_Bool bNew )
for ( sal_uIntPtr i = 0; i < pTextEngine->GetParagraphCount(); i++ )
pTextEngine->RemoveAttribs( i );
-// pTextEngine->QuickFormatDoc();
pTextEngine->SetUpdateMode( sal_True );
pTextView->ShowCursor(sal_True, sal_True );
}
@@ -482,13 +456,15 @@ void TextEditImp::KeyInput( const KeyEvent& rKeyEvent )
pTextView->GetTextEngine()->SetModified( bWasModified );
}
-void TextEditImp::Paint( const Rectangle& rRect ){ pTextView->Paint( rRect );}
-void TextEditImp::MouseButtonUp( const MouseEvent& rMouseEvent ){ pTextView->MouseButtonUp( rMouseEvent );}
-//void TextEditImp::MouseButtonDown( const MouseEvent& rMouseEvent ){ pTextView->MouseButtonDown( rMouseEvent );}
-//void TextEditImp::MouseMove( const MouseEvent& rMouseEvent ){ pTextView->MouseMove( rMouseEvent );}
-//void TextEditImp::Command( const CommandEvent& rCEvt ){ pTextView->Command( rCEvt );}
-//sal_Bool TextEditImp::Drop( const DropEvent& rEvt ){ return sal_False /*pTextView->Drop( rEvt )*/;}
-//sal_Bool TextEditImp::QueryDrop( DropEvent& rEvt ){ return sal_False /*pTextView->QueryDrop( rEvt )*/;}
+void TextEditImp::Paint( const Rectangle& rRect )
+{
+ pTextView->Paint( rRect );
+}
+
+void TextEditImp::MouseButtonUp( const MouseEvent& rMouseEvent )
+{
+ pTextView->MouseButtonUp( rMouseEvent );
+}
void TextEditImp::Command( const CommandEvent& rCEvt )
@@ -543,7 +519,7 @@ SbxBase* TextEditImp::GetSbxAtMousePos( String &aWord )
Point aDocPos = pTextView->GetDocPos( aPos );
aWord = pTextEngine->GetWord( pTextEngine->GetPaM( aDocPos ) );
- if ( aWord.Len() /*&& !Application::GetAppInternational().IsNumeric( aWord )*/ )
+ if ( aWord.Len() )
{
xub_StrLen nLastChar = aWord.Len()-1;
String aSuffixes = CUniString( cSuffixes );
@@ -864,3 +840,4 @@ void TextEdit::BuildKontextMenu( PopupMenu *&pMenu )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/textedit.hxx b/basic/source/app/textedit.hxx
index 404dc4acb2bd..21044c75e4bf 100644..100755
--- a/basic/source/app/textedit.hxx
+++ b/basic/source/app/textedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,6 @@ class BreakpointWindow;
#include "dataedit.hxx"
-//#include <xtextedt.hxx>
class TextEditImp : public Window, public SfxListener
{
@@ -136,3 +136,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/ttbasic.cxx b/basic/source/app/ttbasic.cxx
index 98ffc1e4c08d..cfc12a85dcc4 100644..100755
--- a/basic/source/app/ttbasic.cxx
+++ b/basic/source/app/ttbasic.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@ MyBasic* TTBasic::CreateMyBasic()
{
return new MyBasic;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/ttbasic.hxx b/basic/source/app/ttbasic.hxx
index 04d74daa1bb7..8810da66b5e9 100644..100755
--- a/basic/source/app/ttbasic.hxx
+++ b/basic/source/app/ttbasic.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,4 @@ public:
static MyBasic* CreateMyBasic();
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/ttmsg.src b/basic/source/app/ttmsg.src
index 076ee83fd879..c2c017b167ca 100644..100755
--- a/basic/source/app/ttmsg.src
+++ b/basic/source/app/ttmsg.src
@@ -27,18 +27,19 @@
#include "basic/ttmsg.hrc"
-// Hier sind die Messages aus dem Verzeichnis /basic/source/testtool enhalten
+// Here are included the messages of the folder /basic/source/testtool
///////////////////////////////
-// Fehlermeldungen, die in das Resultfile gelangen.
+// Error messages which go to the result file.
// *********************
-// *** !!ACHTUNG!! ***
+// *** !!ATTENTION!! ***
// *********************
-// Die Nummern dürfen sich NIE! ändern,
-// da sie in den Resultfiles gespeichert sind, und bei erneutem Anzeigen
-// statdessen die entsprechenden neuen oder garkeine Strings angzeigt werden.
+// The numbers must NEVER(!) change,
+// because they are saved in the result files and a renewed display
+// would display new strings or no strings.
///////////////////////////////
+
String S_NAME_NOT_THERE
{
Text[ en-US ] = "Name doesn't exist: #($Arg1)";