diff options
Diffstat (limited to 'basctl/source/basicide/bastypes.cxx')
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 036d4b2341a5..10a78a57494f 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -152,7 +152,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 ) { @@ -186,14 +186,14 @@ void IDEBaseWindow::StoreData() { } -BOOL IDEBaseWindow::CanClose() +sal_Bool IDEBaseWindow::CanClose() { - return TRUE; + return sal_True; } -BOOL IDEBaseWindow::AllowUndo() +sal_Bool IDEBaseWindow::AllowUndo() { - return TRUE; + return sal_True; } @@ -226,13 +226,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 IDEBaseWindow::BasicStarted() @@ -243,14 +243,14 @@ void IDEBaseWindow::BasicStopped() { } -BOOL IDEBaseWindow::IsModified() +sal_Bool IDEBaseWindow::IsModified() { - return TRUE; + return sal_True; } -BOOL IDEBaseWindow::IsPasteAllowed() +sal_Bool IDEBaseWindow::IsPasteAllowed() { - return FALSE; + return sal_False; } Window* IDEBaseWindow::GetLayoutWindow() @@ -258,7 +258,7 @@ Window* IDEBaseWindow::GetLayoutWindow() return this; } -SfxUndoManager* IDEBaseWindow::GetUndoManager() +::svl::IUndoManager* IDEBaseWindow::GetUndoManager() { return NULL; } @@ -315,7 +315,7 @@ void BreakPointList::SetBreakPointsInBasic( SbModule* pModule ) { BreakPoint* pBrk = maBreakPoints[ i ]; if ( pBrk->bEnabled ) - pModule->SetBP( (USHORT)pBrk->nLine ); + pModule->SetBP( (sal_uInt16)pBrk->nLine ); } } @@ -417,7 +417,7 @@ void IDEBaseWindow::Deactivating() { } -USHORT IDEBaseWindow::GetSearchOptions() +sal_uInt16 IDEBaseWindow::GetSearchOptions() { return 0; } @@ -432,11 +432,11 @@ BasicDockingWindow::BasicDockingWindow( Window* pParent ) : -BOOL BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +sal_Bool 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() ); @@ -451,13 +451,13 @@ BOOL BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) -void BasicDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) +void 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 ); } @@ -479,7 +479,7 @@ void BasicDockingWindow::ToggleFloatingMode() -BOOL BasicDockingWindow::PrepareToggleFloatingMode() +sal_Bool BasicDockingWindow::PrepareToggleFloatingMode() { if ( IsFloatingMode() ) { @@ -487,7 +487,7 @@ BOOL BasicDockingWindow::PrepareToggleFloatingMode() aFloatingPosAndSize.SetPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); aFloatingPosAndSize.SetSize( GetSizePixel() ); } - return TRUE; + return sal_True; } @@ -538,18 +538,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 ); } @@ -587,9 +587,9 @@ void 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() ) @@ -609,9 +609,9 @@ void 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() ) @@ -630,8 +630,8 @@ void 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 ); } } } @@ -649,7 +649,7 @@ void 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(); @@ -685,13 +685,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 ); @@ -711,8 +711,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++) @@ -728,7 +728,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 nLine = 0; @@ -778,10 +778,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 ); @@ -832,7 +832,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 ) @@ -918,7 +918,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) @@ -927,7 +927,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) @@ -962,7 +962,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 ); @@ -971,39 +971,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 { |