summaryrefslogtreecommitdiff
path: root/basctl/source/basicide
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r--basctl/source/basicide/basdoc.cxx4
-rw-r--r--basctl/source/basicide/basdoc.hxx4
-rw-r--r--basctl/source/basicide/basicbox.cxx58
-rw-r--r--basctl/source/basicide/basicbox.hxx12
-rw-r--r--basctl/source/basicide/basicmod.hxx2
-rw-r--r--basctl/source/basicide/baside2.cxx266
-rw-r--r--basctl/source/basicide/baside2.hxx114
-rw-r--r--basctl/source/basicide/baside2b.cxx268
-rw-r--r--basctl/source/basicide/baside3.cxx64
-rw-r--r--basctl/source/basicide/basides1.cxx154
-rw-r--r--basctl/source/basicide/basides2.cxx40
-rw-r--r--basctl/source/basicide/basides3.cxx14
-rw-r--r--basctl/source/basicide/basidesh.cxx136
-rw-r--r--basctl/source/basicide/basobj2.cxx50
-rw-r--r--basctl/source/basicide/basobj3.cxx36
-rw-r--r--basctl/source/basicide/bastype2.cxx38
-rw-r--r--basctl/source/basicide/bastype2.hxx10
-rw-r--r--basctl/source/basicide/bastype3.cxx16
-rw-r--r--basctl/source/basicide/bastype4.hxx14
-rw-r--r--basctl/source/basicide/bastypes.cxx128
-rw-r--r--basctl/source/basicide/brkdlg.cxx34
-rw-r--r--basctl/source/basicide/iderdll.cxx6
-rw-r--r--basctl/source/basicide/iderdll2.hxx14
-rw-r--r--basctl/source/basicide/localizationmgr.cxx16
-rw-r--r--basctl/source/basicide/macrodlg.cxx86
-rw-r--r--basctl/source/basicide/macrodlg.hxx14
-rw-r--r--basctl/source/basicide/moduldl2.cxx126
-rw-r--r--basctl/source/basicide/moduldlg.cxx96
-rw-r--r--basctl/source/basicide/moduldlg.hxx54
-rw-r--r--basctl/source/basicide/objdlg.cxx10
-rw-r--r--basctl/source/basicide/objdlg.hxx2
-rw-r--r--basctl/source/basicide/scriptdocument.cxx16
-rw-r--r--basctl/source/basicide/tbxctl.cxx14
-rw-r--r--basctl/source/basicide/tbxctl.hxx10
-rw-r--r--basctl/source/basicide/unomodel.hxx2
35 files changed, 964 insertions, 964 deletions
diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx
index 7b91d7c3a7d8..a999e1dbd7d3 100644
--- a/basctl/source/basicide/basdoc.cxx
+++ b/basctl/source/basicide/basdoc.cxx
@@ -71,7 +71,7 @@ __EXPORT BasicDocShell::~BasicDocShell()
delete pPrinter;
}
-SfxPrinter* BasicDocShell::GetPrinter( BOOL bCreate )
+SfxPrinter* BasicDocShell::GetPrinter( sal_Bool bCreate )
{
if ( !pPrinter && bCreate )
pPrinter = new SfxPrinter( new SfxItemSet( GetPool(), SID_PRINTER_NOTFOUND_WARN , SID_PRINTER_NOTFOUND_WARN ) );
@@ -94,6 +94,6 @@ void BasicDocShell::FillClass( SvGlobalName*, sal_uInt32*, String*, String*, Str
DBG_ASSERT( bTemplate == sal_False, "No template for Basic" );
}
-void BasicDocShell::Draw( OutputDevice *, const JobSetup &, USHORT )
+void BasicDocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16 )
{}
diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx
index a2ec0917ceb5..2e5c1d21c456 100644
--- a/basctl/source/basicide/basdoc.hxx
+++ b/basctl/source/basicide/basdoc.hxx
@@ -40,7 +40,7 @@ class BasicDocShell: public SfxObjectShell
protected:
virtual void Draw( OutputDevice *, const JobSetup & rSetup,
- USHORT nAspect = ASPECT_CONTENT );
+ sal_uInt16 nAspect = ASPECT_CONTENT );
virtual void FillClass( SvGlobalName * pClassName,
sal_uInt32 * pFormat,
String * pAppName,
@@ -58,7 +58,7 @@ public:
BasicDocShell();
~BasicDocShell();
- SfxPrinter* GetPrinter( BOOL bCreate );
+ SfxPrinter* GetPrinter( sal_Bool bCreate );
void SetPrinter( SfxPrinter* pPrinter );
};
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 4ab42fbe97a7..3d0ac3a544da 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -56,7 +56,7 @@ using namespace ::com::sun::star::uno;
SFX_IMPL_TOOLBOX_CONTROL( LibBoxControl, SfxStringItem );
-LibBoxControl::LibBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx )
+LibBoxControl::LibBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
: SfxToolBoxControl( nSlotId, nId, rTbx )
{
}
@@ -69,7 +69,7 @@ LibBoxControl::~LibBoxControl()
-void LibBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState )
+void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
{
BasicLibBox* pBox = (BasicLibBox*) GetToolBox().GetItemWindow( GetId() );
@@ -167,12 +167,12 @@ BasicLibBox::BasicLibBox( Window* pParent, const uno::Reference< frame::XFrame >
m_xFrame( rFrame )
{
FillBox();
- bIgnoreSelect = TRUE; // Select von 0 noch nicht weiterleiten
- bFillBox = TRUE;
+ bIgnoreSelect = sal_True; // Select von 0 noch nicht weiterleiten
+ bFillBox = sal_True;
SelectEntryPos( 0 );
aCurText = GetEntry( 0 );
SetSizePixel( Size( 250, 200 ) );
- bIgnoreSelect = FALSE;
+ bIgnoreSelect = sal_False;
}
@@ -216,8 +216,8 @@ void __EXPORT BasicLibBox::ReleaseFocus()
void BasicLibBox::FillBox()
{
- SetUpdateMode( FALSE );
- bIgnoreSelect = TRUE;
+ SetUpdateMode( sal_False );
+ bIgnoreSelect = sal_True;
aCurText = GetSelectEntry();
@@ -225,7 +225,7 @@ void BasicLibBox::FillBox()
ClearBox();
// create list box entries
- USHORT nPos = InsertEntry( String( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND );
+ sal_uInt16 nPos = InsertEntry( String( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND );
SetEntryData( nPos, new BasicLibEntry( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_UNKNOWN, String() ) );
InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_USER );
InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_SHARE );
@@ -239,7 +239,7 @@ void BasicLibBox::FillBox()
InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT );
}
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
SelectEntry( aCurText );
if ( !GetSelectEntryCount() )
@@ -247,7 +247,7 @@ void BasicLibBox::FillBox()
SelectEntryPos( GetEntryCount() ); // gibst es nicht => leer?
aCurText = GetSelectEntry();
}
- bIgnoreSelect = FALSE;
+ bIgnoreSelect = sal_False;
}
void BasicLibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLocation )
@@ -264,7 +264,7 @@ void BasicLibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocatio
{
String aName( rDocument.getTitle( eLocation ) );
String aEntryText( CreateMgrAndLibStr( aName, aLibName ) );
- USHORT nPos = InsertEntry( aEntryText, LISTBOX_APPEND );
+ sal_uInt16 nPos = InsertEntry( aEntryText, LISTBOX_APPEND );
SetEntryData( nPos, new BasicLibEntry( rDocument, eLocation, aLibName ) );
}
}
@@ -276,7 +276,7 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt )
if( rNEvt.GetType() == EVENT_KEYINPUT )
{
KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
- USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode();
switch( nKeyCode )
{
case KEY_RETURN:
@@ -300,15 +300,15 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt )
if ( bFillBox )
{
FillBox();
- bFillBox = FALSE;
+ bFillBox = sal_False;
}
}
else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( !HasChildPathFocus( TRUE ) )
+ if ( !HasChildPathFocus( sal_True ) )
{
- bIgnoreSelect = TRUE;
- bFillBox = TRUE;
+ bIgnoreSelect = sal_True;
+ bFillBox = sal_True;
}
}
@@ -328,7 +328,7 @@ void __EXPORT BasicLibBox::Select()
void BasicLibBox::NotifyIDE()
{
- USHORT nSelPos = GetSelectEntryPos();
+ sal_uInt16 nSelPos = GetSelectEntryPos();
BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( nSelPos );
if ( pEntry )
{
@@ -350,8 +350,8 @@ void BasicLibBox::NotifyIDE()
void BasicLibBox::ClearBox()
{
- USHORT nCount = GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( i );
delete pEntry;
@@ -363,7 +363,7 @@ void BasicLibBox::ClearBox()
SFX_IMPL_TOOLBOX_CONTROL( LanguageBoxControl, SfxStringItem );
-LanguageBoxControl::LanguageBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx )
+LanguageBoxControl::LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
: SfxToolBoxControl( nSlotId, nId, rTbx )
{
}
@@ -372,7 +372,7 @@ LanguageBoxControl::~LanguageBoxControl()
{
}
-void LanguageBoxControl::StateChanged( USHORT _nID, SfxItemState _eState, const SfxPoolItem* _pItem )
+void LanguageBoxControl::StateChanged( sal_uInt16 _nID, SfxItemState _eState, const SfxPoolItem* _pItem )
{
(void)_nID;
@@ -422,7 +422,7 @@ BasicLanguageBox::~BasicLanguageBox()
void BasicLanguageBox::FillBox()
{
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
m_bIgnoreSelect = true;
m_sCurrentText = GetSelectEntry();
ClearBox();
@@ -436,8 +436,8 @@ void BasicLanguageBox::FillBox()
Locale aCurrentLocale = pCurMgr->getStringResourceManager()->getCurrentLocale();
Sequence< Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales();
const Locale* pLocale = aLocaleSeq.getConstArray();
- INT32 i, nCount = aLocaleSeq.getLength();
- USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 i, nCount = aLocaleSeq.getLength();
+ sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
for ( i = 0; i < nCount; ++i )
{
bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
@@ -449,7 +449,7 @@ void BasicLanguageBox::FillBox()
sLanguage += ' ';
sLanguage += m_sDefaultLanguageStr;
}
- USHORT nPos = InsertEntry( sLanguage );
+ sal_uInt16 nPos = InsertEntry( sLanguage );
SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) );
if ( bIsCurrent )
@@ -469,14 +469,14 @@ void BasicLanguageBox::FillBox()
Disable();
}
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
m_bIgnoreSelect = false;
}
void BasicLanguageBox::ClearBox()
{
- USHORT nCount = GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
LanguageEntry* pEntry = (LanguageEntry*)GetEntryData(i);
delete pEntry;
@@ -504,7 +504,7 @@ long BasicLanguageBox::PreNotify( NotifyEvent& rNEvt )
long nDone = 0;
if( rNEvt.GetType() == EVENT_KEYINPUT )
{
- USHORT nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+ sal_uInt16 nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
switch( nKeyCode )
{
case KEY_RETURN:
diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx
index 3a8d26581350..a2b4d92a56a8 100644
--- a/basctl/source/basicide/basicbox.hxx
+++ b/basctl/source/basicide/basicbox.hxx
@@ -40,10 +40,10 @@ class LibBoxControl: public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- LibBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ LibBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~LibBoxControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual Window* CreateItemWindow( Window *pParent );
};
@@ -83,8 +83,8 @@ class BasicLibBox : public DocListenerBox
{
private:
String aCurText;
- BOOL bIgnoreSelect;
- BOOL bFillBox;
+ sal_Bool bIgnoreSelect;
+ sal_Bool bFillBox;
com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
void ReleaseFocus();
@@ -114,10 +114,10 @@ class LanguageBoxControl: public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- LanguageBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~LanguageBoxControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual Window* CreateItemWindow( Window *pParent );
};
diff --git a/basctl/source/basicide/basicmod.hxx b/basctl/source/basicide/basicmod.hxx
index 374b933c4ea6..def43295a336 100644
--- a/basctl/source/basicide/basicmod.hxx
+++ b/basctl/source/basicide/basicmod.hxx
@@ -36,7 +36,7 @@ class BasicIDEModule : public SfxModule
{
public:
BasicIDEModule( ResMgr *pMgr, SfxObjectFactory *pObjFact) :
- SfxModule( pMgr, FALSE, pObjFact, NULL )
+ SfxModule( pMgr, sal_False, pObjFact, NULL )
{}
};
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d0a8ca1a6ddb..84a3c7b6b04c 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -108,7 +108,7 @@ DBG_NAME( ModulWindow )
TYPEINIT1( ModulWindow , IDEBaseWindow );
-void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle, bool bOutput )
+void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle, bool bOutput )
{
short nLeftMargin = LMARGPRN;
Size aSz = pPrinter->GetOutputSize();
@@ -173,8 +173,8 @@ void lcl_ConvertTabsToSpaces( String& rLine )
{
if ( rLine.Len() )
{
- USHORT nPos = 0;
- USHORT nMax = rLine.Len();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rLine.Len();
while ( nPos < nMax )
{
if ( rLine.GetChar( nPos ) == '\t' )
@@ -284,13 +284,13 @@ void ModulWindow::CheckCompileBasic()
if ( XModule().Is() )
{
// Zur Laufzeit wird niemals compiliert!
- BOOL bRunning = StarBASIC::IsRunning();
- BOOL bModified = ( !xModule->IsCompiled() ||
+ sal_Bool bRunning = StarBASIC::IsRunning();
+ sal_Bool bModified = ( !xModule->IsCompiled() ||
( GetEditEngine() && GetEditEngine()->IsModified() ) );
if ( !bRunning && bModified )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
pIDEShell->GetViewFrame()->GetWindow().EnterWait();
@@ -298,14 +298,14 @@ void ModulWindow::CheckCompileBasic()
if( bModified )
{
AssertValidEditEngine();
- GetEditorWindow().SetSourceInBasic( FALSE );
+ GetEditorWindow().SetSourceInBasic( sal_False );
}
- BOOL bWasModified = GetBasic()->IsModified();
+ sal_Bool bWasModified = GetBasic()->IsModified();
bDone = GetBasic()->Compile( xModule );
if ( !bWasModified )
- GetBasic()->SetModified( FALSE );
+ GetBasic()->SetModified( sal_False );
if ( bDone )
{
@@ -315,12 +315,12 @@ void ModulWindow::CheckCompileBasic()
pIDEShell->GetViewFrame()->GetWindow().LeaveWait();
aStatus.bError = !bDone;
- aStatus.bIsRunning = FALSE;
+ aStatus.bIsRunning = sal_False;
}
}
}
-BOOL ModulWindow::BasicExecute()
+sal_Bool ModulWindow::BasicExecute()
{
DBG_CHKTHIS( ModulWindow, 0 );
@@ -331,7 +331,7 @@ BOOL ModulWindow::BasicExecute()
if ( !aDocument.allowMacros() )
{
WarningBox( this, WB_OK, String( IDEResId( RID_STR_CANNOTRUNMACRO ) ) ).Execute();
- return FALSE;
+ return sal_False;
}
}
@@ -346,13 +346,13 @@ BOOL ModulWindow::BasicExecute()
{
DBG_ASSERT( xModule.Is(), "Kein Modul!" );
AddStatus( BASWIN_RUNNINGBASIC );
- USHORT nStart, nEnd, nCurMethodStart = 0;
+ sal_uInt16 nStart, nEnd, nCurMethodStart = 0;
TextSelection aSel = GetEditView()->GetSelection();
if ( aDocument.isInVBAMode() )
nCurMethodStart = ( aSel.GetStart().GetPara() + 1 );
SbMethod* pMethod = 0;
// erstes Macro, sonst blind "Main" (ExtSearch?)
- for ( USHORT nMacro = 0; nMacro < xModule->GetMethods()->Count(); nMacro++ )
+ for ( sal_uInt16 nMacro = 0; nMacro < xModule->GetMethods()->Count(); nMacro++ )
{
SbMethod* pM = (SbMethod*)xModule->GetMethods()->Get( nMacro );
DBG_ASSERT( pM, "Method?" );
@@ -374,75 +374,75 @@ BOOL ModulWindow::BasicExecute()
if ( !pMethod )
{
if ( aDocument.isInVBAMode() )
- return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), FALSE, rtl::OUString() ).getLength() > 0 ) ? TRUE : FALSE;
+ return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, rtl::OUString() ).getLength() > 0 ) ? sal_True : sal_False;
else
pMethod = (SbMethod*)xModule->Find( String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) ), SbxCLASS_METHOD );
}
if ( pMethod )
{
pMethod->SetDebugFlags( aStatus.nBasicFlags );
- BasicDLL::SetDebugMode( TRUE );
+ BasicDLL::SetDebugMode( sal_True );
BasicIDE::RunMethod( pMethod );
- BasicDLL::SetDebugMode( FALSE );
- // Falls waehrend Interactive=FALSE abgebrochen
- BasicDLL::EnableBreak( TRUE );
+ BasicDLL::SetDebugMode( sal_False );
+ // Falls waehrend Interactive=sal_False abgebrochen
+ BasicDLL::EnableBreak( sal_True );
}
ClearStatus( BASWIN_RUNNINGBASIC );
}
else
- aStatus.bIsRunning = FALSE; // Abbruch von Reschedule()
+ aStatus.bIsRunning = sal_False; // Abbruch von Reschedule()
}
- BOOL bDone = !aStatus.bError;
+ sal_Bool bDone = !aStatus.bError;
return bDone;
}
-BOOL ModulWindow::CompileBasic()
+sal_Bool ModulWindow::CompileBasic()
{
DBG_CHKTHIS( ModulWindow, 0 );
CheckCompileBasic();
- BOOL bIsCompiled = FALSE;
+ sal_Bool bIsCompiled = sal_False;
if ( XModule().Is() )
bIsCompiled = xModule->IsCompiled();
return bIsCompiled;
}
-BOOL ModulWindow::BasicRun()
+sal_Bool ModulWindow::BasicRun()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = 0;
- BOOL bDone = BasicExecute();
+ sal_Bool bDone = BasicExecute();
return bDone;
}
-BOOL ModulWindow::BasicStepOver()
+sal_Bool ModulWindow::BasicStepOver()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER;
- BOOL bDone = BasicExecute();
+ sal_Bool bDone = BasicExecute();
return bDone;
}
-BOOL ModulWindow::BasicStepInto()
+sal_Bool ModulWindow::BasicStepInto()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPINTO;
- BOOL bDone = BasicExecute();
+ sal_Bool bDone = BasicExecute();
return bDone;
}
-BOOL ModulWindow::BasicStepOut()
+sal_Bool ModulWindow::BasicStepOut()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPOUT;
- BOOL bDone = BasicExecute();
+ sal_Bool bDone = BasicExecute();
return bDone;
}
@@ -453,13 +453,13 @@ void ModulWindow::BasicStop()
DBG_CHKTHIS( ModulWindow, 0 );
GetBasic()->Stop();
- aStatus.bIsRunning = FALSE;
+ aStatus.bIsRunning = sal_False;
}
-BOOL ModulWindow::LoadBasic()
+sal_Bool ModulWindow::LoadBasic()
{
DBG_CHKTHIS( ModulWindow, 0 );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference < XFilePicker > xFP;
@@ -485,25 +485,25 @@ BOOL ModulWindow::LoadBasic()
{
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
- SfxMedium aMedium( aCurPath, STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE, TRUE );
+ SfxMedium aMedium( aCurPath, STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE, sal_True );
SvStream* pStream = aMedium.GetInStream();
if ( pStream )
{
AssertValidEditEngine();
- ULONG nLines = CalcLineCount( *pStream );
+ sal_uLong nLines = CalcLineCount( *pStream );
// nLines*4: ReadText/Formatting/Highlighting/Formatting
GetEditorWindow().CreateProgress( String( IDEResId( RID_STR_GENERATESOURCE ) ), nLines*4 );
- GetEditEngine()->SetUpdateMode( FALSE );
+ GetEditEngine()->SetUpdateMode( sal_False );
GetEditView()->Read( *pStream );
- GetEditEngine()->SetUpdateMode( TRUE );
- GetEditorWindow().Update(); // Es wurde bei UpdateMode = TRUE nur Invalidiert
+ GetEditEngine()->SetUpdateMode( sal_True );
+ GetEditorWindow().Update(); // Es wurde bei UpdateMode = sal_True nur Invalidiert
GetEditorWindow().ForceSyntaxTimeout();
GetEditorWindow().DestroyProgress();
- ULONG nError = aMedium.GetError();
+ sal_uLong nError = aMedium.GetError();
if ( nError )
ErrorHandler::HandleError( nError );
else
- bDone = TRUE;
+ bDone = sal_True;
}
else
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_COULDNTREAD ) ) ).Execute();
@@ -512,10 +512,10 @@ BOOL ModulWindow::LoadBasic()
}
-BOOL ModulWindow::SaveBasicSource()
+sal_Bool ModulWindow::SaveBasicSource()
{
DBG_CHKTHIS( ModulWindow, 0 );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference < XFilePicker > xFP;
@@ -547,7 +547,7 @@ BOOL ModulWindow::SaveBasicSource()
{
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
- SfxMedium aMedium( aCurPath, STREAM_WRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, TRUE, FALSE );
+ SfxMedium aMedium( aCurPath, STREAM_WRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, sal_True, sal_False );
SvStream* pStream = aMedium.GetOutStream();
if ( pStream )
{
@@ -556,11 +556,11 @@ BOOL ModulWindow::SaveBasicSource()
GetEditEngine()->Write( *pStream );
aMedium.Commit();
LeaveWait();
- ULONG nError = aMedium.GetError();
+ sal_uLong nError = aMedium.GetError();
if ( nError )
ErrorHandler::HandleError( nError );
else
- bDone = TRUE;
+ bDone = sal_True;
}
else
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_COULDNTWRITE) ) ).Execute();
@@ -569,21 +569,21 @@ BOOL ModulWindow::SaveBasicSource()
return bDone;
}
-BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName );
+sal_Bool implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName );
-BOOL ModulWindow::ImportDialog()
+sal_Bool ModulWindow::ImportDialog()
{
const ScriptDocument& rDocument = GetDocument();
String aLibName = GetLibName();
- BOOL bRet = implImportDialog( this, aCurPath, rDocument, aLibName );
+ sal_Bool bRet = implImportDialog( this, aCurPath, rDocument, aLibName );
return bRet;
}
-BOOL ModulWindow::ToggleBreakPoint( ULONG nLine )
+sal_Bool ModulWindow::ToggleBreakPoint( sal_uLong nLine )
{
DBG_ASSERT( XModule().Is(), "Kein Modul!" );
- BOOL bNewBreakPoint = FALSE;
+ sal_Bool bNewBreakPoint = sal_False;
if ( XModule().Is() )
{
@@ -591,24 +591,24 @@ BOOL ModulWindow::ToggleBreakPoint( ULONG nLine )
if ( aStatus.bError )
{
Sound::Beep();
- return FALSE;
+ return sal_False;
}
BreakPoint* pBrk = GetBreakPoints().FindBreakPoint( nLine );
if ( pBrk ) // entfernen
{
- xModule->ClearBP( (USHORT)nLine );
+ xModule->ClearBP( (sal_uInt16)nLine );
delete GetBreakPoints().Remove( pBrk );
}
else // einen erzeugen
{
- if ( xModule->SetBP( (USHORT)nLine) )
+ if ( xModule->SetBP( (sal_uInt16)nLine) )
{
GetBreakPoints().InsertSorted( new BreakPoint( nLine ) );
- bNewBreakPoint = TRUE;
+ bNewBreakPoint = sal_True;
if ( StarBASIC::IsRunning() )
{
- for ( USHORT nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ )
+ for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ )
{
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( nMethod );
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
@@ -634,14 +634,14 @@ void ModulWindow::UpdateBreakPoint( const BreakPoint& rBrk )
CheckCompileBasic();
if ( rBrk.bEnabled )
- xModule->SetBP( (USHORT)rBrk.nLine );
+ xModule->SetBP( (sal_uInt16)rBrk.nLine );
else
- xModule->ClearBP( (USHORT)rBrk.nLine );
+ xModule->ClearBP( (sal_uInt16)rBrk.nLine );
}
}
-BOOL ModulWindow::BasicToggleBreakPoint()
+sal_Bool ModulWindow::BasicToggleBreakPoint()
{
DBG_CHKTHIS( ModulWindow, 0 );
AssertValidEditEngine();
@@ -650,12 +650,12 @@ BOOL ModulWindow::BasicToggleBreakPoint()
aSel.GetStart().GetPara()++; // Basic-Zeilen beginnen bei 1!
aSel.GetEnd().GetPara()++;
- BOOL bNewBreakPoint = FALSE;
+ sal_Bool bNewBreakPoint = sal_False;
- for ( ULONG nLine = aSel.GetStart().GetPara(); nLine <= aSel.GetEnd().GetPara(); nLine++ )
+ for ( sal_uLong nLine = aSel.GetStart().GetPara(); nLine <= aSel.GetEnd().GetPara(); nLine++ )
{
if ( ToggleBreakPoint( nLine ) )
- bNewBreakPoint = TRUE;
+ bNewBreakPoint = sal_True;
}
aXEditorWindow.GetBrkWindow().Invalidate();
@@ -674,12 +674,12 @@ void ModulWindow::BasicToggleBreakPointEnabled()
TextSelection aSel = pView->GetSelection();
BreakPointList& rList = GetBreakPoints();
- for ( ULONG nLine = ++aSel.GetStart().GetPara(), nEnd = ++aSel.GetEnd().GetPara(); nLine <= nEnd; ++nLine )
+ for ( sal_uLong nLine = ++aSel.GetStart().GetPara(), nEnd = ++aSel.GetEnd().GetPara(); nLine <= nEnd; ++nLine )
{
BreakPoint* pBrk = rList.FindBreakPoint( nLine );
if ( pBrk )
{
- pBrk->bEnabled = pBrk->bEnabled ? FALSE : TRUE;
+ pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True;
UpdateBreakPoint( *pBrk );
}
}
@@ -707,9 +707,9 @@ IMPL_LINK( ModulWindow, BasicErrorHdl, StarBASIC *, pBasic )
// FALSE: Abbrechen
// TRUE: Weiter....
String aErrorText( pBasic->GetErrorText() );
- USHORT nErrorLine = pBasic->GetLine() - 1;
- USHORT nErrCol1 = pBasic->GetCol1();
- USHORT nErrCol2 = pBasic->GetCol2();
+ sal_uInt16 nErrorLine = pBasic->GetLine() - 1;
+ sal_uInt16 nErrCol1 = pBasic->GetCol1();
+ sal_uInt16 nErrCol2 = pBasic->GetCol2();
if ( nErrCol2 != 0xFFFF )
nErrCol2++;
@@ -730,9 +730,9 @@ IMPL_LINK( ModulWindow, BasicErrorHdl, StarBASIC *, pBasic )
}
// Wenn anderes Basic, dan sollte die IDE versuchen, da richtige
// Modul anzuzeigen...
- BOOL bMarkError = ( pBasic == GetBasic() ) ? TRUE : FALSE;
+ sal_Bool bMarkError = ( pBasic == GetBasic() ) ? sal_True : sal_False;
if ( bMarkError )
- aXEditorWindow.GetBrkWindow().SetMarkerPos( nErrorLine, TRUE );
+ aXEditorWindow.GetBrkWindow().SetMarkerPos( nErrorLine, sal_True );
// ErrorBox( this, WB_OK | WB_DEF_OK, String( aErrorTextPrefix + aErrorText ) ).Execute();
// ErrorHandler::HandleError( pBasic->GetErrorCode() );
@@ -744,11 +744,11 @@ IMPL_LINK( ModulWindow, BasicErrorHdl, StarBASIC *, pBasic )
// #i47002#
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( !pWindow )
- return FALSE;
+ return sal_False;
if ( bMarkError )
aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER );
- return FALSE;
+ return sal_False;
}
long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
@@ -761,8 +761,8 @@ long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
// #i69280 Required in Window despite normal usage in next command!
(void)pBasic;
- // ReturnWert: USHORT => siehe SB-Debug-Flags
- USHORT nErrorLine = pBasic->GetLine();
+ // ReturnWert: sal_uInt16 => siehe SB-Debug-Flags
+ sal_uInt16 nErrorLine = pBasic->GetLine();
// Gibt es hier einen BreakPoint?
BreakPoint* pBrk = GetBreakPoints().FindBreakPoint( nErrorLine );
@@ -782,8 +782,8 @@ long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
pLayout->GetWatchWindow().UpdateWatches();
pLayout->GetStackWindow().UpdateCalls();
- aStatus.bIsInReschedule = TRUE;
- aStatus.bIsRunning = TRUE;
+ aStatus.bIsInReschedule = sal_True;
+ aStatus.bIsRunning = sal_True;
AddStatus( BASWIN_INRESCHEDULE );
@@ -792,7 +792,7 @@ long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
while( aStatus.bIsRunning )
Application::Yield();
- aStatus.bIsInReschedule = FALSE;
+ aStatus.bIsInReschedule = sal_False;
aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER );
ClearStatus( BASWIN_INRESCHEDULE );
@@ -804,9 +804,9 @@ void ModulWindow::BasicAddWatch()
{
DBG_CHKTHIS( ModulWindow, 0 );
String aWatchStr;
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
AssertValidEditEngine();
- BOOL bAdd = TRUE;
+ sal_Bool bAdd = sal_True;
if ( !GetEditView()->HasSelection() )
{
// bAdd = GetEditView()->SelectCurrentWord();
@@ -815,11 +815,11 @@ void ModulWindow::BasicAddWatch()
if ( aWord.Len() )
{
TextSelection aSel( aWordStart );
- USHORT& rIndex = aSel.GetEnd().GetIndex();
+ sal_uInt16& rIndex = aSel.GetEnd().GetIndex();
rIndex = rIndex + aWord.Len();
// aSel.GetEnd().GetIndex() += sal::static_int_cast<int>( aWord.Len() );
GetEditView()->SetSelection( aSel );
- bAdd = TRUE;
+ bAdd = sal_True;
}
}
if ( bAdd )
@@ -830,7 +830,7 @@ void ModulWindow::BasicAddWatch()
aWatchStr = GetEditView()->GetSelected();
pLayout->GetWatchWindow().AddWatch( aWatchStr );
pLayout->GetWatchWindow().UpdateWatches();
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
@@ -843,7 +843,7 @@ void ModulWindow::BasicAddWatch()
void ModulWindow::BasicRemoveWatch()
{
DBG_CHKTHIS( ModulWindow, 0 );
- BOOL bRemoved = pLayout->GetWatchWindow().RemoveSelectedWatch();
+ sal_Bool bRemoved = pLayout->GetWatchWindow().RemoveSelectedWatch();
if ( !bRemoved )
Sound::Beep();
@@ -861,7 +861,7 @@ void ModulWindow::EditMacro( const String& rMacroName )
if ( !aStatus.bError )
{
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
SbMethod* pMethod = (SbMethod*)xModule->Find( rMacroName, SbxCLASS_METHOD );
if ( pMethod )
{
@@ -884,7 +884,7 @@ void ModulWindow::EditMacro( const String& rMacroName )
long nNewStartY = nStart * pView->GetTextEngine()->GetCharHeight();
nNewStartY = Min( nNewStartY, nMaxY );
pView->Scroll( 0, -(nNewStartY-nOldStartY) );
- pView->ShowCursor( FALSE, TRUE );
+ pView->ShowCursor( sal_False, sal_True );
GetEditVScrollBar().SetThumbPos( pView->GetStartDocPos().Y() );
}
pView->SetSelection( aSel );
@@ -903,20 +903,20 @@ void __EXPORT ModulWindow::StoreData()
// dieses Fenster beendet wird.
// => Keine Unterbrechungen erwuenscht!
// Und bei SAVE, wenn AppBasic...
- GetEditorWindow().SetSourceInBasic( TRUE );
+ GetEditorWindow().SetSourceInBasic( sal_True );
// Nicht das Modify loeschen, sonst wird das Basic nicht gespeichert
// Es wird beim Speichern sowieso geloescht.
-// xModule->SetModified( FALSE );
+// xModule->SetModified( sal_False );
}
-BOOL __EXPORT ModulWindow::CanClose()
+sal_Bool __EXPORT ModulWindow::CanClose()
{
DBG_CHKTHIS( ModulWindow, 0 );
- return TRUE;
+ return sal_True;
}
-BOOL __EXPORT ModulWindow::AllowUndo()
+sal_Bool __EXPORT ModulWindow::AllowUndo()
{
return GetEditorWindow().CanModify();
}
@@ -939,7 +939,7 @@ void __EXPORT ModulWindow::UpdateData()
TextSelection aSel = GetEditView()->GetSelection();
setTextEngineText( GetEditEngine(), xModule->GetSource32() );
GetEditView()->SetSelection( aSel );
- GetEditEngine()->SetModified( FALSE );
+ GetEditEngine()->SetModified( sal_False );
BasicIDE::MarkDocumentModified( GetDocument() );
}
}
@@ -973,37 +973,37 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
// Font aFont( GetEditEngine()->CreateFontFromItemSet( GetEditEngine()->GetEmptyItemSet() ) );
Font aFont( GetEditEngine()->GetFont() );
aFont.SetAlign( ALIGN_BOTTOM );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetSize( Size( 0, 360 ) );
pPrinter->SetFont( aFont );
pPrinter->SetMapMode( MAP_100TH_MM );
String aTitle( CreateQualifiedName() );
- USHORT nLineHeight = (USHORT) pPrinter->GetTextHeight(); // etwas mehr.
- USHORT nParaSpace = 10;
+ sal_uInt16 nLineHeight = (sal_uInt16) pPrinter->GetTextHeight(); // etwas mehr.
+ sal_uInt16 nParaSpace = 10;
Size aPaperSz = pPrinter->GetOutputSize();
aPaperSz.Width() -= (LMARGPRN+RMARGPRN);
aPaperSz.Height() -= (TMARGPRN+BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
- USHORT nLinespPage = (USHORT) (aPaperSz.Height()/nLineHeight);
- USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ) );
- ULONG nParas = GetEditEngine()->GetParagraphCount();
+ sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height()/nLineHeight);
+ sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ) );
+ sal_uLong nParas = GetEditEngine()->GetParagraphCount();
- USHORT nPages = (USHORT) (nParas/nLinespPage+1 );
- USHORT nCurPage = 1;
+ sal_uInt16 nPages = (sal_uInt16) (nParas/nLinespPage+1 );
+ sal_uInt16 nCurPage = 1;
// Header drucken...
lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle, nPrintPage == 0 );
Point aPos( LMARGPRN, TMARGPRN );
- for ( ULONG nPara = 0; nPara < nParas; nPara++ )
+ for ( sal_uLong nPara = 0; nPara < nParas; nPara++ )
{
String aLine( GetEditEngine()->GetText( nPara ) );
lcl_ConvertTabsToSpaces( aLine );
- USHORT nLines = aLine.Len()/nCharspLine+1;
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ sal_uInt16 nLines = aLine.Len()/nCharspLine+1;
+ for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
String aTmpLine( aLine, nLine*nCharspLine, nCharspLine );
aPos.Y() += nLineHeight;
@@ -1030,7 +1030,7 @@ void __EXPORT ModulWindow::ExecuteCommand( SfxRequest& rReq )
{
DBG_CHKTHIS( ModulWindow, 0 );
AssertValidEditEngine();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_BASICRUN:
@@ -1145,7 +1145,7 @@ void __EXPORT ModulWindow::GetState( SfxItemSet &rSet )
{
DBG_CHKTHIS( ModulWindow, 0 );
SfxWhichIter aIter(rSet);
- for ( USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() )
+ for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() )
{
switch ( nWh )
{
@@ -1216,16 +1216,16 @@ void __EXPORT ModulWindow::DoScroll( ScrollBar* pCurScrollBar )
// VisArea verwenden:
long nDiff = GetEditView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos();
GetEditView()->Scroll( nDiff, 0 );
- GetEditView()->ShowCursor( FALSE, TRUE );
+ GetEditView()->ShowCursor( sal_False, sal_True );
pCurScrollBar->SetThumbPos( GetEditView()->GetStartDocPos().X() );
}
}
-BOOL __EXPORT ModulWindow::IsModified()
+sal_Bool __EXPORT ModulWindow::IsModified()
{
- return GetEditEngine() ? GetEditEngine()->IsModified() : FALSE;
+ return GetEditEngine() ? GetEditEngine()->IsModified() : sal_False;
}
@@ -1260,7 +1260,7 @@ void ModulWindow::FrameWindowMoved()
-void ModulWindow::ShowCursor( BOOL bOn )
+void ModulWindow::ShowCursor( sal_Bool bOn )
{
if ( GetEditEngine() )
{
@@ -1293,7 +1293,7 @@ void ModulWindow::Deactivating()
GetEditView()->EraseVirtualDevice();
}
-USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOOL bFromStart )
+sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, sal_Bool bFromStart )
{
// Mann koennte fuer das blinde Alle-Ersetzen auch auf
// Syntaxhighlighting/Formatierung verzichten...
@@ -1309,8 +1309,8 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO
pView->SetSelection( TextSelection( TextPaM( 0xFFFFFFFF, 0xFFFF ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) );
}
- BOOL bForward = !rSearchItem.GetBackward();
- USHORT nFound = 0;
+ sal_Bool bForward = !rSearchItem.GetBackward();
+ sal_uInt16 nFound = 0;
if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND ) ||
( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL ) )
{
@@ -1321,7 +1321,7 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO
{
if ( !IsReadOnly() )
{
- BOOL bAll = rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL;
+ sal_Bool bAll = rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL;
nFound = pView->Replace( rSearchItem.GetSearchOptions() , bAll , bForward );
}
}
@@ -1339,9 +1339,9 @@ SfxUndoManager* __EXPORT ModulWindow::GetUndoManager()
return NULL;
}
-USHORT __EXPORT ModulWindow::GetSearchOptions()
+sal_uInt16 __EXPORT ModulWindow::GetSearchOptions()
{
- USHORT nOptions = SEARCH_OPTIONS_SEARCH |
+ sal_uInt16 nOptions = SEARCH_OPTIONS_SEARCH |
SEARCH_OPTIONS_WHOLE_WORDS |
SEARCH_OPTIONS_BACKWARDS |
SEARCH_OPTIONS_REG_EXP |
@@ -1362,13 +1362,13 @@ void __EXPORT ModulWindow::BasicStarted()
{
if ( XModule().Is() )
{
- aStatus.bIsRunning = TRUE;
+ aStatus.bIsRunning = sal_True;
BreakPointList& rList = GetBreakPoints();
if ( rList.Count() )
{
rList.ResetHitCount();
rList.SetBreakPointsInBasic( xModule );
- for ( USHORT nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ )
+ for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ )
{
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( nMethod );
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
@@ -1380,7 +1380,7 @@ void __EXPORT ModulWindow::BasicStarted()
void __EXPORT ModulWindow::BasicStopped()
{
- aStatus.bIsRunning = FALSE;
+ aStatus.bIsRunning = sal_False;
GetBreakPointWindow().SetMarkerPos( MARKER_NOMARKER );
}
@@ -1424,15 +1424,15 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor()
return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aModName, OBJ_TYPE_MODULE );
}
-void ModulWindow::SetReadOnly( BOOL b )
+void ModulWindow::SetReadOnly( sal_Bool b )
{
if ( GetEditView() )
GetEditView()->SetReadOnly( b );
}
-BOOL ModulWindow::IsReadOnly()
+sal_Bool ModulWindow::IsReadOnly()
{
- BOOL bReadOnly = FALSE;
+ sal_Bool bReadOnly = sal_False;
if ( GetEditView() )
bReadOnly = GetEditView()->IsReadOnly();
@@ -1440,9 +1440,9 @@ BOOL ModulWindow::IsReadOnly()
return bReadOnly;
}
-BOOL ModulWindow::IsPasteAllowed()
+sal_Bool ModulWindow::IsPasteAllowed()
{
- BOOL bPaste = FALSE;
+ sal_Bool bPaste = sal_False;
// get clipboard
Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard();
@@ -1458,7 +1458,7 @@ BOOL ModulWindow::IsPasteAllowed()
SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor );
if ( xTransf->isDataFlavorSupported( aFlavor ) )
{
- bPaste = TRUE;
+ bPaste = sal_True;
}
}
}
@@ -1472,8 +1472,8 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
aHSplitter( this, WinBits( WB_HSCROLL ) ),
aWatchWindow( this ),
aStackWindow( this ),
- bVSplitted(FALSE),
- bHSplitted(FALSE),
+ bVSplitted(sal_False),
+ bHSplitted(sal_False),
m_pModulWindow(0),
m_aImagesNormal(IDEResId(RID_IMGLST_LAYOUT)),
m_aImagesHighContrast(IDEResId(RID_IMGLST_LAYOUT_HC))
@@ -1610,15 +1610,15 @@ void ModulWindowLayout::ArrangeWindows()
IMPL_LINK( ModulWindowLayout, SplitHdl, Splitter *, pSplitter )
{
if ( pSplitter == &aVSplitter )
- bVSplitted = TRUE;
+ bVSplitted = sal_True;
else
- bHSplitted = TRUE;
+ bHSplitted = sal_True;
ArrangeWindows();
return 0;
}
-BOOL ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point& rPos, Rectangle& rRect )
+sal_Bool ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point& rPos, Rectangle& rRect )
{
// prueffen, ob als Dock oder als Child:
// TRUE: Floating
@@ -1636,7 +1636,7 @@ BOOL ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point
{
rRect.SetSize( Size( nHSplitPos, aSz.Height() - nVSplitPos ) );
rRect.SetPos( OutputToScreenPixel( Point( 0, nVSplitPos ) ) );
- return TRUE;
+ return sal_True;
}
}
if ( pDockingWindow == &aStackWindow )
@@ -1645,11 +1645,11 @@ BOOL ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point
{
rRect.SetSize( Size( aSz.Width() - nHSplitPos, aSz.Height() - nVSplitPos ) );
rRect.SetPos( OutputToScreenPixel( Point( nHSplitPos, nVSplitPos ) ) );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void ModulWindowLayout::DockaWindow( DockingWindow* pDockingWindow )
@@ -1758,13 +1758,13 @@ void ModulWindowLayout::updateSyntaxHighlighting()
if (m_pModulWindow != 0)
{
EditorWindow & rEditor = m_pModulWindow->GetEditorWindow();
- ULONG nCount = rEditor.GetEditEngine()->GetParagraphCount();
- for (ULONG i = 0; i < nCount; ++i)
+ sal_uLong nCount = rEditor.GetEditEngine()->GetParagraphCount();
+ for (sal_uLong i = 0; i < nCount; ++i)
rEditor.DoDelayedSyntaxHighlight(i);
}
}
-Image ModulWindowLayout::getImage(USHORT nId, bool bHighContrastMode) const
+Image ModulWindowLayout::getImage(sal_uInt16 nId, bool bHighContrastMode) const
{
return (bHighContrastMode ? m_aImagesHighContrast : m_aImagesNormal).
GetImage(nId);
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 280bb6ee3ab6..301ef3a6f69d 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -69,24 +69,24 @@ void setTextEngineText( ExtTextEngine* pEngine, const ::rtl::OUString aStr );
class ProgressInfo : public SfxProgress
{
private:
- ULONG nCurState;
+ sal_uLong nCurState;
public:
- inline ProgressInfo( SfxObjectShell* pObjSh, const String& rText, ULONG nRange );
+ inline ProgressInfo( SfxObjectShell* pObjSh, const String& rText, sal_uLong nRange );
-// inline void StartProgress( const String& rName, ULONG nStates );
+// inline void StartProgress( const String& rName, sal_uLong nStates );
// inline void EndProgress();
inline void StepProgress();
};
-inline ProgressInfo::ProgressInfo( SfxObjectShell* pObjSh, const String& rText, ULONG nRange )
+inline ProgressInfo::ProgressInfo( SfxObjectShell* pObjSh, const String& rText, sal_uLong nRange )
: SfxProgress( pObjSh, rText, nRange )
{
nCurState = 0;
}
-// inline void ProgressInfo::StartProgress( const String& rName, ULONG nStates )
+// inline void ProgressInfo::StartProgress( const String& rName, sal_uLong nStates )
// {
// nCurState = 0;
// if ( pStbMgr )
@@ -131,16 +131,16 @@ private:
using Window::Notify;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- void ImpDoHighlight( ULONG nLineOff );
+ void ImpDoHighlight( sal_uLong nLineOff );
void ImplSetFont();
- BOOL bHighlightning;
- BOOL bDoSyntaxHighlight;
- BOOL bDelayHighlight;
+ sal_Bool bHighlightning;
+ sal_Bool bDoSyntaxHighlight;
+ sal_Bool bDelayHighlight;
virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface(BOOL bCreate = TRUE);
+ GetComponentInterface(sal_Bool bCreate = sal_True);
protected:
virtual void Paint( const Rectangle& );
@@ -154,9 +154,9 @@ protected:
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
- void DoSyntaxHighlight( ULONG nPara );
+ void DoSyntaxHighlight( sal_uLong nPara );
String GetWordAtCursor();
- BOOL ImpCanModify();
+ sal_Bool ImpCanModify();
public:
EditorWindow( Window* pParent );
@@ -166,11 +166,11 @@ public:
ExtTextView* GetEditView() const { return pEditView; }
ProgressInfo* GetProgress() const { return pProgress; }
- void CreateProgress( const String& rText, ULONG nRange );
+ void CreateProgress( const String& rText, sal_uLong nRange );
void DestroyProgress();
- void ParagraphInsertedDeleted( ULONG nNewPara, BOOL bInserted );
- void DoDelayedSyntaxHighlight( ULONG nPara );
+ void ParagraphInsertedDeleted( sal_uLong nNewPara, sal_Bool bInserted );
+ void DoDelayedSyntaxHighlight( sal_uLong nPara );
void CreateEditEngine();
void SetScrollBarRanges();
@@ -179,9 +179,9 @@ public:
{ pModulWindow = pWin; }
void ForceSyntaxTimeout();
- BOOL SetSourceInBasic( BOOL bQuiet = TRUE );
+ sal_Bool SetSourceInBasic( sal_Bool bQuiet = sal_True );
- BOOL CanModify() { return ImpCanModify(); }
+ sal_Bool CanModify() { return ImpCanModify(); }
};
@@ -189,10 +189,10 @@ class BreakPointWindow : public Window
{
private:
long nCurYOffset;
- USHORT nMarkerPos;
+ sal_uInt16 nMarkerPos;
BreakPointList aBreakPointList;
ModulWindow* pModulWindow;
- BOOL bErrorMarker;
+ sal_Bool bErrorMarker;
bool m_bHighContrastMode;
virtual void DataChanged(DataChangedEvent const & rDCEvt);
@@ -203,11 +203,11 @@ protected:
virtual void Paint( const Rectangle& );
virtual void Resize();
BreakPoint* FindBreakPoint( const Point& rMousePos );
- void ShowMarker( BOOL bShow );
+ void ShowMarker( sal_Bool bShow );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void Command( const CommandEvent& rCEvt );
- BOOL SyncYOffset();
+ sal_Bool SyncYOffset();
public:
BreakPointWindow( Window* pParent );
@@ -216,7 +216,7 @@ public:
void SetModulWindow( ModulWindow* pWin )
{ pModulWindow = pWin; }
- void SetMarkerPos( USHORT nLine, BOOL bErrorMarker = FALSE );
+ void SetMarkerPos( sal_uInt16 nLine, sal_Bool bErrorMarker = sal_False );
void DoScroll( long nHorzScroll, long nVertScroll );
long& GetCurYOffset() { return nCurYOffset; }
@@ -229,21 +229,21 @@ class WatchTreeListBox : public SvHeaderTabListBox
String aEditingRes;
protected:
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
- BOOL ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult );
+ sal_Bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult );
SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement );
// virtual DragDropMode NotifyBeginDrag( SvLBoxEntry* );
-// virtual BOOL NotifyQueryDrop( SvLBoxEntry* );
+// virtual sal_Bool NotifyQueryDrop( SvLBoxEntry* );
-// virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
-// SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
-// virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
-// SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
-// BOOL NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
-// SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove );
+// virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+// SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
+// virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+// SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
+// sal_Bool NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+// SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove );
public:
WatchTreeListBox( Window* pParent, WinBits nWinBits );
@@ -282,7 +282,7 @@ public:
~WatchWindow();
void AddWatch( const String& rVName );
- BOOL RemoveSelectedWatch();
+ sal_Bool RemoveSelectedWatch();
void UpdateWatches( bool bBasicStopped = false );
WatchTreeListBox& GetWatchTreeListBox() { return aTreeListBox; }
@@ -351,7 +351,7 @@ private:
long BasicBreakHdl( StarBASIC* pBasic );
void CheckCompileBasic();
- BOOL BasicExecute();
+ sal_Bool BasicExecute();
void GoOnTop();
void AssertValidEditEngine();
@@ -378,7 +378,7 @@ public:
virtual void GetState( SfxItemSet& );
virtual void StoreData();
virtual void UpdateData();
- virtual BOOL CanClose();
+ virtual sal_Bool CanClose();
// virtual void PrintData( Printer* pPrinter );
// return number of pages to be printed
virtual sal_Int32 countPages( Printer* pPrinter );
@@ -386,9 +386,9 @@ public:
virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
virtual String GetTitle();
virtual BasicEntryDescriptor CreateEntryDescriptor();
- virtual BOOL AllowUndo();
- virtual void SetReadOnly( BOOL bReadOnly );
- virtual BOOL IsReadOnly();
+ virtual sal_Bool AllowUndo();
+ virtual void SetReadOnly( sal_Bool bReadOnly );
+ virtual sal_Bool IsReadOnly();
StarBASIC* GetBasic() { XModule(); return xBasic; }
@@ -396,39 +396,39 @@ public:
void SetSbModule( SbModule* pModule ) { xModule = pModule; }
String GetSbModuleName();
- BOOL CompileBasic();
- BOOL BasicRun();
- BOOL BasicStepOver();
- BOOL BasicStepInto();
- BOOL BasicStepOut();
+ sal_Bool CompileBasic();
+ sal_Bool BasicRun();
+ sal_Bool BasicStepOver();
+ sal_Bool BasicStepInto();
+ sal_Bool BasicStepOut();
void BasicStop();
- BOOL BasicToggleBreakPoint();
+ sal_Bool BasicToggleBreakPoint();
void BasicToggleBreakPointEnabled();
void ManageBreakPoints();
void UpdateBreakPoint( const BreakPoint& rBrk );
void BasicAddWatch();
void BasicRemoveWatch();
- BOOL LoadBasic();
- BOOL SaveBasicSource();
- BOOL ImportDialog();
+ sal_Bool LoadBasic();
+ sal_Bool SaveBasicSource();
+ sal_Bool ImportDialog();
void EditMacro( const String& rMacroName );
// void InsertFromObjectCatalog( ObjectCatalog* pObjDlg );
- BOOL ToggleBreakPoint( ULONG nLine );
+ sal_Bool ToggleBreakPoint( sal_uLong nLine );
BasicStatus& GetBasicStatus() { return aStatus; }
- virtual BOOL IsModified();
- virtual BOOL IsPasteAllowed();
+ virtual sal_Bool IsModified();
+ virtual sal_Bool IsPasteAllowed();
void FrameWindowMoved();
- void ShowCursor( BOOL bOn );
+ void ShowCursor( sal_Bool bOn );
- virtual USHORT GetSearchOptions();
- USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOOL bFromStart = FALSE );
+ virtual sal_uInt16 GetSearchOptions();
+ sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem, sal_Bool bFromStart = sal_False );
virtual Window* GetLayoutWindow();
@@ -459,8 +459,8 @@ private:
WatchWindow aWatchWindow;
StackWindow aStackWindow;
- BOOL bVSplitted;
- BOOL bHSplitted;
+ sal_Bool bVSplitted;
+ sal_Bool bHSplitted;
ModulWindow * m_pModulWindow;
@@ -489,7 +489,7 @@ public:
~ModulWindowLayout();
void DockaWindow( DockingWindow* pDockingWin );
- BOOL IsToBeDocked( DockingWindow* pDockingWin, const Point& rPos, Rectangle& rRect );
+ sal_Bool IsToBeDocked( DockingWindow* pDockingWin, const Point& rPos, Rectangle& rRect );
void SetModulWindow( ModulWindow* pModWin );
ModulWindow* GetModulWindow() const { return m_pModulWindow; }
@@ -497,7 +497,7 @@ public:
WatchWindow& GetWatchWindow() { return aWatchWindow; }
StackWindow& GetStackWindow() { return aStackWindow; }
- Image getImage(USHORT nId, bool bHighContrastMode) const;
+ Image getImage(sal_uInt16 nId, bool bHighContrastMode) const;
inline Color const & getSyntaxColor(TokenTypes eType) const
{ return m_aSyntaxColors[eType]; }
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 68cdbe9ad9ed..8dcad1f5608b 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -92,7 +92,7 @@ MapUnit eEditMapUnit = MAP_100TH_MM;
aMemStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 );
aMemStream.SetLineDelimiter( LINEEND_LF );
pEngine->Write( aMemStream );
- ULONG nSize = aMemStream.Tell();
+ sal_uLong nSize = aMemStream.Tell();
::rtl::OUString aText( (const sal_Char*)aMemStream.GetData(),
nSize, RTL_TEXTENCODING_UTF8 );
return aText;
@@ -131,10 +131,10 @@ void lcl_SeparateNameAndIndex( const String& rVName, String& rVar, String& rInde
{
rVar = rVName;
rIndex.Erase();
- USHORT nIndexStart = rVar.Search( '(' );
+ sal_uInt16 nIndexStart = rVar.Search( '(' );
if ( nIndexStart != STRING_NOTFOUND )
{
- USHORT nIndexEnd = rVar.Search( ')', nIndexStart );
+ sal_uInt16 nIndexEnd = rVar.Search( ')', nIndexStart );
if ( nIndexStart != STRING_NOTFOUND )
{
rIndex = rVar.Copy( nIndexStart+1, nIndexEnd-nIndexStart-1 );
@@ -147,13 +147,13 @@ void lcl_SeparateNameAndIndex( const String& rVName, String& rVar, String& rInde
if ( rVar.Len() )
{
- USHORT nLastChar = rVar.Len()-1;
+ sal_uInt16 nLastChar = rVar.Len()-1;
if ( strchr( cSuffixes, rVar.GetChar( nLastChar ) ) )
rVar.Erase( nLastChar, 1 );
}
if ( rIndex.Len() )
{
- USHORT nLastChar = rIndex.Len()-1;
+ sal_uInt16 nLastChar = rIndex.Len()-1;
if ( strchr( cSuffixes, rIndex.GetChar( nLastChar ) ) )
rIndex.Erase( nLastChar, 1 );
}
@@ -163,13 +163,13 @@ void lcl_SeparateNameAndIndex( const String& rVName, String& rVar, String& rInde
EditorWindow::EditorWindow( Window* pParent ) :
Window( pParent, WB_BORDER )
{
- bDoSyntaxHighlight = TRUE;
- bDelayHighlight = TRUE;
+ bDoSyntaxHighlight = sal_True;
+ bDelayHighlight = sal_True;
pModulWindow = 0;
pEditView = 0;
pEditEngine = 0;
pSourceViewConfig = new utl::SourceViewConfig;
- bHighlightning = FALSE;
+ bHighlightning = sal_False;
pProgress = 0;
nCurTextWidth = 0;
SetBackground(
@@ -249,7 +249,7 @@ String EditorWindow::GetWordAtCursor()
void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// Sollte eigentlich mal aktiviert werden...
if ( pEditEngine )
@@ -258,7 +258,7 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt )
{
String aKeyword = GetWordAtCursor();
Application::GetHelp()->SearchKeyword( aKeyword );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
{
@@ -269,12 +269,12 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt )
Point aWindowPos = rHEvt.GetMousePosPixel();
aWindowPos = ScreenToOutputPixel( aWindowPos );
Point aDocPos = GetEditView()->GetDocPos( aWindowPos );
- TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM( aDocPos, FALSE );
+ TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM( aDocPos, sal_False );
TextPaM aStartOfWord;
String aWord = GetEditView()->GetTextEngine()->GetWord( aCursor, &aStartOfWord );
if ( aWord.Len() && !ByteString( aWord, RTL_TEXTENCODING_UTF8 ).IsNumericAscii() )
{
- USHORT nLastChar =aWord.Len()-1;
+ sal_uInt16 nLastChar =aWord.Len()-1;
if ( strchr( cSuffixes, aWord.GetChar( nLastChar ) ) )
aWord.Erase( nLastChar, 1 );
SbxBase* pSBX = StarBASIC::FindSBXInCurrentScope( aWord );
@@ -282,13 +282,13 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt )
{
SbxVariable* pVar = (SbxVariable*)pSBX;
SbxDataType eType = pVar->GetType();
- if ( (BYTE)eType == (BYTE)SbxOBJECT )
+ if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT )
// Kann zu Absturz, z.B. bei Selections-Objekt fuehren
// Type == Object heisst nicht, dass pVar == Object!
; // aHelpText = ((SbxObject*)pVar)->GetClassName();
else if ( eType & SbxARRAY )
; // aHelpText = "{...}";
- else if ( (BYTE)eType != (BYTE)SbxEMPTY )
+ else if ( (sal_uInt8)eType != (sal_uInt8)SbxEMPTY )
{
aHelpText = pVar->GetName();
if ( !aHelpText.Len() ) // Bei Uebergabeparametern wird der Name nicht kopiert
@@ -308,7 +308,7 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt )
}
}
Help::ShowQuickHelp( this, Rectangle( aTopLeft, Size( 1, 1 ) ), aHelpText, QUICKHELP_TOP|QUICKHELP_LEFT);
- bDone = TRUE;
+ bDone = sal_True;
}
}
@@ -387,9 +387,9 @@ void __EXPORT EditorWindow::Command( const CommandEvent& rCEvt )
}
}
-BOOL EditorWindow::ImpCanModify()
+sal_Bool EditorWindow::ImpCanModify()
{
- BOOL bCanModify = TRUE;
+ sal_Bool bCanModify = sal_True;
if ( StarBASIC::IsRunning() )
{
// Wenn im Trace-Mode, entweder Trace abbrechen oder
@@ -398,11 +398,11 @@ BOOL EditorWindow::ImpCanModify()
// entfernen!
if ( QueryBox( 0, WB_OK_CANCEL, String( IDEResId( RID_STR_WILLSTOPPRG ) ) ).Execute() == RET_OK )
{
- pModulWindow->GetBasicStatus().bIsRunning = FALSE;
+ pModulWindow->GetBasicStatus().bIsRunning = sal_False;
BasicIDE::StopBasic();
}
else
- bCanModify = FALSE;
+ bCanModify = sal_False;
}
return bCanModify;
}
@@ -419,14 +419,14 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt )
long nLinSz = pModulWindow->GetHScrollBar()->GetLineSize(); (void)nLinSz;
long nThumb = pModulWindow->GetHScrollBar()->GetThumbPos(); (void)nThumb;
#endif
- BOOL bDone = FALSE;
- BOOL bWasModified = pEditEngine->IsModified();
+ sal_Bool bDone = sal_False;
+ sal_Bool bWasModified = pEditEngine->IsModified();
if ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() )
{
if ( ( rKEvt.GetKeyCode().GetCode() == KEY_A) && rKEvt.GetKeyCode().IsMod1() )
pEditView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) );
else if ( ( rKEvt.GetKeyCode().GetCode() == KEY_Y ) && rKEvt.GetKeyCode().IsMod1() )
- bDone = TRUE; // CTRL-Y schlucken, damit kein Vorlagenkatalog
+ bDone = sal_True; // CTRL-Y schlucken, damit kein Vorlagenkatalog
else
{
if ( ( rKEvt.GetKeyCode().GetCode() == KEY_TAB ) && !rKEvt.GetKeyCode().IsMod1() &&
@@ -435,13 +435,13 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt )
TextSelection aSel( pEditView->GetSelection() );
if ( aSel.GetStart().GetPara() != aSel.GetEnd().GetPara() )
{
- bDelayHighlight = FALSE;
+ bDelayHighlight = sal_False;
if ( !rKEvt.GetKeyCode().IsShift() )
pEditView->IndentBlock();
else
pEditView->UnindentBlock();
- bDelayHighlight = TRUE;
- bDone = TRUE;
+ bDelayHighlight = sal_True;
+ bDone = sal_True;
}
}
if ( !bDone )
@@ -486,11 +486,11 @@ void __EXPORT EditorWindow::LoseFocus()
Window::LoseFocus();
}
-BOOL EditorWindow::SetSourceInBasic( BOOL bQuiet )
+sal_Bool EditorWindow::SetSourceInBasic( sal_Bool bQuiet )
{
(void)bQuiet;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if ( pEditEngine && pEditEngine->IsModified()
&& !GetEditView()->IsReadOnly() ) // Added because of #i60626, otherwise
// any read only bug in the text engine could lead to a crash later
@@ -514,9 +514,9 @@ BOOL EditorWindow::SetSourceInBasic( BOOL bQuiet )
String aName = pModulWindow->GetName();
OSL_VERIFY( aDocument.updateModule( aLibName, aName, aModule ) );
- pEditEngine->SetModified( FALSE );
+ pEditEngine->SetModified( sal_False );
BasicIDE::MarkDocumentModified( aDocument );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
return bChanged;
@@ -549,8 +549,8 @@ void EditorWindow::CreateEditEngine()
pEditEngine = new ExtTextEngine;
pEditView = new ExtTextView( pEditEngine, this );
- pEditView->SetAutoIndentMode( TRUE );
- pEditEngine->SetUpdateMode( FALSE );
+ pEditView->SetAutoIndentMode( sal_True );
+ pEditEngine->SetUpdateMode( sal_False );
pEditEngine->InsertView( pEditView );
ImplSetFont();
@@ -560,8 +560,8 @@ void EditorWindow::CreateEditEngine()
aHighlighter.initialize( HIGHLIGHT_BASIC );
- BOOL bWasDoSyntaxHighlight = bDoSyntaxHighlight;
- bDoSyntaxHighlight = FALSE; // Bei grossen Texten zu langsam...
+ sal_Bool bWasDoSyntaxHighlight = bDoSyntaxHighlight;
+ bDoSyntaxHighlight = sal_False; // Bei grossen Texten zu langsam...
::rtl::OUString aOUSource( pModulWindow->GetModule() );
sal_Int32 nLines = 0;
sal_Int32 nIndex = -1;
@@ -581,15 +581,15 @@ void EditorWindow::CreateEditEngine()
pEditView->SetStartDocPos( Point( 0, 0 ) );
pEditView->SetSelection( TextSelection() );
pModulWindow->GetBreakPointWindow().GetCurYOffset() = 0;
- pEditEngine->SetUpdateMode( TRUE );
- Update(); // Es wurde bei UpdateMode = TRUE nur Invalidiert
+ pEditEngine->SetUpdateMode( sal_True );
+ Update(); // Es wurde bei UpdateMode = sal_True nur Invalidiert
// Die anderen Fenster auch, damit keine halben Sachen auf dem Bildschirm!
pModulWindow->GetLayout()->GetWatchWindow().Update();
pModulWindow->GetLayout()->GetStackWindow().Update();
pModulWindow->GetBreakPointWindow().Update();
- pEditView->ShowCursor( TRUE, TRUE );
+ pEditView->ShowCursor( sal_True, sal_True );
StartListening( *pEditEngine );
@@ -598,15 +598,15 @@ void EditorWindow::CreateEditEngine()
bDoSyntaxHighlight = bWasDoSyntaxHighlight;
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
- aSyntaxLineTable.Insert( nLine, (void*)(USHORT)1 );
+ for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
+ aSyntaxLineTable.Insert( nLine, (void*)(sal_uInt16)1 );
ForceSyntaxTimeout();
DELETEZ( pProgress );
pEditView->EraseVirtualDevice();
- pEditEngine->SetModified( FALSE );
- pEditEngine->EnableUndo( TRUE );
+ pEditEngine->SetModified( sal_False );
+ pEditEngine->EnableUndo( sal_True );
InitScrollBars();
@@ -622,11 +622,11 @@ void EditorWindow::CreateEditEngine()
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) )
{
- pModulWindow->SetReadOnly( TRUE );
+ pModulWindow->SetReadOnly( sal_True );
}
if ( aDocument.isDocument() && aDocument.isReadOnly() )
- pModulWindow->SetReadOnly( TRUE );
+ pModulWindow->SetReadOnly( sal_True );
}
// virtual
@@ -686,7 +686,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if ( pModulWindow->GetHScrollBar() )
{
- ULONG nWidth = pEditEngine->CalcTextWidth();
+ sal_uLong nWidth = pEditEngine->CalcTextWidth();
if ( (long)nWidth != nCurTextWidth )
{
nCurTextWidth = nWidth;
@@ -701,12 +701,12 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED )
{
- ParagraphInsertedDeleted( rTextHint.GetValue(), TRUE );
+ ParagraphInsertedDeleted( rTextHint.GetValue(), sal_True );
DoDelayedSyntaxHighlight( rTextHint.GetValue() );
}
else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED )
{
- ParagraphInsertedDeleted( rTextHint.GetValue(), FALSE );
+ ParagraphInsertedDeleted( rTextHint.GetValue(), sal_False );
}
else if( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED )
{
@@ -755,7 +755,7 @@ void EditorWindow::InitScrollBars()
}
}
-void EditorWindow::ImpDoHighlight( ULONG nLine )
+void EditorWindow::ImpDoHighlight( sal_uLong nLine )
{
if ( bDoSyntaxHighlight )
{
@@ -764,12 +764,12 @@ void EditorWindow::ImpDoHighlight( ULONG nLine )
if ( aChanges.Len() )
{
for ( long n = aChanges.Min() + 1; n <= aChanges.Max(); n++ )
- aSyntaxLineTable.Insert( n, (void*)(ULONG)1 );
+ aSyntaxLineTable.Insert( n, (void*)(sal_uLong)1 );
aSyntaxIdleTimer.Start();
}
- BOOL bWasModified = pEditEngine->IsModified();
- pEditEngine->RemoveAttribs( nLine, TRUE );
+ sal_Bool bWasModified = pEditEngine->IsModified();
+ pEditEngine->RemoveAttribs( nLine, sal_True );
HighlightPortions aPortions;
aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
@@ -777,7 +777,7 @@ void EditorWindow::ImpDoHighlight( ULONG nLine )
{
HighlightPortion& r = aPortions[i];
const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
- pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, TRUE );
+ pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, sal_True );
}
// Das Highlighten soll kein Modify setzen
@@ -806,14 +806,14 @@ void EditorWindow::ImplSetFont()
if ( pEditEngine )
{
- BOOL bModified = pEditEngine->IsModified();
+ sal_Bool bModified = pEditEngine->IsModified();
pEditEngine->SetFont( aFont );
pEditEngine->SetModified( bModified );
}
}
}
-void EditorWindow::DoSyntaxHighlight( ULONG nPara )
+void EditorWindow::DoSyntaxHighlight( sal_uLong nPara )
{
// Durch das DelayedSyntaxHighlight kann es passieren,
// dass die Zeile nicht mehr existiert!
@@ -826,7 +826,7 @@ void EditorWindow::DoSyntaxHighlight( ULONG nPara )
}
}
-void EditorWindow::DoDelayedSyntaxHighlight( ULONG nPara )
+void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong nPara )
{
// Zeile wird nur in 'Liste' aufgenommen, im TimerHdl abgearbeitet.
// => Nicht Absaetze manipulieren, waehrend EditEngine formatiert.
@@ -837,7 +837,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( ULONG nPara )
{
if ( bDelayHighlight )
{
- aSyntaxLineTable.Insert( nPara, (void*)(ULONG)1 );
+ aSyntaxLineTable.Insert( nPara, (void*)(sal_uLong)1 );
aSyntaxIdleTimer.Start();
}
else
@@ -849,38 +849,38 @@ IMPL_LINK( EditorWindow, SyntaxTimerHdl, Timer *, EMPTYARG )
{
DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" );
- BOOL bWasModified = pEditEngine->IsModified();
- // pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bWasModified = pEditEngine->IsModified();
+ // pEditEngine->SetUpdateMode( sal_False );
- bHighlightning = TRUE;
- USHORT nLine;
+ bHighlightning = sal_True;
+ sal_uInt16 nLine;
void* p = aSyntaxLineTable.First();
while ( p )
{
- nLine = (USHORT)aSyntaxLineTable.GetCurKey();
+ nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
DoSyntaxHighlight( nLine );
p = aSyntaxLineTable.Next();
}
// MT: Removed, because of idle format now when set/remove attribs...
- // pEditView->SetAutoScroll( FALSE ); // #101043# Don't scroll because of syntax highlight
- // pEditEngine->SetUpdateMode( TRUE );
- // pEditView->ShowCursor( FALSE, TRUE );
- // pEditView->SetAutoScroll( TRUE );
+ // pEditView->SetAutoScroll( sal_False ); // #101043# Don't scroll because of syntax highlight
+ // pEditEngine->SetUpdateMode( sal_True );
+ // pEditView->ShowCursor( sal_False, sal_True );
+ // pEditView->SetAutoScroll( sal_True );
// #i45572#
if ( pEditView )
- pEditView->ShowCursor( FALSE, TRUE );
+ pEditView->ShowCursor( sal_False, sal_True );
pEditEngine->SetModified( bWasModified );
aSyntaxLineTable.Clear();
- bHighlightning = FALSE;
+ bHighlightning = sal_False;
return 0;
}
-void EditorWindow::ParagraphInsertedDeleted( ULONG nPara, BOOL bInserted )
+void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, sal_Bool bInserted )
{
if ( pProgress )
pProgress->StepProgress();
@@ -897,7 +897,7 @@ void EditorWindow::ParagraphInsertedDeleted( ULONG nPara, BOOL bInserted )
// keine Sonderbehandlung fuer EditEngine-CTOR ( Erste-Zeile-Problem ),
// da in diesem Moment noch keine BreakPoints.
// +1: Basic-Zeilen beginnen bei 1!
- pModulWindow->GetBreakPoints().AdjustBreakPoints( (USHORT)nPara+1, bInserted );
+ pModulWindow->GetBreakPoints().AdjustBreakPoints( (sal_uInt16)nPara+1, bInserted );
// Im BreakPointWindow invalidieren...
long nLineHeight = GetTextHeight();
@@ -915,7 +915,7 @@ void EditorWindow::ParagraphInsertedDeleted( ULONG nPara, BOOL bInserted )
}
}
-void EditorWindow::CreateProgress( const String& rText, ULONG nRange )
+void EditorWindow::CreateProgress( const String& rText, sal_uLong nRange )
{
DBG_ASSERT( !pProgress, "ProgressInfo existiert schon" );
pProgress = new ProgressInfo( IDE_DLL()->GetShell()->GetViewFrame()->GetObjectShell(), rText, nRange );
@@ -986,12 +986,12 @@ void __EXPORT BreakPointWindow::Paint( const Rectangle& )
BreakPoint* pBrk = GetBreakPoints().First();
while ( pBrk )
{
- ULONG nLine = pBrk->nLine-1;
- ULONG nY = nLine*nLineHeight - nCurYOffset;
+ sal_uLong nLine = pBrk->nLine-1;
+ sal_uLong nY = nLine*nLineHeight - nCurYOffset;
DrawImage( Point( 0, nY ) + aBmpOff, pBrk->bEnabled ? aBrk1 : aBrk0 );
pBrk = GetBreakPoints().Next();
}
- ShowMarker( TRUE );
+ ShowMarker( sal_True );
}
@@ -1004,18 +1004,18 @@ void BreakPointWindow::DoScroll( long nHorzScroll, long nVertScroll )
-void BreakPointWindow::SetMarkerPos( USHORT nLine, BOOL bError )
+void BreakPointWindow::SetMarkerPos( sal_uInt16 nLine, sal_Bool bError )
{
if ( SyncYOffset() )
Update();
- ShowMarker( FALSE ); // Alten wegzeichen...
+ ShowMarker( sal_False ); // Alten wegzeichen...
nMarkerPos = nLine;
bErrorMarker = bError;
- ShowMarker( TRUE ); // Neuen zeichnen...
+ ShowMarker( sal_True ); // Neuen zeichnen...
}
-void BreakPointWindow::ShowMarker( BOOL bShow )
+void BreakPointWindow::ShowMarker( sal_Bool bShow )
{
if ( nMarkerPos == MARKER_NOMARKER )
return;
@@ -1034,7 +1034,7 @@ void BreakPointWindow::ShowMarker( BOOL bShow )
aMarkerOff.X() = ( aOutSz.Width() - aMarkerSz.Width() ) / 2;
aMarkerOff.Y() = ( nLineHeight - aMarkerSz.Height() ) / 2;
- ULONG nY = nMarkerPos*nLineHeight - nCurYOffset;
+ sal_uLong nY = nMarkerPos*nLineHeight - nCurYOffset;
Point aPos( 0, nY );
aPos += aMarkerOff;
if ( bShow )
@@ -1057,7 +1057,7 @@ BreakPoint* BreakPointWindow::FindBreakPoint( const Point& rMousePos )
BreakPoint* pBrk = GetBreakPoints().First();
while ( pBrk )
{
- ULONG nLine = pBrk->nLine-1;
+ sal_uLong nLine = pBrk->nLine-1;
long nY = nLine*nLineHeight;
if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) )
return pBrk;
@@ -1074,7 +1074,7 @@ void __EXPORT BreakPointWindow::MouseButtonDown( const MouseEvent& rMEvt )
long nLineHeight = GetTextHeight();
long nYPos = aMousePos.Y() + nCurYOffset;
long nLine = nYPos / nLineHeight + 1;
- pModulWindow->ToggleBreakPoint( (ULONG)nLine );
+ pModulWindow->ToggleBreakPoint( (sal_uLong)nLine );
// vielleicht mal etwas genauer...
Invalidate();
}
@@ -1098,7 +1098,7 @@ void __EXPORT BreakPointWindow::Command( const CommandEvent& rCEvt )
{
case RID_ACTIV:
{
- pBrk->bEnabled = pBrk->bEnabled ? FALSE : TRUE;
+ pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True;
pModulWindow->UpdateBreakPoint( *pBrk );
Invalidate();
}
@@ -1130,7 +1130,7 @@ void __EXPORT BreakPointWindow::Command( const CommandEvent& rCEvt )
}
}
-BOOL BreakPointWindow::SyncYOffset()
+sal_Bool BreakPointWindow::SyncYOffset()
{
TextView* pView = pModulWindow->GetEditView();
if ( pView )
@@ -1140,10 +1140,10 @@ BOOL BreakPointWindow::SyncYOffset()
{
nCurYOffset = nViewYOffset;
Invalidate();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// virtual
@@ -1170,9 +1170,9 @@ void BreakPointWindow::setBackgroundColor(Color aColor)
}
-const USHORT ITEM_ID_VARIABLE = 1;
-const USHORT ITEM_ID_VALUE = 2;
-const USHORT ITEM_ID_TYPE = 3;
+const sal_uInt16 ITEM_ID_VARIABLE = 1;
+const sal_uInt16 ITEM_ID_VALUE = 2;
+const sal_uInt16 ITEM_ID_TYPE = 3;
WatchWindow::WatchWindow( Window* pParent ) :
BasicDockingWindow( pParent ),
@@ -1187,7 +1187,7 @@ WatchWindow::WatchWindow( Window* pParent ) :
nHeaderBarHeight = 16;
aTreeListBox.SetHelpId(HID_BASICIDE_WATCHWINDOW_LIST);
- aTreeListBox.EnableInplaceEditing( TRUE );
+ aTreeListBox.EnableInplaceEditing( sal_True );
aTreeListBox.SetSelectHdl( LINK( this, WatchWindow, TreeListHdl ) );
aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight + nHeaderBarHeight ) );
aTreeListBox.SetHighlightRange( 1, 5 );
@@ -1389,15 +1389,15 @@ void WatchWindow::AddWatch( const String& rVName )
String aWatchStr_( aVar );
aWatchStr_ += String( RTL_CONSTASCII_USTRINGPARAM( "\t\t" ) );
- SvLBoxEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, TRUE, LIST_APPEND );
+ SvLBoxEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, sal_True, LIST_APPEND );
pNewEntry->SetUserData( pWatchItem );
- aTreeListBox.Select( pNewEntry, TRUE );
+ aTreeListBox.Select( pNewEntry, sal_True );
aTreeListBox.MakeVisible( pNewEntry );
aRemoveWatchButton.Enable();
}
-BOOL WatchWindow::RemoveSelectedWatch()
+sal_Bool WatchWindow::RemoveSelectedWatch()
{
SvLBoxEntry* pEntry = aTreeListBox.GetCurEntry();
if ( pEntry )
@@ -1410,10 +1410,10 @@ BOOL WatchWindow::RemoveSelectedWatch()
aXEdit.SetText( String() );
if ( !aTreeListBox.GetEntryCount() )
aRemoveWatchButton.Disable();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
@@ -1470,9 +1470,9 @@ IMPL_LINK_INLINE_START( WatchWindow, implEndDragHdl, HeaderBar *, pBar )
aHeaderBar.SetItemSize( ITEM_ID_TYPE, TAB_WIDTH_MIN );
sal_Int32 nPos = 0;
- USHORT nTabs = aHeaderBar.GetItemCount();
+ sal_uInt16 nTabs = aHeaderBar.GetItemCount();
// OSL_ASSERT( m_treelb->TabCount() == nTabs );
- for( USHORT i = 1 ; i < nTabs ; ++i )
+ for( sal_uInt16 i = 1 ; i < nTabs ; ++i )
{
nPos += aHeaderBar.GetItemSize( i );
aTreeListBox.SetTab( i, nPos, MAP_PIXEL );
@@ -1525,7 +1525,7 @@ StackWindow::StackWindow( Window* pParent ) :
aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
aTreeListBox.SetHighlightRange();
aTreeListBox.SetSelectionMode( NO_SELECTION );
- aTreeListBox.InsertEntry( String(), 0, FALSE, LIST_APPEND );
+ aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND );
aTreeListBox.Show();
SetText( String( IDEResId( RID_STR_STACKNAME ) ) );
@@ -1599,7 +1599,7 @@ IMPL_LINK_INLINE_END( StackWindow, ButtonHdl, ImageButton *, pButton )
void __EXPORT StackWindow::UpdateCalls()
{
- aTreeListBox.SetUpdateMode( FALSE );
+ aTreeListBox.SetUpdateMode( sal_False );
aTreeListBox.Clear();
if ( StarBASIC::IsRunning() )
@@ -1607,7 +1607,7 @@ void __EXPORT StackWindow::UpdateCalls()
SbxError eOld = SbxBase::GetError();
aTreeListBox.SetSelectionMode( SINGLE_SELECTION );
- USHORT nScope = 0;
+ sal_uInt16 nScope = 0;
SbMethod* pMethod = StarBASIC::GetActiveMethod( nScope );
while ( pMethod )
{
@@ -1622,7 +1622,7 @@ void __EXPORT StackWindow::UpdateCalls()
{
aEntry += '(';
// 0 ist der Name der Sub...
- for ( USHORT nParam = 1; nParam < pParams->Count(); nParam++ )
+ for ( sal_uInt16 nParam = 1; nParam < pParams->Count(); nParam++ )
{
SbxVariable* pVar = pParams->Get( nParam );
DBG_ASSERT( pVar, "Parameter?!" );
@@ -1645,7 +1645,7 @@ void __EXPORT StackWindow::UpdateCalls()
}
aEntry += ')';
}
- aTreeListBox.InsertEntry( aEntry, 0, FALSE, LIST_APPEND );
+ aTreeListBox.InsertEntry( aEntry, 0, sal_False, LIST_APPEND );
nScope++;
pMethod = StarBASIC::GetActiveMethod( nScope );
}
@@ -1657,10 +1657,10 @@ void __EXPORT StackWindow::UpdateCalls()
else
{
aTreeListBox.SetSelectionMode( NO_SELECTION );
- aTreeListBox.InsertEntry( String(), 0, FALSE, LIST_APPEND );
+ aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND );
}
- aTreeListBox.SetUpdateMode( TRUE );
+ aTreeListBox.SetUpdateMode( sal_True );
}
@@ -1716,7 +1716,7 @@ IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar )
long nDiff = aEdtWindow.GetEditView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos();
aEdtWindow.GetEditView()->Scroll( 0, nDiff );
aBrkWindow.DoScroll( 0, nDiff );
- aEdtWindow.GetEditView()->ShowCursor( FALSE, TRUE );
+ aEdtWindow.GetEditView()->ShowCursor( sal_False, sal_True );
pCurScrollBar->SetThumbPos( aEdtWindow.GetEditView()->GetStartDocPos().Y() );
}
@@ -1742,7 +1742,7 @@ void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt)
// virtual
uno::Reference< awt::XWindowPeer >
-EditorWindow::GetComponentInterface(BOOL bCreate)
+EditorWindow::GetComponentInterface(sal_Bool bCreate)
{
uno::Reference< awt::XWindowPeer > xPeer(
Window::GetComponentInterface(false));
@@ -1776,8 +1776,8 @@ WatchTreeListBox::~WatchTreeListBox()
void WatchTreeListBox::SetTabs()
{
SvHeaderTabListBox::SetTabs();
- USHORT nTabCount_ = aTabs.Count();
- for( USHORT i = 0 ; i < nTabCount_ ; i++ )
+ sal_uInt16 nTabCount_ = aTabs.Count();
+ for( sal_uInt16 i = 0 ; i < nTabCount_ ; i++ )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(i);
if( i == 2 )
@@ -1812,10 +1812,10 @@ void WatchTreeListBox::RequestingChilds( SvLBoxEntry * pParent )
{
createAllObjectProperties( pObj );
SbxArray* pProps = pObj->GetProperties();
- USHORT nPropCount = pProps->Count();
+ sal_uInt16 nPropCount = pProps->Count();
pItem->maMemberList.allocList( nPropCount );
- for( USHORT i = 0 ; i < nPropCount - 3 ; i++ )
+ for( sal_uInt16 i = 0 ; i < nPropCount - 3 ; i++ )
{
SbxVariable* pVar = pProps->Get( i );
@@ -1833,14 +1833,14 @@ void WatchTreeListBox::RequestingChilds( SvLBoxEntry * pParent )
}
else if( pArray )
{
- USHORT nElementCount = 0;
+ sal_uInt16 nElementCount = 0;
// Loop through indices of current level
int nParentLevel = bArrayIsRootArray ? pItem->nDimLevel : 0;
int nThisLevel = nParentLevel + 1;
- INT32 nMin, nMax;
+ sal_Int32 nMin, nMax;
pArray->GetDim32( nThisLevel, nMin, nMax );
- for( INT32 i = nMin ; i <= nMax ; i++ )
+ for( sal_Int32 i = nMin ; i <= nMax ; i++ )
{
WatchItem* pChildItem = new WatchItem();
@@ -1854,7 +1854,7 @@ void WatchTreeListBox::RequestingChilds( SvLBoxEntry * pParent )
pChildItem->nDimLevel = nThisLevel;
pChildItem->nDimCount = pItem->nDimCount;
pChildItem->pIndices = new short[ pChildItem->nDimCount ];
- USHORT j;
+ sal_uInt16 j;
for( j = 0 ; j < nParentLevel ; j++ )
{
short n = pChildItem->pIndices[j] = pItem->pIndices[j];
@@ -1932,11 +1932,11 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArra
return pSBX;
}
-BOOL __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
- BOOL bEdit = FALSE;
+ sal_Bool bEdit = sal_False;
if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() )
{
// No out of scope entries
@@ -1950,7 +1950,7 @@ BOOL __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
aEditingRes = SvHeaderTabListBox::GetEntryText( pEntry, ITEM_ID_VALUE-1 );
aEditingRes.EraseLeadingChars();
aEditingRes.EraseTrailingChars();
- bEdit = TRUE;
+ bEdit = sal_True;
}
}
}
@@ -1961,7 +1961,7 @@ BOOL __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
return bEdit;
}
-BOOL __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
+sal_Bool __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
{
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
String aVName( pItem->maName );
@@ -1970,20 +1970,20 @@ BOOL __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String&
aResult.EraseLeadingChars();
aResult.EraseTrailingChars();
- USHORT nResultLen = aResult.Len();
+ sal_uInt16 nResultLen = aResult.Len();
sal_Unicode cFirst = aResult.GetChar( 0 );
sal_Unicode cLast = aResult.GetChar( nResultLen - 1 );
if( cFirst == '\"' && cLast == '\"' )
aResult = aResult.Copy( 1, nResultLen - 2 );
- BOOL bResModified = ( aResult != aEditingRes ) ? TRUE : FALSE;
- BOOL bError = FALSE;
+ sal_Bool bResModified = ( aResult != aEditingRes ) ? sal_True : sal_False;
+ sal_Bool bError = sal_False;
if ( !aVName.Len() )
{
- bError = TRUE;
+ bError = sal_True;
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( bError )
{
@@ -1997,12 +1997,12 @@ BOOL __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String&
return bRet;
}
-BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult )
+sal_Bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult )
{
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
String aVName( pItem->maName );
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
String aResult( rResult );
String aIndex;
bool bArrayElement;
@@ -2013,10 +2013,10 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String&
{
SbxVariable* pVar = (SbxVariable*)pSBX;
SbxDataType eType = pVar->GetType();
- if ( (BYTE)eType == (BYTE)SbxOBJECT )
- bError = TRUE;
+ if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT )
+ bError = sal_True;
else if ( eType & SbxARRAY )
- bError = TRUE;
+ bError = sal_True;
else
pToBeChanged = pSBX;
}
@@ -2030,14 +2030,14 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String&
((SbxVariable*)pToBeChanged)->PutStringExt( aResult );
}
else
- bError = TRUE;
+ bError = sal_True;
}
// Wenn jemand z.B. einen zu grossen Wert fuer ein Int eingegeben hat,
// folgt beim naechsten Step() ein Runtime-Error.
if ( SbxBase::IsError() )
{
- bError = TRUE;
+ bError = sal_True;
SbxBase::ResetError();
}
@@ -2048,7 +2048,7 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String&
// Der Text soll niemals 1-zu-1 uebernommen werden, weil dann das
// UpdateWatches verlorengeht.
- return FALSE;
+ return sal_False;
}
@@ -2166,8 +2166,8 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
{
// Compare Array dimensions to see if array has changed
// Can be a copy, so comparing pointers does not work
- USHORT nOldDims = pOldArray->GetDims();
- USHORT nNewDims = pNewArray->GetDims();
+ sal_uInt16 nOldDims = pOldArray->GetDims();
+ sal_uInt16 nNewDims = pNewArray->GetDims();
if( nOldDims != nNewDims )
{
bArrayChanged = true;
@@ -2204,7 +2204,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
implEnableChildren( pEntry, true );
pItem->mpArray = pNewArray;
- USHORT nDims = pNewArray->GetDims();
+ sal_uInt16 nDims = pNewArray->GetDims();
pItem->nDimLevel = 0;
pItem->nDimCount = nDims;
}
@@ -2217,7 +2217,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
else
aWatchStr += String( RTL_CONSTASCII_USTRINGPARAM( "<?>" ) );
}
- else if ( (BYTE)eType == (BYTE)SbxOBJECT )
+ else if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT )
{
SbxObject* pObj = NULL;
SbxBase* pBase = pVar->GetObject();
@@ -2231,8 +2231,8 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
if( pItem->mpObject != NULL && pItem->maMemberList.mpMemberNames != NULL )
{
SbxArray* pProps = pObj->GetProperties();
- USHORT nPropCount = pProps->Count();
- for( USHORT i = 0 ; i < nPropCount - 3 ; i++ )
+ sal_uInt16 nPropCount = pProps->Count();
+ for( sal_uInt16 i = 0 ; i < nPropCount - 3 ; i++ )
{
SbxVariable* pVar_ = pProps->Get( i );
String aName( pVar_->GetName() );
@@ -2272,7 +2272,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
implEnableChildren( pEntry, false );
}
- bool bString = ((BYTE)eType == (BYTE)SbxSTRING);
+ bool bString = ((sal_uInt8)eType == (sal_uInt8)SbxSTRING);
String aStrStr( RTL_CONSTASCII_USTRINGPARAM( "\"" ) );
if( bString )
aWatchStr += aStrStr;
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 84291656c755..b6bba4918289 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -108,7 +108,7 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St
:IDEBaseWindow( pParent, rDocument, aLibName, aName )
,pUndoMgr(NULL)
{
- InitSettings( TRUE, TRUE, TRUE );
+ InitSettings( sal_True, sal_True, sal_True );
pEditor = new DlgEditor();
pEditor->SetWindow( this );
@@ -128,10 +128,10 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St
::rtl::OUString aOULibName( aLibName );
Reference< script::XLibraryContainer2 > xDlgLibContainer( GetDocument().getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) )
- SetReadOnly( TRUE );
+ SetReadOnly( sal_True );
if ( rDocument.isDocument() && rDocument.isReadOnly() )
- SetReadOnly( TRUE );
+ SetReadOnly( sal_True );
}
DialogWindow::~DialogWindow()
@@ -304,7 +304,7 @@ void __EXPORT DialogWindow::DoScroll( ScrollBar* pCurScrollBar )
void __EXPORT DialogWindow::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- for ( USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() )
+ for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() )
{
switch ( nWh )
{
@@ -350,10 +350,10 @@ void __EXPORT DialogWindow::GetState( SfxItemSet& rSet )
if( IDE_DLL()->GetShell()->GetFrame() )
{
rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,
- (pEditor->GetMode() == DLGED_TEST) ? TRUE : FALSE) );
+ (pEditor->GetMode() == DLGED_TEST) ? sal_True : sal_False) );
}
else
- rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,FALSE ));
+ rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,sal_False ));
}
break;
@@ -370,7 +370,7 @@ void __EXPORT DialogWindow::GetState( SfxItemSet& rSet )
aItem.SetValue( SVX_SNAP_SELECT );
else
{
- USHORT nObj;
+ sal_uInt16 nObj;
switch( pEditor->GetInsertObj() )
{
case OBJ_DLG_PUSHBUTTON: nObj = SVX_SNAP_PUSHBUTTON; break;
@@ -650,16 +650,16 @@ Reference< container::XNameContainer > DialogWindow::GetDialog() const
return pEditor->GetDialog();
}
-BOOL DialogWindow::RenameDialog( const String& rNewName )
+sal_Bool DialogWindow::RenameDialog( const String& rNewName )
{
if ( !BasicIDE::RenameDialog( this, GetDocument(), GetLibName(), GetName(), rNewName ) )
- return FALSE;
+ return sal_False;
SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings )
pBindings->Invalidate( SID_DOC_MODIFIED );
- return TRUE;
+ return sal_True;
}
void DialogWindow::DisableBrowser()
@@ -683,10 +683,10 @@ void DialogWindow::UpdateBrowser()
static ::rtl::OUString aResourceResolverPropName =
::rtl::OUString::createFromAscii( "ResourceResolver" );
-BOOL DialogWindow::SaveDialog()
+sal_Bool DialogWindow::SaveDialog()
{
DBG_CHKTHIS( DialogWindow, 0 );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference < XFilePicker > xFP;
@@ -950,9 +950,9 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
}
-BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName )
+sal_Bool implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference < XFilePicker > xFP;
@@ -1046,7 +1046,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
aQueryBoxText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "$(ARG1)" ) ), aXmlDlgName );
NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
- USHORT nRet = aQueryBox.Execute();
+ sal_uInt16 nRet = aQueryBox.Execute();
if( RET_YES == nRet )
{
// RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox
@@ -1083,7 +1083,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales();
sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength();
- Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) );
Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
sal_Int32 nLibLocaleCount = 0;
Sequence< lang::Locale > aLibLocaleSeq;
@@ -1108,7 +1108,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_MISMATCH_TITLE ) );
String aQueryBoxText( IDEResId( RID_STR_DLGIMP_MISMATCH_TEXT ) );
LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
- USHORT nRet = aQueryBox.Execute();
+ sal_uInt16 nRet = aQueryBox.Execute();
if( RET_YES == nRet )
{
// RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox
@@ -1194,9 +1194,9 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
{
if ( BasicIDE::RemoveDialog( rDocument, aLibName, aNewDlgName ) )
{
- IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, FALSE, TRUE );
+ IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, sal_False, sal_True );
if( pDlgWin != NULL )
- pIDEShell->RemoveWindow( pDlgWin, TRUE );
+ pIDEShell->RemoveWindow( pDlgWin, sal_True );
BasicIDE::MarkDocumentModified( rDocument );
}
else
@@ -1239,10 +1239,10 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
if( bSuccess )
{
DialogWindow* pNewDlgWin = pIDEShell->CreateDlgWin( rDocument, aLibName, aNewDlgName );
- pIDEShell->SetCurWindow( pNewDlgWin, TRUE );
+ pIDEShell->SetCurWindow( pNewDlgWin, sal_True );
}
- bDone = TRUE;
+ bDone = sal_True;
}
catch( Exception& )
{}
@@ -1251,13 +1251,13 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen
return bDone;
}
-BOOL DialogWindow::ImportDialog()
+sal_Bool DialogWindow::ImportDialog()
{
DBG_CHKTHIS( DialogWindow, 0 );
const ScriptDocument& rDocument = GetDocument();
String aLibName = GetLibName();
- BOOL bRet = implImportDialog( this, aCurPath, rDocument, aLibName );
+ sal_Bool bRet = implImportDialog( this, aCurPath, rDocument, aLibName );
return bRet;
}
@@ -1276,7 +1276,7 @@ DlgEdView* DialogWindow::GetView() const
return pEditor ? pEditor->GetView() : NULL;
}
-BOOL __EXPORT DialogWindow::IsModified()
+sal_Bool __EXPORT DialogWindow::IsModified()
{
return pEditor->IsModified();
}
@@ -1300,7 +1300,7 @@ BasicEntryDescriptor DialogWindow::CreateEntryDescriptor()
return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG );
}
-void DialogWindow::SetReadOnly( BOOL b )
+void DialogWindow::SetReadOnly( sal_Bool b )
{
if ( pEditor )
{
@@ -1311,19 +1311,19 @@ void DialogWindow::SetReadOnly( BOOL b )
}
}
-BOOL DialogWindow::IsReadOnly()
+sal_Bool DialogWindow::IsReadOnly()
{
- BOOL bReadOnly = FALSE;
+ sal_Bool bReadOnly = sal_False;
if ( pEditor && pEditor->GetMode() == DLGED_READONLY )
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
return bReadOnly;
}
-BOOL DialogWindow::IsPasteAllowed()
+sal_Bool DialogWindow::IsPasteAllowed()
{
- return pEditor ? pEditor->IsPasteAllowed() : FALSE;
+ return pEditor ? pEditor->IsPasteAllowed() : sal_False;
}
void DialogWindow::StoreData()
@@ -1378,14 +1378,14 @@ void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- InitSettings( TRUE, TRUE, TRUE );
+ InitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
else
IDEBaseWindow::DataChanged( rDCEvt );
}
-void DialogWindow::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
+void DialogWindow::InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont )
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 351186325b09..f6d4204fb586 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -93,7 +93,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
case SID_BASICIDE_HIDECURPAGE:
{
pCurWin->StoreData();
- RemoveWindow( pCurWin, FALSE );
+ RemoveWindow( pCurWin, sal_False );
}
break;
case SID_BASICIDE_DELETECURRENT:
@@ -120,7 +120,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
{
if ( BasicIDE::RemoveDialog( aDocument, aLibName, aName ) )
{
- RemoveWindow( pCurWin, TRUE );
+ RemoveWindow( pCurWin, sal_True );
BasicIDE::MarkDocumentModified( aDocument );
}
}
@@ -139,7 +139,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
const SfxItemSet* pArgs = rReq.GetArgs();
// Leider kenne ich die ID nicht:
- USHORT nWhich = pArgs->GetWhichByPos( 0 );
+ sal_uInt16 nWhich = pArgs->GetWhichByPos( 0 );
DBG_ASSERT( nWhich, "Wich fuer SearchItem ?" );
const SfxPoolItem& rItem = pArgs->Get( nWhich );
DBG_ASSERT( rItem.ISA( SvxSearchItem ), "Kein Searchitem!" );
@@ -147,11 +147,11 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
{
// Item wegen der Einstellungen merken...
IDE_DLL()->GetExtraData()->SetSearchItem( (const SvxSearchItem&)rItem );
- USHORT nFound = 0;
- BOOL bCanceled = FALSE;
+ sal_uInt16 nFound = 0;
+ sal_Bool bCanceled = sal_False;
if ( ((const SvxSearchItem&)rItem).GetCommand() == SVX_SEARCHCMD_REPLACE_ALL )
{
- USHORT nActModWindows = 0;
+ sal_uInt16 nActModWindows = 0;
IDEBaseWindow* pWin = aIDEWindowTable.First();
while ( pWin )
{
@@ -184,11 +184,11 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
if ( !nFound && !((const SvxSearchItem&)rItem).GetSelection() )
{
// Andere Module durchsuchen...
- BOOL bChangeCurWindow = FALSE;
+ sal_Bool bChangeCurWindow = sal_False;
aIDEWindowTable.Seek( pCurWin );
// Erstmal beim naechsten Anfangen, ggf. spaeter von vorne
IDEBaseWindow* pWin = aIDEWindowTable.Next();
- BOOL bSearchedFromStart = FALSE;
+ sal_Bool bSearchedFromStart = sal_False;
while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) )
{
if ( !pWin )
@@ -200,10 +200,10 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
if ( aQuery.Execute() == RET_YES )
{
pWin = aIDEWindowTable.First();
- bSearchedFromStart = TRUE;
+ bSearchedFromStart = sal_True;
}
else
- bCanceled = TRUE;
+ bCanceled = sal_True;
}
if ( pWin && !pWin->IsSuspended() && pWin->IsA( TYPE( ModulWindow ) ) )
@@ -214,11 +214,11 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
// gleich richtig justiert werden kann.
if ( pCurWin )
pWin->SetSizePixel( pCurWin->GetSizePixel() );
- nFound = ((ModulWindow*)pWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, TRUE );
+ nFound = ((ModulWindow*)pWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_True );
}
if ( nFound )
{
- bChangeCurWindow = TRUE;
+ bChangeCurWindow = sal_True;
break;
}
}
@@ -228,9 +228,9 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
pWin = 0; // Dann sind wir durch...
}
if ( !nFound && bSearchedFromStart ) // Aktuelles von vorne...
- nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, TRUE );
+ nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_True );
if ( bChangeCurWindow )
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
}
if ( !nFound && !bCanceled )
InfoBox( pCurWin, String( IDEResId( RID_STR_SEARCHNOTFOUND ) ) ).Execute();
@@ -266,7 +266,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
// Egal, wer oben, Einfluss auf die Shell:
void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_BASICSTOP:
@@ -291,7 +291,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
{
uno::Reference< task::XStatusIndicator > xStatusIndicator;
- SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, FALSE );
+ SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, sal_False );
if ( pStatusIndicatorItem )
OSL_VERIFY( pStatusIndicatorItem->GetValue() >>= xStatusIndicator );
else
@@ -353,7 +353,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
break;
case SID_BASICIDE_CHOOSEMACRO:
{
- BasicIDE::ChooseMacro( NULL, FALSE, ::rtl::OUString() );
+ BasicIDE::ChooseMacro( NULL, sal_False, ::rtl::OUString() );
}
break;
case SID_BASICIDE_CREATEMACRO:
@@ -366,7 +366,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
- StartListening( *pBasMgr, TRUE /* Nur einmal anmelden */ );
+ StartListening( *pBasMgr, sal_True /* Nur einmal anmelden */ );
String aLibName( rInfo.GetLib() );
if ( !aLibName.Len() )
aLibName = String::CreateFromAscii( "Standard" );
@@ -394,7 +394,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
String aModName = rInfo.GetModule();
::rtl::OUString sModuleCode;
- if ( aDocument.createModule( aLibName, aModName, FALSE, sModuleCode ) )
+ if ( aDocument.createModule( aLibName, aModName, sal_False, sModuleCode ) )
pModule = pBasic->FindModule( aModName );
}
else
@@ -407,15 +407,15 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
SfxViewFrame* pViewFrame = GetViewFrame();
if ( pViewFrame )
pViewFrame->ToTop();
- ModulWindow* pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), TRUE );
+ ModulWindow* pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), sal_True );
DBG_ASSERT( pWin, "Edit/Create Macro: Fenster wurde nicht erzeugt/gefunden!" );
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
pWin->EditMacro( rInfo.GetMethod() );
}
break;
case SID_BASICIDE_OBJCAT:
{
- ShowObjectDialog( TRUE, TRUE );
+ ShowObjectDialog( sal_True, sal_True );
}
break;
case SID_BASICIDE_NAMECHANGEDONTAB:
@@ -444,7 +444,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
// Because we listen for container events for script
// modules, rename will delete the 'old' window
// pWin has been invalidated, restore now
- pWin = FindBasWin( aDocument, aLibName, aNewName, TRUE );
+ pWin = FindBasWin( aDocument, aLibName, aNewName, sal_True );
}
}
@@ -460,7 +460,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
else
{
// set old name in TabWriter
- USHORT nId = (USHORT)aIDEWindowTable.GetKey( pWin );
+ sal_uInt16 nId = (sal_uInt16)aIDEWindowTable.GetKey( pWin );
DBG_ASSERT( nId, "No entry in Tabbar!" );
if ( nId )
pTabBar->SetPageText( nId, aOldName );
@@ -480,7 +480,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager();
DBG_ASSERT( pBasMgr, "Store source: Kein BasMgr?" );
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
- ModulWindow* pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), FALSE, TRUE );
+ ModulWindow* pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), sal_False, sal_True );
if ( pWin )
{
if ( rReq.GetSlot() == SID_BASICIDE_STOREMODULESOURCE )
@@ -525,7 +525,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
aDocument.loadLibraryIfExists( E_DIALOGS, aLibName );
// check password, if library is password protected and not verified
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
{
@@ -546,14 +546,14 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
// alten Wert einstellen...
SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings )
- pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, TRUE, FALSE );
+ pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False );
}
}
else if ( nSlot == SID_BASICIDE_LIBREMOVED )
{
if ( !m_aCurLibName.Len() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) )
{
- RemoveWindows( aDocument, aLibName, TRUE );
+ RemoveWindows( aDocument, aLibName, sal_True );
if ( aDocument == m_aCurDocument && aLibName == m_aCurLibName )
{
m_aCurDocument = ScriptDocument::getApplicationScriptDocument();
@@ -573,14 +573,14 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
{
ModulWindow* pWin = CreateBasWin( m_aCurDocument, m_aCurLibName, String() );
DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" );
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
}
break;
case SID_BASICIDE_NEWDIALOG:
{
DialogWindow* pWin = CreateDlgWin( m_aCurDocument, m_aCurLibName, String() );
DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" );
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
}
break;
case SID_BASICIDE_SBXRENAMED:
@@ -599,9 +599,9 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
{
IDEBaseWindow* pWin = 0;
if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
- pWin = FindBasWin( aDocument, aLibName, aName, TRUE );
+ pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
else if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
- pWin = FindDlgWin( aDocument, aLibName, aName, TRUE );
+ pWin = FindDlgWin( aDocument, aLibName, aName, sal_True );
}
}
break;
@@ -610,9 +610,9 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
ScriptDocument aDocument( rSbxItem.GetDocument() );
- IDEBaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), TRUE );
+ IDEBaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), sal_True );
if ( pWin )
- RemoveWindow( pWin, TRUE );
+ RemoveWindow( pWin, sal_True );
}
break;
case SID_BASICIDE_SHOWSBX:
@@ -626,19 +626,19 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
IDEBaseWindow* pWin = 0;
if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
{
- pWin = FindDlgWin( aDocument, aLibName, aName, TRUE );
+ pWin = FindDlgWin( aDocument, aLibName, aName, sal_True );
}
else if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
{
- pWin = FindBasWin( aDocument, aLibName, aName, TRUE );
+ pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
}
else if ( rSbxItem.GetType() == BASICIDE_TYPE_METHOD )
{
- pWin = FindBasWin( aDocument, aLibName, aName, TRUE );
+ pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
((ModulWindow*)pWin)->EditMacro( rSbxItem.GetMethodName() );
}
DBG_ASSERT( pWin, "Fenster wurde nicht erzeugt!" );
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
pTabBar->MakeVisible( pTabBar->GetCurPageId() );
}
break;
@@ -691,13 +691,13 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
IDEBaseWindow* pWin = 0;
if ( aType == aModType )
- pWin = FindBasWin( *pDocument, aLibName, aName, FALSE );
+ pWin = FindBasWin( *pDocument, aLibName, aName, sal_False );
else if ( aType == aDlgType )
- pWin = FindDlgWin( *pDocument, aLibName, aName, FALSE );
+ pWin = FindDlgWin( *pDocument, aLibName, aName, sal_False );
if ( pWin )
{
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
if ( pTabBar )
pTabBar->MakeVisible( pTabBar->GetCurPageId() );
@@ -733,7 +733,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
long nNewY = nLine * pTextEngine->GetCharHeight() - nVisHeight / 2;
nNewY = ::std::min( nNewY, nMaxY );
pTextView->Scroll( 0, -( nNewY - nOldY ) );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pModWin->GetEditVScrollBar().SetThumbPos( pTextView->GetStartDocPos().Y() );
}
sal_uInt16 nCol1 = 0, nCol2 = 0;
@@ -781,7 +781,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- for ( USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() )
+ for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() )
{
switch ( nWh )
{
@@ -792,7 +792,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
break;
case SID_SAVEDOC:
{
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
if ( pCurWin )
{
@@ -805,7 +805,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
}
else
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
if ( bDisable )
@@ -899,7 +899,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
break;
case SID_SEARCH_OPTIONS:
{
- USHORT nOptions = 0;
+ sal_uInt16 nOptions = 0;
if( pCurWin )
nOptions = pCurWin->GetSearchOptions();
rSet.Put( SfxUInt16Item( SID_SEARCH_OPTIONS, nOptions ) );
@@ -919,7 +919,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
break;
case SID_SEARCH_ITEM:
{
- String aSelected = GetSelectionText( TRUE );
+ String aSelected = GetSelectionText( sal_True );
SvxSearchItem& rItem = IDE_DLL()->GetExtraData()->GetSearchItem();
rItem.SetSearchString( aSelected );
rSet.Put( rItem );
@@ -936,12 +936,12 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
case SID_DOC_MODIFIED:
{
String aModifiedMarker;
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( pCurWin )
{
if ( pCurWin->IsModified() )
- bModified = TRUE;
+ bModified = sal_True;
else
{
ScriptDocument aDocument( pCurWin->GetDocument() );
@@ -998,7 +998,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
{
Sequence< lang::Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales();
const lang::Locale* pLocale = aLocaleSeq.getConstArray();
- INT32 i, nCount = aLocaleSeq.getLength();
+ sal_Int32 i, nCount = aLocaleSeq.getLength();
// Force different results for any combination of locales and default locale
::rtl::OUString aLangStr;
@@ -1047,7 +1047,7 @@ sal_Bool BasicIDEShell::HasUIFeature( sal_uInt32 nFeature )
return bResult;
}
-void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BOOL bRememberAsCurrent )
+void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar, sal_Bool bRememberAsCurrent )
{
// Es muss ein EditWindow am Sfx gesetzt sein, sonst kommt kein
// Resize, also stehen die Controls auf den Wiese...
@@ -1057,7 +1057,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO
pModulLayout->Show();
AdjustPosSizePixel( Point( 0, 0 ), GetViewFrame()->GetWindow().GetOutputSizePixel() );
SetWindow( pModulLayout );
- EnableScrollbars( FALSE );
+ EnableScrollbars( sal_False );
aVScrollBar.Hide();
}
@@ -1099,7 +1099,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO
BasicIDEData* pData = IDE_DLL()->GetExtraData();
if ( pData )
{
- USHORT nCurrentType = pCurWin->IsA( TYPE( ModulWindow ) ) ? BASICIDE_TYPE_MODULE : BASICIDE_TYPE_DIALOG;
+ sal_uInt16 nCurrentType = pCurWin->IsA( TYPE( ModulWindow ) ) ? BASICIDE_TYPE_MODULE : BASICIDE_TYPE_DIALOG;
LibInfoItem* pLibInfoItem = new LibInfoItem( pCurWin->GetDocument(), pCurWin->GetLibName(), pCurWin->GetName(), nCurrentType );
pData->GetLibInfos().InsertInfo( pLibInfoItem );
}
@@ -1124,10 +1124,10 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO
}
if ( bUpdateTabBar )
{
- ULONG nKey = aIDEWindowTable.GetKey( pCurWin );
- if ( pCurWin && ( pTabBar->GetPagePos( (USHORT)nKey ) == TAB_PAGE_NOTFOUND ) )
- pTabBar->InsertPage( (USHORT)nKey, pCurWin->GetTitle() ); // wurde neu eingeblendet
- pTabBar->SetCurPageId( (USHORT)nKey );
+ sal_uLong nKey = aIDEWindowTable.GetKey( pCurWin );
+ if ( pCurWin && ( pTabBar->GetPagePos( (sal_uInt16)nKey ) == TAB_PAGE_NOTFOUND ) )
+ pTabBar->InsertPage( (sal_uInt16)nKey, pCurWin->GetTitle() ); // wurde neu eingeblendet
+ pTabBar->SetCurPageId( (sal_uInt16)nKey );
}
if ( pCurWin && pCurWin->IsSuspended() ) // Wenn das Fenster im Fehlerfall angezeigt wird...
pCurWin->SetStatus( pCurWin->GetStatus() & ~BASWIN_SUSPENDED );
@@ -1145,7 +1145,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO
}
SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 );
InvalidateBasicIDESlots();
- EnableScrollbars( pCurWin ? TRUE : FALSE );
+ EnableScrollbars( pCurWin ? sal_True : sal_False );
if ( m_pCurLocalizationMgr )
m_pCurLocalizationMgr->handleTranslationbar();
@@ -1205,7 +1205,7 @@ IDEBaseWindow* BasicIDEShell::FindApplicationWindow()
return FindWindow( ScriptDocument::getApplicationScriptDocument() );
}
-IDEBaseWindow* BasicIDEShell::FindWindow( const ScriptDocument& rDocument, const String& rLibName, const String& rName, USHORT nType, BOOL bFindSuspended )
+IDEBaseWindow* BasicIDEShell::FindWindow( const ScriptDocument& rDocument, const String& rLibName, const String& rName, sal_uInt16 nType, sal_Bool bFindSuspended )
{
IDEBaseWindow* pWin = aIDEWindowTable.First();
while ( pWin )
@@ -1244,8 +1244,8 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic )
ModulWindow* pModWin = ShowActiveModuleWindow( pBasic );
if ( pModWin )
{
- BOOL bAppWindowDisabled, bDispatcherLocked;
- USHORT nWaitCount;
+ sal_Bool bAppWindowDisabled, bDispatcherLocked;
+ sal_uInt16 nWaitCount;
SfxUInt16Item *pSWActionCount, *pSWLockViewCount;
BasicIDE::BasicStopped( &bAppWindowDisabled, &bDispatcherLocked,
&nWaitCount, &pSWActionCount, &pSWLockViewCount );
@@ -1255,15 +1255,15 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic )
if ( StarBASIC::IsRunning() ) // Falls abgebrochen...
{
if ( bAppWindowDisabled )
- Application::GetDefDialogParent()->Enable( FALSE );
+ Application::GetDefDialogParent()->Enable( sal_False );
/*
if ( bDispatcherLocked )
- SFX_APP()->LockDispatcher( TRUE );
+ SFX_APP()->LockDispatcher( sal_True );
*/
if ( nWaitCount )
{
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
- for ( USHORT n = 0; n < nWaitCount; n++ )
+ for ( sal_uInt16 n = 0; n < nWaitCount; n++ )
pIDEShell->GetViewFrame()->GetWindow().EnterWait();
}
}
@@ -1294,15 +1294,15 @@ ModulWindow* BasicIDEShell::ShowActiveModuleWindow( StarBASIC* pBasic )
{
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
String aLibName = pLib->GetName();
- pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), TRUE );
+ pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), sal_True );
DBG_ASSERT( pWin, "Error/Step-Hdl: Fenster wurde nicht erzeugt/gefunden!" );
SetCurLib( aDocument, aLibName );
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
}
}
BasicManager* pBasicMgr = BasicIDE::FindBasicManager( pBasic );
if ( pBasicMgr )
- StartListening( *pBasicMgr, TRUE /* Nur einmal anmelden */ );
+ StartListening( *pBasicMgr, sal_True /* Nur einmal anmelden */ );
return pWin;
}
return 0;
@@ -1358,7 +1358,7 @@ Reference< XModel > BasicIDEShell::GetCurrentDocument() const
return xDocument;
}
-void __EXPORT BasicIDEShell::Activate( BOOL bMDI )
+void __EXPORT BasicIDEShell::Activate( sal_Bool bMDI )
{
SfxViewShell::Activate( bMDI );
@@ -1367,13 +1367,13 @@ void __EXPORT BasicIDEShell::Activate( BOOL bMDI )
if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) )
((DialogWindow*)pCurWin)->UpdateBrowser();
- ShowObjectDialog( TRUE, FALSE );
+ ShowObjectDialog( sal_True, sal_False );
}
}
-void __EXPORT BasicIDEShell::Deactivate( BOOL bMDI )
+void __EXPORT BasicIDEShell::Deactivate( sal_Bool bMDI )
{
- // bMDI TRUE heisst, dass ein anderes MDI aktiviert wurde, bei einem
+ // bMDI sal_True heisst, dass ein anderes MDI aktiviert wurde, bei einem
// Deactivate durch eine MessageBox ist bMDI FALSE
if ( bMDI )
{
@@ -1387,30 +1387,30 @@ void __EXPORT BasicIDEShell::Deactivate( BOOL bMDI )
// CanClose pruefen, damit auch beim deaktivieren der BasicIDE geprueft wird,
// ob in einem Modul der Sourcecode zu gross ist...
- for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
+ for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin );
if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() )
{
if ( m_aCurLibName.Len() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
SetCurLib( ScriptDocument::getApplicationScriptDocument(), String(), false );
- SetCurWindow( pWin, TRUE );
+ SetCurWindow( pWin, sal_True );
break;
}
}
- ShowObjectDialog( FALSE, FALSE );
+ ShowObjectDialog( sal_False, sal_False );
}
}
IMPL_LINK( BasicIDEShell, AccelSelectHdl, Accelerator*, pAccel )
{
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
SfxViewFrame* pViewFrame = GetViewFrame();
SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
if( !pDispatcher )
- return FALSE;
+ return sal_False;
switch ( pAccel->GetCurKeyCode().GetCode() )
{
case KEY_F5:
@@ -1434,7 +1434,7 @@ IMPL_LINK( BasicIDEShell, AccelSelectHdl, Accelerator*, pAccel )
else
pDispatcher->Execute( SID_BASICIDE_TOGGLEBRKPNT, SFX_CALLMODE_SYNCHRON );
break;
- default: bDone = FALSE;
+ default: bDone = sal_False;
}
return bDone;
}
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 3a3a162f5b5e..a5ee2a0aba19 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -61,7 +61,7 @@ namespace css = ::com::sun::star;
IMPL_LINK_INLINE_START( BasicIDEShell, ObjectDialogCancelHdl, ObjectCatalog *, EMPTYARG )
{
- ShowObjectDialog( FALSE, TRUE );
+ ShowObjectDialog( sal_False, sal_True );
return 0;
}
IMPL_LINK_INLINE_END( BasicIDEShell, ObjectDialogCancelHdl, ObjectCatalog *, EMPTYARG )
@@ -90,11 +90,11 @@ Reference< view::XRenderable > BasicIDEShell::GetRenderable()
}
#if 0
-USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog )
+sal_uInt16 __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog )
{
if ( pCurWin )
{
- SfxPrinter* pPrinter = GetPrinter( TRUE );
+ SfxPrinter* pPrinter = GetPrinter( sal_True );
if ( pPrinter )
{
SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog );
@@ -105,19 +105,19 @@ USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, Print
}
#endif
-BOOL BasicIDEShell::HasSelection( BOOL /* bText */ ) const
+sal_Bool BasicIDEShell::HasSelection( sal_Bool /* bText */ ) const
{
- BOOL bSel = FALSE;
+ sal_Bool bSel = sal_False;
if ( pCurWin && pCurWin->ISA( ModulWindow ) )
{
TextView* pEditView = ((ModulWindow*)pCurWin)->GetEditView();
if ( pEditView && pEditView->HasSelection() )
- bSel = TRUE;
+ bSel = sal_True;
}
return bSel;
}
-String BasicIDEShell::GetSelectionText( BOOL bWholeWord )
+String BasicIDEShell::GetSelectionText( sal_Bool bWholeWord )
{
String aText;
if ( pCurWin && pCurWin->ISA( ModulWindow ) )
@@ -143,7 +143,7 @@ String BasicIDEShell::GetSelectionText( BOOL bWholeWord )
return aText;
}
-SfxPrinter* __EXPORT BasicIDEShell::GetPrinter( BOOL bCreate )
+SfxPrinter* __EXPORT BasicIDEShell::GetPrinter( sal_Bool bCreate )
{
if ( pCurWin ) // && pCurWin->ISA( ModulWindow ) )
{
@@ -154,7 +154,7 @@ SfxPrinter* __EXPORT BasicIDEShell::GetPrinter( BOOL bCreate )
return 0;
}
-USHORT __EXPORT BasicIDEShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 __EXPORT BasicIDEShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
(void)nDiffFlags;
BasicDocShell* pDocShell = (BasicDocShell*)GetViewFrame()->GetObjectShell();
@@ -194,7 +194,7 @@ void BasicIDEShell::SetMDITitle()
if ( pShell && aTitle != pShell->GetTitle( SFX_TITLE_CAPTION ) )
{
pShell->SetTitle( aTitle );
- pShell->SetModified( FALSE );
+ pShell->SetModified( sal_False );
}
css::uno::Reference< css::frame::XController > xController = GetController ();
@@ -227,9 +227,9 @@ void BasicIDEShell::CreateModulWindowLayout()
ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName )
{
- bCreatingWindow = TRUE;
+ bCreatingWindow = sal_True;
- ULONG nKey = 0;
+ sal_uLong nKey = 0;
ModulWindow* pWin = 0;
String aLibName( rLibName );
@@ -244,7 +244,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
// Vielleicht gibt es ein suspendiertes?
- pWin = FindBasWin( rDocument, aLibName, aModName, FALSE, TRUE );
+ pWin = FindBasWin( rDocument, aLibName, aModName, sal_False, sal_True );
if ( !pWin )
{
@@ -253,11 +253,11 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
if ( rDocument.hasModule( aLibName, aModName ) )
bSuccess = rDocument.getModule( aLibName, aModName, aModule );
else
- bSuccess = rDocument.createModule( aLibName, aModName, TRUE, aModule );
+ bSuccess = rDocument.createModule( aLibName, aModName, sal_True, aModule );
if ( bSuccess )
{
- pWin = FindBasWin( rDocument, aLibName, aModName, FALSE, TRUE );
+ pWin = FindBasWin( rDocument, aLibName, aModName, sal_False, sal_True );
if( !pWin )
{
// new module window
@@ -291,17 +291,17 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")");
}
}
- pTabBar->InsertPage( (USHORT)nKey, aModName );
+ pTabBar->InsertPage( (sal_uInt16)nKey, aModName );
pTabBar->Sort();
pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
if ( !pCurWin )
- SetCurWindow( pWin, FALSE, FALSE );
+ SetCurWindow( pWin, sal_False, sal_False );
- bCreatingWindow = FALSE;
+ bCreatingWindow = sal_False;
return pWin;
}
-ModulWindow* BasicIDEShell::FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, BOOL bCreateIfNotExist, BOOL bFindSuspended )
+ModulWindow* BasicIDEShell::FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended )
{
ModulWindow* pModWin = 0;
IDEBaseWindow* pWin = aIDEWindowTable.First();
@@ -331,7 +331,7 @@ void __EXPORT BasicIDEShell::Move()
void __EXPORT BasicIDEShell::ShowCursor( FASTBOOL bOn )
{
if ( pCurWin && pCurWin->ISA( ModulWindow ) )
- ((ModulWindow*)pCurWin)->ShowCursor( (BOOL)bOn );
+ ((ModulWindow*)pCurWin)->ShowCursor( (sal_Bool)bOn );
}
// Hack for #101048
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index 22fbdc4a9c7b..e3b072f905cd 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -57,9 +57,9 @@ using namespace ::com::sun::star::io;
DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName )
{
- bCreatingWindow = TRUE;
+ bCreatingWindow = sal_True;
- ULONG nKey = 0;
+ sal_uLong nKey = 0;
DialogWindow* pWin = 0;
String aLibName( rLibName );
String aDlgName( rDlgName );
@@ -73,7 +73,7 @@ DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, cons
aDlgName = rDocument.createObjectName( E_DIALOGS, aLibName );
// Vielleicht gibt es ein suspendiertes?
- pWin = FindDlgWin( rDocument, aLibName, aDlgName, FALSE, TRUE );
+ pWin = FindDlgWin( rDocument, aLibName, aDlgName, sal_False, sal_True );
if ( !pWin )
{
@@ -125,17 +125,17 @@ DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, cons
if( pWin )
{
pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
- pTabBar->InsertPage( (USHORT)nKey, aDlgName );
+ pTabBar->InsertPage( (sal_uInt16)nKey, aDlgName );
pTabBar->Sort();
if ( !pCurWin )
- SetCurWindow( pWin, FALSE, FALSE );
+ SetCurWindow( pWin, sal_False, sal_False );
}
- bCreatingWindow = FALSE;
+ bCreatingWindow = sal_False;
return pWin;
}
-DialogWindow* BasicIDEShell::FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, BOOL bCreateIfNotExist, BOOL bFindSuspended )
+DialogWindow* BasicIDEShell::FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended )
{
DialogWindow* pDlgWin = 0;
IDEBaseWindow* pWin = aIDEWindowTable.First();
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 0af7b9dda920..56dcd66ad181 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -106,7 +106,7 @@ public:
{
try
{
- uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, FALSE ), uno::UNO_QUERY );
+ uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, sal_False ), uno::UNO_QUERY );
if ( xContainer.is() )
{
uno::Reference< container::XContainerListener > xContainerListener( this );
@@ -119,7 +119,7 @@ public:
{
try
{
- uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, FALSE ), uno::UNO_QUERY );
+ uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, sal_False ), uno::UNO_QUERY );
if ( xContainer.is() )
{
uno::Reference< container::XContainerListener > xContainerListener( this );
@@ -137,7 +137,7 @@ public:
{
rtl::OUString sModuleName;
if( mpShell && ( Event.Accessor >>= sModuleName ) )
- mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, TRUE, FALSE );
+ mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, sal_True, sal_False );
}
virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { }
virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException )
@@ -145,9 +145,9 @@ public:
rtl::OUString sModuleName;
if( mpShell && ( Event.Accessor >>= sModuleName ) )
{
- IDEBaseWindow* pWin = mpShell->FindWindow( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, BASICIDE_TYPE_MODULE, TRUE );
+ IDEBaseWindow* pWin = mpShell->FindWindow( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, BASICIDE_TYPE_MODULE, sal_True );
if( pWin )
- mpShell->RemoveWindow( pWin, TRUE, TRUE );
+ mpShell->RemoveWindow( pWin, sal_True, sal_True );
}
}
@@ -184,7 +184,7 @@ BasicIDEShell::BasicIDEShell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell
aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) ),
aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) ),
aScrollBarBox( &GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE ) ),
- m_bAppBasicModified( FALSE ),
+ m_bAppBasicModified( sal_False ),
m_aNotifier( *this )
{
m_xLibListener = new ContainerListenerImpl( this );
@@ -205,7 +205,7 @@ void BasicIDEShell::Init()
SvxSearchDialogWrapper::RegisterChildWindow( sal_False );
- IDE_DLL()->GetExtraData()->ShellInCriticalSection() = TRUE;
+ IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_True;
SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BasicIDE" ) ) );
SetHelpId( SVX_INTERFACE_BASIDE_VIEWSH );
@@ -222,13 +222,13 @@ void BasicIDEShell::Init()
pCurWin = 0;
m_aCurDocument = ScriptDocument::getApplicationScriptDocument();
pObjectCatalog = 0;
- bCreatingWindow = FALSE;
+ bCreatingWindow = sal_False;
m_pCurLocalizationMgr = NULL;
pTabBar = new BasicIDETabBar( &GetViewFrame()->GetWindow() );
pTabBar->SetSplitHdl( LINK( this, BasicIDEShell, TabBarSplitHdl ) );
- bTabBarSplitted = FALSE;
+ bTabBarSplitted = sal_False;
nCurKey = 100;
InitScrollBars();
@@ -239,7 +239,7 @@ void BasicIDEShell::Init()
if ( IDE_DLL() && IDE_DLL()->pShell == NULL )
IDE_DLL()->pShell = this;
- IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE;
+ IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_False;
// It's enough to create the controller ...
// It will be public by using magic :-)
@@ -261,7 +261,7 @@ __EXPORT BasicIDEShell::~BasicIDEShell()
// Damit bei einem Basic-Fehler beim Speichern die Shell nicht sofort
// wieder hoch kommt:
- IDE_DLL()->GetExtraData()->ShellInCriticalSection() = TRUE;
+ IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_True;
SetWindow( 0 );
SetCurWindow( 0 );
@@ -290,7 +290,7 @@ __EXPORT BasicIDEShell::~BasicIDEShell()
// GetViewFrame()->GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
SFX_APP()->LeaveBasicCall();
- IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE;
+ IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_False;
GnBasicIDEShellCount--;
}
@@ -334,7 +334,7 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument )
bool bSetCurLib = ( _rDocument == m_aCurDocument );
// remove all windows which belong to this document
- for ( ULONG nWin = aIDEWindowTable.Count(); nWin; )
+ for ( sal_uLong nWin = aIDEWindowTable.Count(); nWin; )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( --nWin );
if ( pWin->IsDocument( _rDocument ) )
@@ -352,7 +352,7 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument )
pWin->StoreData();
if ( pWin == pCurWin )
bSetCurWindow = true;
- RemoveWindow( pWin, TRUE, FALSE );
+ RemoveWindow( pWin, sal_True, sal_False );
}
}
}
@@ -365,20 +365,20 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument )
if ( bSetCurLib )
SetCurLib( ScriptDocument::getApplicationScriptDocument(), String::CreateFromAscii( "Standard" ), true, false );
else if ( bSetCurWindow )
- SetCurWindow( FindApplicationWindow(), TRUE );
+ SetCurWindow( FindApplicationWindow(), sal_True );
}
void BasicIDEShell::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ )
{
SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings )
- pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, TRUE, FALSE );
+ pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False );
SetMDITitle();
}
void BasicIDEShell::onDocumentModeChanged( const ScriptDocument& _rDocument )
{
- for ( ULONG nWin = aIDEWindowTable.Count(); nWin; )
+ for ( sal_uLong nWin = aIDEWindowTable.Count(); nWin; )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( --nWin );
if ( pWin->IsDocument( _rDocument ) && _rDocument.isDocument() )
@@ -386,9 +386,9 @@ void BasicIDEShell::onDocumentModeChanged( const ScriptDocument& _rDocument )
}
}
-void BasicIDEShell::StoreAllWindowData( BOOL bPersistent )
+void BasicIDEShell::StoreAllWindowData( sal_Bool bPersistent )
{
- for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
+ for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin );
DBG_ASSERT( pWin, "PrepareClose: NULL-Pointer in Table?" );
@@ -399,7 +399,7 @@ void BasicIDEShell::StoreAllWindowData( BOOL bPersistent )
if ( bPersistent )
{
SFX_APP()->SaveBasicAndDialogContainer();
- SetAppBasicModified( FALSE );
+ SetAppBasicModified( sal_False );
SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings )
@@ -411,12 +411,12 @@ void BasicIDEShell::StoreAllWindowData( BOOL bPersistent )
}
-USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 __EXPORT BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
(void)bForBrowsing;
// da es nach Drucken etc. (DocInfo) modifiziert ist, hier resetten
- GetViewFrame()->GetObjectShell()->SetModified(FALSE);
+ GetViewFrame()->GetObjectShell()->SetModified(sal_False);
if ( StarBASIC::IsRunning() )
{
@@ -426,28 +426,28 @@ USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
Window *pParent = &GetViewFrame()->GetWindow();
InfoBox( pParent, aErrorStr ).Execute();
}
- return FALSE;
+ return sal_False;
}
else
{
// Hier unguenstig, wird zweimal gerufen...
// StoreAllWindowData();
- BOOL bCanClose = TRUE;
- for ( ULONG nWin = 0; bCanClose && ( nWin < aIDEWindowTable.Count() ); nWin++ )
+ sal_Bool bCanClose = sal_True;
+ for ( sal_uLong nWin = 0; bCanClose && ( nWin < aIDEWindowTable.Count() ); nWin++ )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin );
if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() )
{
if ( m_aCurLibName.Len() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
SetCurLib( ScriptDocument::getApplicationScriptDocument(), String(), false );
- SetCurWindow( pWin, TRUE );
- bCanClose = FALSE;
+ SetCurWindow( pWin, sal_True );
+ bCanClose = sal_False;
}
}
if ( bCanClose )
- StoreAllWindowData( FALSE ); // Nicht auf Platte schreiben, das passiert am Ende automatisch
+ StoreAllWindowData( sal_False ); // Nicht auf Platte schreiben, das passiert am Ende automatisch
return bCanClose;
}
@@ -493,7 +493,7 @@ void __EXPORT BasicIDEShell::OuterResizePixel( const Point &rPos, const Size &rS
IMPL_LINK_INLINE_START( BasicIDEShell, TabBarSplitHdl, TabBar *, pTBar )
{
(void)pTBar;
- bTabBarSplitted = TRUE;
+ bTabBarSplitted = sal_True;
ArrangeTabBar();
return 0;
@@ -504,7 +504,7 @@ IMPL_LINK_INLINE_END( BasicIDEShell, TabBarSplitHdl, TabBar *, pTBar )
IMPL_LINK( BasicIDEShell, TabBarHdl, TabBar *, pCurTabBar )
{
- USHORT nCurId = pCurTabBar->GetCurPageId();
+ sal_uInt16 nCurId = pCurTabBar->GetCurPageId();
IDEBaseWindow* pWin = aIDEWindowTable.Get( nCurId );
DBG_ASSERT( pWin, "Eintrag in TabBar passt zu keinem Fenster!" );
SetCurWindow( pWin );
@@ -514,10 +514,10 @@ IMPL_LINK( BasicIDEShell, TabBarHdl, TabBar *, pCurTabBar )
-BOOL BasicIDEShell::NextPage( BOOL bPrev )
+sal_Bool BasicIDEShell::NextPage( sal_Bool bPrev )
{
- BOOL bRet = FALSE;
- USHORT nPos = pTabBar->GetPagePos( pTabBar->GetCurPageId() );
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPos = pTabBar->GetPagePos( pTabBar->GetCurPageId() );
if ( bPrev )
--nPos;
@@ -527,8 +527,8 @@ BOOL BasicIDEShell::NextPage( BOOL bPrev )
if ( nPos < pTabBar->GetPageCount() )
{
IDEBaseWindow* pWin = aIDEWindowTable.Get( pTabBar->GetPageId( nPos ) );
- SetCurWindow( pWin, TRUE );
- bRet = TRUE;
+ SetCurWindow( pWin, sal_True );
+ bRet = sal_True;
}
return bRet;
@@ -565,7 +565,7 @@ SfxUndoManager* BasicIDEShell::GetUndoManager()
-void BasicIDEShell::ShowObjectDialog( BOOL bShow, BOOL bCreateOrDestroy )
+void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy )
{
if ( bShow )
{
@@ -620,7 +620,7 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
{
case SFX_HINT_DYING:
{
- EndListening( rBC, TRUE /* Alle abmelden */ );
+ EndListening( rBC, sal_True /* Alle abmelden */ );
if ( pObjectCatalog )
pObjectCatalog->UpdateEntries();
}
@@ -630,7 +630,7 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
if ( rHint.IsA( TYPE( SbxHint ) ) )
{
SbxHint& rSbxHint = (SbxHint&)rHint;
- ULONG nHintId = rSbxHint.GetId();
+ sal_uLong nHintId = rSbxHint.GetId();
if ( ( nHintId == SBX_HINT_BASICSTART ) ||
( nHintId == SBX_HINT_BASICSTOP ) )
{
@@ -692,42 +692,42 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
void BasicIDEShell::CheckWindows()
{
- BOOL bSetCurWindow = FALSE;
- for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
+ sal_Bool bSetCurWindow = sal_False;
+ for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin );
if ( pWin->GetStatus() & BASWIN_TOBEKILLED )
{
pWin->StoreData();
if ( pWin == pCurWin )
- bSetCurWindow = TRUE;
- RemoveWindow( pWin, TRUE, FALSE );
+ bSetCurWindow = sal_True;
+ RemoveWindow( pWin, sal_True, sal_False );
nWin--;
}
}
if ( bSetCurWindow )
- SetCurWindow( FindApplicationWindow(), TRUE );
+ SetCurWindow( FindApplicationWindow(), sal_True );
}
-void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, BOOL bDestroy )
+void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, sal_Bool bDestroy )
{
- BOOL bChangeCurWindow = pCurWin ? FALSE : TRUE;
- for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
+ sal_Bool bChangeCurWindow = pCurWin ? sal_False : sal_True;
+ for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin );
if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName )
{
if ( pWin == pCurWin )
- bChangeCurWindow = TRUE;
+ bChangeCurWindow = sal_True;
pWin->StoreData();
- RemoveWindow( pWin, bDestroy, FALSE );
+ RemoveWindow( pWin, bDestroy, sal_False );
nWin--;
}
}
if ( bChangeCurWindow )
- SetCurWindow( FindApplicationWindow(), TRUE );
+ SetCurWindow( FindApplicationWindow(), sal_True );
}
@@ -735,16 +735,16 @@ void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const String
void BasicIDEShell::UpdateWindows()
{
// Alle Fenster, die nicht angezeigt werden duerfen, entfernen
- BOOL bChangeCurWindow = pCurWin ? FALSE : TRUE;
+ sal_Bool bChangeCurWindow = pCurWin ? sal_False : sal_True;
if ( m_aCurLibName.Len() )
{
- for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
+ for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
{
IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin );
if ( !pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName )
{
if ( pWin == pCurWin )
- bChangeCurWindow = TRUE;
+ bChangeCurWindow = sal_True;
pWin->StoreData();
// Die Abfrage auf RUNNING verhindert den Absturz, wenn in Reschedule.
// Fenster bleibt erstmal stehen, spaeter sowieso mal umstellen,
@@ -752,7 +752,7 @@ void BasicIDEShell::UpdateWindows()
// geloescht.
if ( !(pWin->GetStatus() & ( BASWIN_TOBEKILLED | BASWIN_RUNNINGBASIC | BASWIN_SUSPENDED ) ) )
{
- RemoveWindow( pWin, FALSE, FALSE );
+ RemoveWindow( pWin, sal_False, sal_False );
nWin--;
}
}
@@ -771,7 +771,7 @@ void BasicIDEShell::UpdateWindows()
++doc
)
{
- StartListening( *doc->getBasicManager(), TRUE /* Nur einmal anmelden */ );
+ StartListening( *doc->getBasicManager(), sal_True /* Nur einmal anmelden */ );
// libraries
Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() );
@@ -785,14 +785,14 @@ void BasicIDEShell::UpdateWindows()
if ( !m_aCurLibName.Len() || ( *doc == m_aCurDocument && aLibName == m_aCurLibName ) )
{
// check, if library is password protected and not verified
- BOOL bProtected = FALSE;
+ sal_Bool bProtected = sal_False;
Reference< script::XLibraryContainer > xModLibContainer( doc->getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
{
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
- bProtected = TRUE;
+ bProtected = sal_True;
}
}
@@ -819,7 +819,7 @@ void BasicIDEShell::UpdateWindows()
for ( sal_Int32 j = 0 ; j < nModCount ; j++ )
{
String aModName = pModNames[ j ];
- ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, FALSE );
+ ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, sal_False );
if ( !pWin )
pWin = CreateBasWin( *doc, aLibName, aModName );
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aModName &&
@@ -850,7 +850,7 @@ void BasicIDEShell::UpdateWindows()
String aDlgName = pDlgNames[ j ];
// this find only looks for non-suspended windows;
// suspended windows are handled in CreateDlgWin
- DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, FALSE );
+ DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, sal_False );
if ( !pWin )
pWin = CreateDlgWin( *doc, aLibName, aDlgName );
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aDlgName &&
@@ -874,22 +874,22 @@ void BasicIDEShell::UpdateWindows()
{
if ( !pNextActiveWindow )
pNextActiveWindow = FindApplicationWindow();
- SetCurWindow( pNextActiveWindow, TRUE );
+ SetCurWindow( pNextActiveWindow, sal_True );
}
}
-void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, BOOL bDestroy, BOOL bAllowChangeCurWindow )
+void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow )
{
DBG_ASSERT( pWindow_, "Kann keinen NULL-Pointer loeschen!" );
- ULONG nKey = aIDEWindowTable.GetKey( pWindow_ );
- pTabBar->RemovePage( (USHORT)nKey );
+ sal_uLong nKey = aIDEWindowTable.GetKey( pWindow_ );
+ pTabBar->RemovePage( (sal_uInt16)nKey );
aIDEWindowTable.Remove( nKey );
if ( pWindow_ == pCurWin )
{
if ( bAllowChangeCurWindow )
- SetCurWindow( FindApplicationWindow(), TRUE );
+ SetCurWindow( FindApplicationWindow(), sal_True );
else
- SetCurWindow( NULL, FALSE );
+ SetCurWindow( NULL, sal_False );
}
if ( bDestroy )
{
@@ -932,7 +932,7 @@ void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, BOOL bDestroy, BOOL b
-USHORT BasicIDEShell::InsertWindowInTable( IDEBaseWindow* pNewWin )
+sal_uInt16 BasicIDEShell::InsertWindowInTable( IDEBaseWindow* pNewWin )
{
// Eigentlich prueffen,
nCurKey++;
@@ -986,7 +986,7 @@ void BasicIDEShell::InvalidateBasicIDESlots()
}
}
-void BasicIDEShell::EnableScrollbars( BOOL bEnable )
+void BasicIDEShell::EnableScrollbars( sal_Bool bEnable )
{
if ( bEnable )
{
@@ -1041,7 +1041,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, S
{
if( aLibName.Len() )
{
- Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) );
xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
}
}
@@ -1055,7 +1055,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, S
void BasicIDEShell::ImplStartListening( StarBASIC* pBasic )
{
- StartListening( pBasic->GetBroadcaster(), TRUE /* Nur einmal anmelden */ );
+ StartListening( pBasic->GetBroadcaster(), sal_True /* Nur einmal anmelden */ );
}
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 9604a8bd9933..206542ab173f 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -56,7 +56,7 @@ using namespace ::com::sun::star::container;
//----------------------------------------------------------------------------
extern "C" {
- SAL_DLLPUBLIC_EXPORT rtl_uString* basicide_choose_macro( void* pOnlyInDocument_AsXModel, BOOL bChooseOnly, rtl_uString* pMacroDesc )
+ SAL_DLLPUBLIC_EXPORT rtl_uString* basicide_choose_macro( void* pOnlyInDocument_AsXModel, sal_Bool bChooseOnly, rtl_uString* pMacroDesc )
{
::rtl::OUString aMacroDesc( pMacroDesc );
Reference< frame::XModel > aDocument( static_cast< frame::XModel* >( pOnlyInDocument_AsXModel ) );
@@ -66,7 +66,7 @@ extern "C" {
return pScriptURL;
}
- SAL_DLLPUBLIC_EXPORT void basicide_macro_organizer( INT16 nTabId )
+ SAL_DLLPUBLIC_EXPORT void basicide_macro_organizer( sal_Int16 nTabId )
{
OSL_TRACE("in basicide_macro_organizer");
BasicIDE::Organize( nTabId );
@@ -77,7 +77,7 @@ namespace BasicIDE
{
//----------------------------------------------------------------------------
-void Organize( INT16 tabId )
+void Organize( sal_Int16 tabId )
{
BasicIDEDLL::Init();
@@ -98,21 +98,21 @@ void Organize( INT16 tabId )
//----------------------------------------------------------------------------
-BOOL IsValidSbxName( const String& rName )
+sal_Bool IsValidSbxName( const String& rName )
{
- for ( USHORT nChar = 0; nChar < rName.Len(); nChar++ )
+ for ( sal_uInt16 nChar = 0; nChar < rName.Len(); nChar++ )
{
- BOOL bValid = ( ( rName.GetChar(nChar) >= 'A' && rName.GetChar(nChar) <= 'Z' ) ||
+ sal_Bool bValid = ( ( rName.GetChar(nChar) >= 'A' && rName.GetChar(nChar) <= 'Z' ) ||
( rName.GetChar(nChar) >= 'a' && rName.GetChar(nChar) <= 'z' ) ||
( rName.GetChar(nChar) >= '0' && rName.GetChar(nChar) <= '9' && nChar ) ||
( rName.GetChar(nChar) == '_' ) );
if ( !bValid )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-static BOOL StringCompareLessThan( const String& rStr1, const String& rStr2 )
+static sal_Bool StringCompareLessThan( const String& rStr1, const String& rStr2 )
{
return (rStr1.CompareIgnoreCaseToAscii( rStr2 ) == COMPARE_LESS);
}
@@ -191,7 +191,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
if ( pIDEShell )
{
- IDEBaseWindow* pWin = pIDEShell->FindWindow( rDocument, rLibName, rNewName, BASICIDE_TYPE_MODULE, TRUE );
+ IDEBaseWindow* pWin = pIDEShell->FindWindow( rDocument, rLibName, rNewName, BASICIDE_TYPE_MODULE, sal_True );
if ( pWin )
{
// set new name in window
@@ -202,7 +202,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
pModWin->SetSbModule( (SbModule*)pModWin->GetBasic()->FindModule( rNewName ) );
// update tabwriter
- USHORT nId = (USHORT)(pIDEShell->GetIDEWindowTable()).GetKey( pWin );
+ sal_uInt16 nId = (sal_uInt16)(pIDEShell->GetIDEWindowTable()).GetKey( pWin );
DBG_ASSERT( nId, "No entry in Tabbar!" );
if ( nId )
{
@@ -218,20 +218,20 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
//----------------------------------------------------------------------------
-::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc )
+::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc )
{
(void)rMacroDesc;
BasicIDEDLL::Init();
- IDE_DLL()->GetExtraData()->ChoosingMacro() = TRUE;
+ IDE_DLL()->GetExtraData()->ChoosingMacro() = sal_True;
SFX_APP()->EnterBasicCall();
String aScriptURL;
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
SbMethod* pMethod = NULL;
- MacroChooser* pChooser = new MacroChooser( NULL, TRUE );
+ MacroChooser* pChooser = new MacroChooser( NULL, sal_True );
if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() )
pChooser->SetMode( MACROCHOOSER_CHOOSEONLY );
@@ -241,7 +241,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
short nRetValue = pChooser->Execute();
- IDE_DLL()->GetExtraData()->ChoosingMacro() = FALSE;
+ IDE_DLL()->GetExtraData()->ChoosingMacro() = sal_False;
switch ( nRetValue )
{
@@ -308,7 +308,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
if ( xLimitToDocument != aDocument.getDocument() )
{
// error
- bError = TRUE;
+ bError = sal_True;
ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute();
}
}
@@ -363,9 +363,9 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
{
SbModuleRef xModule = new SbModule( rModName );
xModule->SetSource32( aOUSource );
- USHORT nCount = xModule->GetMethods()->Count();
- USHORT nRealCount = nCount;
- for ( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = xModule->GetMethods()->Count();
+ sal_uInt16 nRealCount = nCount;
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
if( pMethod->IsHidden() )
@@ -373,8 +373,8 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
}
aSeqMethods.realloc( nRealCount );
- USHORT iTarget = 0;
- for ( USHORT i = 0 ; i < nCount; ++i )
+ sal_uInt16 iTarget = 0;
+ for ( sal_uInt16 i = 0 ; i < nCount; ++i )
{
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
if( pMethod->IsHidden() )
@@ -389,9 +389,9 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
//----------------------------------------------------------------------------
-BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName )
+sal_Bool HasMethod( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName )
{
- BOOL bHasMethod = FALSE;
+ sal_Bool bHasMethod = sal_False;
::rtl::OUString aOUSource;
if ( rDocument.hasModule( rLibName, rModName ) && rDocument.getModule( rLibName, rModName, aOUSource ) )
@@ -403,7 +403,7 @@ BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const S
{
SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
if ( pMethod && !pMethod->IsHidden() )
- bHasMethod = TRUE;
+ bHasMethod = sal_True;
}
}
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 8d04320ec010..d9280749091d 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -101,16 +101,16 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
aMacroName = String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) );
else
{
- BOOL bValid = FALSE;
+ sal_Bool bValid = sal_False;
String aStdMacroText( RTL_CONSTASCII_USTRINGPARAM( "Macro" ) );
//String aStdMacroText( IDEResId( RID_STR_STDMACRONAME ) );
- USHORT nMacro = 1;
+ sal_uInt16 nMacro = 1;
while ( !bValid )
{
aMacroName = aStdMacroText;
aMacroName += String::CreateFromInt32( nMacro );
// Pruefen, ob vorhanden...
- bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? FALSE : TRUE;
+ bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? sal_False : sal_True;
nMacro++;
}
}
@@ -200,7 +200,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const
}
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
- IDEBaseWindow* pWin = pIDEShell ? pIDEShell->FindWindow( rDocument, rLibName, rOldName, BASICIDE_TYPE_DIALOG, FALSE ) : NULL;
+ IDEBaseWindow* pWin = pIDEShell ? pIDEShell->FindWindow( rDocument, rLibName, rOldName, BASICIDE_TYPE_DIALOG, sal_False ) : NULL;
Reference< XNameContainer > xExistingDialog;
if ( pWin )
xExistingDialog = ((DialogWindow*)pWin)->GetEditor()->GetDialog();
@@ -220,7 +220,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const
((DialogWindow*)pWin)->UpdateBrowser();
// update tabwriter
- USHORT nId = (USHORT)(pIDEShell->GetIDEWindowTable()).GetKey( pWin );
+ sal_uInt16 nId = (sal_uInt16)(pIDEShell->GetIDEWindowTable()).GetKey( pWin );
DBG_ASSERT( nId, "No entry in Tabbar!" );
if ( nId )
{
@@ -240,7 +240,7 @@ bool RemoveDialog( const ScriptDocument& rDocument, const String& rLibName, cons
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
if ( pIDEShell )
{
- DialogWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, rLibName, rDlgName, FALSE );
+ DialogWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, rLibName, rDlgName, sal_False );
if( pDlgWin )
{
Reference< container::XNameContainer > xDialogModel = pDlgWin->GetDialog();
@@ -355,17 +355,17 @@ void StopBasic()
//----------------------------------------------------------------------------
-void BasicStopped( BOOL* pbAppWindowDisabled,
- BOOL* pbDispatcherLocked, USHORT* pnWaitCount,
+void BasicStopped( sal_Bool* pbAppWindowDisabled,
+ sal_Bool* pbDispatcherLocked, sal_uInt16* pnWaitCount,
SfxUInt16Item** ppSWActionCount, SfxUInt16Item** ppSWLockViewCount )
{
// Nach einem Error oder dem expliziten abbrechen des Basics muessen
// ggf. einige Locks entfernt werden...
if ( pbAppWindowDisabled )
- *pbAppWindowDisabled = FALSE;
+ *pbAppWindowDisabled = sal_False;
if ( pbDispatcherLocked )
- *pbDispatcherLocked = FALSE;
+ *pbDispatcherLocked = sal_False;
if ( pnWaitCount )
*pnWaitCount = 0;
if ( ppSWActionCount )
@@ -374,7 +374,7 @@ void BasicStopped( BOOL* pbAppWindowDisabled,
*ppSWLockViewCount = 0;
// AppWait ?
- USHORT nWait = 0;
+ sal_uInt16 nWait = 0;
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
if( pIDEShell )
{
@@ -388,20 +388,20 @@ void BasicStopped( BOOL* pbAppWindowDisabled,
}
/*
- // Interactive = FALSE ?
+ // Interactive = sal_False ?
if ( SFX_APP()->IsDispatcherLocked() )
{
- SFX_APP()->LockDispatcher( FALSE );
+ SFX_APP()->LockDispatcher( sal_False );
if ( pbDispatcherLocked )
- *pbDispatcherLocked = TRUE;
+ *pbDispatcherLocked = sal_True;
} */
Window* pDefParent = Application::GetDefDialogParent();
if ( pDefParent && !pDefParent->IsEnabled() )
{
- pDefParent->Enable( TRUE );
+ pDefParent->Enable( sal_True );
if ( pbAppWindowDisabled )
- *pbAppWindowDisabled = TRUE;
+ *pbAppWindowDisabled = sal_True;
}
}
@@ -452,7 +452,7 @@ long HandleBasicError( StarBASIC* pBasic )
BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic );
if ( pBasMgr )
{
- BOOL bProtected = FALSE;
+ sal_Bool bProtected = sal_False;
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
OSL_ENSURE( aDocument.isValid(), "BasicIDE::HandleBasicError: no document for the given BasicManager!" );
if ( aDocument.isValid() )
@@ -464,7 +464,7 @@ long HandleBasicError( StarBASIC* pBasic )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- bProtected = TRUE;
+ bProtected = sal_True;
}
}
}
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 79f3cdb84c6b..356973647060 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -191,7 +191,7 @@ bool BasicEntryDescriptor::operator==( const BasicEntryDescriptor& rDesc ) const
}
BasicTreeListBox::BasicTreeListBox( Window* pParent, const ResId& rRes ) :
- SvTreeListBox( pParent, IDEResId( sal::static_int_cast<USHORT>( rRes.GetId() ) ) ),
+ SvTreeListBox( pParent, IDEResId( sal::static_int_cast<sal_uInt16>( rRes.GetId() ) ) ),
m_aNotifier( *this )
{
SetNodeDefaultImages();
@@ -223,7 +223,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati
// can be called multiple times for updating!
// eigentlich prueffen, ob Basic bereits im Baum ?!
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
// level 1: BasicManager (application, document, ...)
SvLBoxEntry* pDocumentRootEntry = FindRootEntry( rDocument, eLocation );
@@ -243,7 +243,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati
std::auto_ptr< BasicEntry >( new BasicDocumentEntry( rDocument, eLocation ) ) );
}
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation )
@@ -260,19 +260,19 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con
if ( eLocation == rDocument.getLibraryLocation( aLibName ) )
{
// check, if the module library is loaded
- BOOL bModLibLoaded = FALSE;
+ sal_Bool bModLibLoaded = sal_False;
::rtl::OUString aOULibName( aLibName );
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) )
- bModLibLoaded = TRUE;
+ bModLibLoaded = sal_True;
// check, if the dialog library is loaded
- BOOL bDlgLibLoaded = FALSE;
+ sal_Bool bDlgLibLoaded = sal_False;
Reference< script::XLibraryContainer > xDlgLibContainer( rDocument.getLibraryContainer( E_DIALOGS ) );
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryLoaded( aOULibName ) )
- bDlgLibLoaded = TRUE;
+ bDlgLibLoaded = sal_True;
- BOOL bLoaded = bModLibLoaded || bDlgLibLoaded;
+ sal_Bool bLoaded = bModLibLoaded || bDlgLibLoaded;
// if only one of the libraries is loaded, load also the other
if ( bLoaded )
@@ -285,7 +285,7 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con
}
// create tree list box entry
- USHORT nId, nIdHC;
+ sal_uInt16 nId, nIdHC;
if ( ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ) )
{
nId = bLoaded ? RID_IMG_DLGLIB : RID_IMG_DLGLIBNOTLOADED;
@@ -537,7 +537,7 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR
SvLBoxEntry* BasicTreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const String& rText )
{
- ULONG nRootPos = 0;
+ sal_uLong nRootPos = 0;
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
while ( pEntry )
{
@@ -634,7 +634,7 @@ SvLBoxEntry* __EXPORT BasicTreeListBox::CloneEntry( SvLBoxEntry* pSource )
SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const String& rText, BasicEntryType eType )
{
- ULONG nRootPos = 0;
+ sal_uLong nRootPos = 0;
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
while ( pEntry )
{
@@ -651,7 +651,7 @@ SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const String& rT
long BasicTreeListBox::ExpandingHdl()
{
// Expanding oder Collaps?
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if ( GetModel()->GetDepth( GetHdlEntry() ) == 1 )
{
SvLBoxEntry* pCurEntry = GetCurEntry();
@@ -685,9 +685,9 @@ long BasicTreeListBox::ExpandingHdl()
return bOK;
}
-BOOL BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
+sal_Bool BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
{
- BOOL bProtected = FALSE;
+ sal_Bool bProtected = sal_False;
if ( pEntry && ( GetModel()->GetDepth( pEntry ) == 1 ) )
{
BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) );
@@ -702,7 +702,7 @@ BOOL BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- bProtected = TRUE;
+ bProtected = sal_True;
}
}
}
@@ -788,12 +788,12 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima
if ( sFactoryURL.getLength() )
{
rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ),
- FALSE /* small */,
- FALSE /* normal */ );
+ sal_False /* small */,
+ sal_False /* normal */ );
rImageHC = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ),
- FALSE /* small */,
- TRUE /* high contrast */ );
+ sal_False /* small */,
+ sal_True /* high contrast */ );
}
else
{
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index 4b4d42f477d0..70f60bf5d784 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -152,7 +152,7 @@ class BasicTreeListBox :public SvTreeListBox
,public ::basctl::DocumentEventListener
{
private:
- USHORT nMode;
+ sal_uInt16 nMode;
::basctl::DocumentEventNotifier m_aNotifier;
void SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage, const Image& rImageHC );
@@ -188,10 +188,10 @@ public:
void ScanAllEntries();
void UpdateEntries();
- BOOL IsEntryProtected( SvLBoxEntry* pEntry );
+ sal_Bool IsEntryProtected( SvLBoxEntry* pEntry );
- void SetMode( USHORT nM ) { nMode = nM; }
- USHORT GetMode() const { return nMode; }
+ void SetMode( sal_uInt16 nM ) { nMode = nM; }
+ sal_uInt16 GetMode() const { return nMode; }
SbModule* FindModule( SvLBoxEntry* pEntry );
SbxVariable* FindVariable( SvLBoxEntry* pEntry );
@@ -200,7 +200,7 @@ public:
BasicEntryDescriptor GetEntryDescriptor( SvLBoxEntry* pEntry );
- USHORT ConvertType( BasicEntryType eType );
+ sal_uInt16 ConvertType( BasicEntryType eType );
bool IsValidEntry( SvLBoxEntry* pEntry );
SvLBoxEntry* AddEntry( const String& rText, const Image& rImage, const Image& rImageHC,
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 77e92189507b..e57f7882d532 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -72,7 +72,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
::rtl::OUString aOULibName( aLibName );
// check password
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
@@ -87,7 +87,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
if ( bOK )
{
// load module library
- BOOL bModLibLoaded = FALSE;
+ sal_Bool bModLibLoaded = sal_False;
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
if ( !xModLibContainer->isLibraryLoaded( aOULibName ) )
@@ -100,7 +100,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
}
// load dialog library
- BOOL bDlgLibLoaded = FALSE;
+ sal_Bool bDlgLibLoaded = sal_False;
Reference< script::XLibraryContainer > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
{
@@ -187,7 +187,7 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry )
while ( pEntry )
{
- USHORT nDepth = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
switch ( nDepth )
{
case 4:
@@ -292,7 +292,7 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
while ( pEntry )
{
- USHORT nDepth = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
switch ( nDepth )
{
case 4:
@@ -378,9 +378,9 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aName, aMethodName, eType );
}
-USHORT BasicTreeListBox::ConvertType( BasicEntryType eType )
+sal_uInt16 BasicTreeListBox::ConvertType( BasicEntryType eType )
{
- USHORT nType = OBJ_TYPE_UNKNOWN;
+ sal_uInt16 nType = OBJ_TYPE_UNKNOWN;
switch ( eType )
{
@@ -482,7 +482,7 @@ SbModule* BasicTreeListBox::FindModule( SvLBoxEntry* pEntry )
SvLBoxEntry* BasicTreeListBox::FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation )
{
OSL_ENSURE( rDocument.isValid(), "BasicTreeListBox::FindRootEntry: invalid document!" );
- ULONG nRootPos = 0;
+ sal_uLong nRootPos = 0;
SvLBoxEntry* pRootEntry = GetEntry( nRootPos );
while ( pRootEntry )
{
diff --git a/basctl/source/basicide/bastype4.hxx b/basctl/source/basicide/bastype4.hxx
index e1b76ea1e897..90e1bb56845a 100644
--- a/basctl/source/basicide/bastype4.hxx
+++ b/basctl/source/basicide/bastype4.hxx
@@ -37,9 +37,9 @@ class ExtendedTabBar : public TabBar
{
EditEngine* pEditEngine;
EditView* pEditView;
- BOOL bIsInKeyInput;
+ sal_Bool bIsInKeyInput;
#if _SOLAR__PRIVATE
- void ImpCheckEditEngine( BOOL bKeepNewText );
+ void ImpCheckEditEngine( sal_Bool bKeepNewText );
#endif
protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -49,17 +49,17 @@ protected:
virtual void KeyInput( const KeyEvent& rKEvent );
virtual void Paint( const Rectangle& );
- virtual BOOL StartRenamingTab( USHORT nCurId );
- virtual BOOL AllowRenamingTab( USHORT nCurId, const String& rNewName );
- virtual void TabRenamed( USHORT nCurId, const String& rNewName );
+ virtual sal_Bool StartRenamingTab( sal_uInt16 nCurId );
+ virtual sal_Bool AllowRenamingTab( sal_uInt16 nCurId, const String& rNewName );
+ virtual void TabRenamed( sal_uInt16 nCurId, const String& rNewName );
public:
ExtendedTabBar( Window* pParent, WinBits nStyle );
~ExtendedTabBar();
void RenameSelectedTab();
- BOOL IsInEditMode() const { return pEditEngine ? TRUE : FALSE; }
- void StopEditMode( BOOL bKeepCurText = FALSE );
+ sal_Bool IsInEditMode() const { return pEditEngine ? sal_True : sal_False; }
+ void StopEditMode( sal_Bool bKeepCurText = sal_False );
};
#endif //_BASTYPE4_HXX
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 150e10a5a76f..1d51d460d80f 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -154,7 +154,7 @@ long IDEBaseWindow::Notify( NotifyEvent& rNEvt )
{
KeyEvent aKEvt = *rNEvt.GetKeyEvent();
KeyCode aCode = aKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
@@ -188,14 +188,14 @@ void __EXPORT IDEBaseWindow::StoreData()
{
}
-BOOL __EXPORT IDEBaseWindow::CanClose()
+sal_Bool __EXPORT IDEBaseWindow::CanClose()
{
- return TRUE;
+ return sal_True;
}
-BOOL __EXPORT IDEBaseWindow::AllowUndo()
+sal_Bool __EXPORT IDEBaseWindow::AllowUndo()
{
- return TRUE;
+ return sal_True;
}
@@ -228,13 +228,13 @@ String IDEBaseWindow::CreateQualifiedName()
return aName;
}
-void IDEBaseWindow::SetReadOnly( BOOL )
+void IDEBaseWindow::SetReadOnly( sal_Bool )
{
}
-BOOL IDEBaseWindow::IsReadOnly()
+sal_Bool IDEBaseWindow::IsReadOnly()
{
- return FALSE;
+ return sal_False;
}
void __EXPORT IDEBaseWindow::BasicStarted()
@@ -245,14 +245,14 @@ void __EXPORT IDEBaseWindow::BasicStopped()
{
}
-BOOL __EXPORT IDEBaseWindow::IsModified()
+sal_Bool __EXPORT IDEBaseWindow::IsModified()
{
- return TRUE;
+ return sal_True;
}
-BOOL __EXPORT IDEBaseWindow::IsPasteAllowed()
+sal_Bool __EXPORT IDEBaseWindow::IsPasteAllowed()
{
- return FALSE;
+ return sal_False;
}
Window* __EXPORT IDEBaseWindow::GetLayoutWindow()
@@ -269,9 +269,9 @@ BreakPointList::BreakPointList()
{}
BreakPointList::BreakPointList(BreakPointList const & rList):
- BreakPL( sal::static_int_cast<USHORT>( rList.Count() ))
+ BreakPL( sal::static_int_cast<sal_uInt16>( rList.Count() ))
{
- for (ULONG i = 0; i < rList.Count(); ++i)
+ for (sal_uLong i = 0; i < rList.Count(); ++i)
Insert(new BreakPoint(*rList.GetObject(i)), i);
}
@@ -289,7 +289,7 @@ void BreakPointList::reset()
void BreakPointList::transfer(BreakPointList & rList)
{
reset();
- for (ULONG i = 0; i < rList.Count(); ++i)
+ for (sal_uLong i = 0; i < rList.Count(); ++i)
Insert(rList.GetObject(i), i);
rList.Clear();
}
@@ -319,12 +319,12 @@ void BreakPointList::SetBreakPointsInBasic( SbModule* pModule )
while ( pBrk )
{
if ( pBrk->bEnabled )
- pModule->SetBP( (USHORT)pBrk->nLine );
+ pModule->SetBP( (sal_uInt16)pBrk->nLine );
pBrk = Next();
}
}
-BreakPoint* BreakPointList::FindBreakPoint( ULONG nLine )
+BreakPoint* BreakPointList::FindBreakPoint( sal_uLong nLine )
{
BreakPoint* pBrk = First();
while ( pBrk )
@@ -340,18 +340,18 @@ BreakPoint* BreakPointList::FindBreakPoint( ULONG nLine )
-void BreakPointList::AdjustBreakPoints( ULONG nLine, BOOL bInserted )
+void BreakPointList::AdjustBreakPoints( sal_uLong nLine, sal_Bool bInserted )
{
BreakPoint* pBrk = First();
while ( pBrk )
{
- BOOL bDelBrk = FALSE;
+ sal_Bool bDelBrk = sal_False;
if ( pBrk->nLine == nLine )
{
if ( bInserted )
pBrk->nLine++;
else
- bDelBrk = TRUE;
+ bDelBrk = sal_True;
}
else if ( pBrk->nLine > nLine )
{
@@ -363,7 +363,7 @@ void BreakPointList::AdjustBreakPoints( ULONG nLine, BOOL bInserted )
if ( bDelBrk )
{
- ULONG n = GetCurPos();
+ sal_uLong n = GetCurPos();
delete Remove( pBrk );
pBrk = Seek( n );
}
@@ -388,7 +388,7 @@ void IDEBaseWindow::Deactivating()
{
}
-USHORT __EXPORT IDEBaseWindow::GetSearchOptions()
+sal_uInt16 __EXPORT IDEBaseWindow::GetSearchOptions()
{
return 0;
}
@@ -403,11 +403,11 @@ BasicDockingWindow::BasicDockingWindow( Window* pParent ) :
-BOOL __EXPORT BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
+sal_Bool __EXPORT BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
{
ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent();
Rectangle aTmpRec( rRect );
- BOOL bDock = IsDockingPrevented() ? FALSE : pLayout->IsToBeDocked( this, rPos, aTmpRec );
+ sal_Bool bDock = IsDockingPrevented() ? sal_False : pLayout->IsToBeDocked( this, rPos, aTmpRec );
if ( bDock )
{
rRect.SetSize( aTmpRec.GetSize() );
@@ -422,13 +422,13 @@ BOOL __EXPORT BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
-void __EXPORT BasicDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+void __EXPORT BasicDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
{
if ( bFloatMode )
DockingWindow::EndDocking( rRect, bFloatMode );
else
{
- SetFloatingMode( FALSE );
+ SetFloatingMode( sal_False );
ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent();
pLayout->DockaWindow( this );
}
@@ -450,7 +450,7 @@ void __EXPORT BasicDockingWindow::ToggleFloatingMode()
-BOOL __EXPORT BasicDockingWindow::PrepareToggleFloatingMode()
+sal_Bool __EXPORT BasicDockingWindow::PrepareToggleFloatingMode()
{
if ( IsFloatingMode() )
{
@@ -458,7 +458,7 @@ BOOL __EXPORT BasicDockingWindow::PrepareToggleFloatingMode()
aFloatingPosAndSize.SetPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) );
aFloatingPosAndSize.SetSize( GetSizePixel() );
}
- return TRUE;
+ return sal_True;
}
@@ -509,18 +509,18 @@ IMPL_LINK_INLINE_END( ExtendedEdit, EditAccHdl, Accelerator *, pAcc )
struct TabBarDDInfo
{
- ULONG npTabBar;
- USHORT nPage;
+ sal_uLong npTabBar;
+ sal_uInt16 nPage;
TabBarDDInfo() { npTabBar = 0; nPage = 0; }
- TabBarDDInfo( ULONG _npTabBar, USHORT _nPage ) { npTabBar = _npTabBar; nPage = _nPage; }
+ TabBarDDInfo( sal_uLong _npTabBar, sal_uInt16 _nPage ) { npTabBar = _npTabBar; nPage = _nPage; }
};
BasicIDETabBar::BasicIDETabBar( Window* pParent ) :
TabBar( pParent, WinBits( WB_3DLOOK | WB_SCROLL | WB_BORDER | WB_SIZEABLE | WB_DRAG ) )
{
- EnableEditMode( TRUE );
+ EnableEditMode( sal_True );
SetHelpId( HID_BASICIDE_TABBAR );
}
@@ -558,9 +558,9 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt )
PopupMenu aPopup( IDEResId( RID_POPUP_TABBAR ) );
if ( GetPageCount() == 0 )
{
- aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, FALSE );
- aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, FALSE );
- aPopup.EnableItem( SID_BASICIDE_HIDECURPAGE, FALSE );
+ aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False );
+ aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False );
+ aPopup.EnableItem( SID_BASICIDE_HIDECURPAGE, sal_False );
}
if ( StarBASIC::IsRunning() )
@@ -580,9 +580,9 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt )
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) )
{
- aPopup.EnableItem( aPopup.GetItemId( 0 ), FALSE );
- aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, FALSE );
- aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, FALSE );
+ aPopup.EnableItem( aPopup.GetItemId( 0 ), sal_False );
+ aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False );
+ aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False );
aPopup.RemoveDisabledEntries();
}
if ( aDocument.isInVBAMode() )
@@ -601,8 +601,8 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt )
SbModule* pActiveModule = (SbModule*)pBasic->FindModule( pWin->GetName() );
if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) )
{
- aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, FALSE );
- aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, FALSE );
+ aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False );
+ aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False );
}
}
}
@@ -620,7 +620,7 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt )
long BasicIDETabBar::AllowRenaming()
{
- BOOL bValid = BasicIDE::IsValidSbxName( GetEditText() );
+ sal_Bool bValid = BasicIDE::IsValidSbxName( GetEditText() );
if ( !bValid )
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
@@ -656,13 +656,13 @@ void BasicIDETabBar::Sort()
TabBarSortHelper aTabBarSortHelper;
::std::vector<TabBarSortHelper> aModuleList;
::std::vector<TabBarSortHelper> aDialogList;
- USHORT nPageCount = GetPageCount();
- USHORT i;
+ sal_uInt16 nPageCount = GetPageCount();
+ sal_uInt16 i;
// create module and dialog lists for sorting
for ( i = 0; i < nPageCount; i++)
{
- USHORT nId = GetPageId( i );
+ sal_uInt16 nId = GetPageId( i );
aTabBarSortHelper.nPageId = nId;
aTabBarSortHelper.aPageText = GetPageText( nId );
IDEBaseWindow* pWin = aIDEWindowTable.Get( nId );
@@ -682,8 +682,8 @@ void BasicIDETabBar::Sort()
::std::sort( aDialogList.begin() , aDialogList.end() );
- USHORT nModules = sal::static_int_cast<USHORT>( aModuleList.size() );
- USHORT nDialogs = sal::static_int_cast<USHORT>( aDialogList.size() );
+ sal_uInt16 nModules = sal::static_int_cast<sal_uInt16>( aModuleList.size() );
+ sal_uInt16 nDialogs = sal::static_int_cast<sal_uInt16>( aDialogList.size() );
// move module pages to new positions
for (i = 0; i < nModules; i++)
@@ -699,7 +699,7 @@ void BasicIDETabBar::Sort()
}
}
-void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines )
+void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool bEraseTrailingEmptyLines )
{
sal_Int32 nStartPos = 0;
sal_Int32 nEndPos = 0;
@@ -749,10 +749,10 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO
}
}
-ULONG CalcLineCount( SvStream& rStream )
+sal_uLong CalcLineCount( SvStream& rStream )
{
- ULONG nLFs = 0;
- ULONG nCRs = 0;
+ sal_uLong nLFs = 0;
+ sal_uLong nCRs = 0;
char c;
rStream.Seek( 0 );
@@ -803,7 +803,7 @@ bool LibInfoKey::operator==( const LibInfoKey& rKey ) const
return bRet;
}
-LibInfoItem::LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, USHORT nCurrentType )
+LibInfoItem::LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, sal_uInt16 nCurrentType )
:m_aDocument( rDocument )
,m_aLibName( rLibName )
,m_aCurrentName( rCurrentName )
@@ -889,7 +889,7 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey& rKey )
return pItem;
}
-SbxItem::SbxItem(USHORT nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, USHORT nType )
+SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, sal_uInt16 nType )
:SfxPoolItem( nWhich_ )
,m_aDocument(rDocument)
,m_aLibName(aLibName)
@@ -898,7 +898,7 @@ SbxItem::SbxItem(USHORT nWhich_, const ScriptDocument& rDocument, const String&
{
}
-SbxItem::SbxItem(USHORT nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, USHORT nType )
+SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, sal_uInt16 nType )
:SfxPoolItem( nWhich_ )
,m_aDocument(rDocument)
,m_aLibName(aLibName)
@@ -933,7 +933,7 @@ SfxPoolItem *SbxItem::Clone( SfxItemPool* ) const
return new SbxItem(*this);
}
-BOOL QueryDel( const String& rName, const ResId& rId, Window* pParent )
+sal_Bool QueryDel( const String& rName, const ResId& rId, Window* pParent )
{
String aQuery( rId );
String aName( rName );
@@ -942,39 +942,39 @@ BOOL QueryDel( const String& rName, const ResId& rId, Window* pParent )
aQuery.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "XX" ) ), aName );
QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_YES, aQuery );
if ( aQueryBox.Execute() == RET_YES )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL QueryDelMacro( const String& rName, Window* pParent )
+sal_Bool QueryDelMacro( const String& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
}
-BOOL QueryReplaceMacro( const String& rName, Window* pParent )
+sal_Bool QueryReplaceMacro( const String& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
}
-BOOL QueryDelDialog( const String& rName, Window* pParent )
+sal_Bool QueryDelDialog( const String& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
}
-BOOL QueryDelLib( const String& rName, BOOL bRef, Window* pParent )
+sal_Bool QueryDelLib( const String& rName, sal_Bool bRef, Window* pParent )
{
return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : RID_STR_QUERYDELLIB ), pParent );
}
-BOOL QueryDelModule( const String& rName, Window* pParent )
+sal_Bool QueryDelModule( const String& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent );
}
-BOOL QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, BOOL bRepeat, BOOL bNewTitle )
+sal_Bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, sal_Bool bRepeat, sal_Bool bNewTitle )
{
- BOOL bOK = FALSE;
- USHORT nRet = 0;
+ sal_Bool bOK = sal_False;
+ sal_uInt16 nRet = 0;
do
{
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index 6d126784cac0..d14d64e106f4 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -42,13 +42,13 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
-// FIXME Why does BreakPointDialog allow only USHORT for break-point line
-// numbers, whereas BreakPoint supports ULONG?
+// FIXME Why does BreakPointDialog allow only sal_uInt16 for break-point line
+// numbers, whereas BreakPoint supports sal_uLong?
-bool lcl_ParseText( String aText, USHORT& rLineNr )
+bool lcl_ParseText( String aText, sal_uInt16& rLineNr )
{
// aText should look like "# n" where
- // n > 0 && n < std::numeric_limits< USHORT >::max().
+ // n > 0 && n < std::numeric_limits< sal_uInt16 >::max().
// All spaces are ignored, so there can even be spaces within the
// number n. (Maybe it would be better to ignore all whitespace instead
// of just spaces.)
@@ -58,11 +58,11 @@ bool lcl_ParseText( String aText, USHORT& rLineNr )
return false;
if (cFirst == '#')
aText.Erase(0, 1);
- // XXX Assumes that USHORT is contained within sal_Int32:
+ // XXX Assumes that sal_uInt16 is contained within sal_Int32:
sal_Int32 n = aText.ToInt32();
- if (n <= 0 || n > std::numeric_limits< USHORT >::max())
+ if (n <= 0 || n > std::numeric_limits< sal_uInt16 >::max())
return false;
- rLineNr = static_cast< USHORT >(n);
+ rLineNr = static_cast< sal_uInt16 >(n);
return true;
}
@@ -82,7 +82,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
{
FreeResource();
- aComboBox.SetUpdateMode( FALSE );
+ aComboBox.SetUpdateMode( sal_False );
BreakPoint* pBrk = m_aModifiedBreakPointList.First();
BreakPoint* pFirstBrk = pBrk;
while ( pBrk )
@@ -92,7 +92,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
pBrk = m_aModifiedBreakPointList.Next();
}
- aComboBox.SetUpdateMode( TRUE );
+ aComboBox.SetUpdateMode( sal_True );
aOKButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) );
aNewButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) );
@@ -107,7 +107,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
aNumericField.SetMin( 0 );
aNumericField.SetMax( 0x7FFFFFFF );
aNumericField.SetSpinSize( 1 );
- aNumericField.SetStrictFormat( TRUE );
+ aNumericField.SetStrictFormat( sal_True );
aNumericField.SetModifyHdl( LINK( this, BreakPointDialog, EditModifyHdl ) );
aComboBox.SetText( aComboBox.GetEntry( 0 ) );
@@ -129,7 +129,7 @@ void BreakPointDialog::CheckButtons()
// "New" button is enabled if the combo box edit contains a valid line
// number that is not already present in the combo box list; otherwise
// "OK" and "Delete" buttons are enabled:
- USHORT nLine;
+ sal_uInt16 nLine;
if (lcl_ParseText(aComboBox.GetText(), nLine)
&& m_aModifiedBreakPointList.FindBreakPoint(nLine) == 0)
{
@@ -163,7 +163,7 @@ IMPL_LINK( BreakPointDialog, ComboBoxHighlightHdl, ComboBox *, pBox )
aOKButton.Enable();
aDelButton.Enable();
- USHORT nEntry = pBox->GetEntryPos( pBox->GetText() );
+ sal_uInt16 nEntry = pBox->GetEntryPos( pBox->GetText() );
BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry );
DBG_ASSERT( pBrk, "Kein passender Breakpoint zur Liste ?" );
UpdateFields( pBrk );
@@ -199,13 +199,13 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
{
// Checkbox beruecksichtigen!
String aText( aComboBox.GetText() );
- USHORT nLine;
- BOOL bValid = lcl_ParseText( aText, nLine );
+ sal_uInt16 nLine;
+ sal_Bool bValid = lcl_ParseText( aText, nLine );
if ( bValid )
{
BreakPoint* pBrk = new BreakPoint( nLine );
pBrk->bEnabled = aCheckBox.IsChecked();
- pBrk->nStopAfter = (ULONG) aNumericField.GetValue();
+ pBrk->nStopAfter = (sal_uLong) aNumericField.GetValue();
m_aModifiedBreakPointList.InsertSorted( pBrk );
String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
aEntryStr += String::CreateFromInt32( pBrk->nLine );
@@ -228,7 +228,7 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
}
else if ( pButton == &aDelButton )
{
- USHORT nEntry = aComboBox.GetEntryPos( aComboBox.GetText() );
+ sal_uInt16 nEntry = aComboBox.GetEntryPos( aComboBox.GetText() );
BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry );
if ( pBrk )
{
@@ -271,7 +271,7 @@ void BreakPointDialog::UpdateFields( BreakPoint* pBrk )
BreakPoint* BreakPointDialog::GetSelectedBreakPoint()
{
- USHORT nEntry = aComboBox.GetEntryPos( aComboBox.GetText() );
+ sal_uInt16 nEntry = aComboBox.GetEntryPos( aComboBox.GetText() );
BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry );
return pBrk;
}
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index a15bed689b6f..d0589f5ca5d9 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -68,7 +68,7 @@ BasicIDEDLL* BasicIDEDLL::GetDLL()
return pBasicIDEDLL;
}
-IDEResId::IDEResId( USHORT nId ):
+IDEResId::IDEResId( sal_uInt16 nId ):
ResId( nId, *(*(BasicIDEModule**)GetAppData(SHL_IDE))->GetResMgr() )
{
}
@@ -139,8 +139,8 @@ BasicIDEData* BasicIDEDLL::GetExtraData()
BasicIDEData::BasicIDEData() : aObjCatPos( INVPOSITION, INVPOSITION )
{
nBasicDialogCount = 0;
- bChoosingMacro = FALSE;
- bShellInCriticalSection = FALSE;
+ bChoosingMacro = sal_False;
+ bShellInCriticalSection = sal_False;
pSearchItem = new SvxSearchItem( SID_SEARCH_ITEM );
StarBASIC::SetGlobalBreakHdl( LINK( this, BasicIDEData, GlobalBasicBreakHdl ) );
diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx
index 162d08ddcb5e..4897a2e232e7 100644
--- a/basctl/source/basicide/iderdll2.hxx
+++ b/basctl/source/basicide/iderdll2.hxx
@@ -57,11 +57,11 @@ private:
String aAddLibPath;
String aAddLibFilter;
- USHORT nBasicDialogCount;
+ sal_uInt16 nBasicDialogCount;
- BOOL OLD_bRelMacroRecording;
- BOOL bChoosingMacro;
- BOOL bShellInCriticalSection;
+ sal_Bool OLD_bRelMacroRecording;
+ sal_Bool bChoosingMacro;
+ sal_Bool bShellInCriticalSection;
protected:
DECL_LINK( GlobalBasicBreakHdl, StarBASIC * );
@@ -75,10 +75,10 @@ public:
BasicEntryDescriptor& GetLastEntryDescriptor() { return m_aLastEntryDesc; }
void SetLastEntryDescriptor( BasicEntryDescriptor& rDesc ) { m_aLastEntryDesc = rDesc; }
- BOOL& ChoosingMacro() { return bChoosingMacro; }
- BOOL& ShellInCriticalSection() { return bShellInCriticalSection; }
+ sal_Bool& ChoosingMacro() { return bChoosingMacro; }
+ sal_Bool& ShellInCriticalSection() { return bShellInCriticalSection; }
- USHORT GetBasicDialogCount() const { return nBasicDialogCount; }
+ sal_uInt16 GetBasicDialogCount() const { return nBasicDialogCount; }
void IncBasicDialogCount() { nBasicDialogCount++; }
void DecBasicDialogCount() { nBasicDialogCount--; }
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 95c27c65acdb..ca298f76b171 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -147,7 +147,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
for( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
{
String aDlgName = pDlgNames[ i ];
- DialogWindow* pWin = m_pIDEShell->FindDlgWin( m_aDocument, m_aLibName, aDlgName, FALSE );
+ DialogWindow* pWin = m_pIDEShell->FindDlgWin( m_aDocument, m_aLibName, aDlgName, sal_False );
if( pWin && pWin->IsA( TYPE( DialogWindow ) ) )
{
DialogWindow* pDialogWin = static_cast< DialogWindow* >( pWin );
@@ -903,7 +903,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito
if ( !aDocument.isValid() )
return;
const String& rLibName = pDlgWin->GetLibName();
- Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) );
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@@ -933,7 +933,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito
if ( !aDocument.isValid() )
return;
const String& rLibName = pDlgWin->GetLibName();
- Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) );
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@@ -961,7 +961,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
if ( !aDocument.isValid() )
return;
const String& rLibName = pDlgWin->GetLibName();
- Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) );
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@@ -981,7 +981,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" );
// Get library
- Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) );
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@@ -1011,7 +1011,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
const String& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
// Get library
- Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) );
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
if( !xStringResourceManager.is() )
@@ -1042,7 +1042,7 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument,
const String& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
// Get library
- Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) );
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
if( !xStringResourceManager.is() )
@@ -1136,7 +1136,7 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor,
if ( !aDocument.isValid() )
return;
const String& rLibName = pDlgWin->GetLibName();
- Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) );
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 996e98f52ce4..29e376869e72 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -63,7 +63,7 @@ using namespace ::com::sun::star::uno;
DECLARE_LIST( MacroList, SbMethod* )
-MacroChooser::MacroChooser( Window* pParnt, BOOL bCreateEntries ) :
+MacroChooser::MacroChooser( Window* pParnt, sal_Bool bCreateEntries ) :
SfxModalDialog( pParnt, IDEResId( RID_MACROCHOOSER ) ),
aMacroNameTxt( this, IDEResId( RID_TXT_MACRONAME ) ),
aMacroNameEdit( this, IDEResId( RID_ED_MACRONAME ) ),
@@ -85,12 +85,12 @@ MacroChooser::MacroChooser( Window* pParnt, BOOL bCreateEntries ) :
FreeResource();
nMode = MACROCHOOSER_ALL;
- bNewDelIsDel = TRUE;
+ bNewDelIsDel = sal_True;
// Der Sfx fragt den BasicManager nicht, ob modified
// => Speichern anschmeissen, wenn Aenderung, aber kein Sprung in
// die BasicIDE.
- bForceStoreBasic = FALSE;
+ bForceStoreBasic = sal_False;
aMacrosInTxtBaseStr = aMacrosInTxt.GetText();
@@ -188,7 +188,7 @@ void MacroChooser::RestoreMacroDescription()
{
// find entry in macro box
SvLBoxEntry* pEntry = 0;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvLBoxEntry* pE = aMacroBox.GetEntry( nPos );
while ( pE )
{
@@ -224,7 +224,7 @@ short __EXPORT MacroChooser::Execute()
if( rSelectedDoc.isDocument() && !rSelectedDoc.isActive() )
{
// Search for the right entry
- ULONG nRootPos = 0;
+ sal_uLong nRootPos = 0;
SvLBoxEntry* pRootEntry = aBasicBox.GetEntry( nRootPos );
while( pRootEntry )
{
@@ -262,7 +262,7 @@ short __EXPORT MacroChooser::Execute()
}
-void MacroChooser::EnableButton( Button& rButton, BOOL bEnable )
+void MacroChooser::EnableButton( Button& rButton, sal_Bool bEnable )
{
if ( bEnable )
{
@@ -333,10 +333,10 @@ void MacroChooser::DeleteMacro()
SbModule* pModule = pMethod->GetModule();
DBG_ASSERT( pModule, "DeleteMacro: Kein Modul?!" );
::rtl::OUString aSource( pModule->GetSource32() );
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
pModule->GetMethods()->Remove( pMethod );
- CutLines( aSource, nStart-1, nEnd-nStart+1, TRUE );
+ CutLines( aSource, nStart-1, nEnd-nStart+1, sal_True );
pModule->SetSource32( aSource );
// update module in library
@@ -347,7 +347,7 @@ void MacroChooser::DeleteMacro()
SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
DBG_ASSERT( pEntry, "DeleteMacro: Entry ?!" );
aMacroBox.GetModel()->Remove( pEntry );
- bForceStoreBasic = TRUE;
+ bForceStoreBasic = sal_True;
}
}
@@ -429,8 +429,8 @@ void MacroChooser::CheckButtons()
SbMethod* pMethod = GetMacro();
// check, if corresponding libraries are readonly
- BOOL bReadOnly = FALSE;
- USHORT nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
+ sal_Bool bReadOnly = sal_False;
+ sal_uInt16 nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
if ( nDepth == 1 || nDepth == 2 )
{
ScriptDocument aDocument( aDesc.GetDocument() );
@@ -440,26 +440,26 @@ void MacroChooser::CheckButtons()
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) )
{
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
}
}
if ( nMode != MACROCHOOSER_RECORDING )
{
// Run...
- BOOL bEnable = pMethod ? TRUE : FALSE;
+ sal_Bool bEnable = pMethod ? sal_True : sal_False;
if ( ( nMode != MACROCHOOSER_CHOOSEONLY ) && StarBASIC::IsRunning() )
- bEnable = FALSE;
+ bEnable = sal_False;
EnableButton( aRunButton, bEnable );
}
// Organisieren immer moeglich ?
// Assign...
- EnableButton( aAssignButton, pMethod ? TRUE : FALSE );
+ EnableButton( aAssignButton, pMethod ? sal_True : sal_False );
// Edit...
- EnableButton( aEditButton, pMacroEntry ? TRUE : FALSE );
+ EnableButton( aEditButton, pMacroEntry ? sal_True : sal_False );
// aOrganizeButton
EnableButton( aOrganizeButton, !StarBASIC::IsRunning() && ( nMode == MACROCHOOSER_ALL ));
@@ -469,8 +469,8 @@ void MacroChooser::CheckButtons()
bool bShare = ( aDesc.GetLocation() == LIBRARY_LOCATION_SHARE );
EnableButton( aNewDelButton,
!StarBASIC::IsRunning() && ( nMode == MACROCHOOSER_ALL ) && !bProtected && !bReadOnly && !bShare );
- BOOL bPrev = bNewDelIsDel;
- bNewDelIsDel = pMethod ? TRUE : FALSE;
+ sal_Bool bPrev = bNewDelIsDel;
+ bNewDelIsDel = pMethod ? sal_True : sal_False;
if ( ( bPrev != bNewDelIsDel ) && ( nMode == MACROCHOOSER_ALL ) )
{
String aBtnText( bNewDelIsDel ? IDEResId( RID_STR_BTNDEL) : IDEResId( RID_STR_BTNNEW ) );
@@ -555,9 +555,9 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
// Die Macros sollen in der Reihenfolge angezeigt werden,
// wie sie im Modul stehen.
MacroList aMacros;
- USHORT nMacroCount = pModule->GetMethods()->Count();
- USHORT nRealMacroCount = 0;
- USHORT iMeth;
+ sal_uInt16 nMacroCount = pModule->GetMethods()->Count();
+ sal_uInt16 nRealMacroCount = 0;
+ sal_uInt16 iMeth;
for ( iMeth = 0; iMeth < nMacroCount; iMeth++ )
{
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth );
@@ -565,13 +565,13 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
continue;
++nRealMacroCount;
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
- ULONG nPos = LIST_APPEND;
+ sal_uLong nPos = LIST_APPEND;
// Eventuell weiter vorne ?
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
- for ( ULONG n = 0; n < aMacros.Count(); n++ )
+ for ( sal_uLong n = 0; n < aMacros.Count(); n++ )
{
- USHORT nS, nE;
+ sal_uInt16 nS, nE;
SbMethod* pM = aMacros.GetObject( n );
DBG_ASSERT( pM, "Macro nicht in Liste ?!" );
pM->GetLineRange( nS, nE );
@@ -584,10 +584,10 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
aMacros.Insert( pMethod, nPos );
}
- aMacroBox.SetUpdateMode( FALSE );
+ aMacroBox.SetUpdateMode( sal_False );
for ( iMeth = 0; iMeth < nRealMacroCount; iMeth++ )
aMacroBox.InsertEntry( aMacros.GetObject( iMeth )->GetName() );
- aMacroBox.SetUpdateMode( TRUE );
+ aMacroBox.SetUpdateMode( sal_True );
if ( aMacroBox.GetEntryCount() )
{
@@ -613,7 +613,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit )
SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
if ( pCurEntry )
{
- USHORT nDepth = aBasicBox.GetModel()->GetDepth( pCurEntry );
+ sal_uInt16 nDepth = aBasicBox.GetModel()->GetDepth( pCurEntry );
if ( ( nDepth == 1 ) && ( aBasicBox.IsEntryProtected( pCurEntry ) ) )
{
// Dann auf die entsprechende Std-Lib stellen...
@@ -637,15 +637,15 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit )
if ( aMacroBox.GetEntryCount() )
{
String aEdtText( aMacroNameEdit.GetText() );
- BOOL bFound = FALSE;
- for ( USHORT n = 0; n < aMacroBox.GetEntryCount(); n++ )
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 n = 0; n < aMacroBox.GetEntryCount(); n++ )
{
SvLBoxEntry* pEntry = aMacroBox.GetEntry( n );
DBG_ASSERT( pEntry, "Entry ?!" );
if ( aMacroBox.GetEntryText( pEntry ).CompareIgnoreCaseToAscii( aEdtText ) == COMPARE_EQUAL )
{
SaveSetCurEntry( aMacroBox, pEntry );
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -654,7 +654,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit )
SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
// Wenn es den Eintrag gibt ->Select ->Desription...
if ( pEntry )
- aMacroBox.Select( pEntry, FALSE );
+ aMacroBox.Select( pEntry, sal_False );
}
}
}
@@ -691,7 +691,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
}
else if ( nMode == MACROCHOOSER_RECORDING )
{
- BOOL bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() );
+ sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() );
if ( !bValid )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
@@ -768,7 +768,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
}
else
{
- BOOL bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() );
+ sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() );
if ( !bValid )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
@@ -843,7 +843,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
BasicEntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( aBasicBox.FirstSelected() ) );
OrganizeDialog* pDlg = new OrganizeDialog( this, 0, aDesc );
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
delete pDlg;
if ( nRet ) // Nicht einfach nur geschlossen
@@ -854,7 +854,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
if ( pIDEShell && pIDEShell->IsAppBasicModified() )
- bForceStoreBasic = TRUE;
+ bForceStoreBasic = sal_True;
aBasicBox.UpdateEntries();
}
@@ -873,26 +873,26 @@ void MacroChooser::UpdateFields()
aMacroNameEdit.SetText( aMacroBox.GetEntryText( pMacroEntry ) );
}
-void MacroChooser::SetMode( USHORT nM )
+void MacroChooser::SetMode( sal_uInt16 nM )
{
nMode = nM;
if ( nMode == MACROCHOOSER_ALL )
{
aRunButton.SetText( String( IDEResId( RID_STR_RUN ) ) );
- EnableButton( aNewDelButton, TRUE );
- EnableButton( aOrganizeButton, TRUE );
+ EnableButton( aNewDelButton, sal_True );
+ EnableButton( aOrganizeButton, sal_True );
}
else if ( nMode == MACROCHOOSER_CHOOSEONLY )
{
aRunButton.SetText( String( IDEResId( RID_STR_CHOOSE ) ) );
- EnableButton( aNewDelButton, FALSE );
- EnableButton( aOrganizeButton, FALSE );
+ EnableButton( aNewDelButton, sal_False );
+ EnableButton( aOrganizeButton, sal_False );
}
else if ( nMode == MACROCHOOSER_RECORDING )
{
aRunButton.SetText( String( IDEResId( RID_STR_RECORD ) ) );
- EnableButton( aNewDelButton, FALSE );
- EnableButton( aOrganizeButton, FALSE );
+ EnableButton( aNewDelButton, sal_False );
+ EnableButton( aOrganizeButton, sal_False );
aAssignButton.Hide();
aEditButton.Hide();
diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx
index b610b2041b50..5184d763d28c 100644
--- a/basctl/source/basicide/macrodlg.hxx
+++ b/basctl/source/basicide/macrodlg.hxx
@@ -74,10 +74,10 @@ private:
PushButton aNewLibButton;
PushButton aNewModButton;
- BOOL bNewDelIsDel;
- BOOL bForceStoreBasic;
+ sal_Bool bNewDelIsDel;
+ sal_Bool bForceStoreBasic;
- USHORT nMode;
+ sal_uInt16 nMode;
DECL_LINK( MacroSelectHdl, SvTreeListBox * );
DECL_LINK( MacroDoubleClickHdl, SvTreeListBox * );
@@ -89,7 +89,7 @@ private:
void SaveSetCurEntry( SvTreeListBox& rBox, SvLBoxEntry* pEntry );
void UpdateFields();
- void EnableButton( Button& rButton, BOOL bEnable );
+ void EnableButton( Button& rButton, sal_Bool bEnable );
String GetInfo( SbxVariable* pVar );
@@ -97,7 +97,7 @@ private:
void RestoreMacroDescription();
public:
- MacroChooser( Window* pParent, BOOL bCreateEntries = TRUE );
+ MacroChooser( Window* pParent, sal_Bool bCreateEntries = sal_True );
~MacroChooser();
SbMethod* GetMacro();
@@ -106,8 +106,8 @@ public:
virtual short Execute();
- void SetMode( USHORT nMode );
- USHORT GetMode() const { return nMode; }
+ void SetMode( sal_uInt16 nMode );
+ sal_uInt16 GetMode() const { return nMode; }
};
#endif // _MACRODLG_HXX
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 35bc94e24fca..4d6bfa923f37 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -127,15 +127,15 @@ public:
class BasicLibLBoxString : public SvLBoxString
{
public:
- BasicLibLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String& rTxt ) :
+ BasicLibLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) :
SvLBoxString( pEntry, nFlags, rTxt ) {}
- virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry );
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
};
//----------------------------------------------------------------------------
-void BasicLibLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* pEntry )
+void BasicLibLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry )
{
// Change text color if library is read only:
bool bReadOnly = false;
@@ -210,7 +210,7 @@ void BasicCheckBox::Init()
//----------------------------------------------------------------------------
-void BasicCheckBox::SetMode( USHORT n )
+void BasicCheckBox::SetMode( sal_uInt16 n )
{
nMode = n;
@@ -222,7 +222,7 @@ void BasicCheckBox::SetMode( USHORT n )
//----------------------------------------------------------------------------
-SvLBoxEntry* BasicCheckBox::DoInsertEntry( const String& rStr, ULONG nPos )
+SvLBoxEntry* BasicCheckBox::DoInsertEntry( const String& rStr, sal_uLong nPos )
{
return SvTabListBox::InsertEntryToColumn( rStr, nPos, 0 );
}
@@ -231,8 +231,8 @@ SvLBoxEntry* BasicCheckBox::DoInsertEntry( const String& rStr, ULONG nPos )
SvLBoxEntry* BasicCheckBox::FindEntry( const String& rName )
{
- ULONG nCount = GetEntryCount();
- for ( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nCount; i++ )
{
SvLBoxEntry* pEntry = GetEntry( i );
DBG_ASSERT( pEntry, "pEntry?!" );
@@ -244,7 +244,7 @@ SvLBoxEntry* BasicCheckBox::FindEntry( const String& rName )
//----------------------------------------------------------------------------
-void BasicCheckBox::CheckEntryPos( ULONG nPos, BOOL bCheck )
+void BasicCheckBox::CheckEntryPos( sal_uLong nPos, sal_Bool bCheck )
{
if ( nPos < GetEntryCount() )
{
@@ -260,11 +260,11 @@ void BasicCheckBox::CheckEntryPos( ULONG nPos, BOOL bCheck )
//----------------------------------------------------------------------------
-BOOL BasicCheckBox::IsChecked( ULONG nPos ) const
+sal_Bool BasicCheckBox::IsChecked( sal_uLong nPos ) const
{
if ( nPos < GetEntryCount() )
return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED);
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
@@ -276,8 +276,8 @@ void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const
if ( nMode == LIBMODE_MANAGER )
{
// initialize all columns with own string class (column 0 == bitmap)
- USHORT nCount = pEntry->ItemCount();
- for ( USHORT nCol = 1; nCol < nCount; ++nCol )
+ sal_uInt16 nCount = pEntry->ItemCount();
+ for ( sal_uInt16 nCol = 1; nCol < nCount; ++nCol )
{
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol );
BasicLibLBoxString* pStr = new BasicLibLBoxString( pEntry, 0, pCol->GetText() );
@@ -288,10 +288,10 @@ void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const
//----------------------------------------------------------------------------
-BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{
if ( nMode != LIBMODE_MANAGER )
- return FALSE;
+ return sal_False;
DBG_ASSERT( pEntry, "Kein Eintrag?" );
@@ -300,7 +300,7 @@ BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
if ( aLibName.EqualsIgnoreCaseAscii( "Standard" ) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_CANNOTCHANGENAMESTDLIB ) ) ).Execute();
- return FALSE;
+ return sal_False;
}
// check, if library is readonly
@@ -311,11 +311,11 @@ BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) && !xDlgLibContainer->isLibraryLink( aOULibName ) ) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_LIBISREADONLY ) ) ).Execute();
- return FALSE;
+ return sal_False;
}
// i24094: Password verification necessary for renaming
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
{
// check password
@@ -327,29 +327,29 @@ BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
}
if ( !bOK )
- return FALSE;
+ return sal_False;
}
// TODO: check if library is reference/link
// Prueffen, ob Referenz...
/*
- USHORT nLib = pBasMgr->GetLibId( GetEntryText( pEntry, 0 ) );
+ sal_uInt16 nLib = pBasMgr->GetLibId( GetEntryText( pEntry, 0 ) );
DBG_ASSERT( nLib != LIB_NOTFOUND, "LibId ?!" );
if ( pBasMgr->IsReference( nLib ) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_CANNOTCHANGENAMEREFLIB ) ) ).Execute();
- return FALSE;
+ return sal_False;
}
*/
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
+sal_Bool __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
{
- BOOL bValid = ( rNewText.Len() <= 30 ) && BasicIDE::IsValidSbxName( rNewText );
+ sal_Bool bValid = ( rNewText.Len() <= 30 ) && BasicIDE::IsValidSbxName( rNewText );
String aCurText( GetEntryText( pEntry, 0 ) );
if ( bValid && ( aCurText != rNewText ) )
{
@@ -381,12 +381,12 @@ BOOL __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNe
catch ( container::ElementExistException& )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_SBXNAMEALLREADYUSED ) ) ).Execute();
- return FALSE;
+ return sal_False;
}
catch ( container::NoSuchElementException& )
{
DBG_UNHANDLED_EXCEPTION();
- return FALSE;
+ return sal_False;
}
}
@@ -418,7 +418,7 @@ IMPL_LINK(NewObjectDialog, OkButtonHandler, Button *, EMPTYARG)
return 0;
}
-NewObjectDialog::NewObjectDialog(Window * pParent, USHORT nMode,
+NewObjectDialog::NewObjectDialog(Window * pParent, sal_uInt16 nMode,
bool bCheckName)
: ModalDialog( pParent, IDEResId( RID_DLG_NEWLIB ) ),
aText( this, IDEResId( RID_FT_NEWLIB ) ),
@@ -520,7 +520,7 @@ LibPage::LibPage( Window * pParent )
aBasicsBox.SetSelectHdl( LINK( this, LibPage, BasicSelectHdl ) );
aLibBox.SetMode( LIBMODE_MANAGER );
- aLibBox.EnableInplaceEditing( TRUE );
+ aLibBox.EnableInplaceEditing( sal_True );
aLibBox.SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP );
aCloseButton.GrabFocus();
@@ -538,8 +538,8 @@ LibPage::LibPage( Window * pParent )
LibPage::~LibPage()
{
- USHORT nCount = aBasicsBox.GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = aBasicsBox.GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
BasicDocumentEntry* pEntry = (BasicDocumentEntry*)aBasicsBox.GetEntryData( i );
delete pEntry;
@@ -713,19 +713,19 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() )
{
- BOOL bProtected = xPasswd->isLibraryPasswordProtected( aOULibName );
+ sal_Bool bProtected = xPasswd->isLibraryPasswordProtected( aOULibName );
// change password dialog
- SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, TRUE, !bProtected );
+ SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, sal_True, !bProtected );
pDlg->SetCheckPasswordHdl( LINK( this, LibPage, CheckPasswordHdl ) );
if ( pDlg->Execute() == RET_OK )
{
- BOOL bNewProtected = xPasswd->isLibraryPasswordProtected( aOULibName );
+ sal_Bool bNewProtected = xPasswd->isLibraryPasswordProtected( aOULibName );
if ( bNewProtected != bProtected )
{
- ULONG nPos = (ULONG)aLibBox.GetModel()->GetAbsPos( pCurEntry );
+ sal_uLong nPos = (sal_uLong)aLibBox.GetModel()->GetAbsPos( pCurEntry );
aLibBox.GetModel()->Remove( pCurEntry );
ImpInsertLibEntry( aLibName, nPos );
aLibBox.SetCurEntry( aLibBox.GetEntry( nPos ) );
@@ -910,8 +910,8 @@ void LibPage::InsertLib()
( xDlgLibContImport.is() && xDlgLibContImport->hasByName( aOULibName ) && xDlgLibContImport->isLibraryLink( aOULibName ) ) ) )
{
SvLBoxEntry* pEntry = pLibDlg->GetLibBox().DoInsertEntry( aLibName );
- USHORT nPos = (USHORT) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry );
- pLibDlg->GetLibBox().CheckEntryPos( nPos, TRUE);
+ sal_uInt16 nPos = (sal_uInt16) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry );
+ pLibDlg->GetLibBox().CheckEntryPos( nPos, sal_True);
}
}
@@ -919,22 +919,22 @@ void LibPage::InsertLib()
InfoBox( this, String( IDEResId( RID_STR_NOLIBINSTORAGE ) ) ).Execute();
else
{
- BOOL bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
String aExtension( aURLObj.getExtension() );
String aLibExtension( String::CreateFromAscii( "xlb" ) );
String aContExtension( String::CreateFromAscii( "xlc" ) );
// disable reference checkbox for documents and sbls
if ( aExtension != aLibExtension && aExtension != aContExtension )
- pLibDlg->EnableReference( FALSE );
+ pLibDlg->EnableReference( sal_False );
if ( pLibDlg->Execute() )
{
- ULONG nNewPos = aLibBox.GetEntryCount();
- BOOL bRemove = FALSE;
- BOOL bReplace = pLibDlg->IsReplace();
- BOOL bReference = pLibDlg->IsReference();
- for ( USHORT nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ )
+ sal_uLong nNewPos = aLibBox.GetEntryCount();
+ sal_Bool bRemove = sal_False;
+ sal_Bool bReplace = pLibDlg->IsReplace();
+ sal_Bool bReference = pLibDlg->IsReference();
+ for ( sal_uInt16 nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ )
{
if ( pLibDlg->GetLibBox().IsChecked( nLib ) )
{
@@ -971,7 +971,7 @@ void LibPage::InsertLib()
}
// remove existing libraries
- bRemove = TRUE;
+ bRemove = sal_True;
}
else
{
@@ -989,14 +989,14 @@ void LibPage::InsertLib()
}
// check, if the library is password protected
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
String aPassword;
if ( xModLibContImport.is() && xModLibContImport->hasByName( aOULibName ) )
{
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) && !bReference )
{
- bOK = QueryPassword( xModLibContImp, aLibName, aPassword, TRUE, TRUE );
+ bOK = QueryPassword( xModLibContImp, aLibName, aPassword, sal_True, sal_True );
if ( !bOK )
{
@@ -1043,7 +1043,7 @@ void LibPage::InsertLib()
::rtl::OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
- xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aOULibName, aModStorageURL, TRUE ), UNO_QUERY);
+ xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aOULibName, aModStorageURL, sal_True ), UNO_QUERY);
}
else
{
@@ -1112,7 +1112,7 @@ void LibPage::InsertLib()
::rtl::OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
- xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aOULibName, aDlgStorageURL, TRUE ), UNO_QUERY);
+ xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aOULibName, aDlgStorageURL, sal_True ), UNO_QUERY);
}
else
{
@@ -1148,7 +1148,7 @@ void LibPage::InsertLib()
// insert listbox entry
ImpInsertLibEntry( aLibName, aLibBox.GetEntryCount() );
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
@@ -1178,7 +1178,7 @@ void LibPage::Export( void )
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
// check password
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
@@ -1450,14 +1450,14 @@ void LibPage::DeleteCurrent()
String aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// check, if library is link
- BOOL bIsLibraryLink = FALSE;
+ sal_Bool bIsLibraryLink = sal_False;
::rtl::OUString aOULibName( aLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLink( aOULibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryLink( aOULibName ) ) )
{
- bIsLibraryLink = TRUE;
+ bIsLibraryLink = sal_True;
}
if ( QueryDelLib( aLibName, bIsLibraryLink, this ) )
@@ -1487,7 +1487,7 @@ void LibPage::DeleteCurrent()
//----------------------------------------------------------------------------
-void LibPage::EndTabDialog( USHORT nRet )
+void LibPage::EndTabDialog( sal_uInt16 nRet )
{
DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" );
if ( pTabDlg )
@@ -1516,7 +1516,7 @@ void LibPage::FillListBox()
void LibPage::InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation )
{
String aEntryText( rDocument.getTitle( eLocation ) );
- USHORT nPos = aBasicsBox.InsertEntry( aEntryText, LISTBOX_APPEND );
+ sal_uInt16 nPos = aBasicsBox.InsertEntry( aEntryText, LISTBOX_APPEND );
aBasicsBox.SetEntryData( nPos, new BasicDocumentEntry( rDocument, eLocation ) );
}
@@ -1524,7 +1524,7 @@ void LibPage::InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocati
void LibPage::SetCurLib()
{
- USHORT nSelPos = aBasicsBox.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aBasicsBox.GetSelectEntryPos();
BasicDocumentEntry* pEntry = (BasicDocumentEntry*)aBasicsBox.GetEntryData( nSelPos );
if ( pEntry )
{
@@ -1562,10 +1562,10 @@ void LibPage::SetCurLib()
//----------------------------------------------------------------------------
-SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, ULONG nPos )
+SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos )
{
// check, if library is password protected
- BOOL bProtected = FALSE;
+ sal_Bool bProtected = sal_False;
::rtl::OUString aOULibName( rLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
@@ -1616,14 +1616,14 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
String aLibName;
String aLibStdName( String( RTL_CONSTASCII_USTRINGPARAM( "Library" ) ) );
//String aLibStdName( IDEResId( RID_STR_STDLIBNAME ) );
- BOOL bValid = FALSE;
- USHORT i = 1;
+ sal_Bool bValid = sal_False;
+ sal_uInt16 i = 1;
while ( !bValid )
{
aLibName = aLibStdName;
aLibName += String::CreateFromInt32( i );
if ( !rDocument.hasLibrary( E_SCRIPTS, aLibName ) && !rDocument.hasLibrary( E_DIALOGS, aLibName ) )
- bValid = TRUE;
+ bValid = sal_True;
i++;
}
@@ -1667,7 +1667,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
// create a module
String aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
::rtl::OUString sModuleCode;
- if ( !rDocument.createModule( aLibName, aModName, TRUE, sModuleCode ) )
+ if ( !rDocument.createModule( aLibName, aModName, sal_True, sModuleCode ) )
throw Exception();
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE );
@@ -1690,10 +1690,10 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
pEntry = pBasicBox->GetParent( pEntry );
}
- USHORT nMode = pBasicBox->GetMode();
+ sal_uInt16 nMode = pBasicBox->GetMode();
bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES );
- USHORT nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB;
- USHORT nIdHC = bDlgMode ? RID_IMG_DLGLIB_HC : RID_IMG_MODLIB_HC;
+ sal_uInt16 nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB;
+ sal_uInt16 nIdHC = bDlgMode ? RID_IMG_DLGLIB_HC : RID_IMG_MODLIB_HC;
SvLBoxEntry* pNewLibEntry = pBasicBox->AddEntry(
aLibName,
Image( IDEResId( nId ) ),
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index c877b2f35bb2..5c82e3edc90f 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -77,13 +77,13 @@ ExtBasicTreeListBox::~ExtBasicTreeListBox()
{
}
-BOOL __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pEntry )
{
- USHORT nDepth = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
if ( nDepth >= 2 )
{
BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) );
@@ -95,7 +95,7 @@ BOOL __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection&
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) )
{
// allow editing only for libraries, which are not readonly
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -103,25 +103,25 @@ BOOL __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection&
return bRet;
}
-BOOL __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
+sal_Bool __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
{
- BOOL bValid = BasicIDE::IsValidSbxName( rNewText );
+ sal_Bool bValid = BasicIDE::IsValidSbxName( rNewText );
if ( !bValid )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
- return FALSE;
+ return sal_False;
}
String aCurText( GetEntryText( pEntry ) );
if ( aCurText == rNewText )
// nothing to do
- return TRUE;
+ return sal_True;
BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) );
ScriptDocument aDocument( aDesc.GetDocument() );
DBG_ASSERT( aDocument.isValid(), "ExtBasicTreeListBox::EditedEntry: no document!" );
if ( !aDocument.isValid() )
- return FALSE;
+ return sal_False;
String aLibName( aDesc.GetLibName() );
BasicEntryType eType( aDesc.GetType() );
@@ -130,7 +130,7 @@ BOOL __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const Strin
: BasicIDE::RenameDialog( this, aDocument, aLibName, aCurText, rNewText );
if ( !bSuccess )
- return FALSE;
+ return sal_False;
BasicIDE::MarkDocumentModified( aDocument );
@@ -148,10 +148,10 @@ BOOL __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const Strin
SetEntryText( pEntry, rNewText );
SetCurEntry( pEntry );
SetCurEntry( pEntry );
- Select( pEntry, FALSE );
+ Select( pEntry, sal_False );
Select( pEntry ); // damit Handler gerufen wird => Edit updaten
- return TRUE;
+ return sal_True;
}
@@ -161,7 +161,7 @@ DragDropMode __EXPORT ExtBasicTreeListBox::NotifyStartDrag( TransferDataContaine
if ( pEntry )
{
- USHORT nDepth = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
if ( nDepth >= 2 )
{
nMode_ = SV_DRAGDROP_CTRL_COPY;
@@ -179,7 +179,7 @@ DragDropMode __EXPORT ExtBasicTreeListBox::NotifyStartDrag( TransferDataContaine
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
{
// Get StringResourceManager
- Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aOULibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aOULibName, sal_True ) );
Reference< XStringResourceManager > xSourceMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
if( xSourceMgr.is() )
@@ -195,18 +195,18 @@ DragDropMode __EXPORT ExtBasicTreeListBox::NotifyStartDrag( TransferDataContaine
}
-BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
+sal_Bool __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
{
// don't drop on a BasicManager (nDepth == 0)
- USHORT nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0;
- BOOL bValid = nDepth ? TRUE : FALSE;
+ sal_uInt16 nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0;
+ sal_Bool bValid = nDepth ? sal_True : sal_False;
// don't drop in the same library
SvLBoxEntry* pSelected = FirstSelected();
if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
- bValid = FALSE;
+ bValid = sal_False;
else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) )
- bValid = FALSE;
+ bValid = sal_False;
// don't drop on a library, which is not loaded, readonly or password protected
// or which already has a module/dialog with this name
@@ -228,14 +228,14 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOUDestLibName ) )
{
if ( !xModLibContainer->isLibraryLoaded( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
if ( xModLibContainer->isLibraryReadOnly( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOUDestLibName ) && !xPasswd->isLibraryPasswordVerified( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
}
// check if dialog library is not loaded or readonly
@@ -243,17 +243,17 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOUDestLibName ) )
{
if ( !xDlgLibContainer->isLibraryLoaded( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
if ( xDlgLibContainer->isLibraryReadOnly( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
}
// check, if module/dialog with this name is already existing in target library
if ( ( eSourceType == OBJ_TYPE_MODULE && rDestDoc.hasModule( aDestLibName, aSourceName ) ) ||
( eSourceType == OBJ_TYPE_DIALOG && rDestDoc.hasDialog( aDestLibName, aSourceName ) ) )
{
- bValid = FALSE;
+ bValid = sal_False;
}
}
@@ -261,20 +261,20 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
}
-BOOL __EXPORT ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool __EXPORT ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return NotifyCopyingMoving( pTarget, pEntry,
- rpNewParent, rNewChildPos, TRUE );
+ rpNewParent, rNewChildPos, sal_True );
}
-BOOL __EXPORT ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool __EXPORT ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
-// return FALSE; // Wie kopiere ich ein SBX ?!
+// return sal_False; // Wie kopiere ich ein SBX ?!
return NotifyCopyingMoving( pTarget, pEntry,
- rpNewParent, rNewChildPos, FALSE );
+ rpNewParent, rNewChildPos, sal_False );
}
@@ -286,14 +286,14 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >&
return;
// Get StringResourceManager
- Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, TRUE ) );
+ Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, sal_True ) );
Reference< XStringResourceManager > xSourceMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xSourceDialogLib );
if( !xSourceMgr.is() )
return;
bool bSourceLocalized = ( xSourceMgr->getLocales().getLength() > 0 );
- Reference< container::XNameContainer > xDestDialogLib( rDestDoc.getLibrary( E_DIALOGS, rDestLibName, TRUE ) );
+ Reference< container::XNameContainer > xDestDialogLib( rDestDoc.getLibrary( E_DIALOGS, rDestLibName, sal_True ) );
Reference< XStringResourceManager > xDestMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xDestDialogLib );
if( !xDestMgr.is() )
@@ -334,13 +334,13 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >&
}
-BOOL __EXPORT ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove )
+sal_Bool __EXPORT ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove )
{
(void)pEntry;
DBG_ASSERT( pEntry, "Kein Eintrag?" ); // Hier ASS ok, sollte nicht mit
DBG_ASSERT( pTarget, "Kein Ziel?" ); // NULL (ganz vorne) erreicht werden
- USHORT nDepth = GetModel()->GetDepth( pTarget );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pTarget );
DBG_ASSERT( nDepth, "Tiefe?" );
if ( nDepth == 1 )
{
@@ -480,7 +480,7 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, Sv
return 2; // Aufklappen...
}
-OrganizeDialog::OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescriptor& rDesc )
+OrganizeDialog::OrganizeDialog( Window* pParent, sal_Int16 tabId, BasicEntryDescriptor& rDesc )
:TabDialog( pParent, IDEResId( RID_TD_ORGANIZE ) )
,aTabCtrl( this, IDEResId( RID_TC_ORGANIZE ) )
,m_aCurEntry( rDesc )
@@ -513,7 +513,7 @@ OrganizeDialog::OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescript
__EXPORT OrganizeDialog::~OrganizeDialog()
{
- for ( USHORT i = 0; i < aTabCtrl.GetPageCount(); i++ )
+ for ( sal_uInt16 i = 0; i < aTabCtrl.GetPageCount(); i++ )
delete aTabCtrl.GetTabPage( aTabCtrl.GetPageId( i ) );
};
@@ -529,7 +529,7 @@ short OrganizeDialog::Execute()
IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
- USHORT nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 nId = pTabCtrl->GetCurPageId();
// Wenn TabPage noch nicht erzeugt wurde, dann erzeugen
if ( !pTabCtrl->GetTabPage( nId ) )
{
@@ -564,7 +564,7 @@ IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
return 0;
}
-ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, USHORT nMode ) :
+ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, sal_uInt16 nMode ) :
TabPage( pParent, rResId ),
aLibText( this, IDEResId( RID_STR_LIB ) ),
aBasicBox( this, IDEResId( RID_TRLBOX ) ),
@@ -594,7 +594,7 @@ ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, USHORT nMode ) :
}
aBasicBox.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY );
- aBasicBox.EnableInplaceEditing( TRUE );
+ aBasicBox.EnableInplaceEditing( sal_True );
aBasicBox.SetMode( nMode );
aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP |
WB_HASLINES | WB_HASLINESATROOT |
@@ -629,9 +629,9 @@ void ObjectPage::CheckButtons()
::rtl::OUString aOULibName( aDesc.GetLibName() );
String aLibSubName( aDesc.GetLibSubName() );
sal_Bool bVBAEnabled = aDocument.isInVBAMode();
- USHORT nMode = aBasicBox.GetMode();
+ sal_uInt16 nMode = aBasicBox.GetMode();
- USHORT nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
+ sal_uInt16 nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
if ( nDepth >= 2 )
{
if( bVBAEnabled && ( nMode & BROWSEMODE_MODULES ) && ( nDepth == 2 ) )
@@ -644,7 +644,7 @@ void ObjectPage::CheckButtons()
// enable/disable new module/dialog buttons
LibraryLocation eLocation( aDesc.GetLocation() );
- BOOL bReadOnly = FALSE;
+ sal_Bool bReadOnly = sal_False;
if ( nDepth > 0 )
{
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
@@ -652,7 +652,7 @@ void ObjectPage::CheckButtons()
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) )
{
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
}
}
if ( bReadOnly || eLocation == LIBRARY_LOCATION_SHARE )
@@ -766,7 +766,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
return false;
// check if the module library is loaded
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
::rtl::OUString aOULibName( rLibName );
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
@@ -932,7 +932,7 @@ void ObjectPage::DeleteCurrent()
-void ObjectPage::EndTabDialog( USHORT nRet )
+void ObjectPage::EndTabDialog( sal_uInt16 nRet )
{
DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" );
if ( pTabDlg )
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index f9efa779357e..93263b020453 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -64,7 +64,7 @@ private:
DECL_LINK(OkButtonHandler, Button *);
public:
- NewObjectDialog(Window * pParent, USHORT nMode, bool bCheckName = false);
+ NewObjectDialog(Window * pParent, sal_uInt16 nMode, bool bCheckName = false);
~NewObjectDialog();
String GetObjectName() const { return aEdit.GetText(); }
@@ -94,18 +94,18 @@ public:
class ExtBasicTreeListBox : public BasicTreeListBox
{
protected:
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvLBoxEntry* pEntry );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* pEntry );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* pEntry );
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
- BOOL NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove );
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
+ sal_Bool NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove );
public:
ExtBasicTreeListBox( Window* pParent, const ResId& rRes );
@@ -118,7 +118,7 @@ public:
class BasicCheckBox : public SvTabListBox
{
private:
- USHORT nMode;
+ sal_uInt16 nMode;
SvLBoxButtonData* pCheckButton;
ScriptDocument m_aDocument;
void Init();
@@ -127,20 +127,20 @@ public:
BasicCheckBox( Window* pParent, const ResId& rResId );
~BasicCheckBox();
- SvLBoxEntry* DoInsertEntry( const String& rStr, ULONG nPos = LISTBOX_APPEND );
+ SvLBoxEntry* DoInsertEntry( const String& rStr, sal_uLong nPos = LISTBOX_APPEND );
SvLBoxEntry* FindEntry( const String& rName );
- void CheckEntryPos( ULONG nPos, BOOL bCheck = TRUE );
- BOOL IsChecked( ULONG nPos ) const;
+ void CheckEntryPos( sal_uLong nPos, sal_Bool bCheck = sal_True );
+ sal_Bool IsChecked( sal_uLong nPos ) const;
virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind );
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
- void SetMode( USHORT n );
- USHORT GetMode() const { return nMode; }
+ void SetMode( sal_uInt16 n );
+ sal_uInt16 GetMode() const { return nMode; }
};
class LibDialog: public ModalDialog
@@ -161,11 +161,11 @@ public:
void SetStorageName( const String& rName );
BasicCheckBox& GetLibBox() { return aLibBox; }
- BOOL IsReference() const { return aReferenceBox.IsChecked(); }
- BOOL IsReplace() const { return aReplaceBox.IsChecked(); }
+ sal_Bool IsReference() const { return aReferenceBox.IsChecked(); }
+ sal_Bool IsReplace() const { return aReplaceBox.IsChecked(); }
- void EnableReference( BOOL b ) { aReferenceBox.Enable( b ); }
- void EnableReplace( BOOL b ) { aReplaceBox.Enable( b ); }
+ void EnableReference( sal_Bool b ) { aReferenceBox.Enable( b ); }
+ void EnableReplace( sal_Bool b ) { aReplaceBox.Enable( b ); }
};
@@ -176,7 +176,7 @@ private:
BasicEntryDescriptor m_aCurEntry;
public:
- OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescriptor& rDesc );
+ OrganizeDialog( Window* pParent, sal_Int16 tabId, BasicEntryDescriptor& rDesc );
~OrganizeDialog();
virtual short Execute();
@@ -202,7 +202,7 @@ protected:
void DeleteCurrent();
void NewModule();
void NewDialog();
- void EndTabDialog( USHORT nRet );
+ void EndTabDialog( sal_uInt16 nRet );
TabDialog* pTabDlg;
@@ -210,7 +210,7 @@ protected:
virtual void DeactivatePage();
public:
- ObjectPage( Window* pParent, const ResId& rResId, USHORT nMode );
+ ObjectPage( Window* pParent, const ResId& rResId, sal_uInt16 nMode );
void SetCurrentEntry( BasicEntryDescriptor& rDesc );
void SetTabDlg( TabDialog* p ) { pTabDlg = p;}
@@ -250,11 +250,11 @@ protected:
void Export();
void ExportAsPackage( const String& aLibName );
void ExportAsBasic( const String& aLibName );
- void EndTabDialog( USHORT nRet );
+ void EndTabDialog( sal_uInt16 nRet );
void FillListBox();
void InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
void SetCurLib();
- SvLBoxEntry* ImpInsertLibEntry( const String& rLibName, ULONG nPos );
+ SvLBoxEntry* ImpInsertLibEntry( const String& rLibName, sal_uLong nPos );
virtual void ActivatePage();
virtual void DeactivatePage();
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index 82030adfccee..9b9006953411 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -146,10 +146,10 @@ void __EXPORT ObjectCatalog::Move()
IDE_DLL()->GetExtraData()->SetObjectCatalogPos( GetPosPixel() );
}
-BOOL __EXPORT ObjectCatalog::Close()
+sal_Bool __EXPORT ObjectCatalog::Close()
{
aCancelHdl.Call( this );
- return TRUE;
+ return sal_True;
}
void __EXPORT ObjectCatalog::Resize()
@@ -184,7 +184,7 @@ void __EXPORT ObjectCatalog::Resize()
IMPL_LINK( ObjectCatalog, ToolBoxHdl, ToolBox*, pToolBox )
{
- USHORT nCurItem = pToolBox->GetCurItemId();
+ sal_uInt16 nCurItem = pToolBox->GetCurItemId();
switch ( nCurItem )
{
case TBITEM_SHOW:
@@ -231,9 +231,9 @@ void ObjectCatalog::CheckButtons()
SvLBoxEntry* pCurEntry = aMacroTreeList.GetCurEntry();
BasicEntryType eType = pCurEntry ? ((BasicEntry*)pCurEntry->GetUserData())->GetType() : OBJ_TYPE_UNKNOWN;
if ( eType == OBJ_TYPE_DIALOG || eType == OBJ_TYPE_MODULE || eType == OBJ_TYPE_METHOD )
- aToolBox.EnableItem( TBITEM_SHOW, TRUE );
+ aToolBox.EnableItem( TBITEM_SHOW, sal_True );
else
- aToolBox.EnableItem( TBITEM_SHOW, FALSE );
+ aToolBox.EnableItem( TBITEM_SHOW, sal_False );
}
diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx
index 796d3cd4fbf6..5f0cbc126641 100644
--- a/basctl/source/basicide/objdlg.hxx
+++ b/basctl/source/basicide/objdlg.hxx
@@ -80,7 +80,7 @@ protected:
DECL_LINK( TreeListHighlightHdl, SvTreeListBox * );
void UpdateFields();
virtual void Move();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
public:
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 6b16316d889c..5fbfbf61caca 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -584,7 +584,7 @@ namespace basctl
{
try
{
- Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ) );
+ Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) );
if ( xLib.is() )
{
xLib->removeByName( _rModuleName );
@@ -608,7 +608,7 @@ namespace basctl
try
{
- Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ) );
+ Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) );
if ( xLib.is() )
return xLib->hasByName( _rModName );
}
@@ -629,7 +629,7 @@ namespace basctl
_out_rModuleOrDialog.clear();
try
{
- Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ), UNO_QUERY_THROW );
+ Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ), UNO_QUERY_THROW );
if ( xLib->hasByName( _rObjectName ) )
{
_out_rModuleOrDialog = xLib->getByName( _rObjectName );
@@ -653,7 +653,7 @@ namespace basctl
try
{
- Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ), UNO_QUERY_THROW );
+ Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ), UNO_QUERY_THROW );
// get element
Any aElement( xLib->getByName( _rOldName ) );
@@ -717,7 +717,7 @@ namespace basctl
_out_rNewModuleCode = ::rtl::OUString();
try
{
- Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, TRUE ) );
+ Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, sal_True ) );
if ( !xLib.is() || xLib->hasByName( _rModName ) )
return false;
@@ -780,7 +780,7 @@ namespace basctl
{
try
{
- Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, TRUE ), UNO_QUERY_THROW );
+ Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, sal_True ), UNO_QUERY_THROW );
// create dialog
_out_rDialogProvider.clear();
@@ -1350,14 +1350,14 @@ namespace basctl
::std::insert_iterator< ::std::set< ::rtl::OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) );
bool bValid = false;
- USHORT i = 1;
+ sal_uInt16 i = 1;
while ( !bValid )
{
aObjectName = aBaseName;
aObjectName += String::CreateFromInt32( i );
if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
- bValid = TRUE;
+ bValid = sal_True;
++i;
}
diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx
index 8a7afc6b64c2..d046a2356ec9 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -65,7 +65,7 @@ IMPL_LINK( PopupWindowTbx, SelectHdl, void*, EMPTYARG )
return 0;
}
-PopupWindowTbx::PopupWindowTbx( USHORT nId, WindowAlign eAlign,
+PopupWindowTbx::PopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign,
ResId aRIdWin, ResId aRIdTbx,
SfxBindings& rBind ) :
SfxPopupWindow ( nId, aRIdWin, rBind ),
@@ -117,7 +117,7 @@ PopupWindowTbx::~PopupWindowTbx()
|*
\************************************************************************/
-TbxControls::TbxControls( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+TbxControls::TbxControls( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
nLastSlot = USHRT_MAX;
@@ -138,7 +138,7 @@ SfxPopupWindowType TbxControls::GetPopupWindowType() const
return(SFX_POPUPWINDOW_ONTIMEOUT);
}
-void TbxControls::StateChanged( USHORT nSID, SfxItemState eState,
+void TbxControls::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
if( pState )
@@ -146,8 +146,8 @@ void TbxControls::StateChanged( USHORT nSID, SfxItemState eState,
SfxAllEnumItem* pItem = PTR_CAST(SfxAllEnumItem, pState);
if( pItem )
{
- USHORT nLastEnum = pItem->GetValue();
- USHORT nTemp = 0;
+ sal_uInt16 nLastEnum = pItem->GetValue();
+ sal_uInt16 nTemp = 0;
switch( nLastEnum )
{
case SVX_SNAP_PUSHBUTTON: nTemp = SID_INSERT_PUSHBUTTON; break;
@@ -193,7 +193,7 @@ void TbxControls::StateChanged( USHORT nSID, SfxItemState eState,
SfxToolBoxControl::StateChanged( nSID, eState,pState );
}
-void TbxControls::Select( USHORT nModifier )
+void TbxControls::Select( sal_uInt16 nModifier )
{
(void)nModifier;
SfxAllEnumItem aItem( SID_CHOOSE_CONTROLS, nLastSlot );
@@ -228,7 +228,7 @@ SfxPopupWindow* TbxControls::CreatePopupWindow()
IDEResId( RID_TBXCONTROLS ),
IDEResId( RID_TOOLBOX ),
GetBindings() );
- pWin->StartPopupMode(&GetToolBox(), TRUE);
+ pWin->StartPopupMode(&GetToolBox(), sal_True);
pWin->Update();
pWin->StartSelection();
pWin->Show();
diff --git a/basctl/source/basicide/tbxctl.hxx b/basctl/source/basicide/tbxctl.hxx
index 94dfd32b96e6..f10f10b49640 100644
--- a/basctl/source/basicide/tbxctl.hxx
+++ b/basctl/source/basicide/tbxctl.hxx
@@ -44,7 +44,7 @@ private:
DECL_LINK( SelectHdl, void* );
public:
- PopupWindowTbx( USHORT nId, WindowAlign eAlign,
+ PopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign,
ResId aRIdWin, ResId aRIdTbx, SfxBindings& rBind );
~PopupWindowTbx();
@@ -70,22 +70,22 @@ private:
bool bDisabled;
};
- USHORT nLastSlot;
+ sal_uInt16 nLastSlot;
protected:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
public:
SFX_DECL_TOOLBOX_CONTROL();
- TbxControls(USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ TbxControls(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~TbxControls() {}
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
using SfxToolBoxControl::Select;
- void Select( USHORT nModifier );
+ void Select( sal_uInt16 nModifier );
};
diff --git a/basctl/source/basicide/unomodel.hxx b/basctl/source/basicide/unomodel.hxx
index 2eb79a34e946..5aa14c17d70e 100644
--- a/basctl/source/basicide/unomodel.hxx
+++ b/basctl/source/basicide/unomodel.hxx
@@ -50,7 +50,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void)
throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName)
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
throw( ::com::sun::star::uno::RuntimeException );