summaryrefslogtreecommitdiff
path: root/basic/source/app/app.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/app/app.cxx')
-rw-r--r--basic/source/app/app.cxx252
1 files changed, 126 insertions, 126 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index fd613a81673f..cd3e1dd0061f 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -94,52 +94,52 @@ IMPL_GEN_RES_STR;
#ifdef DBG_UTIL
// filter Messages generated due to missing configuration Bug:#83887#
-void TestToolDebugMessageFilter( const sal_Char *pString, BOOL bIsOsl )
+void TestToolDebugMessageFilter( const sal_Char *pString, sal_Bool bIsOsl )
{
- static BOOL static_bInsideFilter = FALSE;
+ static sal_Bool static_bInsideFilter = sal_False;
// Ignore messages during filtering to avoid endless recursions
if ( static_bInsideFilter )
return;
- static_bInsideFilter = TRUE;
+ static_bInsideFilter = sal_True;
ByteString aMessage( pString );
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = sal_False;
if ( bIsOsl )
{
// OSL
if ( aMessage.Search( CByteString("Cannot open Configuration: Connector: unknown delegatee com.sun.star.connection.Connector.portal") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
else
{
// DBG
#if ! (OSL_DEBUG_LEVEL > 1)
if ( aMessage.Search( CByteString("SelectAppIconPixmap") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
#endif
if ( aMessage.Search( CByteString("PropertySetRegistry::") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
if ( aMessage.Search( CByteString("property value missing") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
if ( aMessage.Search( CByteString("getDateFormatsImpl") ) != STRING_NOTFOUND
&& aMessage.Search( CByteString("no date formats") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
if ( aMessage.Search( CByteString("ucb::configureUcb(): Bad arguments") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
if ( aMessage.Search( CByteString("CreateInstance with arguments exception") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
if ( aMessage.Search( CByteString("AcquireTree failed") ) != STRING_NOTFOUND )
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
if ( bIgnore )
{
- static_bInsideFilter = FALSE;
+ static_bInsideFilter = sal_False;
return;
}
@@ -164,22 +164,22 @@ void TestToolDebugMessageFilter( const sal_Char *pString, BOOL bIsOsl )
/* DBG_INSTOUTERROR( DBG_OUT_MSGBOX )
DBG_ERROR( pString );
DBG_INSTOUTERROR( DBG_OUT_TESTTOOL )*/
- static_bInsideFilter = FALSE;
+ static_bInsideFilter = sal_False;
}
void SAL_CALL DBG_TestToolDebugMessageFilter( const sal_Char *pString )
{
- TestToolDebugMessageFilter( pString, FALSE );
+ TestToolDebugMessageFilter( pString, sal_False );
}
extern "C" void SAL_CALL osl_TestToolDebugMessageFilter( const sal_Char *pString )
{
if ( !getenv( "DISABLE_SAL_DBGBOX" ) )
- TestToolDebugMessageFilter( pString, TRUE );
+ TestToolDebugMessageFilter( pString, sal_True );
}
#endif
// #94145# Due to a tab in TT_SIGNATURE_FOR_UNICODE_TEXTFILES which is changed to blanks by some editors
// this routine became necessary
-BOOL IsTTSignatureForUnicodeTextfile( String aLine )
+sal_Bool IsTTSignatureForUnicodeTextfile( String aLine )
{
aLine.SearchAndReplace( '\t', ' ' );
String ThreeBlanks = CUniString(" ");
@@ -304,7 +304,7 @@ void BasicApp::Main( )
if ( aDefIniPath.Exists() )
{
aDefIniPath.CopyTo( aIniPath, FSYS_ACTION_COPYFILE );
- FileStat::SetReadOnlyFlag( aIniPath, FALSE );
+ FileStat::SetReadOnlyFlag( aIniPath, sal_False );
}
}
}
@@ -331,7 +331,7 @@ void BasicApp::Main( )
}
// ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt ), )
-//const char* ResMgr::GetLang( LanguageType& nType, USHORT nPrio )
+//const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio )
// ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt )
// ResMgr *pRes = new ResMgr( "testtool.res" );
@@ -406,7 +406,7 @@ void BasicApp::SetFocus()
IMPL_LINK( BasicApp, LateInit, void *, pDummy )
{
(void) pDummy; /* avoid warning about unused parameter */
- USHORT i;
+ sal_uInt16 i;
for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
{
if ( Application::GetCommandLineParam( i ).Copy(0,4).CompareIgnoreCaseToAscii("-run") == COMPARE_EQUAL
@@ -414,7 +414,7 @@ IMPL_LINK( BasicApp, LateInit, void *, pDummy )
|| Application::GetCommandLineParam( i ).Copy(0,4).CompareIgnoreCaseToAscii("/run") == COMPARE_EQUAL
#endif
)
- pFrame->SetAutoRun( TRUE );
+ pFrame->SetAutoRun( sal_True );
else if ( Application::GetCommandLineParam( i ).Copy(0,7).CompareIgnoreCaseToAscii("-result") == COMPARE_EQUAL
#ifndef UNX
|| Application::GetCommandLineParam( i ).Copy(0,7).CompareIgnoreCaseToAscii("/result") == COMPARE_EQUAL
@@ -425,7 +425,7 @@ IMPL_LINK( BasicApp, LateInit, void *, pDummy )
{
if ( ByteString( Application::GetCommandLineParam( i+1 ), osl_getThreadTextEncoding() ).IsNumericAscii() )
{
- MsgEdit::SetMaxLogLen( sal::static_int_cast< USHORT >( Application::GetCommandLineParam( i+1 ).ToInt32() ) );
+ MsgEdit::SetMaxLogLen( sal::static_int_cast< sal_uInt16 >( Application::GetCommandLineParam( i+1 ).ToInt32() ) );
}
i++;
}
@@ -497,7 +497,7 @@ FloatingExecutionStatus::FloatingExecutionStatus( Window * pParent )
void FloatingExecutionStatus::SetStatus( String aW )
{
- Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
ToTop( TOTOP_NOGRABFOCUS );
aAusblend.Start();
aStatus.SetText( aW );
@@ -505,7 +505,7 @@ void FloatingExecutionStatus::SetStatus( String aW )
void FloatingExecutionStatus::SetAdditionalInfo( String aF )
{
- Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
ToTop( TOTOP_NOGRABFOCUS );
aAusblend.Start();
aAdditionalInfo.SetText( aF );
@@ -524,11 +524,11 @@ TYPEINIT1(TTExecutionStatusHint, SfxSimpleHint);
BasicFrame::BasicFrame() : WorkWindow( NULL,
WinBits( WB_APP | WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) )
-, bIsAutoRun( FALSE )
+, bIsAutoRun( sal_False )
, pDisplayHidDlg( NULL )
, pEditVar ( 0 )
-, bAutoReload( FALSE )
-, bAutoSave( TRUE )
+, bAutoReload( sal_False )
+, bAutoSave( sal_True )
, pBasic( NULL )
, pExecutionStatus( NULL )
, pStatus( NULL )
@@ -538,10 +538,10 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
{
Application::SetDefDialogParent( this );
- AlwaysEnableInput( TRUE );
+ AlwaysEnableInput( sal_True );
pBasic = TTBasic::CreateMyBasic(); // depending on what was linked to the executable
- bInBreak = FALSE;
- bDisas = FALSE;
+ bInBreak = sal_False;
+ bDisas = sal_False;
nFlags = 0;
// Icon aAppIcon;
@@ -653,11 +653,11 @@ BasicFrame::BasicFrame() : WorkWindow( NULL,
}
const ByteString ProfilePrefix("_profile_");
-const USHORT ProfilePrefixLen = ProfilePrefix.Len();
+const sal_uInt16 ProfilePrefixLen = ProfilePrefix.Len();
void BasicFrame::LoadIniFile()
{
- USHORT i;
+ sal_uInt16 i;
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
for ( i = 0 ; i < aConf.GetGroupCount() ; i++ )
@@ -777,12 +777,12 @@ IMPL_LINK( BasicFrame, CheckAllFiles, Timer*, pTimer )
return 0;
}
-BOOL BasicFrame::IsAutoRun()
+sal_Bool BasicFrame::IsAutoRun()
{
return bIsAutoRun;
}
-void BasicFrame::SetAutoRun( BOOL bAuto )
+void BasicFrame::SetAutoRun( sal_Bool bAuto )
{
bIsAutoRun = bAuto;
}
@@ -849,7 +849,7 @@ void BasicFrame::Resize()
// Resize possibly maximized window
- ULONG i;
+ sal_uIntPtr i;
for( i = pList->Count(); i > 0 ; i-- )
{
if ( pList->GetObject( i-1 )->GetWinState() == TT_WIN_STATE_MAX )
@@ -877,7 +877,7 @@ IMPL_LINK( BasicFrame, CloseButtonClick, void*, EMPTYARG )
{};
if ( p )
p->GrabFocus();
- return Command( RID_FILECLOSE, FALSE );
+ return Command( RID_FILECLOSE, sal_False );
}
IMPL_LINK( BasicFrame, FloatButtonClick, void*, EMPTYARG )
@@ -906,7 +906,7 @@ void BasicFrame::WinShow_Hide()
return;
AppWin* p;
- BOOL bWasFullscreen = FALSE;
+ sal_Bool bWasFullscreen = sal_False;
for ( p = pList->Last() ; p ; p = pList->Prev() )
{
if ( p->pDataEdit )
@@ -916,7 +916,7 @@ void BasicFrame::WinShow_Hide()
)
p->Hide( SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
else
- p->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ p->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
}
bWasFullscreen |= p->GetWinState() == TT_WIN_STATE_MAX;
}
@@ -926,10 +926,10 @@ void BasicFrame::WinMax_Restore()
{
// The application buttons
AppWin* p;
- BOOL bHasFullscreenWin = FALSE;
+ sal_Bool bHasFullscreenWin = sal_False;
for( p = pList->First(); p && !bHasFullscreenWin ; p = pList->Next() )
bHasFullscreenWin |= ( p->GetWinState() == TT_WIN_STATE_MAX );
- GetMenuBar()->ShowButtons( bHasFullscreenWin, FALSE, FALSE );
+ GetMenuBar()->ShowButtons( bHasFullscreenWin, sal_False, sal_False );
WinShow_Hide();
}
@@ -948,9 +948,9 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
Menu* pMenu = GetMenuBar();
if( pList->Count() == 0 ) {
- pMenu->EnableItem( RID_APPEDIT, FALSE );
- pMenu->EnableItem( RID_APPRUN, FALSE );
- pMenu->EnableItem( RID_APPWINDOW, FALSE );
+ pMenu->EnableItem( RID_APPEDIT, sal_False );
+ pMenu->EnableItem( RID_APPRUN, sal_False );
+ pMenu->EnableItem( RID_APPWINDOW, sal_False );
}
PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW );
@@ -974,20 +974,20 @@ void BasicFrame::AddWindow( AppWin *pWin )
// Enable main menu
MenuBar* pMenu = GetMenuBar();
if( pList->Count() > 0 ) {
- pMenu->EnableItem( RID_APPEDIT, TRUE );
- pMenu->EnableItem( RID_APPRUN, TRUE );
- pMenu->EnableItem( RID_APPWINDOW, TRUE );
+ pMenu->EnableItem( RID_APPEDIT, sal_True );
+ pMenu->EnableItem( RID_APPRUN, sal_True );
+ pMenu->EnableItem( RID_APPWINDOW, sal_True );
}
PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW );
- USHORT nLastID = pWinMenu->GetItemId( pWinMenu->GetItemCount() - 1 );
+ sal_uInt16 nLastID = pWinMenu->GetItemId( pWinMenu->GetItemCount() - 1 );
// Separator necessary
if ( nLastID < RID_WIN_FILE1 && pWinMenu->GetItemType( pWinMenu->GetItemCount() - 1 ) != MENUITEM_SEPARATOR )
pWinMenu->InsertSeparator();
// Find free ID
- USHORT nFreeID = RID_WIN_FILE1;
+ sal_uInt16 nFreeID = RID_WIN_FILE1;
while ( pWinMenu->GetItemPos( nFreeID ) != MENU_ITEM_NOTFOUND && nFreeID < RID_WIN_FILEn )
nFreeID++;
@@ -1013,7 +1013,7 @@ void BasicFrame::FocusWindow( AppWin *pWin )
pWork = pWin;
pList->Remove( pWin );
pList->Insert( pWin, LIST_APPEND );
- pWin->Minimize( FALSE );
+ pWin->Minimize( sal_False );
aAppFile = pWin->GetText();
UpdateTitle();
@@ -1022,14 +1022,14 @@ void BasicFrame::FocusWindow( AppWin *pWin )
pStatus->LoadTaskToolBox();
}
-BOOL BasicFrame::Close()
+sal_Bool BasicFrame::Close()
{
if( bInBreak || Basic().IsRunning() )
if( RET_NO == QueryBox( this, SttResId( IDS_RUNNING ) ).Execute() )
- return FALSE;
+ return sal_False;
StarBASIC::Stop();
- bInBreak = FALSE;
+ bInBreak = sal_False;
if( CloseAll() )
{
aLineNum.Stop();
@@ -1043,30 +1043,30 @@ BOOL BasicFrame::Close()
Application::SetDefDialogParent( NULL );
WorkWindow::Close();
- return TRUE;
- } else return FALSE;
+ return sal_True;
+ } else return sal_False;
}
-BOOL BasicFrame::CloseAll()
+sal_Bool BasicFrame::CloseAll()
{
while ( pList->Count() )
if ( !pList->Last()->Close() )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-BOOL BasicFrame::CompileAll()
+sal_Bool BasicFrame::CompileAll()
{
AppWin* p;
for( p = pList->First(); p; p = pList->Next() )
- if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return FALSE;
- return TRUE;
+ if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return sal_False;
+ return sal_True;
}
// Setup menu
#define MENU2FILENAME( Name ) Name.Copy( Name.SearchAscii(" ") +1).EraseAllChars( '~' )
#define LRUNr( nNr ) CByteString("LRU").Append( ByteString::CreateFromInt32( nNr ) )
-String FILENAME2MENU( USHORT nNr, String aName )
+String FILENAME2MENU( sal_uInt16 nNr, String aName )
{
String aRet;
if ( nNr <= 9 )
@@ -1085,9 +1085,9 @@ void BasicFrame::AddToLRU(String const& aFile)
PopupMenu *pPopup = GetMenuBar()->GetPopupMenu(RID_APPFILE);
aConfig.SetGroup("LRU");
- USHORT nMaxLRU = (USHORT)aConfig.ReadKey("MaxLRU","4").ToInt32();
+ sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32();
DirEntry aFileEntry( aFile );
- USHORT i,nLastMove = nMaxLRU;
+ sal_uInt16 i,nLastMove = nMaxLRU;
for ( i = 1 ; i<nMaxLRU && nLastMove == nMaxLRU ; i++ )
{
@@ -1119,15 +1119,15 @@ void BasicFrame::LoadLRU()
{
Config aConfig(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
PopupMenu *pPopup = GetMenuBar()->GetPopupMenu(RID_APPFILE);
- BOOL bAddSep = TRUE;
+ sal_Bool bAddSep = sal_True;
aConfig.SetGroup("LRU");
- USHORT nMaxLRU = (USHORT)aConfig.ReadKey("MaxLRU","4").ToInt32();
+ sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32();
if ( pPopup )
bAddSep = pPopup->GetItemPos( IDM_FILE_LRU1 ) == MENU_ITEM_NOTFOUND;
- USHORT i;
+ sal_uInt16 i;
for ( i = 1; i <= nMaxLRU && pPopup != NULL; i++)
{
String aFile = UniString( aConfig.ReadKey(LRUNr(i)), RTL_TEXTENCODING_UTF8 );
@@ -1137,7 +1137,7 @@ void BasicFrame::LoadLRU()
if (bAddSep)
{
pPopup->InsertSeparator();
- bAddSep = FALSE;
+ bAddSep = sal_False;
}
if ( pPopup->GetItemPos( IDM_FILE_LRU1 + i-1 ) == MENU_ITEM_NOTFOUND )
@@ -1156,10 +1156,10 @@ void BasicFrame::LoadLRU()
IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
{
- BOOL bNormal = BOOL( !bInBreak );
+ sal_Bool bNormal = sal_Bool( !bInBreak );
pMenu->EnableItem( RID_RUNCOMPILE, bNormal );
- BOOL bHasEdit = BOOL( /*bNormal &&*/ pWork != NULL );
+ sal_Bool bHasEdit = sal_Bool( /*bNormal &&*/ pWork != NULL );
// pMenu->EnableItem( RID_FILENEW, bNormal ); // always possible
// pMenu->EnableItem( RID_FILEOPEN, bNormal );
@@ -1171,16 +1171,16 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
pMenu->EnableItem( RID_FILELOADLIB, bNormal );
pMenu->EnableItem( RID_FILESAVELIB, bHasEdit );
- BOOL bHasErr = BOOL( bNormal && pBasic->GetErrors() != 0 );
- BOOL bNext = bHasErr & bNormal;
- BOOL bPrev = bHasErr & bNormal;
+ sal_Bool bHasErr = sal_Bool( bNormal && pBasic->GetErrors() != 0 );
+ sal_Bool bNext = bHasErr & bNormal;
+ sal_Bool bPrev = bHasErr & bNormal;
if( bHasErr )
{
- ULONG n = pBasic->aErrors.GetCurPos();
+ sal_uIntPtr n = pBasic->aErrors.GetCurPos();
if( n == 0 )
- bPrev = FALSE;
- if( USHORT(n+1) == pBasic->GetErrors() )
- bNext = FALSE;
+ bPrev = sal_False;
+ if( sal_uInt16(n+1) == pBasic->GetErrors() )
+ bNext = sal_False;
}
pMenu->EnableItem( RID_RUNNEXTERR, bNext );
pMenu->EnableItem( RID_RUNPREVERR, bPrev );
@@ -1188,7 +1188,7 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu )
if( pWork )
pWork->InitMenu( pMenu );
- return TRUE;
+ return sal_True;
}
IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu )
@@ -1208,7 +1208,7 @@ IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu )
pMenu->EnableItem( RID_RUNPREVERR );
if( pWork ) pWork->DeInitMenu( pMenu );
*/
- SetAutoRun( FALSE );
+ SetAutoRun( sal_False );
String aString;
pStatus->Message( aString );
return 0L;
@@ -1225,15 +1225,15 @@ IMPL_LINK_INLINE_END( BasicFrame, HighlightMenu, Menu *, pMenu )
IMPL_LINK_INLINE_START( BasicFrame, MenuCommand, Menu *, pMenu )
{
- USHORT nId = pMenu->GetCurItemId();
- BOOL bChecked = pMenu->IsItemChecked( nId );
+ sal_uInt16 nId = pMenu->GetCurItemId();
+ sal_Bool bChecked = pMenu->IsItemChecked( nId );
return Command( nId, bChecked );
}
IMPL_LINK_INLINE_END( BasicFrame, MenuCommand, Menu *, pMenu )
IMPL_LINK_INLINE_START( BasicFrame, Accel, Accelerator*, pAcc )
{
- SetAutoRun( FALSE );
+ SetAutoRun( sal_False );
return Command( pAcc->GetCurItemId() );
}
IMPL_LINK_INLINE_END( BasicFrame, Accel, Accelerator*, pAcc )
@@ -1298,14 +1298,14 @@ AppBasEd* BasicFrame::CreateModuleWin( SbModule* pMod )
return p;
}
-BOOL BasicFrame::LoadFile( String aFilename )
+sal_Bool BasicFrame::LoadFile( String aFilename )
{
- BOOL bIsResult = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("RES") == COMPARE_EQUAL;
- BOOL bIsBasic = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("BAS") == COMPARE_EQUAL;
+ sal_Bool bIsResult = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("RES") == COMPARE_EQUAL;
+ sal_Bool bIsBasic = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("BAS") == COMPARE_EQUAL;
bIsBasic |= DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("INC") == COMPARE_EQUAL;
AppWin* p;
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if ( bIsResult )
{
p = new AppError( this, aFilename );
@@ -1332,7 +1332,7 @@ BOOL BasicFrame::LoadFile( String aFilename )
}
// Execute command
-long BasicFrame::Command( short nID, BOOL bChecked )
+long BasicFrame::Command( short nID, sal_Bool bChecked )
{
BasicError* pErr;
@@ -1346,7 +1346,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
case RID_FILEOPEN:
{
String s;
- if( QueryFileName( s, FT_BASIC_SOURCE | FT_RESULT_FILE, FALSE ) ) {
+ if( QueryFileName( s, FT_BASIC_SOURCE | FT_RESULT_FILE, sal_False ) ) {
AddToLRU( s );
LoadFile( s );
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
@@ -1387,7 +1387,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
{
SbModule *pModule = ((AppBasEd*)pWork)->GetModule();
#if OSL_DEBUG_LEVEL > 1
- USHORT x;
+ sal_uInt16 x;
x = pWork->GetLineNr();
x = ((AppBasEd*)pWork)->GetModule()->GetBPCount();
if ( !x )
@@ -1395,7 +1395,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
x = pModule->GetBPCount();
#endif
- for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
+ for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
{
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
@@ -1417,7 +1417,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
else
{
AppWin *w = NULL;
- for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : FALSE ; w = pList->Prev() ) ;
+ for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : sal_False ; w = pList->Prev() ) ;
if ( w )
{
p = ((AppBasEd*)w);
@@ -1430,7 +1430,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
if( bInBreak )
// Reset the flag
- bInBreak = FALSE;
+ bInBreak = sal_False;
else
{
if( IsAutoSave() && !SaveAll() ) break;
@@ -1439,12 +1439,12 @@ long BasicFrame::Command( short nID, BOOL bChecked )
pStatus->Message( aString );
if( p )
{
- BasicDLL::SetDebugMode( TRUE );
+ BasicDLL::SetDebugMode( sal_True );
Basic().ClearGlobalVars();
p->Run();
- BasicDLL::SetDebugMode( FALSE );
+ BasicDLL::SetDebugMode( sal_False );
// If cancelled during Interactive=FALSE
-// BasicDLL::EnableBreak( TRUE );
+// BasicDLL::EnableBreak( sal_True );
}
}}
}
@@ -1459,7 +1459,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
}
break;
case RID_RUNDISAS:
- bDisas = BOOL( !bChecked );
+ bDisas = sal_Bool( !bChecked );
break;
case RID_RUNBREAK:
if ( Basic().IsRunning() && !bInBreak )
@@ -1470,7 +1470,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
break;
case RID_RUNSTOP:
Basic().Stop();
- bInBreak = FALSE;
+ bInBreak = sal_False;
break;
case RID_RUNNEXTERR:
pErr = pBasic->aErrors.Next();
@@ -1494,7 +1494,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
case RID_WINTILE:
{
WindowArrange aArange;
- for ( ULONG i = 0 ; i < pList->Count() ; i++ )
+ for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
{
aArange.AddWindow( pList->GetObject( i ) );
pList->GetObject( i )->Restore();
@@ -1518,7 +1518,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
case RID_WINTILEHORZ:
{
WindowArrange aArange;
- for ( ULONG i = 0 ; i < pList->Count() ; i++ )
+ for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
{
aArange.AddWindow( pList->GetObject( i ) );
pList->GetObject( i )->Restore();
@@ -1546,7 +1546,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
//#define WINDOWARRANGE_CASCADE 4
{
WindowArrange aArange;
- for ( ULONG i = 0 ; i < pList->Count() ; i++ )
+ for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ )
{
aArange.AddWindow( pList->GetObject( i ) );
pList->GetObject( i )->Restore();
@@ -1569,7 +1569,7 @@ long BasicFrame::Command( short nID, BOOL bChecked )
break;
case RID_WINCASCADE:
{
- for ( USHORT i = 0 ; i < pList->Count() ; i++ )
+ for ( sal_uInt16 i = 0 ; i < pList->Count() ; i++ )
{
pList->GetObject( i )->Cascade( i );
}
@@ -1631,22 +1631,22 @@ long BasicFrame::Command( short nID, BOOL bChecked )
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPEDIT )); // So daß Delete richtig ist
}
}
- return TRUE;
+ return sal_True;
}
-BOOL BasicFrame::SaveAll()
+sal_Bool BasicFrame::SaveAll()
{
AppWin* p, *q = pWork;
for( p = pList->First(); p; p = pList->Next() )
{
- USHORT nRes = p->QuerySave( QUERY_DISK_CHANGED );
+ 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 ) )
- return FALSE;
+ return sal_False;
}
if ( q )
q->ToTop();
- return TRUE;
+ return sal_True;
}
IMPL_LINK( BasicFrame, ModuleWinExists, String*, pFilename )
@@ -1687,7 +1687,7 @@ AppWin* BasicFrame::FindWin( const String& rName )
return NULL;
}
-AppWin* BasicFrame::FindWin( USHORT nWinId )
+AppWin* BasicFrame::FindWin( sal_uInt16 nWinId )
{
AppWin* p;
for( p = pList->First(); p; p = pList->Next() )
@@ -1714,10 +1714,10 @@ IMPL_LINK( BasicFrame, WriteString, String*, pString )
if ( pList->Last() )
{
pList->Last()->pDataEdit->ReplaceSelected( *pString );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
class NewFileDialog : public FileDialog
@@ -1740,7 +1740,7 @@ void NewFileDialog::FilterSelect()
return; // User decides after he has changed the path
String aCurFilter = GetCurFilter();
- USHORT nFilterNr = 0;
+ sal_uInt16 nFilterNr = 0;
while ( nFilterNr < GetFilterCount() && aCurFilter != GetFilterName( nFilterNr ) )
{
nFilterNr++;
@@ -1759,7 +1759,7 @@ void NewFileDialog::FilterSelect()
short NewFileDialog::Execute()
{
- BOOL bRet = (BOOL)FileDialog::Execute();
+ sal_Bool bRet = (sal_Bool)FileDialog::Execute();
if ( bRet )
{
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
@@ -1772,8 +1772,8 @@ short NewFileDialog::Execute()
return bRet;
}
-BOOL BasicFrame::QueryFileName
- (String& rName, FileType nFileType, BOOL bSave )
+sal_Bool BasicFrame::QueryFileName
+ (String& rName, FileType nFileType, sal_Bool bSave )
{
NewFileDialog aDlg( this, bSave ? WinBits( WB_SAVEAS ) :
WinBits( WB_OPEN ) );
@@ -1826,21 +1826,21 @@ BOOL BasicFrame::QueryFileName
if ( rExtension == aDlg.GetFilterName( i ) )
rExtension = aDlg.GetFilterType( i );
*/
- return TRUE;
- } else return FALSE;
+ return sal_True;
+ } else return sal_False;
}
-USHORT BasicFrame::BreakHandler()
+sal_uInt16 BasicFrame::BreakHandler()
{
- bInBreak = TRUE;
+ bInBreak = sal_True;
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
// MenuBar aBar( ResId( RID_APPMENUBAR ) );
-// aBar.EnableItem( RID_APPEDIT, FALSE );
+// aBar.EnableItem( RID_APPEDIT, sal_False );
SetAppMode( String( SttResId ( IDS_APPMODE_BREAK ) ) );
while( bInBreak )
GetpApp()->Yield();
SetAppMode( String( SttResId ( IDS_APPMODE_RUN ) ) );
-// aBar.EnableItem( RID_APPEDIT, TRUE );
+// aBar.EnableItem( RID_APPEDIT, sal_True );
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
return nFlags;
}
@@ -1848,7 +1848,7 @@ USHORT BasicFrame::BreakHandler()
void BasicFrame::LoadLibrary()
{
String s;
- if( QueryFileName( s, FT_BASIC_LIBRARY, FALSE ) )
+ if( QueryFileName( s, FT_BASIC_LIBRARY, sal_False ) )
{
CloseAll();
SvFileStream aStrm( s, STREAM_STD_READ );
@@ -1858,7 +1858,7 @@ void BasicFrame::LoadLibrary()
pBasic = pNew;
// Show all contents if existing
SbxArray* pMods = pBasic->GetModules();
- for( USHORT i = 0; i < pMods->Count(); i++ )
+ for( sal_uInt16 i = 0; i < pMods->Count(); i++ )
{
SbModule* pMod = (SbModule*) pMods->Get( i );
AppWin* p = new AppBasEd( this, pMod );
@@ -1876,7 +1876,7 @@ void BasicFrame::LoadLibrary()
void BasicFrame::SaveLibrary()
{
String s;
- if( QueryFileName( s, FT_BASIC_LIBRARY, TRUE ) )
+ if( QueryFileName( s, FT_BASIC_LIBRARY, sal_True ) )
{
SvFileStream aStrm( s, STREAM_STD_WRITE );
if( !Basic().Store( aStrm ) )
@@ -1890,8 +1890,8 @@ String BasicFrame::GenRealString( const String &aResString )
String aType,aValue,aResult(aResString);
String aString;
xub_StrLen nInsertPos = 0;
- BOOL bFound;
- bFound = FALSE;
+ sal_Bool bFound;
+ bFound = sal_False;
while ( (nStart = aResult.Search(StartKenn,nStartPos)) != STRING_NOTFOUND &&
(nGleich = aResult.SearchAscii("=",nStart+StartKenn.Len())) != STRING_NOTFOUND &&
@@ -1911,7 +1911,7 @@ String BasicFrame::GenRealString( const String &aResString )
aString.Erase();
}
// if ( Resource::GetResManager()->IsAvailable( ResId( aValue ) ) )
- aString = String( SttResId( (USHORT)(aValue.ToInt32()) ) );
+ aString = String( SttResId( (sal_uInt16)(aValue.ToInt32()) ) );
// else
{
// DBG_ERROR( "Could not load resource!" );
@@ -1920,12 +1920,12 @@ String BasicFrame::GenRealString( const String &aResString )
nInsertPos = nStart;
nStartPos = nStart;
aResult.Erase( nStart, nEnd-nStart+1 );
- bFound = TRUE;
+ bFound = sal_True;
}
else if ( aType.Search(BaseArgKenn) == 0 ) // Starts with BaseArgKenn
{
// TODO: What the hell is that for??
- USHORT nArgNr = USHORT( aType.Copy( BaseArgKenn.Len() ).ToInt32() );
+ sal_uInt16 nArgNr = sal_uInt16( aType.Copy( BaseArgKenn.Len() ).ToInt32() );
DBG_ASSERT( aString.Search( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")") ) != STRING_NOTFOUND, "Extra Argument given in String");
aString.SearchAndReplace( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")"), aValue );
nStartPos = nStart;