summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMalte Timmermann [mt] <malte.timmermann@oracle.com>2011-02-15 17:14:59 +0100
committerMalte Timmermann [mt] <malte.timmermann@oracle.com>2011-02-15 17:14:59 +0100
commitf42f3b496a1d956f72fad8aaf37da790e89ed803 (patch)
treeb6f9cea18fda9b1c8a0af9642958a9671de6f713 /basctl
parentde539c71865e6eec7b1db38031f661d7d8ad0714 (diff)
parent16680c16eb84b5315dbbeeb61b3693c4d567640a (diff)
accfixes: merged to m100
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/accessibility/accessibledialogwindow.cxx10
-rw-r--r--basctl/source/basicide/basdoc.cxx4
-rw-r--r--basctl/source/basicide/basdoc.hxx4
-rw-r--r--basctl/source/basicide/basicbox.cxx62
-rw-r--r--basctl/source/basicide/basicbox.hxx12
-rw-r--r--basctl/source/basicide/basicmod.hxx2
-rw-r--r--basctl/source/basicide/basicprint.src2
-rw-r--r--basctl/source/basicide/basicrenderable.cxx14
-rw-r--r--basctl/source/basicide/baside2.cxx268
-rw-r--r--basctl/source/basicide/baside2.hxx117
-rw-r--r--basctl/source/basicide/baside2b.cxx270
-rw-r--r--basctl/source/basicide/baside3.cxx66
-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.cxx143
-rw-r--r--basctl/source/basicide/basobj2.cxx286
-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.cxx130
-rw-r--r--basctl/source/basicide/brkdlg.cxx34
-rw-r--r--basctl/source/basicide/iderdll.cxx23
-rw-r--r--basctl/source/basicide/iderdll2.hxx16
-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
-rw-r--r--basctl/source/dlged/dlged.cxx88
-rw-r--r--basctl/source/dlged/dlgedfunc.cxx92
-rw-r--r--basctl/source/dlged/dlgedobj.cxx32
-rw-r--r--basctl/source/dlged/dlgedpage.cxx2
-rw-r--r--basctl/source/dlged/dlgedview.cxx4
-rw-r--r--basctl/source/dlged/managelang.cxx36
-rw-r--r--basctl/source/inc/baside3.hxx19
-rw-r--r--basctl/source/inc/basidesh.hxx59
-rw-r--r--basctl/source/inc/basobj.hxx10
-rw-r--r--basctl/source/inc/bastypes.hxx99
-rw-r--r--basctl/source/inc/dlged.hxx32
-rw-r--r--basctl/source/inc/dlgeddef.hxx56
-rw-r--r--basctl/source/inc/dlgedfunc.hxx22
-rw-r--r--basctl/source/inc/dlgedmod.hxx2
-rw-r--r--basctl/source/inc/dlgedpage.hxx4
-rw-r--r--basctl/source/inc/dlgedview.hxx2
-rw-r--r--basctl/source/inc/iderid.hxx2
-rw-r--r--basctl/source/inc/sbxitem.hxx22
-rw-r--r--basctl/util/makefile.mk1
57 files changed, 1420 insertions, 1395 deletions
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index c774f2d166eb..2d21620a659a 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -130,9 +130,9 @@ AccessibleDialogWindow::AccessibleDialogWindow( DialogWindow* pDialogWindow )
SdrPage* pSdrPage = m_pDialogWindow->GetPage();
if ( pSdrPage )
{
- ULONG nCount = pSdrPage->GetObjCount();
+ sal_uLong nCount = pSdrPage->GetObjCount();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
SdrObject* pObj = pSdrPage->GetObj( i );
DlgEdObj* pDlgEdObj = PTR_CAST( DlgEdObj, pObj );
@@ -357,7 +357,7 @@ void AccessibleDialogWindow::UpdateChildren()
SdrPage* pSdrPage = m_pDialogWindow->GetPage();
if ( pSdrPage )
{
- for ( ULONG i = 0, nCount = pSdrPage->GetObjCount(); i < nCount; ++i )
+ for ( sal_uLong i = 0, nCount = pSdrPage->GetObjCount(); i < nCount; ++i )
{
SdrObject* pObj = pSdrPage->GetObj( i );
DlgEdObj* pDlgEdObj = PTR_CAST( DlgEdObj, pObj );
@@ -751,7 +751,7 @@ sal_Int32 AccessibleDialogWindow::getAccessibleIndexInParent( ) throw (RuntimeE
Window* pParent = m_pDialogWindow->GetAccessibleParentWindow();
if ( pParent )
{
- for ( USHORT i = 0, nCount = pParent->GetAccessibleChildWindowCount(); i < nCount; ++i )
+ for ( sal_uInt16 i = 0, nCount = pParent->GetAccessibleChildWindowCount(); i < nCount; ++i )
{
Window* pChild = pParent->GetAccessibleChildWindow( i );
if ( pChild == static_cast< Window* >( m_pDialogWindow ) )
@@ -1114,7 +1114,7 @@ void AccessibleDialogWindow::deselectAccessibleChild( sal_Int32 nChildIndex ) th
{
SdrPageView* pPgView = pSdrView->GetSdrPageView();
if ( pPgView )
- pSdrView->MarkObj( pDlgEdObj, pPgView, TRUE );
+ pSdrView->MarkObj( pDlgEdObj, pPgView, sal_True );
}
}
}
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..0ff56f208cad 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() );
@@ -144,9 +144,7 @@ void DocListenerBox::onDocumentSaveAsDone( const ScriptDocument& /*_rDocument*/
void DocListenerBox::onDocumentClosed( const ScriptDocument& /*_rDocument*/ )
{
- if ( SFX_APP()->IsInBasicCall() )
- // Nicht wenn Office beendet
- FillBox();
+ FillBox();
}
void DocListenerBox::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ )
@@ -167,12 +165,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 +214,8 @@ void __EXPORT BasicLibBox::ReleaseFocus()
void BasicLibBox::FillBox()
{
- SetUpdateMode( FALSE );
- bIgnoreSelect = TRUE;
+ SetUpdateMode( sal_False );
+ bIgnoreSelect = sal_True;
aCurText = GetSelectEntry();
@@ -225,7 +223,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 +237,7 @@ void BasicLibBox::FillBox()
InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT );
}
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
SelectEntry( aCurText );
if ( !GetSelectEntryCount() )
@@ -247,7 +245,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 +262,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 +274,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 +298,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 +326,7 @@ void __EXPORT BasicLibBox::Select()
void BasicLibBox::NotifyIDE()
{
- USHORT nSelPos = GetSelectEntryPos();
+ sal_uInt16 nSelPos = GetSelectEntryPos();
BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( nSelPos );
if ( pEntry )
{
@@ -350,8 +348,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 +361,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 +370,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 +420,7 @@ BasicLanguageBox::~BasicLanguageBox()
void BasicLanguageBox::FillBox()
{
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
m_bIgnoreSelect = true;
m_sCurrentText = GetSelectEntry();
ClearBox();
@@ -436,8 +434,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 +447,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 +467,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 +502,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/basicprint.src b/basctl/source/basicide/basicprint.src
index 1f301d3461a9..06bb6b057150 100644
--- a/basctl/source/basicide/basicprint.src
+++ b/basctl/source/basicide/basicprint.src
@@ -33,8 +33,6 @@ StringArray RID_PRINTDLG_STRLIST
{
< "Print range"; >;
< "All ~Pages"; >;
- < "Print all pages of the printable content."; >;
< "Pa~ges"; >;
- < "Print only some pages of the printable content."; >;
};
};
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index e2042d49876c..1f8fe51c21dd 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -45,8 +45,8 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin )
, mpWindow( pWin )
{
ResStringArray aStrings( IDEResId( RID_PRINTDLG_STRLIST ) );
- DBG_ASSERT( aStrings.Count() >= 5, "resource incomplete" );
- if( aStrings.Count() < 5 ) // bad resource ?
+ DBG_ASSERT( aStrings.Count() >= 3, "resource incomplete" );
+ if( aStrings.Count() < 3 ) // bad resource ?
return;
m_aUIProperties.realloc( 3 );
@@ -63,13 +63,13 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin )
// create a choice for the range to print
rtl::OUString aPrintContentName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
Sequence< rtl::OUString > aChoices( 2 );
- Sequence< rtl::OUString > aHelpTexts( 2 );
+ Sequence< rtl::OUString > aHelpIds( 2 );
aChoices[0] = aStrings.GetString( 1 );
- aHelpTexts[0] = aStrings.GetString( 2 );
- aChoices[1] = aStrings.GetString( 3 );
- aHelpTexts[1] = aStrings.GetString( 4 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aChoices[1] = aStrings.GetString( 2 );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
m_aUIProperties[1].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
aPrintContentName,
aChoices,
0 );
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d0a8ca1a6ddb..5c13be2ff187 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 );
}
}
@@ -1332,16 +1332,16 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO
return nFound;
}
-SfxUndoManager* __EXPORT ModulWindow::GetUndoManager()
+::svl::IUndoManager* __EXPORT ModulWindow::GetUndoManager()
{
if ( GetEditEngine() )
return &GetEditEngine()->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..86e8527524f4 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();
@@ -443,7 +443,8 @@ public:
virtual void BasicStarted();
virtual void BasicStopped();
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
const ::rtl::OUString& GetModule() const { return m_aModule; }
void SetModule( const ::rtl::OUString& aModule ) { m_aModule = aModule; }
@@ -459,8 +460,8 @@ private:
WatchWindow aWatchWindow;
StackWindow aStackWindow;
- BOOL bVSplitted;
- BOOL bHSplitted;
+ sal_Bool bVSplitted;
+ sal_Bool bHSplitted;
ModulWindow * m_pModulWindow;
@@ -489,7 +490,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 +498,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 8464cd8b9cab..25aa457cfcc2 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 ),
@@ -1190,7 +1190,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 );
@@ -1392,15 +1392,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 )
@@ -1413,10 +1413,10 @@ BOOL WatchWindow::RemoveSelectedWatch()
aXEdit.SetText( String() );
if ( !aTreeListBox.GetEntryCount() )
aRemoveWatchButton.Disable();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
@@ -1473,9 +1473,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 );
@@ -1528,8 +1528,8 @@ StackWindow::StackWindow( Window* pParent ) :
aTreeListBox.SetAccessibleName(String( IDEResId(RID_STR_STACKNAME)));
aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
aTreeListBox.SetHighlightRange();
- aTreeListBox.SetSelectionMode( NO_SELECTION );
- aTreeListBox.InsertEntry( String(), 0, FALSE, LIST_APPEND );
+ aTreeListBox.SetSelectionMode( NO_SELECTION );
+ aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND );
aTreeListBox.Show();
SetText( String( IDEResId( RID_STR_STACKNAME ) ) );
@@ -1603,7 +1603,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() )
@@ -1611,7 +1611,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 )
{
@@ -1626,7 +1626,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?!" );
@@ -1649,7 +1649,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 );
}
@@ -1661,10 +1661,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 );
}
@@ -1720,7 +1720,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() );
}
@@ -1746,7 +1746,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));
@@ -1780,8 +1780,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 )
@@ -1816,10 +1816,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 );
@@ -1837,14 +1837,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();
@@ -1858,7 +1858,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];
@@ -1936,11 +1936,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
@@ -1954,7 +1954,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;
}
}
}
@@ -1965,7 +1965,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 );
@@ -1974,20 +1974,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 )
{
@@ -2001,12 +2001,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;
@@ -2017,10 +2017,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;
}
@@ -2034,14 +2034,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();
}
@@ -2052,7 +2052,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;
}
@@ -2170,8 +2170,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;
@@ -2208,7 +2208,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;
}
@@ -2221,7 +2221,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();
@@ -2235,8 +2235,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() );
@@ -2276,7 +2276,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..a0e217e55666 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,12 +1276,12 @@ DlgEdView* DialogWindow::GetView() const
return pEditor ? pEditor->GetView() : NULL;
}
-BOOL __EXPORT DialogWindow::IsModified()
+sal_Bool __EXPORT DialogWindow::IsModified()
{
return pEditor->IsModified();
}
-SfxUndoManager* __EXPORT DialogWindow::GetUndoManager()
+::svl::IUndoManager* __EXPORT DialogWindow::GetUndoManager()
{
return pUndoMgr;
}
@@ -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..2786aa3311be 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,13 +205,11 @@ 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 );
- SFX_APP()->EnterBasicCall();
-
LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR );
LanguageBoxControl::RegisterControl( SID_BASICIDE_CURRENT_LANG );
@@ -222,13 +220,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 +237,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 +259,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 );
@@ -289,8 +287,7 @@ __EXPORT BasicIDEShell::~BasicIDEShell()
// ObjSh loslaesst. Es wusste auch keiner mehr wozu das gut war.
// GetViewFrame()->GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
- SFX_APP()->LeaveBasicCall();
- IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE;
+ IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_False;
GnBasicIDEShellCount--;
}
@@ -334,7 +331,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 +349,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 +362,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 +383,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 +396,7 @@ void BasicIDEShell::StoreAllWindowData( BOOL bPersistent )
if ( bPersistent )
{
SFX_APP()->SaveBasicAndDialogContainer();
- SetAppBasicModified( FALSE );
+ SetAppBasicModified( sal_False );
SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings )
@@ -411,12 +408,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 +423,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 +490,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 +501,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 +511,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 +524,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;
@@ -554,9 +551,9 @@ void BasicIDEShell::ArrangeTabBar()
-SfxUndoManager* BasicIDEShell::GetUndoManager()
+::svl::IUndoManager* BasicIDEShell::GetUndoManager()
{
- SfxUndoManager* pMgr = NULL;
+ ::svl::IUndoManager* pMgr = NULL;
if( pCurWin )
pMgr = pCurWin->GetUndoManager();
@@ -565,7 +562,7 @@ SfxUndoManager* BasicIDEShell::GetUndoManager()
-void BasicIDEShell::ShowObjectDialog( BOOL bShow, BOOL bCreateOrDestroy )
+void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy )
{
if ( bShow )
{
@@ -620,7 +617,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 +627,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 +689,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 +732,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 +749,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 +768,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 +782,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 +816,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 +847,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 +871,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 +929,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 +983,7 @@ void BasicIDEShell::InvalidateBasicIDESlots()
}
}
-void BasicIDEShell::EnableScrollbars( BOOL bEnable )
+void BasicIDEShell::EnableScrollbars( sal_Bool bEnable )
{
if ( bEnable )
{
@@ -1041,7 +1038,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 +1052,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..3309d0c9ffc3 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -30,23 +30,29 @@
#include <ide_pch.hxx>
-#include <vector>
-#include <algorithm>
-#include <basic/sbx.hxx>
-#include <unotools/moduleoptions.hxx>
+#include "basobj.hxx"
+#include "iderdll.hxx"
+#include "iderdll2.hxx"
+#include "iderid.hxx"
+#include "macrodlg.hxx"
+#include "moduldlg.hxx"
+#include "basidesh.hxx"
+#include "basidesh.hrc"
+#include "baside2.hxx"
+#include "basicmod.hxx"
+#include "basdoc.hxx"
+
#include <com/sun/star/document/XEmbeddedScripts.hpp>
#include <com/sun/star/document/XScriptInvocationContext.hpp>
-#include <basobj.hxx>
-#include <iderdll.hxx>
-#include <iderdll2.hxx>
-#include <iderid.hxx>
-#include <macrodlg.hxx>
-#include <moduldlg.hxx>
-#include <basidesh.hxx>
-#include <basidesh.hrc>
-#include <baside2.hxx>
-#include <basicmod.hxx>
-#include <basdoc.hxx>
+
+#include <basic/sbx.hxx>
+#include <framework/documentundoguard.hxx>
+#include <tools/diagnose_ex.h>
+#include <unotools/moduleoptions.hxx>
+
+#include <vector>
+#include <algorithm>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -56,7 +62,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 +72,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 +83,7 @@ namespace BasicIDE
{
//----------------------------------------------------------------------------
-void Organize( INT16 tabId )
+void Organize( sal_Int16 tabId )
{
BasicIDEDLL::Init();
@@ -98,21 +104,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 +197,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 +208,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 )
{
@@ -216,22 +222,66 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
return true;
}
+
+//----------------------------------------------------------------------------
+
+namespace
+{
+ struct MacroExecutionData
+ {
+ ScriptDocument aDocument;
+ SbMethodRef xMethod;
+
+ MacroExecutionData()
+ :aDocument( ScriptDocument::NoDocument )
+ ,xMethod( NULL )
+ {
+ }
+ };
+
+ class MacroExecution
+ {
+ public:
+ DECL_STATIC_LINK( MacroExecution, ExecuteMacroEvent, MacroExecutionData* );
+ };
+
+
+ IMPL_STATIC_LINK( MacroExecution, ExecuteMacroEvent, MacroExecutionData*, i_pData )
+ {
+ (void)pThis;
+ ENSURE_OR_RETURN( i_pData, "wrong MacroExecutionData", 0L );
+ // take ownership of the data
+ ::std::auto_ptr< MacroExecutionData > pData( i_pData );
+
+ DBG_ASSERT( pData->xMethod->GetParent()->GetFlags() & SBX_EXTSEARCH, "Kein EXTSEARCH!" );
+
+ // in case this is a document-local macro, try to protect the document's Undo Manager from
+ // flawed scripts
+ ::std::auto_ptr< ::framework::DocumentUndoGuard > pUndoGuard;
+ if ( pData->aDocument.isDocument() )
+ pUndoGuard.reset( new ::framework::DocumentUndoGuard( pData->aDocument.getDocument() ) );
+
+ BasicIDE::RunMethod( pData->xMethod );
+
+ return 1L;
+ }
+}
+
//----------------------------------------------------------------------------
-::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;
- SFX_APP()->EnterBasicCall();
+ IDE_DLL()->GetExtraData()->ChoosingMacro() = sal_True;
String aScriptURL;
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
SbMethod* pMethod = NULL;
- MacroChooser* pChooser = new MacroChooser( NULL, TRUE );
+ ::std::auto_ptr< MacroChooser > pChooser( new MacroChooser( NULL, sal_True ) );
if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() )
pChooser->SetMode( MACROCHOOSER_CHOOSEONLY );
@@ -241,7 +291,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 )
{
@@ -251,103 +301,95 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
if ( !pMethod && pChooser->GetMode() == MACROCHOOSER_RECORDING )
pMethod = pChooser->CreateMacro();
- if ( pMethod )
+ if ( !pMethod )
+ break;
+
+ SbModule* pModule = pMethod->GetModule();
+ ENSURE_OR_BREAK( pModule, "BasicIDE::ChooseMacro: No Module found!" );
+
+ StarBASIC* pBasic = (StarBASIC*)pModule->GetParent();
+ ENSURE_OR_BREAK( pBasic, "BasicIDE::ChooseMacro: No Basic found!" );
+
+ BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic );
+ ENSURE_OR_BREAK( pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!" );
+
+ // name
+ String aName;
+ aName += pBasic->GetName();
+ aName += '.';
+ aName += pModule->GetName();
+ aName += '.';
+ aName += pMethod->GetName();
+
+ // language
+ String aLanguage = String::CreateFromAscii("Basic");
+
+ // location
+ String aLocation;
+ ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
+ if ( aDocument.isDocument() )
{
- SbModule* pModule = pMethod->GetModule();
- DBG_ASSERT(pModule, "BasicIDE::ChooseMacro: No Module found!");
- if ( pModule )
- {
- StarBASIC* pBasic = (StarBASIC*)pModule->GetParent();
- DBG_ASSERT(pBasic, "BasicIDE::ChooseMacro: No Basic found!");
- if ( pBasic )
- {
- BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic );
- DBG_ASSERT(pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!");
- if ( pBasMgr )
- {
- // name
- String aName;
- aName += pBasic->GetName();
- aName += '.';
- aName += pModule->GetName();
- aName += '.';
- aName += pMethod->GetName();
-
- // language
- String aLanguage = String::CreateFromAscii("Basic");
-
- // location
- String aLocation;
- ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
- if ( aDocument.isDocument() )
- {
- // document basic
- aLocation = String::CreateFromAscii("document");
-
- if ( rxLimitToDocument.is() )
- {
- uno::Reference< frame::XModel > xLimitToDocument( rxLimitToDocument );
-
- uno::Reference< document::XEmbeddedScripts > xScripts( rxLimitToDocument, UNO_QUERY );
- if ( !xScripts.is() )
- { // the document itself does not support embedding scripts
- uno::Reference< document::XScriptInvocationContext > xContext( rxLimitToDocument, UNO_QUERY );
- if ( xContext.is() )
- xScripts = xContext->getScriptContainer();
- if ( xScripts.is() )
- { // but it is able to refer to a document which actually does support this
- xLimitToDocument.set( xScripts, UNO_QUERY );
- if ( !xLimitToDocument.is() )
- {
- OSL_ENSURE( false, "BasicIDE::ChooseMacro: a script container which is no document!?" );
- xLimitToDocument = rxLimitToDocument;
- }
- }
- }
-
- if ( xLimitToDocument != aDocument.getDocument() )
- {
- // error
- bError = TRUE;
- ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute();
- }
- }
- }
- else
- {
- // application basic
- aLocation = String::CreateFromAscii("application");
- }
+ // document basic
+ aLocation = String::CreateFromAscii("document");
- // script URL
- if ( !bError )
+ if ( rxLimitToDocument.is() )
+ {
+ uno::Reference< frame::XModel > xLimitToDocument( rxLimitToDocument );
+
+ uno::Reference< document::XEmbeddedScripts > xScripts( rxLimitToDocument, UNO_QUERY );
+ if ( !xScripts.is() )
+ { // the document itself does not support embedding scripts
+ uno::Reference< document::XScriptInvocationContext > xContext( rxLimitToDocument, UNO_QUERY );
+ if ( xContext.is() )
+ xScripts = xContext->getScriptContainer();
+ if ( xScripts.is() )
+ { // but it is able to refer to a document which actually does support this
+ xLimitToDocument.set( xScripts, UNO_QUERY );
+ if ( !xLimitToDocument.is() )
{
- aScriptURL = String::CreateFromAscii("vnd.sun.star.script:");
- aScriptURL += aName;
- aScriptURL += String::CreateFromAscii("?language=");
- aScriptURL += aLanguage;
- aScriptURL += String::CreateFromAscii("&location=");
- aScriptURL += aLocation;
+ OSL_ENSURE( false, "BasicIDE::ChooseMacro: a script container which is no document!?" );
+ xLimitToDocument = rxLimitToDocument;
}
}
}
+
+ if ( xLimitToDocument != aDocument.getDocument() )
+ {
+ // error
+ bError = sal_True;
+ ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute();
+ }
}
}
+ else
+ {
+ // application basic
+ aLocation = String::CreateFromAscii("application");
+ }
+
+ // script URL
+ if ( !bError )
+ {
+ aScriptURL = String::CreateFromAscii("vnd.sun.star.script:");
+ aScriptURL += aName;
+ aScriptURL += String::CreateFromAscii("?language=");
+ aScriptURL += aLanguage;
+ aScriptURL += String::CreateFromAscii("&location=");
+ aScriptURL += aLocation;
+ }
- if ( pMethod && !rxLimitToDocument.is() )
+ if ( !rxLimitToDocument.is() )
{
- pMethod->AddRef(); // festhalten, bis Event abgearbeitet.
- Application::PostUserEvent( LINK( IDE_DLL()->GetExtraData(), BasicIDEData, ExecuteMacroEvent ), pMethod );
+ MacroExecutionData* pExecData = new MacroExecutionData;
+ pExecData->aDocument = aDocument;
+ pExecData->xMethod = pMethod; // keep alive until the event has been processed
+ Application::PostUserEvent( STATIC_LINK( NULL, MacroExecution, ExecuteMacroEvent ), pExecData );
}
}
break;
}
- delete pChooser;
-
- SFX_APP()->LeaveBasicCall();
-
- return ::rtl::OUString( aScriptURL );
+ return aScriptURL;
}
//----------------------------------------------------------------------------
@@ -363,9 +405,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 +415,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 +431,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 +445,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..9e8b1c452b9a 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()
@@ -260,7 +260,7 @@ Window* __EXPORT IDEBaseWindow::GetLayoutWindow()
return this;
}
-SfxUndoManager* __EXPORT IDEBaseWindow::GetUndoManager()
+::svl::IUndoManager* __EXPORT IDEBaseWindow::GetUndoManager()
{
return NULL;
}
@@ -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..473b6219d16f 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 ) );
@@ -211,20 +211,3 @@ IMPL_LINK( BasicIDEData, GlobalBasicBreakHdl, StarBASIC *, pBasic )
return nRet;
}
-
-IMPL_LINK( BasicIDEData, ExecuteMacroEvent, void *, pData )
-{
- if ( pData )
- {
- SFX_APP()->EnterBasicCall();
- SbMethod* pMethod = (SbMethod*)pData;
-
- // Ist es eine StarScript-Methode? Am Parent erkennen
- DBG_ASSERT( pMethod->GetParent()->GetFlags() & SBX_EXTSEARCH, "Kein EXTSEARCH!" );
- BasicIDE::RunMethod( pMethod );
- pMethod->ReleaseRef(); // muss vorher inkrementiert worden sein!
- SFX_APP()->LeaveBasicCall();
- }
- return 0;
-}
-
diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx
index 162d08ddcb5e..bd812ee36f6f 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--; }
@@ -100,8 +100,6 @@ public:
const String& GetAddLibFilter() const { return aAddLibFilter; }
void SetAddLibFilter( const String& rFilter ) { aAddLibFilter = rFilter; }
-
- DECL_LINK( ExecuteMacroEvent, void * );
};
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 85ce443925f3..b6fef1100e4e 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 d83089517512..7152e699da3b 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 e32148d2deff..fbd1c8262669 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -148,10 +148,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()
@@ -186,7 +186,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:
@@ -233,9 +233,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 );
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 326098976d87..328bb94d7cc2 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -175,30 +175,30 @@ void DlgEditor::ShowDialog()
//----------------------------------------------------------------------------
-BOOL DlgEditor::UnmarkDialog()
+sal_Bool DlgEditor::UnmarkDialog()
{
SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0);
SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
- BOOL bWasMarked = pDlgEdView->IsObjMarked( pDlgObj );
+ sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj );
if( bWasMarked )
- pDlgEdView->MarkObj( pDlgObj, pPgView, TRUE );
+ pDlgEdView->MarkObj( pDlgObj, pPgView, sal_True );
return bWasMarked;
}
//----------------------------------------------------------------------------
-BOOL DlgEditor::RemarkDialog()
+sal_Bool DlgEditor::RemarkDialog()
{
SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0);
SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
- BOOL bWasMarked = pDlgEdView->IsObjMarked( pDlgObj );
+ sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj );
if( !bWasMarked )
- pDlgEdView->MarkObj( pDlgObj, pPgView, FALSE );
+ pDlgEdView->MarkObj( pDlgObj, pPgView, sal_False );
return bWasMarked;
}
@@ -220,12 +220,12 @@ DlgEditor::DlgEditor()
,pFunc(NULL)
,eMode( DLGED_SELECT )
,eActObj( OBJ_DLG_PUSHBUTTON )
- ,bFirstDraw(FALSE)
+ ,bFirstDraw(sal_False)
,aGridSize( 100, 100 ) // 100TH_MM
- ,bGridVisible(FALSE)
- ,bGridSnap(TRUE)
- ,bCreateOK(TRUE)
- ,bDialogModelChanged(FALSE)
+ ,bGridVisible(sal_False)
+ ,bGridSnap(sal_True)
+ ,bCreateOK(sal_True)
+ ,bDialogModelChanged(sal_False)
,mnPaintGuard(0)
{
pDlgEdModel = new DlgEdModel();
@@ -294,17 +294,17 @@ void DlgEditor::SetWindow( Window* pWindow_ )
pDlgEdView = new DlgEdView( pDlgEdModel, pWindow_, this );
pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0));
- pDlgEdView->SetLayerVisible( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), FALSE );
- pDlgEdView->SetMoveSnapOnlyTopLeft( TRUE );
+ pDlgEdView->SetLayerVisible( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), sal_False );
+ pDlgEdView->SetMoveSnapOnlyTopLeft( sal_True );
pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) );
pDlgEdView->SetGridCoarse( aGridSize );
pDlgEdView->SetSnapGridWidth(Fraction(aGridSize.Width(), 1), Fraction(aGridSize.Height(), 1));
pDlgEdView->SetGridSnap( bGridSnap );
pDlgEdView->SetGridVisible( bGridVisible );
- pDlgEdView->SetDragStripes( FALSE );
+ pDlgEdView->SetDragStripes( sal_False );
- pDlgEdView->SetDesignMode( TRUE );
+ pDlgEdView->SetDesignMode( sal_True );
::comphelper::disposeComponent( m_xControlContainer );
}
@@ -333,8 +333,8 @@ void DlgEditor::InitScrollBars()
pHScroll->SetRange( Range( 0, aPgSize.Width() ));
pVScroll->SetRange( Range( 0, aPgSize.Height() ));
- pHScroll->SetVisibleSize( (ULONG)aOutSize.Width() );
- pVScroll->SetVisibleSize( (ULONG)aOutSize.Height() );
+ pHScroll->SetVisibleSize( (sal_uLong)aOutSize.Width() );
+ pVScroll->SetVisibleSize( (sal_uLong)aOutSize.Height() );
pHScroll->SetLineSize( aOutSize.Width() / 10 );
pVScroll->SetLineSize( aOutSize.Height() / 10 );
@@ -464,9 +464,9 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr
}
}
- bFirstDraw = TRUE;
+ bFirstDraw = sal_True;
- pDlgEdModel->SetChanged( FALSE );
+ pDlgEdModel->SetChanged( sal_False );
}
void DlgEditor::ResetDialog( void )
@@ -474,13 +474,13 @@ void DlgEditor::ResetDialog( void )
DlgEdForm* pOldDlgEdForm = pDlgEdForm;
DlgEdPage* pPage = (DlgEdPage*)pDlgEdModel->GetPage(0);
SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
- BOOL bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm );
+ sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm );
pDlgEdView->UnmarkAll();
pPage->Clear();
pPage->SetDlgEdForm( NULL );
SetDialog( m_xUnoControlDialogModel );
if( bWasMarked )
- pDlgEdView->MarkObj( pDlgEdForm, pPgView, FALSE );
+ pDlgEdView->MarkObj( pDlgEdForm, pPgView, sal_False );
}
@@ -516,7 +516,7 @@ void DlgEditor::MouseButtonDown( const MouseEvent& rMEvt )
void DlgEditor::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bRet = pFunc->MouseButtonUp( rMEvt );
+ sal_Bool bRet = pFunc->MouseButtonUp( rMEvt );
if( (eMode == DLGED_INSERT) )
bCreateOK = bRet;
@@ -531,7 +531,7 @@ void DlgEditor::MouseMove( const MouseEvent& rMEvt )
//----------------------------------------------------------------------------
-BOOL DlgEditor::KeyInput( const KeyEvent& rKEvt )
+sal_Bool DlgEditor::KeyInput( const KeyEvent& rKEvt )
{
return pFunc->KeyInput( rKEvt );
}
@@ -558,7 +558,7 @@ IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG )
pWindow->IsVisible() &&
(pWindow->GetOutputSize() != aMacSize) )
{
- bFirstDraw = FALSE;
+ bFirstDraw = sal_False;
// get property set
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPSet(pDlgEdForm->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
@@ -601,14 +601,14 @@ IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG )
pDlgEdForm->SetSnapRect( Rectangle( aPos, aSize ) );
pDlgEdForm->EndListening(sal_False);
pDlgEdForm->SetPropsFromRect();
- pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(sal_True);
pDlgEdForm->StartListening();
// set position and size of controls
- ULONG nObjCount;
+ sal_uLong nObjCount;
if ( pDlgEdPage && ( ( nObjCount = pDlgEdPage->GetObjCount() ) > 0 ) )
{
- for ( ULONG i = 0 ; i < nObjCount ; i++ )
+ for ( sal_uLong i = 0 ; i < nObjCount ; i++ )
{
SdrObject* pObj = pDlgEdPage->GetObj(i);
DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj);
@@ -686,9 +686,9 @@ void DlgEditor::SetMode( DlgEdMode eNewMode )
pFunc = new DlgEdFuncSelect( this );
if ( eNewMode == DLGED_READONLY )
- pDlgEdModel->SetReadOnly( TRUE );
+ pDlgEdModel->SetReadOnly( sal_True );
else
- pDlgEdModel->SetReadOnly( FALSE );
+ pDlgEdModel->SetReadOnly( sal_False );
}
if ( eNewMode == DLGED_TEST )
@@ -699,7 +699,7 @@ void DlgEditor::SetMode( DlgEdMode eNewMode )
//----------------------------------------------------------------------------
-void DlgEditor::SetInsertObj( USHORT eObj )
+void DlgEditor::SetInsertObj( sal_uInt16 eObj )
{
eActObj = eObj;
@@ -709,7 +709,7 @@ void DlgEditor::SetInsertObj( USHORT eObj )
//----------------------------------------------------------------------------
-USHORT DlgEditor::GetInsertObj() const
+sal_uInt16 DlgEditor::GetInsertObj() const
{
return eActObj;
}
@@ -797,8 +797,8 @@ void DlgEditor::Copy()
}
// insert control models of marked objects into clipboard dialog model
- ULONG nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount();
- for( ULONG i = 0; i < nMark; i++ )
+ sal_uLong nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount();
+ for( sal_uLong i = 0; i < nMark; i++ )
{
SdrObject* pObj = pDlgEdView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj();
DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj);
@@ -1095,7 +1095,7 @@ void DlgEditor::Paste()
// mark object
SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
- pDlgEdView->MarkObj( pCtrlObj, pPgView, FALSE, TRUE);
+ pDlgEdView->MarkObj( pCtrlObj, pPgView, sal_False, sal_True);
}
// center marked objects in dialog editor form
@@ -1107,7 +1107,7 @@ void DlgEditor::Paste()
pDlgEdView->MarkListHasChanged();
// dialog model changed
- SetDialogModelChanged(TRUE);
+ SetDialogModelChanged(sal_True);
}
}
}
@@ -1122,9 +1122,9 @@ void DlgEditor::Delete()
return;
// remove control models of marked objects from dialog model
- ULONG nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount();
+ sal_uLong nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount();
- for( ULONG i = 0; i < nMark; i++ )
+ for( sal_uLong i = 0; i < nMark; i++ )
{
SdrObject* pObj = pDlgEdView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj();
DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj);
@@ -1165,7 +1165,7 @@ void DlgEditor::Delete()
pDlgEdView->BrkAction();
- BOOL bDlgMarked = UnmarkDialog();
+ sal_Bool bDlgMarked = UnmarkDialog();
pDlgEdView->DeleteMarked();
if( bDlgMarked )
RemarkDialog();
@@ -1173,9 +1173,9 @@ void DlgEditor::Delete()
//----------------------------------------------------------------------------
-BOOL DlgEditor::IsPasteAllowed()
+sal_Bool DlgEditor::IsPasteAllowed()
{
- BOOL bPaste = FALSE;
+ sal_Bool bPaste = sal_False;
// get clipboard
Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow()->GetClipboard();
@@ -1189,7 +1189,7 @@ BOOL DlgEditor::IsPasteAllowed()
{
if ( xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ) )
{
- bPaste = TRUE;
+ bPaste = sal_True;
}
}
}
@@ -1216,7 +1216,7 @@ void DlgEditor::UpdatePropertyBrowserDelayed()
//----------------------------------------------------------------------------
-BOOL DlgEditor::IsModified() const
+sal_Bool DlgEditor::IsModified() const
{
return pDlgEdModel->IsChanged() || bDialogModelChanged;
}
@@ -1225,8 +1225,8 @@ BOOL DlgEditor::IsModified() const
void DlgEditor::ClearModifyFlag()
{
- pDlgEdModel->SetChanged( FALSE );
- bDialogModelChanged = FALSE;
+ pDlgEdModel->SetChanged( sal_False );
+ bDialogModelChanged = sal_False;
}
//----------------------------------------------------------------------------
diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx
index 576fd4cab99d..d15a1798467f 100644
--- a/basctl/source/dlged/dlgedfunc.cxx
+++ b/basctl/source/dlged/dlgedfunc.cxx
@@ -110,37 +110,37 @@ DlgEdFunc::~DlgEdFunc()
//----------------------------------------------------------------------------
-BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& )
+sal_Bool DlgEdFunc::MouseButtonDown( const MouseEvent& )
{
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFunc::MouseButtonUp( const MouseEvent& )
+sal_Bool DlgEdFunc::MouseButtonUp( const MouseEvent& )
{
aScrollTimer.Stop();
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFunc::MouseMove( const MouseEvent& )
+sal_Bool DlgEdFunc::MouseMove( const MouseEvent& )
{
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
+sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrView* pView = pParent->GetView();
Window* pWindow = pParent->GetWindow();
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
@@ -149,7 +149,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
if ( pView->IsAction() )
{
pView->BrkAction();
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( pView->AreObjectsMarked() )
{
@@ -160,7 +160,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
else
pView->UnmarkAll();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -179,7 +179,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
if ( pView->AreObjectsMarked() )
pView->MakeVisible( pView->GetAllMarkedRect(), *pWindow );
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( aCode.IsMod1() )
{
@@ -196,7 +196,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
pView->MakeVisible( aVisRect, *pWindow );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -303,13 +303,13 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
if ( pView->IsDragObj() )
{
FASTBOOL bWasNoSnap = rDragStat.IsNoSnap();
- BOOL bWasSnapEnabled = pView->IsSnapEnabled();
+ sal_Bool bWasSnapEnabled = pView->IsSnapEnabled();
// switch snapping off
if ( !bWasNoSnap )
- ((SdrDragStat&)rDragStat).SetNoSnap( TRUE );
+ ((SdrDragStat&)rDragStat).SetNoSnap( sal_True );
if ( bWasSnapEnabled )
- pView->SetSnapEnabled( FALSE );
+ pView->SetSnapEnabled( sal_False );
pView->MovAction( aEndPoint );
pView->EndDragObj();
@@ -345,7 +345,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
default:
@@ -365,30 +365,30 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
DlgEdFuncInsert::DlgEdFuncInsert( DlgEditor* pParent_ ) :
DlgEdFunc( pParent_ )
{
- pParent_->GetView()->SetCreateMode( TRUE );
+ pParent_->GetView()->SetCreateMode( sal_True );
}
//----------------------------------------------------------------------------
DlgEdFuncInsert::~DlgEdFuncInsert()
{
- pParent->GetView()->SetEditMode( TRUE );
+ pParent->GetView()->SetEditMode( sal_True );
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
{
if( !rMEvt.IsLeft() )
- return TRUE;
+ return sal_True;
SdrView* pView = pParent->GetView();
Window* pWindow= pParent->GetWindow();
pView->SetActualWin( pWindow );
Point aPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
- USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
- USHORT nDrgLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
pWindow->CaptureMouse();
@@ -413,12 +413,12 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
pParent->ShowProperties();
}
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
{
DlgEdFunc::MouseButtonUp( rMEvt );
@@ -435,34 +435,34 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
if ( !pView->AreObjectsMarked() )
{
- USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
Point aPos( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pView->MarkObj(aPos, nHitLog);
}
if( pView->AreObjectsMarked() )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
{
if ( pView->IsDragObj() )
pView->EndDragObj( rMEvt.IsMod1() );
- return TRUE;
+ return sal_True;
}
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
{
SdrView* pView = pParent->GetView();
Window* pWindow= pParent->GetWindow();
pView->SetActualWin( pWindow );
Point aPos( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
- USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
if ( pView->IsAction() )
{
@@ -472,14 +472,14 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
pWindow->SetPointer( pView->GetPreferedPointer( aPos, pWindow, nHitLog ) );
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
DlgEdFuncSelect::DlgEdFuncSelect( DlgEditor* pParent_ ) :
DlgEdFunc( pParent_ ),
- bMarkAction(FALSE)
+ bMarkAction(sal_False)
{
}
@@ -491,15 +491,15 @@ DlgEdFuncSelect::~DlgEdFuncSelect()
//----------------------------------------------------------------------------
-BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
{
// get view from parent
SdrView* pView = pParent->GetView();
Window* pWindow = pParent->GetWindow();
pView->SetActualWin( pWindow );
- USHORT nDrgLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
- USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
Point aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
if ( rMEvt.IsLeft() && rMEvt.GetClicks() == 1 )
@@ -539,7 +539,7 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
{
// select object
pView->BegMarkObj(aMDPos);
- bMarkAction = TRUE;
+ bMarkAction = sal_True;
}
}
}
@@ -550,12 +550,12 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
pParent->ShowProperties();
}
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
{
DlgEdFunc::MouseButtonUp( rMEvt );
@@ -565,7 +565,7 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
pView->SetActualWin( pWindow );
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
- USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
if ( rMEvt.IsLeft() )
{
@@ -584,7 +584,7 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
}
}
-// USHORT nClicks = rMEvt.GetClicks();
+// sal_uInt16 nClicks = rMEvt.GetClicks();
// if (nClicks == 2)
// {
// if ( pView->AreObjectsMarked() )
@@ -601,24 +601,24 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
// }
// }
- bMarkAction = FALSE;
+ bMarkAction = sal_False;
pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) );
pWindow->ReleaseMouse();
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
{
SdrView* pView = pParent->GetView();
Window* pWindow= pParent->GetWindow();
pView->SetActualWin( pWindow );
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
- USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() );
if ( pView->IsAction() )
{
@@ -631,7 +631,7 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) );
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 5af7519f85f0..45b41c831769 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -578,7 +578,7 @@ void DlgEdObj::UpdateStep()
sal_Int32 nStep = GetStep();
SdrLayerAdmin& rLayerAdmin = GetModel()->GetLayerAdmin();
- SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( String( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), FALSE );
+ SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( String( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), sal_False );
SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName(), sal_False );
if( nCurStep )
@@ -1027,7 +1027,7 @@ void DlgEdObj::NbcMove( const Size& rSize )
StartListening();
// dialog model changed
- GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
//----------------------------------------------------------------------------
@@ -1046,7 +1046,7 @@ void DlgEdObj::NbcResize(const Point& rRef, const Fraction& xFract, const Fracti
StartListening();
// dialog model changed
- GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
//----------------------------------------------------------------------------
@@ -1145,7 +1145,7 @@ void DlgEdObj::SetDefaults()
}
// dialog model changed
- pDlgEdForm->GetDlgEditor()->SetDialogModelChanged( TRUE );
+ pDlgEdForm->GetDlgEditor()->SetDialogModelChanged( sal_True );
}
}
@@ -1252,7 +1252,7 @@ void SAL_CALL DlgEdObj::_propertyChange( const ::com::sun::star::beans::Propert
return;
// dialog model changed
- pDlgEditor->SetDialogModelChanged(TRUE);
+ pDlgEditor->SetDialogModelChanged(sal_True);
// update position and size
if ( evt.PropertyName == DLGED_PROP_POSITIONX || evt.PropertyName == DLGED_PROP_POSITIONY ||
@@ -1302,11 +1302,11 @@ void SAL_CALL DlgEdObj::_elementInserted(const ::com::sun::star::container::Cont
// dialog model changed
if ( ISA(DlgEdForm) )
{
- ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
else
{
- GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
}
}
@@ -1320,11 +1320,11 @@ void SAL_CALL DlgEdObj::_elementReplaced(const ::com::sun::star::container::Cont
// dialog model changed
if ( ISA(DlgEdForm) )
{
- ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
else
{
- GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
}
}
@@ -1338,11 +1338,11 @@ void SAL_CALL DlgEdObj::_elementRemoved(const ::com::sun::star::container::Conta
// dialog model changed
if ( ISA(DlgEdForm) )
{
- ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
else
{
- GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True);
}
}
}
@@ -1600,12 +1600,12 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
void DlgEdForm::UpdateStep()
{
- ULONG nObjCount;
+ sal_uLong nObjCount;
SdrPage* pSdrPage = GetPage();
if ( pSdrPage && ( ( nObjCount = pSdrPage->GetObjCount() ) > 0 ) )
{
- for ( ULONG i = 0 ; i < nObjCount ; i++ )
+ for ( sal_uLong i = 0 ; i < nObjCount ; i++ )
{
SdrObject* pObj = pSdrPage->GetObj(i);
DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj);
@@ -1798,7 +1798,7 @@ void DlgEdForm::NbcMove( const Size& rSize )
}
// dialog model changed
- GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEditor()->SetDialogModelChanged(sal_True);
}
//----------------------------------------------------------------------------
@@ -1822,7 +1822,7 @@ void DlgEdForm::NbcResize(const Point& rRef, const Fraction& xFract, const Fract
}
// dialog model changed
- GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEditor()->SetDialogModelChanged(sal_True);
}
//----------------------------------------------------------------------------
@@ -1838,7 +1838,7 @@ FASTBOOL DlgEdForm::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
SetPropsFromRect();
// dialog model changed
- GetDlgEditor()->SetDialogModelChanged(TRUE);
+ GetDlgEditor()->SetDialogModelChanged(sal_True);
// start listening
StartListening();
diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx
index eaabbfef0ff2..a2cd7dfbc364 100644
--- a/basctl/source/dlged/dlgedpage.cxx
+++ b/basctl/source/dlged/dlgedpage.cxx
@@ -68,7 +68,7 @@ SdrPage* DlgEdPage::Clone() const
//----------------------------------------------------------------------------
-SdrObject* DlgEdPage::SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum)
+SdrObject* DlgEdPage::SetObjectOrdNum(sal_uLong nOldObjNum, sal_uLong nNewObjNum)
{
SdrObject* pObj = SdrPage::SetObjectOrdNum( nOldObjNum, nNewObjNum );
diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx
index da8bbc638a1e..e57abbcaeaea 100644
--- a/basctl/source/dlged/dlgedview.cxx
+++ b/basctl/source/dlged/dlgedview.cxx
@@ -149,7 +149,7 @@ void DlgEdView::MakeVisible( const Rectangle& rRect, Window& rWin )
//----------------------------------------------------------------------------
-SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT nTol)
+SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt16 nTol)
{
DlgEdObj* pDlgEdObj = dynamic_cast< DlgEdObj* >(pRetval);
@@ -198,7 +198,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT n
return pRetval;
}
-SdrObject* DlgEdView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
+SdrObject* DlgEdView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const
{
// call parent
SdrObject* pRetval = SdrView::CheckSingleSdrObjectHit(rPnt, nTol, pObj, pPV, nOptions, pMVisLay);
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 41c86699203b..085191370425 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -86,8 +86,8 @@ namespace {
{
nStartPos = aBoundary.endPos;
String sWord( rText.Copy(
- (USHORT)aBoundary.startPos,
- (USHORT)aBoundary.endPos - (USHORT)aBoundary.startPos ) );
+ (sal_uInt16)aBoundary.startPos,
+ (sal_uInt16)aBoundary.endPos - (sal_uInt16)aBoundary.startPos ) );
long nTemp = rWin.GetCtrlTextWidth( sWord );
if ( nTemp > nWidth )
nWidth = nTemp;
@@ -145,7 +145,7 @@ void ManageLanguageDialog::Init()
m_aMakeDefPB.SetClickHdl( LINK( this, ManageLanguageDialog, MakeDefHdl ) );
m_aLanguageLB.SetSelectHdl( LINK( this, ManageLanguageDialog, SelectHdl ) );
- m_aLanguageLB.EnableMultiSelection( TRUE );
+ m_aLanguageLB.EnableMultiSelection( sal_True );
CalcInfoSize();
}
@@ -188,7 +188,7 @@ void ManageLanguageDialog::FillLanguageBox()
Locale aDefaultLocale = m_pLocalizationMgr->getStringResourceManager()->getDefaultLocale();
Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales();
const Locale* pLocale = aLocaleSeq.getConstArray();
- INT32 i, nCount = aLocaleSeq.getLength();
+ sal_Int32 i, nCount = aLocaleSeq.getLength();
for ( i = 0; i < nCount; ++i )
{
bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
@@ -199,7 +199,7 @@ void ManageLanguageDialog::FillLanguageBox()
sLanguage += ' ';
sLanguage += m_sDefLangStr;
}
- USHORT nPos = m_aLanguageLB.InsertEntry( sLanguage );
+ sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage );
m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) );
}
}
@@ -209,7 +209,7 @@ void ManageLanguageDialog::FillLanguageBox()
void ManageLanguageDialog::ClearLanguageBox()
{
- USHORT i, nCount = m_aLanguageLB.GetEntryCount();
+ sal_uInt16 i, nCount = m_aLanguageLB.GetEntryCount();
for ( i = 0; i < nCount; ++i )
{
LanguageEntry* pEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData(i) );
@@ -244,13 +244,13 @@ IMPL_LINK( ManageLanguageDialog, DeleteHdl, Button *, EMPTYARG )
aQBox.SetButtonText( RET_OK, m_sDeleteStr );
if ( aQBox.Execute() == RET_OK )
{
- USHORT i, nCount = m_aLanguageLB.GetSelectEntryCount();
- USHORT nPos = m_aLanguageLB.GetSelectEntryPos();
+ sal_uInt16 i, nCount = m_aLanguageLB.GetSelectEntryCount();
+ sal_uInt16 nPos = m_aLanguageLB.GetSelectEntryPos();
// remove locales
Sequence< Locale > aLocaleSeq( nCount );
for ( i = 0; i < nCount; ++i )
{
- USHORT nSelPos = m_aLanguageLB.GetSelectEntryPos(i);
+ sal_uInt16 nSelPos = m_aLanguageLB.GetSelectEntryPos(i);
LanguageEntry* pEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData( nSelPos ) );
if ( pEntry )
aLocaleSeq[i] = pEntry->m_aLocale;
@@ -271,7 +271,7 @@ IMPL_LINK( ManageLanguageDialog, DeleteHdl, Button *, EMPTYARG )
IMPL_LINK( ManageLanguageDialog, MakeDefHdl, Button *, EMPTYARG )
{
- USHORT nPos = m_aLanguageLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aLanguageLB.GetSelectEntryPos();
LanguageEntry* pSelectEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData( nPos ) );
if ( pSelectEntry && !pSelectEntry->m_bIsDefault )
{
@@ -290,7 +290,7 @@ IMPL_LINK( ManageLanguageDialog, MakeDefHdl, Button *, EMPTYARG )
IMPL_LINK( ManageLanguageDialog, SelectHdl, ListBox *, EMPTYARG )
{
- USHORT nCount = m_aLanguageLB.GetEntryCount();
+ sal_uInt16 nCount = m_aLanguageLB.GetEntryCount();
bool bEmpty = ( !nCount ||
m_aLanguageLB.GetEntryPos( m_sCreateLangStr ) != LISTBOX_ENTRY_NOTFOUND );
bool bSelect = ( m_aLanguageLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND );
@@ -345,18 +345,18 @@ SetDefaultLanguageDialog::~SetDefaultLanguageDialog()
void SetDefaultLanguageDialog::FillLanguageBox()
{
// fill list with all languages
- m_pLanguageLB->SetLanguageList( LANG_LIST_ALL, FALSE );
+ m_pLanguageLB->SetLanguageList( LANG_LIST_ALL, sal_False );
// remove the already localized languages
Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales();
const Locale* pLocale = aLocaleSeq.getConstArray();
- INT32 i, nCount = aLocaleSeq.getLength();
+ sal_Int32 i, nCount = aLocaleSeq.getLength();
for ( i = 0; i < nCount; ++i )
m_pLanguageLB->RemoveLanguage( SvxLocaleToLanguage( pLocale[i] ) );
// fill checklistbox if not in default mode
if ( m_pLocalizationMgr->isLibraryLocalized() )
{
- USHORT j, nCount_ = m_pLanguageLB->GetEntryCount();
+ sal_uInt16 j, nCount_ = m_pLanguageLB->GetEntryCount();
for ( j = 0; j < nCount_; ++j )
{
m_pCheckLangLB->InsertEntry(
@@ -401,7 +401,7 @@ void SetDefaultLanguageDialog::CalcInfoSize()
Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const
{
bool bNotLocalized = !m_pLocalizationMgr->isLibraryLocalized();
- INT32 nSize = bNotLocalized ? 1 : m_pCheckLangLB->GetCheckedEntryCount();
+ sal_Int32 nSize = bNotLocalized ? 1 : m_pCheckLangLB->GetCheckedEntryCount();
Sequence< Locale > aLocaleSeq( nSize );
if ( bNotLocalized )
{
@@ -411,13 +411,13 @@ Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const
}
else
{
- USHORT i, nCount = static_cast< USHORT >( m_pCheckLangLB->GetEntryCount() );
- INT32 j = 0;
+ sal_uInt16 i, nCount = static_cast< sal_uInt16 >( m_pCheckLangLB->GetEntryCount() );
+ sal_Int32 j = 0;
for ( i = 0; i < nCount; ++i )
{
if ( m_pCheckLangLB->IsChecked(i) )
{
- LanguageType eType = LanguageType( (ULONG)m_pCheckLangLB->GetEntryData(i) );
+ LanguageType eType = LanguageType( (sal_uLong)m_pCheckLangLB->GetEntryData(i) );
Locale aLocale;
SvxLanguageToLocale( aLocale, eType );
aLocaleSeq[j++] = aLocale;
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index c55e5bd721d5..f59f921a0739 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -75,7 +75,7 @@ protected:
virtual void DoInit();
virtual void DoScroll( ScrollBar* pCurScrollBar );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground);
+ void InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground);
public:
TYPEINFO();
@@ -91,22 +91,23 @@ public:
DlgEdModel* GetModel() const;
DlgEdPage* GetPage() const;
DlgEdView* GetView() const;
- BOOL RenameDialog( const String& rNewName );
+ sal_Bool RenameDialog( const String& rNewName );
void DisableBrowser();
void UpdateBrowser();
- BOOL SaveDialog();
- BOOL ImportDialog();
+ sal_Bool SaveDialog();
+ sal_Bool ImportDialog();
virtual String GetTitle();
virtual BasicEntryDescriptor CreateEntryDescriptor();
- virtual void SetReadOnly( BOOL bReadOnly );
- virtual BOOL IsReadOnly();
+ virtual void SetReadOnly( sal_Bool bReadOnly );
+ virtual sal_Bool IsReadOnly();
virtual void StoreData();
- virtual BOOL IsModified();
- virtual BOOL IsPasteAllowed();
+ virtual sal_Bool IsModified();
+ virtual sal_Bool IsPasteAllowed();
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
// return number of pages to be printed
virtual sal_Int32 countPages( Printer* pPrinter );
// print page
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 07bc2dfa3149..de0cb539694c 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -50,7 +50,7 @@
//----------------------------------------------------------------------------
-const ULONG BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001;
+const sal_uLong BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001;
//----------------------------------------------------------------------------
@@ -84,13 +84,13 @@ class BasicIDEShell :public SfxViewShell
{
friend class JavaDebuggingListenerImpl;
friend class LocalizationMgr;
-friend BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName );
+friend sal_Bool implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName );
friend bool BasicIDE::RemoveDialog( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName );
ObjectCatalog* pObjectCatalog;
IDEWindowTable aIDEWindowTable;
- USHORT nCurKey;
+ sal_uInt16 nCurKey;
IDEBaseWindow* pCurWin;
ScriptDocument m_aCurDocument;
String m_aCurLibName;
@@ -100,10 +100,10 @@ friend bool BasicIDE::RemoveDialog( const ScriptDocument& rDocument, const Strin
ScrollBar aVScrollBar;
ScrollBarBox aScrollBarBox;
BasicIDETabBar* pTabBar;
- BOOL bTabBarSplitted;
- BOOL bCreatingWindow;
+ sal_Bool bTabBarSplitted;
+ sal_Bool bCreatingWindow;
ModulWindowLayout* pModulLayout;
- BOOL m_bAppBasicModified;
+ sal_Bool m_bAppBasicModified;
::basctl::DocumentEventNotifier
m_aNotifier;
friend class ContainerListenerImpl;
@@ -114,13 +114,13 @@ friend class ContainerListenerImpl;
void InitTabBar();
void InitScrollBars();
void CheckWindows();
- void RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, BOOL bDestroy );
+ void RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, sal_Bool bDestroy );
void UpdateWindows();
- void ShowObjectDialog( BOOL bShow, BOOL bCreateOrDestroy );
+ void ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy );
void InvalidateBasicIDESlots();
- void StoreAllWindowData( BOOL bPersistent = TRUE );
+ void StoreAllWindowData( sal_Bool bPersistent = sal_True );
void SetMDITitle();
- void EnableScrollbars( BOOL bEnable );
+ void EnableScrollbars( sal_Bool bEnable );
void SetCurLib( const ScriptDocument& rDocument, String aLibName, bool bUpdateWindows = true , bool bCheck = true );
void SetCurLibForLocalization( const ScriptDocument& rDocument, String aLibName );
@@ -136,28 +136,28 @@ protected:
virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize );
virtual void OuterResizePixel( const Point &rPos, const Size &rSize );
virtual Size GetOptimalSizePixel() const;
- USHORT InsertWindowInTable( IDEBaseWindow* pNewWin );
- virtual USHORT PrepareClose( BOOL bUI, BOOL bForBrowsing );
+ sal_uInt16 InsertWindowInTable( IDEBaseWindow* pNewWin );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing );
- void SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar = FALSE, BOOL bRememberAsCurrent = TRUE );
+ void SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar = sal_False, sal_Bool bRememberAsCurrent = sal_True );
void ManageToolbars();
- void RemoveWindow( IDEBaseWindow* pWindow, BOOL bDestroy, BOOL bAllowChangeCurWindow = TRUE );
+ void RemoveWindow( IDEBaseWindow* pWindow, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow = sal_True );
void ArrangeTabBar();
ModulWindow* CreateBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName );
DialogWindow* CreateDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName );
- ModulWindow* FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, BOOL bCreateIfNotExist, BOOL bFindSuspended = FALSE );
+ ModulWindow* FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended = sal_False );
ModulWindow* ShowActiveModuleWindow( StarBASIC* pBasic );
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
- virtual void Activate(BOOL bMDI);
- virtual void Deactivate(BOOL bMDI);
+ virtual void Activate(sal_Bool bMDI);
+ virtual void Deactivate(sal_Bool bMDI);
virtual void Move();
- virtual void ShowCursor( FASTBOOL bOn = TRUE );
+ virtual void ShowCursor( FASTBOOL bOn = sal_True );
void CreateModulWindowLayout();
void DestroyModulWindowLayout();
@@ -197,15 +197,16 @@ public:
SdrView* GetCurDlgView() const;
- SfxUndoManager* GetUndoManager();
+ ::svl::IUndoManager*
+ GetUndoManager();
virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable();
- // virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
- virtual SfxPrinter* GetPrinter( BOOL bCreate );
- virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual String GetSelectionText( BOOL bCompleteWords );
- virtual BOOL HasSelection( BOOL bText ) const;
+ // virtual sal_uInt16 Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog = 0 );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate );
+ virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual String GetSelectionText( sal_Bool bCompleteWords );
+ virtual sal_Bool HasSelection( sal_Bool bText ) const;
void GetState( SfxItemSet& );
void ExecuteGlobal( SfxRequest& rReq );
@@ -220,13 +221,13 @@ public:
ModulWindowLayout* GetLayoutWindow() const { return pModulLayout; }
- IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const String& rLibName = String(), const String& rName = String(), USHORT nType = BASICIDE_TYPE_UNKNOWN, BOOL bFindSuspended = FALSE );
- DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, BOOL bCreateIfNotExist, BOOL bFindSuspended = FALSE );
+ IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const String& rLibName = String(), const String& rName = String(), sal_uInt16 nType = BASICIDE_TYPE_UNKNOWN, sal_Bool bFindSuspended = sal_False );
+ DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended = sal_False );
IDEBaseWindow* FindApplicationWindow();
- BOOL NextPage( BOOL bPrev = FALSE );
+ sal_Bool NextPage( sal_Bool bPrev = sal_False );
- BOOL IsAppBasicModified() const { return m_bAppBasicModified; }
- void SetAppBasicModified( BOOL bModified = TRUE ) { m_bAppBasicModified = bModified; }
+ sal_Bool IsAppBasicModified() const { return m_bAppBasicModified; }
+ void SetAppBasicModified( sal_Bool bModified = sal_True ) { m_bAppBasicModified = bModified; }
// For Dialog Drag&Drop in Dialog Organizer
static void CopyDialogResources(
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index d4fa39fcb67d..e446ba4b1e99 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -51,7 +51,7 @@ struct BasicIDE_Impl;
namespace BasicIDE
{
- void Organize( INT16 tabId );
+ void Organize( sal_Int16 tabId );
// Hilfsmethoden fuer den allg. Gebrauch:
@@ -61,10 +61,10 @@ namespace BasicIDE
StarBASIC* FindBasic( const SbxVariable* pVar );
void StopBasic();
long HandleBasicError( StarBASIC* pBasic );
- void BasicStopped( BOOL* pbAppWindowDisabled = 0, BOOL* pbDispatcherLocked = 0, USHORT* pnWaitCount = 0,
+ void BasicStopped( sal_Bool* pbAppWindowDisabled = 0, sal_Bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0,
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
- BOOL IsValidSbxName( const String& rName );
+ sal_Bool IsValidSbxName( const String& rName );
BasicManager* FindBasicManager( StarBASIC* pLib );
@@ -95,13 +95,13 @@ namespace BasicIDE
// new methods for macros
::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument,
- BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc );
+ sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc );
::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames(
const ScriptDocument& rDocument, const String& rLibName, const String& rModName )
throw( ::com::sun::star::container::NoSuchElementException );
- BOOL HasMethod(
+ sal_Bool HasMethod(
const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName );
// new methods for dialogs
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index bc588fccaf14..1a5283ae0691 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -70,26 +70,26 @@ sal_Int32 searchEOL( const ::rtl::OUString& rStr, sal_Int32 fromIndex );
struct BasicStatus
{
-// BOOL bCompiled : 1;
- BOOL bIsRunning : 1;
- BOOL bError : 1;
- BOOL bIsInReschedule : 1;
- USHORT nBasicFlags;
+// sal_Bool bCompiled : 1;
+ sal_Bool bIsRunning : 1;
+ sal_Bool bError : 1;
+ sal_Bool bIsInReschedule : 1;
+ sal_uInt16 nBasicFlags;
BasicStatus() {
- bIsRunning = FALSE; bError = FALSE;
- nBasicFlags = 0; bIsInReschedule = FALSE; }
+ bIsRunning = sal_False; bError = sal_False;
+ nBasicFlags = 0; bIsInReschedule = sal_False; }
};
struct BreakPoint
{
- BOOL bEnabled;
- BOOL bTemp;
- ULONG nLine;
- ULONG nStopAfter;
- ULONG nHitCount;
+ sal_Bool bEnabled;
+ sal_Bool bTemp;
+ sal_uLong nLine;
+ sal_uLong nStopAfter;
+ sal_uLong nHitCount;
- BreakPoint( ULONG nL ) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = TRUE; bTemp = FALSE; }
+ BreakPoint( sal_uLong nL ) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = sal_True; bTemp = sal_False; }
};
@@ -98,10 +98,10 @@ class BasicDockingWindow : public DockingWindow
Rectangle aFloatingPosAndSize;
protected:
- virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
- virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect );
+ virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
virtual void ToggleFloatingMode();
- virtual BOOL PrepareToggleFloatingMode();
+ virtual sal_Bool PrepareToggleFloatingMode();
virtual void StartDocking();
public:
@@ -126,8 +126,8 @@ public:
void transfer(BreakPointList & rList);
void InsertSorted( BreakPoint* pBrk );
- BreakPoint* FindBreakPoint( ULONG nLine );
- void AdjustBreakPoints( ULONG nLine, BOOL bInserted );
+ BreakPoint* FindBreakPoint( sal_uLong nLine );
+ void AdjustBreakPoints( sal_uLong nLine, sal_Bool bInserted );
void SetBreakPointsInBasic( SbModule* pModule );
void ResetHitCount();
};
@@ -136,7 +136,7 @@ public:
class TabBarSortHelper
{
public:
- USHORT nPageId;
+ sal_uInt16 nPageId;
String aPageText;
bool operator<(const TabBarSortHelper& rComp) const { return (aPageText.CompareIgnoreCaseToAscii( rComp.aPageText ) == COMPARE_LESS); }
@@ -164,9 +164,13 @@ public:
#define BASWIN_INRESCHEDULE 0x08
class Printer;
-class SfxUndoManager;
class BasicEntryDescriptor;
+namespace svl
+{
+ class IUndoManager;
+}
+
class IDEBaseWindow : public Window
{
private:
@@ -174,7 +178,7 @@ private:
ScrollBar* pShellVScrollBar;
DECL_LINK( ScrollHdl, ScrollBar * );
- BYTE nStatus;
+ sal_uInt8 nStatus;
ScriptDocument m_aDocument;
String m_aLibName;
@@ -202,7 +206,7 @@ public:
virtual void StoreData();
virtual void UpdateData();
- virtual BOOL CanClose();
+ virtual sal_Bool CanClose();
// return number of pages to be printed
virtual sal_Int32 countPages( Printer* pPrinter ) = 0;
@@ -213,30 +217,31 @@ public:
String CreateQualifiedName();
virtual BasicEntryDescriptor CreateEntryDescriptor() = 0;
- virtual BOOL IsModified();
- virtual BOOL IsPasteAllowed();
+ virtual sal_Bool IsModified();
+ virtual sal_Bool IsPasteAllowed();
- virtual BOOL AllowUndo();
+ virtual sal_Bool AllowUndo();
- virtual void SetReadOnly( BOOL bReadOnly );
- virtual BOOL IsReadOnly();
+ virtual void SetReadOnly( sal_Bool bReadOnly );
+ virtual sal_Bool IsReadOnly();
- BYTE GetStatus() { return nStatus; }
- void SetStatus( BYTE n ) { nStatus = n; }
- void AddStatus( BYTE n ) { nStatus = nStatus | n; }
- void ClearStatus( BYTE n ) { nStatus = nStatus & ~n; }
+ sal_uInt8 GetStatus() { return nStatus; }
+ void SetStatus( sal_uInt8 n ) { nStatus = n; }
+ void AddStatus( sal_uInt8 n ) { nStatus = nStatus | n; }
+ void ClearStatus( sal_uInt8 n ) { nStatus = nStatus & ~n; }
virtual Window* GetLayoutWindow();
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
- virtual USHORT GetSearchOptions();
+ virtual sal_uInt16 GetSearchOptions();
virtual void BasicStarted();
virtual void BasicStopped();
- BOOL IsSuspended() const
- { return ( nStatus & BASWIN_SUSPENDED ) ? TRUE : FALSE; }
+ sal_Bool IsSuspended() const
+ { return ( nStatus & BASWIN_SUSPENDED ) ? sal_True : sal_False; }
const ScriptDocument&
GetDocument() const { return m_aDocument; }
@@ -274,10 +279,10 @@ private:
ScriptDocument m_aDocument;
String m_aLibName;
String m_aCurrentName;
- USHORT m_nCurrentType;
+ sal_uInt16 m_nCurrentType;
public:
- LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, USHORT nCurrentType );
+ LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, sal_uInt16 nCurrentType );
~LibInfoItem();
LibInfoItem( const LibInfoItem& rItem );
@@ -287,7 +292,7 @@ public:
GetDocument() const { return m_aDocument; }
const String& GetLibName() const { return m_aLibName; }
const String& GetCurrentName() const { return m_aCurrentName; }
- USHORT GetCurrentType() const { return m_nCurrentType; }
+ sal_uInt16 GetCurrentType() const { return m_nCurrentType; }
};
class LibInfos
@@ -317,16 +322,16 @@ public:
LibInfoItem* GetInfo( const LibInfoKey& rKey );
};
-void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines = FALSE );
+void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool bEraseTrailingEmptyLines = sal_False );
String CreateMgrAndLibStr( const String& rMgrName, const String& rLibName );
-ULONG CalcLineCount( SvStream& rStream );
-
-BOOL QueryReplaceMacro( const String& rName, Window* pParent = 0 );
-BOOL QueryDelMacro( const String& rName, Window* pParent = 0 );
-BOOL QueryDelDialog( const String& rName, Window* pParent = 0 );
-BOOL QueryDelModule( const String& rName, Window* pParent = 0 );
-BOOL QueryDelLib( const String& rName, BOOL bRef = FALSE, Window* pParent = 0 );
-BOOL QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, BOOL bRepeat = FALSE, BOOL bNewTitle = FALSE );
+sal_uLong CalcLineCount( SvStream& rStream );
+
+sal_Bool QueryReplaceMacro( const String& rName, Window* pParent = 0 );
+sal_Bool QueryDelMacro( const String& rName, Window* pParent = 0 );
+sal_Bool QueryDelDialog( const String& rName, Window* pParent = 0 );
+sal_Bool QueryDelModule( const String& rName, Window* pParent = 0 );
+sal_Bool QueryDelLib( const String& rName, sal_Bool bRef = sal_False, Window* pParent = 0 );
+sal_Bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, sal_Bool bRepeat = sal_False, sal_Bool bNewTitle = sal_False );
class ModuleInfoHelper
{
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 1444bab59c65..cf8f8a1df350 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -117,15 +117,15 @@ protected:
Window* pWindow;
DlgEdFunc* pFunc;
DlgEdMode eMode;
- USHORT eActObj;
- BOOL bFirstDraw;
+ sal_uInt16 eActObj;
+ sal_Bool bFirstDraw;
Size aGridSize;
- BOOL bGridVisible;
- BOOL bGridSnap;
- BOOL bCreateOK;
+ sal_Bool bGridVisible;
+ sal_Bool bGridSnap;
+ sal_Bool bCreateOK;
Timer aPaintTimer;
Rectangle aPaintRect;
- BOOL bDialogModelChanged;
+ sal_Bool bDialogModelChanged;
Timer aMarkTimer;
long mnPaintGuard;
@@ -167,33 +167,33 @@ public:
void ShowDialog();
- BOOL UnmarkDialog();
- BOOL RemarkDialog();
+ sal_Bool UnmarkDialog();
+ sal_Bool RemarkDialog();
- void SetDialogModelChanged( BOOL bChanged = TRUE ) { bDialogModelChanged = bChanged; }
- BOOL IsDialogModelChanged() const { return bDialogModelChanged; }
+ void SetDialogModelChanged( sal_Bool bChanged = sal_True ) { bDialogModelChanged = bChanged; }
+ sal_Bool IsDialogModelChanged() const { return bDialogModelChanged; }
- BOOL IsModified() const;
+ sal_Bool IsModified() const;
void ClearModifyFlag();
void MouseButtonDown( const MouseEvent& rMEvt );
void MouseButtonUp( const MouseEvent& rMEvt );
void MouseMove( const MouseEvent& rMEvt );
void Paint( const Rectangle& rRect );
- BOOL KeyInput( const KeyEvent& rKEvt );
+ sal_Bool KeyInput( const KeyEvent& rKEvt );
void SetMode( DlgEdMode eMode );
- void SetInsertObj( USHORT eObj );
- USHORT GetInsertObj() const;
+ void SetInsertObj( sal_uInt16 eObj );
+ sal_uInt16 GetInsertObj() const;
void CreateDefaultObject();
DlgEdMode GetMode() const { return eMode; }
- BOOL IsCreateOK() const { return bCreateOK; }
+ sal_Bool IsCreateOK() const { return bCreateOK; }
void Cut();
void Copy();
void Paste();
void Delete();
- BOOL IsPasteAllowed();
+ sal_Bool IsPasteAllowed();
void ShowProperties();
void UpdatePropertyBrowserDelayed();
diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx
index d93ef9001959..e2ccf72158c8 100644
--- a/basctl/source/inc/dlgeddef.hxx
+++ b/basctl/source/inc/dlgeddef.hxx
@@ -31,36 +31,36 @@
#include <tools/solar.h>
-const UINT32 DlgInventor = UINT32('D')*0x00000001+
- UINT32('L')*0x00000100+
- UINT32('G')*0x00010000+
- UINT32('1')*0x01000000;
+const sal_uInt32 DlgInventor = sal_uInt32('D')*0x00000001+
+ sal_uInt32('L')*0x00000100+
+ sal_uInt32('G')*0x00010000+
+ sal_uInt32('1')*0x01000000;
-#define OBJ_DLG_CONTROL ((UINT16) 1)
-#define OBJ_DLG_DIALOG ((UINT16) 2)
-#define OBJ_DLG_PUSHBUTTON ((UINT16) 3)
-#define OBJ_DLG_RADIOBUTTON ((UINT16) 4)
-#define OBJ_DLG_CHECKBOX ((UINT16) 5)
-#define OBJ_DLG_LISTBOX ((UINT16) 6)
-#define OBJ_DLG_COMBOBOX ((UINT16) 7)
-#define OBJ_DLG_GROUPBOX ((UINT16) 8)
-#define OBJ_DLG_EDIT ((UINT16) 9)
-#define OBJ_DLG_FIXEDTEXT ((UINT16)10)
-#define OBJ_DLG_IMAGECONTROL ((UINT16)11)
-#define OBJ_DLG_PROGRESSBAR ((UINT16)12)
-#define OBJ_DLG_HSCROLLBAR ((UINT16)13)
-#define OBJ_DLG_VSCROLLBAR ((UINT16)14)
-#define OBJ_DLG_HFIXEDLINE ((UINT16)15)
-#define OBJ_DLG_VFIXEDLINE ((UINT16)16)
-#define OBJ_DLG_DATEFIELD ((UINT16)17)
-#define OBJ_DLG_TIMEFIELD ((UINT16)18)
-#define OBJ_DLG_NUMERICFIELD ((UINT16)19)
-#define OBJ_DLG_CURRENCYFIELD ((UINT16)20)
-#define OBJ_DLG_FORMATTEDFIELD ((UINT16)21)
-#define OBJ_DLG_PATTERNFIELD ((UINT16)22)
-#define OBJ_DLG_FILECONTROL ((UINT16)23)
-#define OBJ_DLG_TREECONTROL ((UINT16)24)
+#define OBJ_DLG_CONTROL ((sal_uInt16) 1)
+#define OBJ_DLG_DIALOG ((sal_uInt16) 2)
+#define OBJ_DLG_PUSHBUTTON ((sal_uInt16) 3)
+#define OBJ_DLG_RADIOBUTTON ((sal_uInt16) 4)
+#define OBJ_DLG_CHECKBOX ((sal_uInt16) 5)
+#define OBJ_DLG_LISTBOX ((sal_uInt16) 6)
+#define OBJ_DLG_COMBOBOX ((sal_uInt16) 7)
+#define OBJ_DLG_GROUPBOX ((sal_uInt16) 8)
+#define OBJ_DLG_EDIT ((sal_uInt16) 9)
+#define OBJ_DLG_FIXEDTEXT ((sal_uInt16)10)
+#define OBJ_DLG_IMAGECONTROL ((sal_uInt16)11)
+#define OBJ_DLG_PROGRESSBAR ((sal_uInt16)12)
+#define OBJ_DLG_HSCROLLBAR ((sal_uInt16)13)
+#define OBJ_DLG_VSCROLLBAR ((sal_uInt16)14)
+#define OBJ_DLG_HFIXEDLINE ((sal_uInt16)15)
+#define OBJ_DLG_VFIXEDLINE ((sal_uInt16)16)
+#define OBJ_DLG_DATEFIELD ((sal_uInt16)17)
+#define OBJ_DLG_TIMEFIELD ((sal_uInt16)18)
+#define OBJ_DLG_NUMERICFIELD ((sal_uInt16)19)
+#define OBJ_DLG_CURRENCYFIELD ((sal_uInt16)20)
+#define OBJ_DLG_FORMATTEDFIELD ((sal_uInt16)21)
+#define OBJ_DLG_PATTERNFIELD ((sal_uInt16)22)
+#define OBJ_DLG_FILECONTROL ((sal_uInt16)23)
+#define OBJ_DLG_TREECONTROL ((sal_uInt16)24)
// control properties
#define DLGED_PROP_BACKGROUNDCOLOR ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) )
diff --git a/basctl/source/inc/dlgedfunc.hxx b/basctl/source/inc/dlgedfunc.hxx
index d603321f782e..fea2c23fc85c 100644
--- a/basctl/source/inc/dlgedfunc.hxx
+++ b/basctl/source/inc/dlgedfunc.hxx
@@ -52,10 +52,10 @@ public:
DlgEdFunc( DlgEditor* pParent );
virtual ~DlgEdFunc();
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
- virtual BOOL KeyInput( const KeyEvent& rKEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool KeyInput( const KeyEvent& rKEvt );
};
//============================================================================
@@ -68,9 +68,9 @@ public:
DlgEdFuncInsert( DlgEditor* pParent );
~DlgEdFuncInsert();
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
};
//============================================================================
@@ -80,15 +80,15 @@ public:
class DlgEdFuncSelect : public DlgEdFunc
{
protected:
- BOOL bMarkAction;
+ sal_Bool bMarkAction;
public:
DlgEdFuncSelect( DlgEditor* pParent );
~DlgEdFuncSelect();
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
};
diff --git a/basctl/source/inc/dlgedmod.hxx b/basctl/source/inc/dlgedmod.hxx
index 5a0118fe25eb..b4579ec7298a 100644
--- a/basctl/source/inc/dlgedmod.hxx
+++ b/basctl/source/inc/dlgedmod.hxx
@@ -54,7 +54,7 @@ public:
DlgEdModel();
virtual ~DlgEdModel();
- virtual void DlgEdModelChanged( FASTBOOL bChanged = TRUE );
+ virtual void DlgEdModelChanged( FASTBOOL bChanged = sal_True );
virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
diff --git a/basctl/source/inc/dlgedpage.hxx b/basctl/source/inc/dlgedpage.hxx
index ec1f7d10600b..e14d6cbe2831 100644
--- a/basctl/source/inc/dlgedpage.hxx
+++ b/basctl/source/inc/dlgedpage.hxx
@@ -45,7 +45,7 @@ private:
public:
TYPEINFO();
- DlgEdPage( DlgEdModel& rModel, FASTBOOL bMasterPage=FALSE );
+ DlgEdPage( DlgEdModel& rModel, FASTBOOL bMasterPage=sal_False );
DlgEdPage( const DlgEdPage& );
virtual ~DlgEdPage();
@@ -55,7 +55,7 @@ public:
void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; }
DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; }
- virtual SdrObject* SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum);
+ virtual SdrObject* SetObjectOrdNum(sal_uLong nOldObjNum, sal_uLong nNewObjNum);
};
#endif //_BASCTL_DLGEDPAGE_HXX
diff --git a/basctl/source/inc/dlgedview.hxx b/basctl/source/inc/dlgedview.hxx
index 003c56721cba..9842ed65e3d3 100644
--- a/basctl/source/inc/dlgedview.hxx
+++ b/basctl/source/inc/dlgedview.hxx
@@ -54,7 +54,7 @@ public:
protected:
// overloaded to handle HitTest for some objects special
using SdrView::CheckSingleSdrObjectHit;
- virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const;
};
#endif //_BASCTL_DLGEDVIEW_HXX
diff --git a/basctl/source/inc/iderid.hxx b/basctl/source/inc/iderid.hxx
index ef88708b734e..e5ac72a7a58e 100644
--- a/basctl/source/inc/iderid.hxx
+++ b/basctl/source/inc/iderid.hxx
@@ -33,7 +33,7 @@
class IDEResId: public ResId
{
public:
- IDEResId( USHORT nId );
+ IDEResId( sal_uInt16 nId );
};
diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx
index f863b00aac7c..ec50979e7189 100644
--- a/basctl/source/inc/sbxitem.hxx
+++ b/basctl/source/inc/sbxitem.hxx
@@ -30,12 +30,12 @@
#include "scriptdocument.hxx"
#include <svl/poolitem.hxx>
-const USHORT BASICIDE_TYPE_UNKNOWN = 0;
-const USHORT BASICIDE_TYPE_SHELL = 1;
-const USHORT BASICIDE_TYPE_LIBRARY = 2;
-const USHORT BASICIDE_TYPE_MODULE = 3;
-const USHORT BASICIDE_TYPE_DIALOG = 4;
-const USHORT BASICIDE_TYPE_METHOD = 5;
+const sal_uInt16 BASICIDE_TYPE_UNKNOWN = 0;
+const sal_uInt16 BASICIDE_TYPE_SHELL = 1;
+const sal_uInt16 BASICIDE_TYPE_LIBRARY = 2;
+const sal_uInt16 BASICIDE_TYPE_MODULE = 3;
+const sal_uInt16 BASICIDE_TYPE_DIALOG = 4;
+const sal_uInt16 BASICIDE_TYPE_METHOD = 5;
class SbxItem : public SfxPoolItem
@@ -44,12 +44,12 @@ class SbxItem : public SfxPoolItem
String m_aLibName;
String m_aName;
String m_aMethodName;
- USHORT m_nType;
+ sal_uInt16 m_nType;
public:
TYPEINFO();
- SbxItem( USHORT nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, USHORT nType );
- SbxItem( USHORT nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, USHORT nType );
+ SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, sal_uInt16 nType );
+ SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, sal_uInt16 nType );
SbxItem( const SbxItem& );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -68,8 +68,8 @@ public:
const String& GetMethodName() const { return m_aMethodName; }
void SetMethodName( const String& aMethodName ) { m_aMethodName = aMethodName; }
- USHORT GetType() const { return m_nType; }
- void SetType( USHORT nType ) { m_nType = nType; }
+ sal_uInt16 GetType() const { return m_nType; }
+ void SetType( sal_uInt16 nType ) { m_nType = nType; }
};
diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk
index e690a5a20a3b..1719a7c9c078 100644
--- a/basctl/util/makefile.mk
+++ b/basctl/util/makefile.mk
@@ -54,6 +54,7 @@ SHL1STDLIBS= \
$(SVXCORELIB) \
$(SVXLIB) \
$(SFX2LIB) \
+ $(FWELIB) \
$(BASICLIB) \
$(SVTOOLLIB) \
$(TKLIB) \