diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
commit | 50428ea8ce78c05701fe4685beae6df145f6c6df (patch) | |
tree | a2c2d2beabe5ade17eefe70adf94b3efb8dfc9e5 /basctl | |
parent | 6ed68a9d0336e6c798b863f009db33d85a351c5d (diff) | |
parent | c608f21f9cec7a617786a3a657db9efeb9cc8031 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
automation/source/communi/communi.cxx
automation/source/server/recorder.cxx
automation/source/server/server.cxx
basctl/source/basicide/basobj2.cxx
Diffstat (limited to 'basctl')
72 files changed, 1544 insertions, 1744 deletions
diff --git a/basctl/inc/helpid.hrc b/basctl/inc/helpid.hrc index be1f441e2..64341f504 100644 --- a/basctl/inc/helpid.hrc +++ b/basctl/inc/helpid.hrc @@ -27,59 +27,53 @@ #ifndef _BASCTL_HELPID_HRC #define _BASCTL_HELPID_HRC -// include --------------------------------------------------------------- +#define HID_BASICIDE_TOOLBOX "BASCTL_HID_BASICIDE_TOOLBOX" +#define HID_BASICIDE_OBJECTS "BASCTL_HID_BASICIDE_OBJECTS" +#define HID_MACRO_OPTIONS "BASCTL_HID_MACRO_OPTIONS" +#define HID_BASICIDE_BRKPNTS "BASCTL_HID_BASICIDE_BRKPNTS" +#define HID_BASICIDE_MODULS "BASCTL_HID_BASICIDE_MODULS" +#define HID_BASICIDE_LIBS_TP "BASCTL_HID_BASICIDE_LIBS_TP" +#define HID_BASICIDE_LIBS_DLG "BASCTL_HID_BASICIDE_LIBS_DLG" +#define HID_BASICIDE_CONTROLS "BASCTL_HID_BASICIDE_CONTROLS" +#define HID_BASICIDE_MACROS "BASCTL_HID_BASICIDE_MACROS" +#define HID_BASICIDE_LIBS "BASCTL_HID_BASICIDE_LIBS" +#define HID_BASICIDE_ORG_TC "BASCTL_HID_BASICIDE_ORG_TC" -#include <svl/solar.hrc> +#define HID_BASICIDE_MODULES_TREE "BASCTL_HID_BASICIDE_MODULES_TREE" +#define HID_BASICIDE_LIBS_TREE "BASCTL_HID_BASICIDE_LIBS_TREE" +#define HID_BASICIDE_LIBSDLG_TREE "BASCTL_HID_BASICIDE_LIBSDLG_TREE" +#define HID_BASICIDE_OBJECTCAT "BASCTL_HID_BASICIDE_OBJECTCAT" -// Help-Ids -------------------------------------------------------------- +#define HID_BASICIDE_PROP_BROWSER "BASCTL_HID_BASICIDE_PROP_BROWSER" -#define HID_BASICIDE_TOOLBOX (HID_BASICIDE_START + 0) -#define HID_BASICIDE_OBJECTS (HID_BASICIDE_START + 1) -#define HID_MACRO_OPTIONS (HID_BASICIDE_START + 2) -#define HID_BASICIDE_BRKPNTS (HID_BASICIDE_START + 3) -#define HID_BASICIDE_MODULS (HID_BASICIDE_START + 4) -#define HID_BASICIDE_LIBS_TP (HID_BASICIDE_START + 5) -#define HID_BASICIDE_LIBS_DLG (HID_BASICIDE_START + 6) -#define HID_BASICIDE_CONTROLS (HID_BASICIDE_START + 7) -#define HID_BASICIDE_MACROS (HID_BASICIDE_START + 8) -#define HID_BASICIDE_LIBS (HID_BASICIDE_START + 9) -#define HID_BASICIDE_ORG_TC (HID_BASICIDE_START + 10) +#define HID_BASICIDE_PROP_BROWSER_LBOX "BASCTL_HID_BASICIDE_PROP_BROWSER_LBOX" -#define HID_BASICIDE_MODULES_TREE (HID_BASICIDE_START + 11) -#define HID_BASICIDE_LIBS_TREE (HID_BASICIDE_START + 12) -#define HID_BASICIDE_LIBSDLG_TREE (HID_BASICIDE_START + 13) -#define HID_BASICIDE_OBJECTCAT (HID_BASICIDE_START + 14) +#define HID_BASICIDE_OBJCAT_SHOW "BASCTL_HID_BASICIDE_OBJCAT_SHOW" +#define HID_BASICIDE_OBJCAT_PROPS "BASCTL_HID_BASICIDE_OBJCAT_PROPS" +#define HID_BASICIDE_OBJCAT_HELP "BASCTL_HID_BASICIDE_OBJCAT_HELP" -#define HID_BASICIDE_PROP_BROWSER (HID_BASICIDE_START + 15) +#define HID_BASICIDE_BRKDLG "BASCTL_HID_BASICIDE_BRKDLG" +#define HID_BASICIDE_ACTIV "BASCTL_HID_BASICIDE_ACTIV" +#define HID_BASICIDE_BRKPROPS "BASCTL_HID_BASICIDE_BRKPROPS" +#define HID_BASICIDE_REMOVEWATCH "BASCTL_HID_BASICIDE_REMOVEWATCH" +#define HID_BASICIDE_GOTOALL "BASCTL_HID_BASICIDE_GOTOALL" -#define HID_BASICIDE_PROP_BROWSER_LBOX (HID_BASICIDE_START + 16) +#define HID_BASICIDE_MODULWINDOW "BASCTL_HID_BASICIDE_MODULWINDOW" +#define HID_BASICIDE_DIALOGWINDOW "BASCTL_HID_BASICIDE_DIALOGWINDOW" -#define HID_BASICIDE_OBJCAT_SHOW (HID_BASICIDE_START + 17) -#define HID_BASICIDE_OBJCAT_PROPS (HID_BASICIDE_START + 18) -#define HID_BASICIDE_OBJCAT_HELP (HID_BASICIDE_START + 19) +#define HID_BASICIDE_EDITORWINDOW "BASCTL_HID_BASICIDE_EDITORWINDOW" +#define HID_BASICIDE_BREAKPOINTWINDOW "BASCTL_HID_BASICIDE_BREAKPOINTWINDOW" +#define HID_BASICIDE_WATCHWINDOW "BASCTL_HID_BASICIDE_WATCHWINDOW" +#define HID_BASICIDE_STACKWINDOW "BASCTL_HID_BASICIDE_STACKWINDOW" +#define HID_BASICIDE_TABBAR "BASCTL_HID_BASICIDE_TABBAR" +#define HID_BASICIDE_WATCHWINDOW_EDIT "BASCTL_HID_BASICIDE_WATCHWINDOW_EDIT" +#define HID_BASICIDE_WATCHWINDOW_LIST "BASCTL_HID_BASICIDE_WATCHWINDOW_LIST" +#define HID_BASICIDE_STACKWINDOW_LIST "BASCTL_HID_BASICIDE_STACKWINDOW_LIST" -#define HID_BASICIDE_BRKDLG (HID_BASICIDE_START + 20) -#define HID_BASICIDE_ACTIV (HID_BASICIDE_START + 21) -#define HID_BASICIDE_BRKPROPS (HID_BASICIDE_START + 22) -#define HID_BASICIDE_REMOVEWATCH (HID_BASICIDE_START + 23) -#define HID_BASICIDE_GOTOALL (HID_BASICIDE_START + 24) - -#define HID_BASICIDE_MODULWINDOW (HID_BASICIDE_START + 25) -#define HID_BASICIDE_DIALOGWINDOW (HID_BASICIDE_START + 26) - -#define HID_BASICIDE_EDITORWINDOW (HID_BASICIDE_START + 27) -#define HID_BASICIDE_BREAKPOINTWINDOW (HID_BASICIDE_START + 28) -#define HID_BASICIDE_WATCHWINDOW (HID_BASICIDE_START + 29) -#define HID_BASICIDE_STACKWINDOW (HID_BASICIDE_START + 30) -#define HID_BASICIDE_TABBAR (HID_BASICIDE_START + 31) -#define HID_BASICIDE_WATCHWINDOW_EDIT (HID_BASICIDE_START + 32) -#define HID_BASICIDE_WATCHWINDOW_LIST (HID_BASICIDE_START + 33) -#define HID_BASICIDE_STACKWINDOW_LIST (HID_BASICIDE_START + 34) - -#define HID_BASICIDE_MANAGE_LANGUAGE (HID_BASICIDE_START + 35) -#define HID_BASICIDE_SETDEFAULT_LANGUAGE (HID_BASICIDE_START + 36) -#define HID_BASICIDE_ADDNEW_LANGUAGE (HID_BASICIDE_START + 37) -#define HID_BASICIDE_ADDNEW_CONTROL (HID_BASICIDE_START + 38) +#define HID_BASICIDE_MANAGE_LANGUAGE "BASCTL_HID_BASICIDE_MANAGE_LANGUAGE" +#define HID_BASICIDE_SETDEFAULT_LANGUAGE "BASCTL_HID_BASICIDE_SETDEFAULT_LANGUAGE" +#define HID_BASICIDE_ADDNEW_LANGUAGE "BASCTL_HID_BASICIDE_ADDNEW_LANGUAGE" +#define HID_BASICIDE_ADDNEW_CONTROL "BASCTL_HID_BASICIDE_ADDNEW_CONTROL" #endif diff --git a/basctl/prj/build.lst b/basctl/prj/build.lst index a48a698a9..1f92577d2 100644 --- a/basctl/prj/build.lst +++ b/basctl/prj/build.lst @@ -1,4 +1,4 @@ -bc basctl : l10n svx NULL +bc basctl : LIBXSLT:libxslt L10N:l10n svx NULL bc basctl usr1 - all bc_mkout NULL bc basctl\inc nmake - all bc_inc NULL bc basctl\source\inc get - all bc_sinc NULL diff --git a/basctl/prj/d.lst b/basctl/prj/d.lst index d05ff35bd..b3ded50b6 100644 --- a/basctl/prj/d.lst +++ b/basctl/prj/d.lst @@ -21,3 +21,4 @@ mkdir: %_DEST%\inc%_EXT%\basctl ..\uiconfig\basicide\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\menubar\*.xml ..\uiconfig\basicide\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\toolbar\*.xml ..\uiconfig\basicide\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\statusbar\*.xml +..\%__SRC%\misc\basctl.component %_DEST%\xml%_EXT%\basctl.component diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index ce914b2cb..70677e4ef 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -131,9 +131,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 ); @@ -358,7 +358,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 ); @@ -752,7 +752,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 ) ) @@ -1115,7 +1115,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 7465d4807..96f00abba 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -72,7 +72,7 @@ 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 ) ); @@ -89,49 +89,13 @@ void BasicDocShell::SetPrinter( SfxPrinter* pPr ) } } -void BasicDocShell::FillStatusBar( StatusBar& rStatusBar ) -{ - String aTmp; - - // Titel - aTmp.Fill( 30, 'X' ); - rStatusBar.InsertItem( SID_BASICIDE_STAT_TITLE, - rStatusBar.GetTextWidth( aTmp ), SIB_AUTOSIZE | SIB_LEFT); - - // Modify - rStatusBar.InsertItem( SID_DOC_MODIFIED, - rStatusBar.GetTextWidth( '*' ) ); - - // signatures - rStatusBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rStatusBar ), SIB_USERDRAW ); - rStatusBar.SetHelpId(SID_SIGNATURE, SID_SIGNATURE); - - // Position - aTmp.Erase(); - aTmp.Fill( 15, 'X' ); - rStatusBar.InsertItem( SID_BASICIDE_STAT_POS, - rStatusBar.GetTextWidth( aTmp ), SIB_LEFT); - - // Insert/Overwrite - rStatusBar.InsertItem( SID_ATTR_INSERT, - rStatusBar.GetTextWidth( String( RTL_CONSTASCII_USTRINGPARAM( "XXXXX" /* "EINFG" */ ) ) ) ); - - // Uhrzeit - aTmp.Fill( 20, 'X' ); - rStatusBar.InsertItem( SID_ATTR_SIZE, - rStatusBar.GetTextWidth( aTmp ), SIB_AUTOSIZE | SIB_LEFT | SIB_USERDRAW ); - -// return pStatusBar; - -} - void BasicDocShell::FillClass( SvGlobalName*, sal_uInt32*, String*, String*, String*, sal_Int32, sal_Bool bTemplate) const { (void)bTemplate; DBG_ASSERT( bTemplate == sal_False, "No template for Basic" ); } -void BasicDocShell::Draw( OutputDevice *, const JobSetup &, USHORT ) +void BasicDocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16 ) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx index 48d0b072a..843e2e41c 100644 --- a/basctl/source/basicide/basdoc.hxx +++ b/basctl/source/basicide/basdoc.hxx @@ -40,9 +40,8 @@ class BasicDocShell: public SfxObjectShell SfxPrinter* pPrinter; protected: - virtual void FillStatusBar( StatusBar& rBar); 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, @@ -60,7 +59,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 9732bc9dd..e73671b25 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -57,7 +57,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 ) { } @@ -70,7 +70,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() ); @@ -145,9 +145,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*/ ) @@ -168,12 +166,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; } @@ -217,8 +215,8 @@ void BasicLibBox::ReleaseFocus() void BasicLibBox::FillBox() { - SetUpdateMode( FALSE ); - bIgnoreSelect = TRUE; + SetUpdateMode( sal_False ); + bIgnoreSelect = sal_True; aCurText = GetSelectEntry(); @@ -226,7 +224,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 ); @@ -240,7 +238,7 @@ void BasicLibBox::FillBox() InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT ); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); SelectEntry( aCurText ); if ( !GetSelectEntryCount() ) @@ -248,7 +246,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 ) @@ -265,7 +263,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 ) ); } } @@ -277,7 +275,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: @@ -301,15 +299,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; } } @@ -329,7 +327,7 @@ void BasicLibBox::Select() void BasicLibBox::NotifyIDE() { - USHORT nSelPos = GetSelectEntryPos(); + sal_uInt16 nSelPos = GetSelectEntryPos(); BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( nSelPos ); if ( pEntry ) { @@ -351,8 +349,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; @@ -364,7 +362,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 ) { } @@ -373,7 +371,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; @@ -423,7 +421,7 @@ BasicLanguageBox::~BasicLanguageBox() void BasicLanguageBox::FillBox() { - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); m_bIgnoreSelect = true; m_sCurrentText = GetSelectEntry(); ClearBox(); @@ -437,8 +435,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] ); @@ -450,7 +448,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 ) @@ -470,14 +468,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; @@ -505,7 +503,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 8932fb454..1e27c1c19 100644 --- a/basctl/source/basicide/basicbox.hxx +++ b/basctl/source/basicide/basicbox.hxx @@ -41,10 +41,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 ); }; @@ -84,8 +84,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(); @@ -115,10 +115,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 8bbc72fa1..2c244443f 100644 --- a/basctl/source/basicide/basicmod.hxx +++ b/basctl/source/basicide/basicmod.hxx @@ -37,7 +37,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 a5d9a8351..caa5241c5 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 6946f5a44..b157a7254 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -46,8 +46,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 ); @@ -64,13 +64,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 bab52a2ee..772094d0c 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -100,7 +100,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(); @@ -165,8 +165,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' ) @@ -274,13 +274,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(); @@ -288,14 +288,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 ) { @@ -305,12 +305,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 ); @@ -321,7 +321,7 @@ BOOL ModulWindow::BasicExecute() if ( !aDocument.allowMacros() ) { WarningBox( this, WB_OK, String( IDEResId( RID_STR_CANNOTRUNMACRO ) ) ).Execute(); - return FALSE; + return sal_False; } } @@ -336,13 +336,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(); // Init cursor to top 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?" ); @@ -357,73 +357,73 @@ BOOL ModulWindow::BasicExecute() if ( !pMethod ) { // If not in a method then prompt the user - 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; } 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; } @@ -434,13 +434,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; @@ -464,25 +464,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(); @@ -491,10 +491,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; @@ -524,7 +524,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 ) { @@ -533,11 +533,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(); @@ -546,21 +546,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() ) { @@ -568,24 +568,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)" ); @@ -611,14 +611,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(); @@ -627,12 +627,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(); @@ -651,12 +651,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 ); } } @@ -684,9 +684,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++; @@ -707,9 +707,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 ); // #i47002# Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( this ); @@ -719,11 +719,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 ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) @@ -733,8 +733,8 @@ long 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 ); @@ -754,8 +754,8 @@ long 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 ); @@ -764,7 +764,7 @@ long ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) while( aStatus.bIsRunning ) Application::Yield(); - aStatus.bIsInReschedule = FALSE; + aStatus.bIsInReschedule = sal_False; aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER ); ClearStatus( BASWIN_INRESCHEDULE ); @@ -776,9 +776,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() ) { TextPaM aWordStart; @@ -786,10 +786,10 @@ void ModulWindow::BasicAddWatch() if ( aWord.Len() ) { TextSelection aSel( aWordStart ); - USHORT& rIndex = aSel.GetEnd().GetIndex(); + sal_uInt16& rIndex = aSel.GetEnd().GetIndex(); rIndex = rIndex + aWord.Len(); GetEditView()->SetSelection( aSel ); - bAdd = TRUE; + bAdd = sal_True; } } if ( bAdd ) @@ -800,7 +800,7 @@ void ModulWindow::BasicAddWatch() aWatchStr = GetEditView()->GetSelected(); pLayout->GetWatchWindow().AddWatch( aWatchStr ); pLayout->GetWatchWindow().UpdateWatches(); - bInserted = TRUE; + bInserted = sal_True; } } @@ -813,7 +813,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(); @@ -831,7 +831,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 ) { @@ -854,7 +854,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 ); @@ -873,17 +873,17 @@ void ModulWindow::StoreData() // dieses Fenster beendet wird. // => Keine Unterbrechungen erwuenscht! // Und bei SAVE, wenn AppBasic... - GetEditorWindow().SetSourceInBasic( TRUE ); + GetEditorWindow().SetSourceInBasic( sal_True ); } -BOOL ModulWindow::CanClose() +sal_Bool ModulWindow::CanClose() { DBG_CHKTHIS( ModulWindow, 0 ); - return TRUE; + return sal_True; } -BOOL ModulWindow::AllowUndo() +sal_Bool ModulWindow::AllowUndo() { return GetEditorWindow().CanModify(); } @@ -906,7 +906,7 @@ void ModulWindow::UpdateData() TextSelection aSel = GetEditView()->GetSelection(); setTextEngineText( GetEditEngine(), xModule->GetSource32() ); GetEditView()->SetSelection( aSel ); - GetEditEngine()->SetModified( FALSE ); + GetEditEngine()->SetModified( sal_False ); BasicIDE::MarkDocumentModified( GetDocument() ); } } @@ -939,37 +939,37 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) 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; @@ -996,7 +996,7 @@ void ModulWindow::ExecuteCommand( SfxRequest& rReq ) { DBG_CHKTHIS( ModulWindow, 0 ); AssertValidEditEngine(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_BASICRUN: @@ -1111,7 +1111,7 @@ void 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 ) { @@ -1182,16 +1182,16 @@ void 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 ModulWindow::IsModified() +sal_Bool ModulWindow::IsModified() { - return GetEditEngine() ? GetEditEngine()->IsModified() : FALSE; + return GetEditEngine() ? GetEditEngine()->IsModified() : sal_False; } @@ -1224,7 +1224,7 @@ void ModulWindow::FrameWindowMoved() -void ModulWindow::ShowCursor( BOOL bOn ) +void ModulWindow::ShowCursor( sal_Bool bOn ) { if ( GetEditEngine() ) { @@ -1257,7 +1257,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... @@ -1273,8 +1273,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 ) ) { @@ -1285,7 +1285,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 ); } } @@ -1296,16 +1296,16 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO return nFound; } -SfxUndoManager* ModulWindow::GetUndoManager() +::svl::IUndoManager* ModulWindow::GetUndoManager() { if ( GetEditEngine() ) return &GetEditEngine()->GetUndoManager(); return NULL; } -USHORT ModulWindow::GetSearchOptions() +sal_uInt16 ModulWindow::GetSearchOptions() { - USHORT nOptions = SEARCH_OPTIONS_SEARCH | + sal_uInt16 nOptions = SEARCH_OPTIONS_SEARCH | SEARCH_OPTIONS_WHOLE_WORDS | SEARCH_OPTIONS_BACKWARDS | SEARCH_OPTIONS_REG_EXP | @@ -1326,13 +1326,13 @@ void ModulWindow::BasicStarted() { if ( XModule().Is() ) { - aStatus.bIsRunning = TRUE; + aStatus.bIsRunning = sal_True; BreakPointList& rList = GetBreakPoints(); if ( rList.size() ) { 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)" ); @@ -1344,7 +1344,7 @@ void ModulWindow::BasicStarted() void ModulWindow::BasicStopped() { - aStatus.bIsRunning = FALSE; + aStatus.bIsRunning = sal_False; GetBreakPointWindow().SetMarkerPos( MARKER_NOMARKER ); } @@ -1388,15 +1388,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(); @@ -1404,9 +1404,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(); @@ -1422,7 +1422,7 @@ BOOL ModulWindow::IsPasteAllowed() SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); if ( xTransf->isDataFlavorSupported( aFlavor ) ) { - bPaste = TRUE; + bPaste = sal_True; } } } @@ -1436,8 +1436,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)) { @@ -1572,15 +1572,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 @@ -1598,7 +1598,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 ) @@ -1607,11 +1607,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 ) @@ -1720,13 +1720,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) const +Image ModulWindowLayout::getImage(sal_uInt16 nId) const { return m_aImagesNormal.GetImage(nId); } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index dde29a101..573d7c610 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -68,15 +68,15 @@ 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 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; @@ -114,16 +114,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& ); @@ -137,9 +137,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 ); @@ -149,11 +149,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(); @@ -162,9 +162,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(); } }; @@ -172,10 +172,10 @@ class BreakPointWindow : public Window { private: long nCurYOffset; - USHORT nMarkerPos; + sal_uInt16 nMarkerPos; BreakPointList aBreakPointList; ModulWindow* pModulWindow; - BOOL bErrorMarker; + sal_Bool bErrorMarker; virtual void DataChanged(DataChangedEvent const & rDCEvt); @@ -185,11 +185,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 ); @@ -198,7 +198,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; } @@ -211,10 +211,10 @@ 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 ); public: @@ -254,7 +254,7 @@ public: ~WatchWindow(); void AddWatch( const String& rVName ); - BOOL RemoveSelectedWatch(); + sal_Bool RemoveSelectedWatch(); void UpdateWatches( bool bBasicStopped = false ); WatchTreeListBox& GetWatchTreeListBox() { return aTreeListBox; } @@ -323,7 +323,7 @@ private: long BasicBreakHdl( StarBASIC* pBasic ); void CheckCompileBasic(); - BOOL BasicExecute(); + sal_Bool BasicExecute(); void GoOnTop(); void AssertValidEditEngine(); @@ -350,16 +350,16 @@ public: virtual void GetState( SfxItemSet& ); 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 ); // print page 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; } @@ -367,37 +367,37 @@ 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 ); - 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(); @@ -412,7 +412,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; } @@ -428,8 +429,8 @@ private: WatchWindow aWatchWindow; StackWindow aStackWindow; - BOOL bVSplitted; - BOOL bHSplitted; + sal_Bool bVSplitted; + sal_Bool bHSplitted; ModulWindow * m_pModulWindow; @@ -457,7 +458,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; } @@ -465,7 +466,7 @@ public: WatchWindow& GetWatchWindow() { return aWatchWindow; } StackWindow& GetStackWindow() { return aStackWindow; } - Image getImage(USHORT nId) const; + Image getImage(sal_uInt16 nId) 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 849aefed8..5f65839c0 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -29,8 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_basctl.hxx" - -#include <svl/svarray.hxx> +#include <vector> #define _BASIC_TEXTPORTIONS #include <basic/sbdef.hxx> #include <ide_pch.hxx> @@ -91,7 +90,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; @@ -129,10 +128,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 ); @@ -145,13 +144,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 ); } @@ -161,13 +160,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( @@ -246,7 +245,7 @@ String EditorWindow::GetWordAtCursor() void EditorWindow::RequestHelp( const HelpEvent& rHEvt ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Should have been activated at some point if ( pEditEngine ) @@ -254,8 +253,8 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & HELPMODE_CONTEXT ) { String aKeyword = GetWordAtCursor(); - Application::GetHelp()->Start( aKeyword, this ); - bDone = TRUE; + Application::GetHelp()->SearchKeyword( aKeyword ); + bDone = sal_True; } else if ( rHEvt.GetMode() & HELPMODE_QUICK ) { @@ -266,12 +265,12 @@ void 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 ); @@ -279,13 +278,13 @@ void 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 @@ -305,7 +304,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt ) } } Help::ShowQuickHelp( this, Rectangle( aTopLeft, Size( 1, 1 ) ), aHelpText, QUICKHELP_TOP|QUICKHELP_LEFT); - bDone = TRUE; + bDone = sal_True; } } @@ -382,20 +381,20 @@ void EditorWindow::Command( const CommandEvent& rCEvt ) } } -BOOL EditorWindow::ImpCanModify() +sal_Bool EditorWindow::ImpCanModify() { - BOOL bCanModify = TRUE; + sal_Bool bCanModify = sal_True; if ( StarBASIC::IsRunning() ) { // If in Trace-mode, abort the trace or refuse input // Remove markers in the modules in Notify at Basic::Stoped 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; } @@ -412,14 +411,14 @@ void 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() && @@ -428,13 +427,13 @@ void 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 ) @@ -479,11 +478,11 @@ void 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 for #i60626, otherwise // any read only bug in the text engine could lead to a crash later @@ -507,9 +506,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; @@ -542,8 +541,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(); @@ -553,8 +552,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; @@ -574,15 +573,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 ); @@ -591,15 +590,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(); @@ -615,11 +614,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 @@ -679,7 +678,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; @@ -694,12 +693,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 ) { @@ -748,7 +747,7 @@ void EditorWindow::InitScrollBars() } } -void EditorWindow::ImpDoHighlight( ULONG nLine ) +void EditorWindow::ImpDoHighlight( sal_uLong nLine ) { if ( bDoSyntaxHighlight ) { @@ -757,20 +756,20 @@ 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 ); - USHORT nCount = aPortions.Count(); - for ( USHORT i = 0; i < nCount; i++ ) + + for ( size_t i = 0; i < aPortions.size(); i++ ) { 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 @@ -799,14 +798,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! @@ -819,7 +818,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. @@ -830,7 +829,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( ULONG nPara ) { if ( bDelayHighlight ) { - aSyntaxLineTable.Insert( nPara, (void*)(ULONG)1 ); + aSyntaxLineTable.Insert( nPara, (void*)(sal_uLong)1 ); aSyntaxIdleTimer.Start(); } else @@ -842,32 +841,32 @@ 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(); } // #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(); @@ -884,7 +883,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(); @@ -902,7 +901,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 ); @@ -976,7 +975,7 @@ void BreakPointWindow::Paint( const Rectangle& ) size_t nY = nLine*nLineHeight - nCurYOffset; DrawImage( Point( 0, nY ) + aBmpOff, pBrk->bEnabled ? aBrk1 : aBrk0 ); } - ShowMarker( TRUE ); + ShowMarker( sal_True ); } @@ -989,18 +988,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; @@ -1018,7 +1017,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 ) @@ -1054,7 +1053,7 @@ void 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(); } @@ -1078,7 +1077,7 @@ void 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(); } @@ -1110,7 +1109,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) } } -BOOL BreakPointWindow::SyncYOffset() +sal_Bool BreakPointWindow::SyncYOffset() { TextView* pView = pModulWindow->GetEditView(); if ( pView ) @@ -1120,10 +1119,10 @@ BOOL BreakPointWindow::SyncYOffset() { nCurYOffset = nViewYOffset; Invalidate(); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } // virtual @@ -1149,9 +1148,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 ), @@ -1162,11 +1161,14 @@ WatchWindow::WatchWindow( Window* pParent ) : | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ), aHeaderBar( this, WB_BUTTONSTYLE | WB_BORDER ) { + aXEdit.SetAccessibleName(String(IDEResId( RID_STR_WATCHNAME))); + aTreeListBox.SetAccessibleName(String(IDEResId(RID_STR_WATCHNAME))); + nVirtToolBoxHeight = aXEdit.GetSizePixel().Height() + 7; 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 ); @@ -1366,15 +1368,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 ) @@ -1387,10 +1389,10 @@ BOOL WatchWindow::RemoveSelectedWatch() aXEdit.SetText( String() ); if ( !aTreeListBox.GetEntryCount() ) aRemoveWatchButton.Disable(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } @@ -1447,8 +1449,8 @@ IMPL_LINK_INLINE_START( WatchWindow, implEndDragHdl, HeaderBar *, pBar ) aHeaderBar.SetItemSize( ITEM_ID_TYPE, TAB_WIDTH_MIN ); sal_Int32 nPos = 0; - USHORT nTabs = aHeaderBar.GetItemCount(); - for( USHORT i = 1 ; i < nTabs ; ++i ) + sal_uInt16 nTabs = aHeaderBar.GetItemCount(); + for( sal_uInt16 i = 1 ; i < nTabs ; ++i ) { nPos += aHeaderBar.GetItemSize( i ); aTreeListBox.SetTab( i, nPos, MAP_PIXEL ); @@ -1497,11 +1499,12 @@ StackWindow::StackWindow( Window* pParent ) : aGotoCallButton( this, IDEResId( RID_IMGBTN_GOTOCALL ) ), aStackStr( IDEResId( RID_STR_STACK ) ) { - aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST); + aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST); + 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.InsertEntry( String(), 0, sal_False, LIST_APPEND ); aTreeListBox.Show(); SetText( String( IDEResId( RID_STR_STACKNAME ) ) ); @@ -1574,7 +1577,7 @@ IMPL_LINK_INLINE_END( StackWindow, ButtonHdl, ImageButton *, pButton ) void StackWindow::UpdateCalls() { - aTreeListBox.SetUpdateMode( FALSE ); + aTreeListBox.SetUpdateMode( sal_False ); aTreeListBox.Clear(); if ( StarBASIC::IsRunning() ) @@ -1582,7 +1585,7 @@ void StackWindow::UpdateCalls() SbxError eOld = SbxBase::GetError(); aTreeListBox.SetSelectionMode( SINGLE_SELECTION ); - USHORT nScope = 0; + sal_uInt16 nScope = 0; SbMethod* pMethod = StarBASIC::GetActiveMethod( nScope ); while ( pMethod ) { @@ -1597,7 +1600,7 @@ void 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?!" ); @@ -1610,16 +1613,17 @@ void StackWindow::UpdateCalls() aEntry += pParam->aName; } aEntry += '='; - if( pVar->GetType() & SbxARRAY ) + SbxDataType eType = pVar->GetType(); + if( eType & SbxARRAY ) aEntry += String( RTL_CONSTASCII_USTRINGPARAM( "..." ) ); - else + else if( eType != SbxOBJECT ) aEntry += pVar->GetString(); if ( nParam < ( pParams->Count() - 1 ) ) aEntry += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) ); } aEntry += ')'; } - aTreeListBox.InsertEntry( aEntry, 0, FALSE, LIST_APPEND ); + aTreeListBox.InsertEntry( aEntry, 0, sal_False, LIST_APPEND ); nScope++; pMethod = StarBASIC::GetActiveMethod( nScope ); } @@ -1631,10 +1635,10 @@ void 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 ); } @@ -1685,7 +1689,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() ); } @@ -1709,7 +1713,7 @@ void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt) } uno::Reference< awt::XWindowPeer > -EditorWindow::GetComponentInterface(BOOL bCreate) +EditorWindow::GetComponentInterface(sal_Bool bCreate) { uno::Reference< awt::XWindowPeer > xPeer( Window::GetComponentInterface(false)); @@ -1743,8 +1747,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 ) @@ -1779,10 +1783,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 ); @@ -1800,14 +1804,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(); @@ -1820,7 +1824,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]; @@ -1894,11 +1898,11 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArra return pSBX; } -BOOL WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) +sal_Bool 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 @@ -1912,7 +1916,7 @@ BOOL WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) aEditingRes = SvHeaderTabListBox::GetEntryText( pEntry, ITEM_ID_VALUE-1 ); aEditingRes.EraseLeadingChars(); aEditingRes.EraseTrailingChars(); - bEdit = TRUE; + bEdit = sal_True; } } } @@ -1923,7 +1927,7 @@ BOOL WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) return bEdit; } -BOOL WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) +sal_Bool WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) { WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); String aVName( pItem->maName ); @@ -1932,20 +1936,20 @@ BOOL WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText 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 ) { @@ -1959,12 +1963,12 @@ BOOL WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText 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; @@ -1975,10 +1979,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; } @@ -1992,14 +1996,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(); } @@ -2010,7 +2014,7 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& // The text should never be taken/copied 1:1, // as the UpdateWatches will be lost - return FALSE; + return sal_False; } @@ -2126,8 +2130,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; @@ -2164,7 +2168,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; } @@ -2177,7 +2181,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(); @@ -2191,8 +2195,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() ); @@ -2232,7 +2236,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 7e735c891..0d3e62820 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -87,9 +87,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::resource; using namespace ::com::sun::star::ui::dialogs; -#if defined(MAC) -#define FILTERMASK_ALL "****" -#elif defined(OW) || defined(MTF) +#if defined(UNX) #define FILTERMASK_ALL "*" #elif defined(PM2) #define FILTERMASK_ALL "" @@ -106,7 +104,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( rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() ); pEditor->SetWindow( this ); @@ -126,10 +124,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() @@ -291,7 +289,7 @@ void DialogWindow::DoScroll( ScrollBar* pCurScrollBar ) void 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 ) { @@ -337,10 +335,10 @@ void 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; @@ -357,7 +355,7 @@ void 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; @@ -637,16 +635,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() @@ -669,10 +667,10 @@ void DialogWindow::UpdateBrowser() static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "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; @@ -934,9 +932,9 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent, SetImage( 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; @@ -1030,7 +1028,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 @@ -1067,7 +1065,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; @@ -1092,7 +1090,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 @@ -1178,9 +1176,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 @@ -1223,10 +1221,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& ) {} @@ -1235,13 +1233,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; } @@ -1260,12 +1258,12 @@ DlgEdView* DialogWindow::GetView() const return pEditor ? pEditor->GetView() : NULL; } -BOOL DialogWindow::IsModified() +sal_Bool DialogWindow::IsModified() { return pEditor->IsModified(); } -SfxUndoManager* DialogWindow::GetUndoManager() +::svl::IUndoManager* DialogWindow::GetUndoManager() { return pUndoMgr; } @@ -1284,7 +1282,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 ) { @@ -1295,19 +1293,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() @@ -1362,14 +1360,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 07436de5f..7b5a4d3b0 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -94,7 +94,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) case SID_BASICIDE_HIDECURPAGE: { pCurWin->StoreData(); - RemoveWindow( pCurWin, FALSE ); + RemoveWindow( pCurWin, sal_False ); } break; case SID_BASICIDE_DELETECURRENT: @@ -121,7 +121,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) { if ( BasicIDE::RemoveDialog( aDocument, aLibName, aName ) ) { - RemoveWindow( pCurWin, TRUE ); + RemoveWindow( pCurWin, sal_True ); BasicIDE::MarkDocumentModified( aDocument ); } } @@ -140,7 +140,7 @@ void 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!" ); @@ -148,11 +148,11 @@ void 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 ) { @@ -185,11 +185,11 @@ void 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 ) @@ -201,10 +201,10 @@ void 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 ) ) ) @@ -215,11 +215,11 @@ void 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; } } @@ -229,9 +229,9 @@ void 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(); @@ -267,7 +267,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) // Egal, wer oben, Einfluss auf die Shell: void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_BASICSTOP: @@ -292,7 +292,7 @@ void 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 @@ -354,7 +354,7 @@ void 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: @@ -367,7 +367,7 @@ void 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" ); @@ -395,7 +395,7 @@ void 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 @@ -408,15 +408,15 @@ void 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: @@ -445,7 +445,7 @@ void 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 ); } } @@ -461,7 +461,7 @@ void 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 ); @@ -481,7 +481,7 @@ void 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 ) @@ -526,7 +526,7 @@ void 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 ) ) { @@ -547,14 +547,14 @@ void 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(); @@ -574,14 +574,14 @@ void 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 BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) if ( !m_aCurLibName.Len() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) ) { if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE ) - FindBasWin( aDocument, aLibName, aName, TRUE ); + FindBasWin( aDocument, aLibName, aName, sal_True ); else if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG ) - FindDlgWin( aDocument, aLibName, aName, TRUE ); + FindDlgWin( aDocument, aLibName, aName, sal_True ); } } break; @@ -610,9 +610,9 @@ void 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 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 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 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 BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) void 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 BasicIDEShell::GetState(SfxItemSet &rSet) break; case SID_SAVEDOC: { - BOOL bDisable = FALSE; + sal_Bool bDisable = sal_False; if ( pCurWin ) { @@ -805,7 +805,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) } else { - bDisable = TRUE; + bDisable = sal_True; } if ( bDisable ) @@ -899,7 +899,7 @@ void 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 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 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 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(); @@ -1202,7 +1202,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 ) @@ -1241,8 +1241,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 ); @@ -1252,12 +1252,12 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic ) if ( StarBASIC::IsRunning() ) // Falls abgebrochen... { if ( bAppWindowDisabled ) - Application::GetDefDialogParent()->Enable( FALSE ); + Application::GetDefDialogParent()->Enable( sal_False ); 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(); } } @@ -1288,15 +1288,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; @@ -1351,7 +1351,7 @@ Reference< XModel > BasicIDEShell::GetCurrentDocument() const return xDocument; } -void BasicIDEShell::Activate( BOOL bMDI ) +void BasicIDEShell::Activate( sal_Bool bMDI ) { SfxViewShell::Activate( bMDI ); @@ -1360,13 +1360,13 @@ void BasicIDEShell::Activate( BOOL bMDI ) if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) ) ((DialogWindow*)pCurWin)->UpdateBrowser(); - ShowObjectDialog( TRUE, FALSE ); + ShowObjectDialog( sal_True, sal_False ); } } -void BasicIDEShell::Deactivate( BOOL bMDI ) +void 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 ) { @@ -1380,30 +1380,30 @@ void 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: @@ -1427,7 +1427,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 3e102277c..a2e0a85e1 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -62,7 +62,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 ) @@ -72,19 +72,19 @@ Reference< view::XRenderable > BasicIDEShell::GetRenderable() return Reference< view::XRenderable >( new basicide::BasicRenderable( pCurWin ) ); } -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 ) ) @@ -107,7 +107,7 @@ String BasicIDEShell::GetSelectionText( BOOL bWholeWord ) return aText; } -SfxPrinter* BasicIDEShell::GetPrinter( BOOL bCreate ) +SfxPrinter* BasicIDEShell::GetPrinter( sal_Bool bCreate ) { if ( pCurWin ) // && pCurWin->ISA( ModulWindow ) ) { @@ -118,7 +118,7 @@ SfxPrinter* BasicIDEShell::GetPrinter( BOOL bCreate ) return 0; } -USHORT BasicIDEShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool ) +sal_uInt16 BasicIDEShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) { (void)nDiffFlags; BasicDocShell* pDocShell = (BasicDocShell*)GetViewFrame()->GetObjectShell(); @@ -158,7 +158,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 (); @@ -191,9 +191,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 ); @@ -208,7 +208,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 ) { @@ -217,11 +217,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 @@ -255,17 +255,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(); diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx index fe6e039f9..dc518e40f 100644 --- a/basctl/source/basicide/basides3.cxx +++ b/basctl/source/basicide/basides3.cxx @@ -58,9 +58,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 ); @@ -74,7 +74,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 ) { @@ -126,17 +126,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 b44645330..aa29e841f 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 ); } } @@ -183,7 +183,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 ); @@ -204,13 +204,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 ); @@ -221,13 +219,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(); @@ -238,7 +236,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 :-) @@ -260,7 +258,7 @@ 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 ); @@ -284,8 +282,7 @@ BasicIDEShell::~BasicIDEShell() if ( pListener ) pListener->removeContainerListener( m_aCurDocument, m_aCurLibName ); - SFX_APP()->LeaveBasicCall(); - IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE; + IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_False; GnBasicIDEShellCount--; } @@ -329,7 +326,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 ) ) @@ -347,7 +344,7 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument ) pWin->StoreData(); if ( pWin == pCurWin ) bSetCurWindow = true; - RemoveWindow( pWin, TRUE, FALSE ); + RemoveWindow( pWin, sal_True, sal_False ); } } } @@ -360,20 +357,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() ) @@ -381,9 +378,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?" ); @@ -394,7 +391,7 @@ void BasicIDEShell::StoreAllWindowData( BOOL bPersistent ) if ( bPersistent ) { SFX_APP()->SaveBasicAndDialogContainer(); - SetAppBasicModified( FALSE ); + SetAppBasicModified( sal_False ); SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) @@ -406,12 +403,12 @@ void BasicIDEShell::StoreAllWindowData( BOOL bPersistent ) } -USHORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) +sal_uInt16 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() ) { @@ -421,25 +418,25 @@ USHORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) Window *pParent = &GetViewFrame()->GetWindow(); InfoBox( pParent, aErrorStr ).Execute(); } - return FALSE; + return sal_False; } else { - 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->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; } @@ -485,7 +482,7 @@ void BasicIDEShell::OuterResizePixel( const Point &rPos, const Size &rSize ) IMPL_LINK_INLINE_START( BasicIDEShell, TabBarSplitHdl, TabBar *, pTBar ) { (void)pTBar; - bTabBarSplitted = TRUE; + bTabBarSplitted = sal_True; ArrangeTabBar(); return 0; @@ -496,7 +493,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 ); @@ -506,10 +503,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; @@ -519,8 +516,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; @@ -546,9 +543,9 @@ void BasicIDEShell::ArrangeTabBar() -SfxUndoManager* BasicIDEShell::GetUndoManager() +::svl::IUndoManager* BasicIDEShell::GetUndoManager() { - SfxUndoManager* pMgr = NULL; + ::svl::IUndoManager* pMgr = NULL; if( pCurWin ) pMgr = pCurWin->GetUndoManager(); @@ -557,7 +554,7 @@ SfxUndoManager* BasicIDEShell::GetUndoManager() -void BasicIDEShell::ShowObjectDialog( BOOL bShow, BOOL bCreateOrDestroy ) +void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy ) { if ( bShow ) { @@ -612,7 +609,7 @@ void 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(); } @@ -622,7 +619,7 @@ void 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 ) ) { @@ -684,42 +681,42 @@ void 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 ); } @@ -727,16 +724,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, @@ -744,7 +741,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--; } } @@ -763,7 +760,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() ); @@ -777,14 +774,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; } } @@ -811,7 +808,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 && @@ -842,7 +839,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 && @@ -866,22 +863,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 ) { @@ -924,7 +921,7 @@ void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, BOOL bDestroy, BOOL b -USHORT BasicIDEShell::InsertWindowInTable( IDEBaseWindow* pNewWin ) +sal_uInt16 BasicIDEShell::InsertWindowInTable( IDEBaseWindow* pNewWin ) { // Eigentlich prueffen, nCurKey++; @@ -978,7 +975,7 @@ void BasicIDEShell::InvalidateBasicIDESlots() } } -void BasicIDEShell::EnableScrollbars( BOOL bEnable ) +void BasicIDEShell::EnableScrollbars( sal_Bool bEnable ) { if ( bEnable ) { @@ -1033,7 +1030,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 ); } } @@ -1047,7 +1044,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 */ ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src index 36e15ec13..6fab2c55e 100644 --- a/basctl/source/basicide/basidesh.src +++ b/basctl/source/basicide/basidesh.src @@ -31,6 +31,8 @@ #include <svx/globlmn.hrc> #endif #include "dlgresid.hrc" +#include <sfx2/sfxcommands.h> +#include <svx/svxcommands.h> #define MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }; @@ -423,13 +425,13 @@ Menu RID_POPUP_TABBAR MenuItem { Identifier = SID_BASICIDE_NEWMODULE ; - HelpId = SID_BASICIDE_NEWMODULE ; + HelpId = CMD_SID_BASICIDE_NEWMODULE ; Text [ en-US ] = "BASIC Module" ; }; MenuItem { Identifier = SID_BASICIDE_NEWDIALOG ; - HelpId = SID_BASICIDE_NEWDIALOG ; + HelpId = CMD_SID_BASICIDE_NEWDIALOG ; Text [ en-US ] = "BASIC Dialog" ; }; }; @@ -438,19 +440,19 @@ Menu RID_POPUP_TABBAR MenuItem { Identifier = SID_BASICIDE_DELETECURRENT ; - HelpId = SID_BASICIDE_DELETECURRENT ; + HelpId = CMD_SID_BASICIDE_DELETECURRENT ; Text [ en-US ] = "Delete" ; }; MenuItem { Identifier = SID_BASICIDE_RENAMECURRENT ; - HelpId = SID_BASICIDE_RENAMECURRENT ; + HelpId = CMD_SID_BASICIDE_RENAMECURRENT ; Text [ en-US ] = "Rename" ; }; MenuItem { Identifier = SID_BASICIDE_HIDECURPAGE ; - HelpId = SID_BASICIDE_HIDECURPAGE ; + HelpId = CMD_SID_BASICIDE_HIDECURPAGE ; Text [ en-US ] = "Hide" ; }; MenuItem @@ -460,7 +462,7 @@ Menu RID_POPUP_TABBAR MenuItem { Identifier = SID_BASICIDE_MODULEDLG ; - HelpId = SID_BASICIDE_MODULEDLG ; + HelpId = CMD_SID_BASICIDE_MODULEDLG ; Text [ en-US ] = "Modules..." ; }; }; @@ -474,7 +476,7 @@ Menu RID_POPUP_DLGED MenuItem { Identifier = SID_SHOW_PROPERTYBROWSER ; - HelpId = SID_SHOW_PROPERTYBROWSER ; + HelpId = CMD_SID_SHOW_PROPERTYBROWSER ; Text [ en-US ] = "Properties..."; }; }; diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index e47addbe8..0b37c7b65 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -31,23 +31,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; @@ -57,7 +63,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 ) ); @@ -67,7 +73,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 ); @@ -78,7 +84,7 @@ namespace BasicIDE { //---------------------------------------------------------------------------- -void Organize( INT16 tabId ) +void Organize( sal_Int16 tabId ) { BasicIDEDLL::Init(); @@ -99,21 +105,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); } @@ -192,7 +198,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 @@ -203,7 +209,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 ) { @@ -217,22 +223,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 ); @@ -242,7 +292,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 ) { @@ -252,103 +302,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_FAIL( "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; } //---------------------------------------------------------------------------- @@ -364,9 +406,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() ) @@ -374,8 +416,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() ) @@ -390,9 +432,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 ) ) @@ -404,7 +446,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 5ec78c85b..76f45d5a6 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -100,15 +100,15 @@ 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" ) ); - 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++; } } @@ -198,7 +198,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(); @@ -218,7 +218,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 ) { @@ -238,7 +238,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(); @@ -353,17 +353,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 ) @@ -375,7 +375,7 @@ void BasicStopped( BOOL* pbAppWindowDisabled, BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); if( pIDEShell ) { - USHORT nWait = 0; + sal_uInt16 nWait = 0; while ( pIDEShell->GetViewFrame()->GetWindow().IsWait() ) { pIDEShell->GetViewFrame()->GetWindow().LeaveWait(); @@ -388,9 +388,9 @@ void BasicStopped( BOOL* pbAppWindowDisabled, Window* pDefParent = Application::GetDefDialogParent(); if ( pDefParent && !pDefParent->IsEnabled() ) { - pDefParent->Enable( TRUE ); + pDefParent->Enable( sal_True ); if ( pbAppWindowDisabled ) - *pbAppWindowDisabled = TRUE; + *pbAppWindowDisabled = sal_True; } } @@ -441,7 +441,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() ) @@ -453,7 +453,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 27142b7db..d91de2471 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -192,7 +192,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(); @@ -224,7 +224,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 ); @@ -242,7 +242,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 ) @@ -259,19 +259,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 ) @@ -284,7 +284,7 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con } // create tree list box entry - USHORT nId; + sal_uInt16 nId; if ( ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ) ) nId = bLoaded ? RID_IMG_DLGLIB : RID_IMG_DLGLIBNOTLOADED; else @@ -523,7 +523,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 ) { @@ -620,7 +620,7 @@ SvLBoxEntry* 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 ) { @@ -637,7 +637,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(); @@ -671,9 +671,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 ) ); @@ -688,7 +688,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; } } } @@ -773,7 +773,7 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima if ( sFactoryURL.getLength() ) { - rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), FALSE ); + rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), sal_False ); } else { diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index f2464d656..04b566f34 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -153,7 +153,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 ); @@ -189,10 +189,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 ); @@ -201,7 +201,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, diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 6b23810e4..8567753fe 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -43,14 +43,13 @@ #include <basdoc.hxx> #include <com/sun/star/script/XLibraryContainer.hpp> #include <com/sun/star/script/XLibraryContainerPassword.hpp> +#include <deque> using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -SV_DECL_VARARR( EntryArray, SvLBoxEntry*, 4, 4 ) - -SV_IMPL_VARARR( EntryArray, SvLBoxEntry*); +typedef std::deque< SvLBoxEntry* > EntryArray; void BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry ) @@ -74,7 +73,7 @@ void 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 ) ) { @@ -89,7 +88,7 @@ void 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 ) ) @@ -102,7 +101,7 @@ void 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 ) ) { @@ -188,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: @@ -196,7 +195,7 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry ) case 2: case 1: { - aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 ); + aEntries.push_front( pEntry ); } break; case 0: @@ -210,14 +209,14 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry ) SbxVariable* pVar = 0; bool bDocumentObjects = false; - if ( aEntries.Count() ) + if ( !aEntries.empty() ) { - for ( USHORT n = 0; n < aEntries.Count(); n++ ) + for ( size_t n = 0; n < aEntries.size(); n++ ) { SvLBoxEntry* pLE = aEntries[n]; - DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" ); + DBG_ASSERT( pLE, "Can not find entry in array" ); BasicEntry* pBE = (BasicEntry*)pLE->GetUserData(); - DBG_ASSERT( pBE, "Keine Daten im Eintrag gefunden!" ); + DBG_ASSERT( pBE, "The data in the entry not found!" ); String aName( GetEntryText( pLE ) ); switch ( pBE->GetType() ) @@ -293,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: @@ -301,7 +300,7 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry ) case 2: case 1: { - aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 ); + aEntries.push_front( pEntry ); } break; case 0: @@ -319,9 +318,9 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry ) pEntry = GetParent( pEntry ); } - if ( aEntries.Count() ) + if ( !aEntries.empty() ) { - for ( USHORT n = 0; n < aEntries.Count(); n++ ) + for ( size_t n = 0; n < aEntries.size(); n++ ) { SvLBoxEntry* pLE = aEntries[n]; DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" ); @@ -379,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 ) { @@ -483,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 be4dbc140..be49835fb 100644 --- a/basctl/source/basicide/bastype4.hxx +++ b/basctl/source/basicide/bastype4.hxx @@ -38,9 +38,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 ); @@ -50,17 +50,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 aeb7b38b9..b7562d058 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 { diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 57a55d83c..7b25f3124 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, size_t& 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,7 +58,7 @@ bool lcl_ParseText( String aText, size_t& 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 ) return false; @@ -82,7 +82,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList { FreeResource(); - aComboBox.SetUpdateMode( FALSE ); + aComboBox.SetUpdateMode( sal_False ); for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i ) { BreakPoint* pBrk = m_aModifiedBreakPointList.at( i ); @@ -90,7 +90,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList aEntryStr += String::CreateFromInt32( pBrk->nLine ); aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND ); } - aComboBox.SetUpdateMode( TRUE ); + aComboBox.SetUpdateMode( sal_True ); aOKButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) ); aNewButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) ); @@ -104,7 +104,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 ) ); @@ -160,7 +160,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.at( nEntry ); DBG_ASSERT( pBrk, "Kein passender Breakpoint zur Liste ?" ); UpdateFields( pBrk ); diff --git a/basctl/source/basicide/brkdlg.src b/basctl/source/basicide/brkdlg.src index 654fa9369..3f08bb23f 100644 --- a/basctl/source/basicide/brkdlg.src +++ b/basctl/source/basicide/brkdlg.src @@ -29,7 +29,7 @@ #include <brkdlg.hrc> ModalDialog RID_BASICIDE_BREAKPOINTDLG { - // HelpId = HID_BASICIDE_BRKPNTS ; + HelpId = "basctl:RID_BASICIDE_BREAKPOINTDLG" ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 178 , 116 ) ; @@ -37,6 +37,7 @@ ModalDialog RID_BASICIDE_BREAKPOINTDLG // Closeable = TRUE; ComboBox RID_CB_BRKPOINTS { + HelpID = "basctl:ComboBox:RID_BASICIDE_BREAKPOINTDLG:RID_CB_BRKPOINTS"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 110 , 70 ) ; TabStop = TRUE ; @@ -55,6 +56,7 @@ ModalDialog RID_BASICIDE_BREAKPOINTDLG }; PushButton RID_PB_NEW { + HelpID = "basctl:PushButton:RID_BASICIDE_BREAKPOINTDLG:RID_PB_NEW"; Pos = MAP_APPFONT ( 122 , 57 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -62,6 +64,7 @@ ModalDialog RID_BASICIDE_BREAKPOINTDLG }; PushButton RID_PB_DEL { + HelpID = "basctl:PushButton:RID_BASICIDE_BREAKPOINTDLG:RID_PB_DEL"; Pos = MAP_APPFONT ( 122 , 74 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -69,6 +72,7 @@ ModalDialog RID_BASICIDE_BREAKPOINTDLG }; CheckBox RID_CHKB_ACTIVE { + HelpID = "basctl:CheckBox:RID_BASICIDE_BREAKPOINTDLG:RID_CHKB_ACTIVE"; Pos = MAP_APPFONT ( 6 , 87 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -88,6 +92,7 @@ ModalDialog RID_BASICIDE_BREAKPOINTDLG }; NumericField RID_FLD_PASS { + HelpID = "basctl:NumericField:RID_BASICIDE_BREAKPOINTDLG:RID_FLD_PASS"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 100 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index c0fd6456a..a1d46991d 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -69,7 +69,7 @@ BasicIDEDLL* BasicIDEDLL::GetDLL() return pBasicIDEDLL; } -IDEResId::IDEResId( USHORT nId ): +IDEResId::IDEResId( sal_uInt16 nId ): ResId( nId, *(*(BasicIDEModule**)GetAppData(SHL_IDE))->GetResMgr() ) { } @@ -140,8 +140,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 ) ); @@ -213,20 +213,4 @@ 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; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx index c49d3507e..3ed3ee642 100644 --- a/basctl/source/basicide/iderdll2.hxx +++ b/basctl/source/basicide/iderdll2.hxx @@ -58,11 +58,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 * ); @@ -76,10 +76,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--; } @@ -101,8 +101,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 afc47d502..499de7996 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -146,7 +146,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 ); @@ -856,7 +856,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 ); @@ -886,7 +886,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 ); @@ -914,7 +914,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 ); @@ -934,7 +934,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "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 ); @@ -964,7 +964,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() ) @@ -995,7 +995,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() ) @@ -1089,7 +1089,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 dbd5e4a3c..b2a11d1c9 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -63,7 +63,7 @@ using ::std::pair; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -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(); @@ -121,9 +121,10 @@ MacroChooser::MacroChooser( Window* pParnt, BOOL bCreateEntries ) : aMacroBox.SetSelectHdl( LINK( this, MacroChooser, MacroSelectHdl ) ); aBasicBox.SetMode( BROWSEMODE_MODULES ); - aBasicBox.SetWindowBits( WB_HASLINES | WB_HASLINESATROOT | - WB_HASBUTTONS | WB_HASBUTTONSATROOT | - WB_HSCROLL ); + aBasicBox.SetStyle( WB_TABSTOP | WB_BORDER | + WB_HASLINES | WB_HASLINESATROOT | + WB_HASBUTTONS | WB_HASBUTTONSATROOT | + WB_HSCROLL ); BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL; @@ -187,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 ) { @@ -223,7 +224,7 @@ short 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 ) { @@ -261,7 +262,7 @@ short MacroChooser::Execute() } -void MacroChooser::EnableButton( Button& rButton, BOOL bEnable ) +void MacroChooser::EnableButton( Button& rButton, sal_Bool bEnable ) { if ( bEnable ) { @@ -332,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 @@ -346,7 +347,7 @@ void MacroChooser::DeleteMacro() SvLBoxEntry* pEntry = aMacroBox.FirstSelected(); DBG_ASSERT( pEntry, "DeleteMacro: Entry ?!" ); aMacroBox.GetModel()->Remove( pEntry ); - bForceStoreBasic = TRUE; + bForceStoreBasic = sal_True; } } @@ -428,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() ); @@ -439,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 )); @@ -468,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 ) ); @@ -568,10 +569,10 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox ) aMacros.insert( map< sal_uInt16, SbMethod*>::value_type( nStart, pMethod ) ); } - aMacroBox.SetUpdateMode( FALSE ); + aMacroBox.SetUpdateMode( sal_False ); for ( map< sal_uInt16, SbMethod* >::iterator it = aMacros.begin(); it != aMacros.end(); ++it ) aMacroBox.InsertEntry( (*it).second->GetName() ); - aMacroBox.SetUpdateMode( TRUE ); + aMacroBox.SetUpdateMode( sal_True ); if ( aMacroBox.GetEntryCount() ) { @@ -597,7 +598,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... @@ -621,15 +622,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; } } @@ -638,7 +639,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 ); } } } @@ -675,7 +676,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(); @@ -752,7 +753,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(); @@ -827,7 +828,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 @@ -838,7 +839,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); if ( pIDEShell && pIDEShell->IsAppBasicModified() ) - bForceStoreBasic = TRUE; + bForceStoreBasic = sal_True; aBasicBox.UpdateEntries(); } @@ -857,26 +858,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 287fe837a..3934dca52 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -73,10 +73,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 * ); @@ -88,7 +88,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 ); @@ -96,7 +96,7 @@ private: void RestoreMacroDescription(); public: - MacroChooser( Window* pParent, BOOL bCreateEntries = TRUE ); + MacroChooser( Window* pParent, sal_Bool bCreateEntries = sal_True ); ~MacroChooser(); SbMethod* GetMacro(); @@ -105,8 +105,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/macrodlg.src b/basctl/source/basicide/macrodlg.src index 133449934..5201da429 100644 --- a/basctl/source/basicide/macrodlg.src +++ b/basctl/source/basicide/macrodlg.src @@ -31,7 +31,7 @@ #include <helpid.hrc> ModalDialog RID_MACROCHOOSER { - // HelpId = SID_BASICCHOOSER ; + HelpId = "basctl:ModalDialog:RID_MACROCHOOSER" ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 287 , 165 ) ; @@ -70,6 +70,7 @@ ModalDialog RID_MACROCHOOSER }; Edit RID_ED_MACRONAME { + HelpID = "basctl:Edit:RID_MACROCHOOSER:RID_ED_MACRONAME"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; @@ -97,6 +98,7 @@ ModalDialog RID_MACROCHOOSER }; PushButton RID_PB_RUN { + HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_RUN"; Pos = MAP_APPFONT ( 231 , 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; DefButton = TRUE; @@ -113,6 +115,7 @@ ModalDialog RID_MACROCHOOSER PushButton RID_PB_ASSIGN { + HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_ASSIGN"; Pos = MAP_APPFONT ( 231 , 60 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Assign..." ; @@ -120,6 +123,7 @@ ModalDialog RID_MACROCHOOSER }; PushButton RID_PB_EDIT { + HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_EDIT"; Size = MAP_APPFONT ( 50 , 14 ) ; Pos = MAP_APPFONT ( 231 , 77 ) ; Text [ en-US ] = "~Edit" ; @@ -127,18 +131,21 @@ ModalDialog RID_MACROCHOOSER }; PushButton RID_PB_NEWLIB { + HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_NEWLIB"; Pos = MAP_APPFONT ( 231 , 60 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "New ~Library"; }; PushButton RID_PB_NEWMOD { + HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_NEWMOD"; Size = MAP_APPFONT ( 50 , 14 ) ; Pos = MAP_APPFONT ( 231 , 77 ) ; Text [ en-US ] = "New M~odule"; }; PushButton RID_PB_DEL { + HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_DEL"; Pos = MAP_APPFONT ( 231 , 94 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -146,6 +153,7 @@ ModalDialog RID_MACROCHOOSER }; PushButton RID_PB_ORG { + HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_ORG"; Pos = MAP_APPFONT ( 231 , 114 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Organizer..." ; @@ -158,6 +166,7 @@ ModalDialog RID_MACROCHOOSER }; MultiLineEdit RID_ML_DESCRIPTION { + HelpID = "basctl:MultiLineEdit:RID_MACROCHOOSER:RID_ML_DESCRIPTION"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 131 ) ; Size = MAP_APPFONT ( 216 , 28 ) ; diff --git a/basctl/source/basicide/makefile.mk b/basctl/source/basicide/makefile.mk index 1b1081220..210d0db3d 100644 --- a/basctl/source/basicide/makefile.mk +++ b/basctl/source/basicide/makefile.mk @@ -80,7 +80,7 @@ EXCEPTIONSFILES= \ SLOFILES = $(EXCEPTIONSFILES) SRS1NAME=$(TARGET) -SRC1FILES= basidesh.src macrodlg.src moptions.src moduldlg.src objdlg.src brkdlg.src tbxctl.src basicprint.src +SRC1FILES= basidesh.src macrodlg.src moptions.src moduldlg.src objdlg.src brkdlg.src basicprint.src .INCLUDE : target.mk diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 2751448b3..b963f0bd8 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -124,15 +124,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; @@ -207,7 +207,7 @@ void BasicCheckBox::Init() //---------------------------------------------------------------------------- -void BasicCheckBox::SetMode( USHORT n ) +void BasicCheckBox::SetMode( sal_uInt16 n ) { nMode = n; @@ -219,7 +219,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 ); } @@ -228,8 +228,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?!" ); @@ -241,7 +241,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() ) { @@ -257,11 +257,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; } //---------------------------------------------------------------------------- @@ -273,8 +273,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() ); @@ -285,10 +285,10 @@ void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const //---------------------------------------------------------------------------- -BOOL BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) +sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { if ( nMode != LIBMODE_MANAGER ) - return FALSE; + return sal_False; DBG_ASSERT( pEntry, "Kein Eintrag?" ); @@ -297,7 +297,7 @@ BOOL 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 @@ -308,11 +308,11 @@ BOOL 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 @@ -324,19 +324,19 @@ BOOL BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) bOK = QueryPassword( xModLibContainer1, aLibName, aPassword ); } if ( !bOK ) - return FALSE; + return sal_False; } // TODO: check if library is reference/link - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) +sal_Bool 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 ) ) { @@ -368,12 +368,12 @@ BOOL BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) 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; } } @@ -405,7 +405,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 ) ), @@ -485,9 +485,9 @@ LibPage::LibPage( Window * pParent ) ,aEditButton( this, IDEResId( RID_PB_EDIT ) ) ,aCloseButton( this, IDEResId( RID_PB_CLOSE ) ) ,aPasswordButton( this, IDEResId( RID_PB_PASSWORD ) ) - ,aExportButton( this, IDEResId( RID_PB_EXPORT ) ) ,aNewLibButton( this, IDEResId( RID_PB_NEWLIB ) ) ,aInsertLibButton( this, IDEResId( RID_PB_APPEND ) ) + ,aExportButton( this, IDEResId( RID_PB_EXPORT ) ) ,aDelButton( this, IDEResId( RID_PB_DELETE ) ) ,m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ) ,m_eCurLocation( LIBRARY_LOCATION_UNKNOWN ) @@ -507,8 +507,8 @@ LibPage::LibPage( Window * pParent ) aBasicsBox.SetSelectHdl( LINK( this, LibPage, BasicSelectHdl ) ); aLibBox.SetMode( LIBMODE_MANAGER ); - aLibBox.EnableInplaceEditing( TRUE ); - aLibBox.SetWindowBits( WB_HSCROLL ); + aLibBox.EnableInplaceEditing( sal_True ); + aLibBox.SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP ); aCloseButton.GrabFocus(); long aTabs[] = { 2, 30, 120 }; @@ -525,8 +525,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; @@ -700,19 +700,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 ) ); @@ -897,8 +897,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); } } @@ -906,22 +906,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 ) ) { @@ -958,7 +958,7 @@ void LibPage::InsertLib() } // remove existing libraries - bRemove = TRUE; + bRemove = sal_True; } else { @@ -976,14 +976,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 ) { @@ -1030,7 +1030,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 { @@ -1099,7 +1099,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 { @@ -1135,7 +1135,7 @@ void LibPage::InsertLib() // insert listbox entry ImpInsertLibEntry( aLibName, aLibBox.GetEntryCount() ); - bChanges = TRUE; + bChanges = sal_True; } } @@ -1165,7 +1165,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 ); @@ -1437,14 +1437,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 ) ) @@ -1474,7 +1474,7 @@ void LibPage::DeleteCurrent() //---------------------------------------------------------------------------- -void LibPage::EndTabDialog( USHORT nRet ) +void LibPage::EndTabDialog( sal_uInt16 nRet ) { DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" ); if ( pTabDlg ) @@ -1503,7 +1503,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 ) ); } @@ -1511,7 +1511,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 ) { @@ -1549,10 +1549,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 ) ) @@ -1598,14 +1598,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++; } @@ -1649,7 +1649,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 ); @@ -1672,9 +1672,9 @@ 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; + sal_uInt16 nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB; SvLBoxEntry* pNewLibEntry = pBasicBox->AddEntry( aLibName, Image( IDEResId( nId ) ), diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 2fe2310d3..977c6dea0 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -74,13 +74,13 @@ ExtBasicTreeListBox::~ExtBasicTreeListBox() { } -BOOL ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) +sal_Bool 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 ) ); @@ -92,7 +92,7 @@ BOOL 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; } } } @@ -100,25 +100,25 @@ BOOL ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) return bRet; } -BOOL ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) +sal_Bool 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() ); @@ -127,7 +127,7 @@ BOOL ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewTe : BasicIDE::RenameDialog( this, aDocument, aLibName, aCurText, rNewText ); if ( !bSuccess ) - return FALSE; + return sal_False; BasicIDE::MarkDocumentModified( aDocument ); @@ -145,10 +145,10 @@ BOOL ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewTe 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; } @@ -158,7 +158,7 @@ DragDropMode ExtBasicTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBo if ( pEntry ) { - USHORT nDepth = GetModel()->GetDepth( pEntry ); + sal_uInt16 nDepth = GetModel()->GetDepth( pEntry ); if ( nDepth >= 2 ) { nMode_ = SV_DRAGDROP_CTRL_COPY; @@ -176,7 +176,7 @@ DragDropMode ExtBasicTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBo 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() ) @@ -192,18 +192,18 @@ DragDropMode ExtBasicTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBo } -BOOL ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) +sal_Bool 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 @@ -225,14 +225,14 @@ BOOL 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 @@ -240,17 +240,17 @@ BOOL 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; } } @@ -258,20 +258,20 @@ BOOL ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) } -BOOL ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ) +sal_Bool ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ) { return NotifyCopyingMoving( pTarget, pEntry, - rpNewParent, rNewChildPos, TRUE ); + rpNewParent, rNewChildPos, sal_True ); } -BOOL ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ) +sal_Bool 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 ); } @@ -283,14 +283,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() ) @@ -331,13 +331,13 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >& } -BOOL ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove ) +sal_Bool 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 ) { @@ -477,7 +477,7 @@ BOOL ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry 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 ) @@ -510,7 +510,7 @@ OrganizeDialog::OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescript 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 ) ); }; @@ -526,7 +526,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 ) ) { @@ -561,7 +561,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 ) ), @@ -591,11 +591,12 @@ 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.SetWindowBits( WB_HASLINES | WB_HASLINESATROOT | - WB_HASBUTTONS | WB_HASBUTTONSATROOT | - WB_HSCROLL ); + aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP | + WB_HASLINES | WB_HASLINESATROOT | + WB_HASBUTTONS | WB_HASBUTTONSATROOT | + WB_HSCROLL ); aBasicBox.ScanAllEntries(); aEditButton.GrabFocus(); @@ -625,9 +626,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 ) ) @@ -640,7 +641,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 ); @@ -648,7 +649,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 ) @@ -762,7 +763,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 ) ) @@ -927,7 +928,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 3c80c7edb..cef66b226 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -63,7 +63,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(); } @@ -93,18 +93,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 ); @@ -117,7 +117,7 @@ public: class BasicCheckBox : public SvTabListBox { private: - USHORT nMode; + sal_uInt16 nMode; SvLBoxButtonData* pCheckButton; ScriptDocument m_aDocument; void Init(); @@ -126,20 +126,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 @@ -160,11 +160,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 ); } }; @@ -175,7 +175,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(); @@ -201,7 +201,7 @@ protected: void DeleteCurrent(); void NewModule(); void NewDialog(); - void EndTabDialog( USHORT nRet ); + void EndTabDialog( sal_uInt16 nRet ); TabDialog* pTabDlg; @@ -209,7 +209,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;} @@ -228,9 +228,9 @@ protected: PushButton aEditButton; CancelButton aCloseButton; PushButton aPasswordButton; - PushButton aExportButton; PushButton aNewLibButton; PushButton aInsertLibButton; + PushButton aExportButton; PushButton aDelButton; ScriptDocument m_aCurDocument; @@ -249,11 +249,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/moduldlg.src b/basctl/source/basicide/moduldlg.src index 7e1666c9d..a00f13646 100644 --- a/basctl/source/basicide/moduldlg.src +++ b/basctl/source/basicide/moduldlg.src @@ -62,7 +62,7 @@ TabDialog RID_TD_ORGANIZE }; TabPage RID_TP_MODULS { - // HelpId = HID_BASICIDE_MODULS ; + HelpId = "basctl:TabPage:RID_TP_MODULS" ; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 210 , 140 ) ; @@ -82,6 +82,7 @@ TabPage RID_TP_MODULS }; PushButton RID_PB_EDIT { + HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_EDIT"; Text [ en-US ] = "~Edit"; Pos = MAP_APPFONT ( 144 , 6 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; @@ -97,6 +98,7 @@ TabPage RID_TP_MODULS }; PushButton RID_PB_NEWMOD { + HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_NEWMOD"; Pos = MAP_APPFONT ( 144 , 103 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~New..." ; @@ -104,6 +106,7 @@ TabPage RID_TP_MODULS }; PushButton RID_PB_NEWDLG { + HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_NEWDLG"; Pos = MAP_APPFONT ( 144 , 103 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~New..." ; @@ -111,6 +114,7 @@ TabPage RID_TP_MODULS }; PushButton RID_PB_DELETE { + HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_DELETE"; Pos = MAP_APPFONT ( 144 , 120 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -119,6 +123,7 @@ TabPage RID_TP_MODULS }; TabPage RID_TP_DLGS { + HelpID = "basctl:TabPage:RID_TP_DLGS"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 210 , 140 ) ; @@ -138,6 +143,7 @@ TabPage RID_TP_DLGS }; PushButton RID_PB_EDIT { + HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_EDIT"; Text [ en-US ] = "~Edit"; Pos = MAP_APPFONT ( 144 , 6 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; @@ -153,6 +159,7 @@ TabPage RID_TP_DLGS }; PushButton RID_PB_NEWMOD { + HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_NEWMOD"; Pos = MAP_APPFONT ( 144 , 103 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~New..." ; @@ -160,6 +167,7 @@ TabPage RID_TP_DLGS }; PushButton RID_PB_NEWDLG { + HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_NEWDLG"; Pos = MAP_APPFONT ( 144 , 103 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~New..." ; @@ -167,6 +175,7 @@ TabPage RID_TP_DLGS }; PushButton RID_PB_DELETE { + HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_DELETE"; Pos = MAP_APPFONT ( 144 , 120 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -175,7 +184,7 @@ TabPage RID_TP_DLGS }; TabPage RID_TP_LIBS { - // HelpId = HID_BASICIDE_LIBS_TP ; + HelpId = "basctl:TabPage:RID_TP_LIBS" ; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 210 , 140 ) ; @@ -187,6 +196,7 @@ TabPage RID_TP_LIBS }; ListBox RID_LB_BASICS { + HelpID = "basctl:ListBox:RID_TP_LIBS:RID_LB_BASICS"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 130 , 80 ) ; @@ -210,6 +220,7 @@ TabPage RID_TP_LIBS PushButton RID_PB_EDIT { + HelpID = "basctl:PushButton:RID_TP_LIBS:RID_PB_EDIT"; Text [ en-US ] = "~Edit"; Pos = MAP_APPFONT ( 144 , 6 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; @@ -225,6 +236,7 @@ TabPage RID_TP_LIBS }; PushButton RID_PB_PASSWORD { + HelpID = "basctl:PushButton:RID_TP_LIBS:RID_PB_PASSWORD"; Pos = MAP_APPFONT ( 144 , 43 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Password..." ; @@ -233,6 +245,7 @@ TabPage RID_TP_LIBS PushButton RID_PB_NEWLIB { + HelpID = "basctl:PushButton:RID_TP_LIBS:RID_PB_NEWLIB"; Pos = MAP_APPFONT ( 144 , 69 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~New..." ; @@ -240,12 +253,14 @@ TabPage RID_TP_LIBS }; PushButton RID_PB_APPEND { + HelpID = "basctl:PushButton:RID_TP_LIBS:RID_PB_APPEND"; Pos = MAP_APPFONT ( 144 , 86 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Import..." ; }; PushButton RID_PB_EXPORT { + HelpID = "basctl:PushButton:RID_TP_LIBS:RID_PB_EXPORT"; Pos = MAP_APPFONT ( 144 , 103 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "E~xport..." ; @@ -253,6 +268,7 @@ TabPage RID_TP_LIBS }; PushButton RID_PB_DELETE { + HelpID = "basctl:PushButton:RID_TP_LIBS:RID_PB_DELETE"; Pos = MAP_APPFONT ( 144 , 120 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -261,7 +277,7 @@ TabPage RID_TP_LIBS }; ModalDialog RID_DLG_LIBS { - // HelpId = HID_BASICIDE_LIBS_DLG ; + HelpId = "basctl:ModalDialog:RID_DLG_LIBS" ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 168 , 132 ) ; @@ -301,6 +317,7 @@ ModalDialog RID_DLG_LIBS }; CheckBox RID_CB_REF { + HelpID = "basctl:CheckBox:RID_DLG_LIBS:RID_CB_REF"; Pos = MAP_APPFONT ( 12 , 100 ) ; Size = MAP_APPFONT ( 146 , 10 ) ; TabStop = TRUE ; @@ -308,6 +325,7 @@ ModalDialog RID_DLG_LIBS }; CheckBox RID_CB_REPL { + HelpID = "basctl:CheckBox:RID_DLG_LIBS:RID_CB_REPL"; Pos = MAP_APPFONT ( 12 , 113 ) ; Size = MAP_APPFONT ( 146 , 10 ) ; Text [ en-US ] = "Replace existing libraries" ; @@ -315,6 +333,7 @@ ModalDialog RID_DLG_LIBS }; ModalDialog RID_DLG_NEWLIB { + HelpID = "basctl:ModalDialog:RID_DLG_NEWLIB"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 160 , 55 ) ; @@ -341,6 +360,7 @@ ModalDialog RID_DLG_NEWLIB }; Edit RID_ED_LIBNAME { + HelpID = "basctl:Edit:RID_DLG_NEWLIB:RID_ED_LIBNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 19 ) ; Size = MAP_APPFONT ( 92 , 12 ) ; @@ -350,6 +370,7 @@ ModalDialog RID_DLG_NEWLIB ModalDialog RID_DLG_EXPORT { + HelpID = "basctl:ModalDialog:RID_DLG_EXPORT"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 115 , 55 ) ; @@ -372,6 +393,7 @@ ModalDialog RID_DLG_EXPORT RadioButton RB_EXPORTASPACKAGE { + HelpID = "basctl:RadioButton:RID_DLG_EXPORT:RB_EXPORTASPACKAGE"; Pos = MAP_APPFONT( 6, 6 ); Size = MAP_APPFONT( 103, 10 ); Group = TRUE; @@ -380,6 +402,7 @@ ModalDialog RID_DLG_EXPORT }; RadioButton RB_EXPORTASBASIC { + HelpID = "basctl:RadioButton:RID_DLG_EXPORT:RB_EXPORTASBASIC"; Pos = MAP_APPFONT( 6, 19 ); Size = MAP_APPFONT( 103, 10 ); //Group = TRUE; diff --git a/basctl/source/basicide/moptions.src b/basctl/source/basicide/moptions.src index 32cb236a0..e300d4f73 100644 --- a/basctl/source/basicide/moptions.src +++ b/basctl/source/basicide/moptions.src @@ -29,7 +29,7 @@ #include <moptions.hrc> ModalDialog RID_MACROOPTIONS { - // HelpId = HID_MACRO_OPTIONS ; + HelpId = "basctl:ModalDialog:RID_MACROOPTIONS" ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 224 , 121 ) ; @@ -70,6 +70,7 @@ ModalDialog RID_MACROOPTIONS }; MultiLineEdit RID_ME_DESCR { + HelpID = "basctl:MultiLineEdit:RID_MACROOPTIONS:RID_ME_DESCR"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 6 , 32 ) ; @@ -93,6 +94,7 @@ ModalDialog RID_MACROOPTIONS }; NumericField RID_NF_HELPID { + HelpID = "basctl:NumericField:RID_MACROOPTIONS:RID_NF_HELPID"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 95 , 83 ) ; @@ -110,6 +112,7 @@ ModalDialog RID_MACROOPTIONS }; Edit RID_ED_HELPNAME { + HelpID = "basctl:Edit:RID_MACROOPTIONS:RID_ED_HELPNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 95 , 99 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index 099c1c332..39aa894fc 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -97,13 +97,16 @@ ObjectCatalog::ObjectCatalog( Window * pParent ) aToolBox.SetSizePixel( aToolBox.CalcWindowSizePixel() ); aToolBox.SetSelectHdl( LINK( this, ObjectCatalog, ToolBoxHdl ) ); - aMacroTreeList.SetWindowBits( WB_HASLINES | WB_HASLINESATROOT | - WB_HASBUTTONS | WB_HASBUTTONSATROOT | - WB_HSCROLL ); + aMacroTreeList.SetStyle( WB_BORDER | WB_TABSTOP | + WB_HASLINES | WB_HASLINESATROOT | + WB_HASBUTTONS | WB_HASBUTTONSATROOT | + WB_HSCROLL ); aMacroTreeList.SetSelectHdl( LINK( this, ObjectCatalog, TreeListHighlightHdl ) ); - + aMacroTreeList.SetAccessibleName(String(IDEResId(RID_STR_TLB_MACROS))); aMacroTreeList.ScanAllEntries(); + aMacroTreeList.GrabFocus(); + CheckButtons(); Point aPos = IDE_DLL()->GetExtraData()->GetObjectCatalogPos(); @@ -140,10 +143,10 @@ void ObjectCatalog::Move() IDE_DLL()->GetExtraData()->SetObjectCatalogPos( GetPosPixel() ); } -BOOL ObjectCatalog::Close() +sal_Bool ObjectCatalog::Close() { aCancelHdl.Call( this ); - return TRUE; + return sal_True; } void ObjectCatalog::Resize() @@ -178,7 +181,7 @@ void ObjectCatalog::Resize() IMPL_LINK( ObjectCatalog, ToolBoxHdl, ToolBox*, pToolBox ) { - USHORT nCurItem = pToolBox->GetCurItemId(); + sal_uInt16 nCurItem = pToolBox->GetCurItemId(); switch ( nCurItem ) { case TBITEM_SHOW: @@ -225,9 +228,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.hrc b/basctl/source/basicide/objdlg.hrc index fa4937a9f..4ecc73f8e 100644 --- a/basctl/source/basicide/objdlg.hrc +++ b/basctl/source/basicide/objdlg.hrc @@ -36,4 +36,6 @@ #define TBITEM_SHOW 1 +#define RID_STR_TLB_MACROS ( RID_BASICIDE_START + 71 ) + #endif // _OBJDLG_HXX diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx index 567fb7ec1..343d89083 100644 --- a/basctl/source/basicide/objdlg.hxx +++ b/basctl/source/basicide/objdlg.hxx @@ -78,7 +78,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/objdlg.src b/basctl/source/basicide/objdlg.src index 167d813b4..45cc031cc 100644 --- a/basctl/source/basicide/objdlg.src +++ b/basctl/source/basicide/objdlg.src @@ -32,6 +32,7 @@ FloatingWindow RID_BASICIDE_OBJCAT { + HelpID = "basctl:FloatingWindow:RID_BASICIDE_OBJCAT"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 191 , 179 ) ; @@ -82,3 +83,9 @@ FloatingWindow RID_BASICIDE_OBJCAT Size = MAP_APPFONT ( 185 , 18 ) ; }; }; + +String RID_STR_TLB_MACROS +{ + Text [ en-US ] = "Objects Tree"; +}; + diff --git a/basctl/source/basicide/register.cxx b/basctl/source/basicide/register.cxx index 212db9f23..c1ee36965 100644 --- a/basctl/source/basicide/register.cxx +++ b/basctl/source/basicide/register.cxx @@ -54,28 +54,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( } SAL_DLLPUBLIC_EXPORT -sal_Bool SAL_CALL component_writeInfo( void* pServiceManager , - void* pRegistryKey ) -{ - (void)pServiceManager; - - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - xNewKey = xKey->createKey( aDelimiter + SIDEModel::getImplementationName_Static() + aUnoServices ); - Sequence< OUString > aServices = SIDEModel::getSupportedServiceNames_Static(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - -SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 5bb34af6a..6018eea4f 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -566,7 +566,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 ); @@ -590,7 +590,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 ); } @@ -611,7 +611,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 ); @@ -635,7 +635,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 ) ); @@ -699,7 +699,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; @@ -762,7 +762,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(); @@ -1324,14 +1324,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 4dba82d71..a2a0c03c1 100644 --- a/basctl/source/basicide/tbxctl.cxx +++ b/basctl/source/basicide/tbxctl.cxx @@ -56,7 +56,7 @@ SFX_IMPL_TOOLBOX_CONTROL( TbxControls, SfxAllEnumItem ) |* \************************************************************************/ -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; @@ -77,7 +77,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 ) @@ -85,8 +85,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; @@ -132,7 +132,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 ); diff --git a/basctl/source/basicide/tbxctl.hxx b/basctl/source/basicide/tbxctl.hxx index a18ed1b61..92115d652 100644 --- a/basctl/source/basicide/tbxctl.hxx +++ b/basctl/source/basicide/tbxctl.hxx @@ -44,22 +44,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/tbxctl.src b/basctl/source/basicide/tbxctl.src deleted file mode 100644 index 72186812c..000000000 --- a/basctl/source/basicide/tbxctl.src +++ /dev/null @@ -1,263 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "svx/svxids.hrc" -#include "tbxctl.hrc" -#include "helpid.hrc" -FloatingWindow RID_TBXCONTROLS -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpId = HID_BASICIDE_CONTROLS ; - Text [ en-US ] = "Controls" ; - String RID_TOOLBOX - { - Text [ en-US ] = "Controls" ; - }; -}; -ToolBox RID_TOOLBOX -{ - SVLook = TRUE ; - // HelpId = HID_BASICIDE_CONTROLS ; - LineCount = 2 ; - ItemList = - { - ToolBoxItem - { - HelpId = SID_INSERT_PUSHBUTTON ; - Identifier = SID_INSERT_PUSHBUTTON ; - RadioCheck = TRUE ; - Text [ en-US ] = "Button" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_CHECKBOX ; - Identifier = SID_INSERT_CHECKBOX ; - RadioCheck = TRUE ; - Text [ en-US ] = "Check Box" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_FIXEDTEXT ; - Identifier = SID_INSERT_FIXEDTEXT ; - RadioCheck = TRUE ; - Text [ en-US ] = "Label field" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_LISTBOX ; - Identifier = SID_INSERT_LISTBOX ; - RadioCheck = TRUE ; - Text [ en-US ] = "List Box" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_HSCROLLBAR ; - Identifier = SID_INSERT_HSCROLLBAR ; - RadioCheck = TRUE ; - Text [ en-US ] = "Horizontal Scroll Bar" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_GROUPBOX ; - Identifier = SID_INSERT_GROUPBOX ; - RadioCheck = TRUE ; - Text [ en-US ] = "Group Box" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_HFIXEDLINE ; - Identifier = SID_INSERT_HFIXEDLINE ; - RadioCheck = TRUE ; - Text [ en-US ] = "Horizontal Line" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_DATEFIELD ; - Identifier = SID_INSERT_DATEFIELD ; - RadioCheck = TRUE ; - Text [ en-US ] = "Date Field"; - }; - ToolBoxItem - { - HelpId = SID_INSERT_NUMERICFIELD ; - Identifier = SID_INSERT_NUMERICFIELD ; - RadioCheck = TRUE ; - Text [ en-US ] = "Numeric Field"; - }; - ToolBoxItem - { - HelpId = SID_INSERT_FORMATTEDFIELD ; - Identifier = SID_INSERT_FORMATTEDFIELD ; - RadioCheck = TRUE ; - Text [ en-US ] = "Formatted Field"; - }; - ToolBoxItem - { - HelpId = SID_INSERT_FILECONTROL ; - Identifier = SID_INSERT_FILECONTROL ; - RadioCheck = TRUE ; - Text [ en-US ] = "File Selection"; - }; - ToolBoxItem - { - HelpId = SID_INSERT_TREECONTROL ; - Identifier = SID_INSERT_TREECONTROL ; - RadioCheck = TRUE ; - Text [ en-US ] = "Tree Control"; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - HelpId = SID_SHOW_PROPERTYBROWSER ; - Identifier = SID_SHOW_PROPERTYBROWSER ; - Text [ en-US ] = "Properties" ; - }; - ToolBoxItem { Type = TOOLBOXITEM_BREAK ; }; - ToolBoxItem - { - HelpId = SID_INSERT_IMAGECONTROL ; - Identifier = SID_INSERT_IMAGECONTROL ; - RadioCheck = TRUE ; - Text [ en-US ] = "Image Control" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_RADIOBUTTON ; - Identifier = SID_INSERT_RADIOBUTTON ; - RadioCheck = TRUE ; - Text [ en-US ] = "Option Button" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_EDIT ; - Identifier = SID_INSERT_EDIT ; - RadioCheck = TRUE ; - Text [ en-US ] = "Text Box" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_COMBOBOX ; - Identifier = SID_INSERT_COMBOBOX ; - RadioCheck = TRUE ; - Text [ en-US ] = "Combo Box" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_VSCROLLBAR ; - Identifier = SID_INSERT_VSCROLLBAR ; - RadioCheck = TRUE ; - Text [ en-US ] = "Vertical Scroll Bar" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_PROGRESSBAR ; - Identifier = SID_INSERT_PROGRESSBAR ; - RadioCheck = TRUE ; - Text [ en-US ] = "Progress Bar" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_VFIXEDLINE ; - Identifier = SID_INSERT_VFIXEDLINE ; - RadioCheck = TRUE ; - Text [ en-US ] = "Vertical Line" ; - }; - ToolBoxItem - { - HelpId = SID_INSERT_TIMEFIELD ; - Identifier = SID_INSERT_TIMEFIELD ; - RadioCheck = TRUE ; - Text [ en-US ] = "Time Field"; - }; - ToolBoxItem - { - HelpId = SID_INSERT_CURRENCYFIELD ; - Identifier = SID_INSERT_CURRENCYFIELD ; - RadioCheck = TRUE ; - Text [ en-US ] = "Currency Field"; - }; - ToolBoxItem - { - HelpId = SID_INSERT_PATTERNFIELD ; - Identifier = SID_INSERT_PATTERNFIELD ; - RadioCheck = TRUE ; - Text [ en-US ] = "Pattern Field"; - }; - ToolBoxItem - { - HelpId = SID_INSERT_SELECT ; - Identifier = SID_INSERT_SELECT ; - RadioCheck = TRUE ; - Text [ en-US ] = "Select" ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - HelpId = SID_DIALOG_TESTMODE ; - Identifier = SID_DIALOG_TESTMODE ; - Text [ en-US ] = "Activate Test Mode" ; - }; - }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/basctl/source/basicide/unomodel.hxx b/basctl/source/basicide/unomodel.hxx index 73ca3b035..45333df93 100644 --- a/basctl/source/basicide/unomodel.hxx +++ b/basctl/source/basicide/unomodel.hxx @@ -51,7 +51,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 3fcc35b90..b56bb1b2e 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -166,29 +166,29 @@ 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; } @@ -209,12 +209,12 @@ DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star:: ,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) ,m_xDocument( xModel ) { @@ -281,17 +281,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 ); } @@ -318,8 +318,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 ); @@ -444,9 +444,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 ) @@ -454,13 +454,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 ); } @@ -492,7 +492,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; @@ -505,7 +505,7 @@ void DlgEditor::MouseMove( const MouseEvent& rMEvt ) } -BOOL DlgEditor::KeyInput( const KeyEvent& rKEvt ) +sal_Bool DlgEditor::KeyInput( const KeyEvent& rKEvt ) { return pFunc->KeyInput( rKEvt ); } @@ -530,7 +530,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); @@ -573,14 +573,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); @@ -656,9 +656,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 ) @@ -668,7 +668,7 @@ void DlgEditor::SetMode( DlgEdMode eNewMode ) } -void DlgEditor::SetInsertObj( USHORT eObj ) +void DlgEditor::SetInsertObj( sal_uInt16 eObj ) { eActObj = eObj; @@ -677,7 +677,7 @@ void DlgEditor::SetInsertObj( USHORT eObj ) } -USHORT DlgEditor::GetInsertObj() const +sal_uInt16 DlgEditor::GetInsertObj() const { return eActObj; } @@ -762,8 +762,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); @@ -1059,7 +1059,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 @@ -1071,7 +1071,7 @@ void DlgEditor::Paste() pDlgEdView->MarkListHasChanged(); // dialog model changed - SetDialogModelChanged(TRUE); + SetDialogModelChanged(sal_True); } } } @@ -1085,9 +1085,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); @@ -1128,16 +1128,16 @@ void DlgEditor::Delete() pDlgEdView->BrkAction(); - BOOL bDlgMarked = UnmarkDialog(); + sal_Bool bDlgMarked = UnmarkDialog(); pDlgEdView->DeleteMarked(); if( bDlgMarked ) RemarkDialog(); } -BOOL DlgEditor::IsPasteAllowed() +sal_Bool DlgEditor::IsPasteAllowed() { - BOOL bPaste = FALSE; + sal_Bool bPaste = sal_False; // get clipboard Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow()->GetClipboard(); @@ -1151,7 +1151,7 @@ BOOL DlgEditor::IsPasteAllowed() { if ( xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ) ) { - bPaste = TRUE; + bPaste = sal_True; } } } @@ -1175,7 +1175,7 @@ void DlgEditor::UpdatePropertyBrowserDelayed() } -BOOL DlgEditor::IsModified() const +sal_Bool DlgEditor::IsModified() const { return pDlgEdModel->IsChanged() || bDialogModelChanged; } @@ -1183,8 +1183,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 07b02db64..ad9e38e81 100644 --- a/basctl/source/dlged/dlgedfunc.cxx +++ b/basctl/source/dlged/dlgedfunc.cxx @@ -111,37 +111,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 ) { @@ -150,7 +150,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->IsAction() ) { pView->BrkAction(); - bReturn = TRUE; + bReturn = sal_True; } else if ( pView->AreObjectsMarked() ) { @@ -161,7 +161,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) else pView->UnmarkAll(); - bReturn = TRUE; + bReturn = sal_True; } } break; @@ -180,7 +180,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->AreObjectsMarked() ) pView->MakeVisible( pView->GetAllMarkedRect(), *pWindow ); - bReturn = TRUE; + bReturn = sal_True; } else if ( aCode.IsMod1() ) { @@ -197,7 +197,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) pView->MakeVisible( aVisRect, *pWindow ); } - bReturn = TRUE; + bReturn = sal_True; } } break; @@ -304,13 +304,13 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->IsDragObj() ) { bool 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(); @@ -346,7 +346,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) } } - bReturn = TRUE; + bReturn = sal_True; } break; default: @@ -366,30 +366,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(); @@ -414,12 +414,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 ); @@ -436,34 +436,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() ) { @@ -473,14 +473,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) { } @@ -492,15 +492,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 ) @@ -540,7 +540,7 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) { // select object pView->BegMarkObj(aMDPos); - bMarkAction = TRUE; + bMarkAction = sal_True; } } } @@ -551,12 +551,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 ); @@ -566,7 +566,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() ) { @@ -583,24 +583,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() ) { @@ -613,7 +613,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 6dd16bcf9..d1607fc7d 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -577,7 +577,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 ) @@ -1026,7 +1026,7 @@ void DlgEdObj::NbcMove( const Size& rSize ) StartListening(); // dialog model changed - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); } //---------------------------------------------------------------------------- @@ -1045,7 +1045,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); } //---------------------------------------------------------------------------- @@ -1144,7 +1144,7 @@ void DlgEdObj::SetDefaults() } // dialog model changed - pDlgEdForm->GetDlgEditor()->SetDialogModelChanged( TRUE ); + pDlgEdForm->GetDlgEditor()->SetDialogModelChanged( sal_True ); } } @@ -1251,7 +1251,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 || @@ -1301,11 +1301,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); } } } @@ -1319,11 +1319,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); } } } @@ -1337,11 +1337,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); } } } @@ -1599,12 +1599,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); @@ -1797,7 +1797,7 @@ void DlgEdForm::NbcMove( const Size& rSize ) } // dialog model changed - GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEditor()->SetDialogModelChanged(sal_True); } //---------------------------------------------------------------------------- @@ -1821,7 +1821,7 @@ void DlgEdForm::NbcResize(const Point& rRef, const Fraction& xFract, const Fract } // dialog model changed - GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEditor()->SetDialogModelChanged(sal_True); } //---------------------------------------------------------------------------- @@ -1837,7 +1837,7 @@ bool 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 a327bac76..3bacb0eb2 100644 --- a/basctl/source/dlged/dlgedpage.cxx +++ b/basctl/source/dlged/dlgedpage.cxx @@ -69,7 +69,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 335974554..eed522548 100644 --- a/basctl/source/dlged/dlgedview.cxx +++ b/basctl/source/dlged/dlgedview.cxx @@ -148,7 +148,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); @@ -197,7 +197,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 f39ebb0cc..f5548632b 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -82,8 +82,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; @@ -141,7 +141,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(); } @@ -184,7 +184,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] ); @@ -195,7 +195,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 ) ); } } @@ -205,7 +205,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) ); @@ -240,13 +240,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; @@ -267,7 +267,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 ) { @@ -286,7 +286,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 ); @@ -341,18 +341,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( @@ -397,7 +397,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 ) { @@ -407,13 +407,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/dlged/managelang.src b/basctl/source/dlged/managelang.src index 6b54abcb1..822502ff9 100644 --- a/basctl/source/dlged/managelang.src +++ b/basctl/source/dlged/managelang.src @@ -45,6 +45,7 @@ ModalDialog RID_DLG_MANAGE_LANGUAGE }; ListBox LB_LANGUAGE { + HelpID = "basctl:ListBox:RID_DLG_MANAGE_LANGUAGE:LB_LANGUAGE"; Pos = MAP_APPFONT ( MANAGE_COL1 , MANAGE_ROW2 ) ; Size = MAP_APPFONT ( MANAGE_LB_WIDTH , MANAGE_LB_HEIGHT ) ; Border = TRUE; @@ -52,6 +53,7 @@ ModalDialog RID_DLG_MANAGE_LANGUAGE }; PushButton PB_ADD_LANG { + HelpID = "basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_ADD_LANG"; Pos = MAP_APPFONT ( MANAGE_COL3 , MANAGE_ROW2 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; TabStop = TRUE ; @@ -59,6 +61,7 @@ ModalDialog RID_DLG_MANAGE_LANGUAGE }; PushButton PB_DEL_LANG { + HelpID = "basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_DEL_LANG"; Pos = MAP_APPFONT ( MANAGE_COL3 , MANAGE_ROW3 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; TabStop = TRUE ; @@ -66,6 +69,7 @@ ModalDialog RID_DLG_MANAGE_LANGUAGE }; PushButton PB_MAKE_DEFAULT { + HelpID = "basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_MAKE_DEFAULT"; Pos = MAP_APPFONT ( MANAGE_COL3 , MANAGE_ROW4 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; TabStop = TRUE ; @@ -135,6 +139,7 @@ ModalDialog RID_DLG_SETDEF_LANGUAGE }; ListBox LB_DEF_LANGUAGE { + HelpID = "basctl:ListBox:RID_DLG_SETDEF_LANGUAGE:LB_DEF_LANGUAGE"; Pos = MAP_APPFONT ( SETDEF_COL1 , SETDEF_ROW2 ) ; Size = MAP_APPFONT ( SETDEF_LB_WIDTH , SETDEF_LB_HEIGHT ) ; Border = TRUE; diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index cbfee7069..2add8fd32 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -70,7 +70,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(); @@ -86,22 +86,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 6f20a10b9..6f032e0c4 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -45,7 +45,7 @@ //---------------------------------------------------------------------------- -const ULONG BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001; +const sal_uLong BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001; //---------------------------------------------------------------------------- @@ -79,13 +79,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; @@ -95,10 +95,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; @@ -109,13 +109,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 ); @@ -131,25 +131,25 @@ 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( bool bOn = true ); @@ -192,15 +192,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 ); @@ -215,13 +216,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 3640d2140..50381d017 100644 --- a/basctl/source/inc/basobj.hxx +++ b/basctl/source/inc/basobj.hxx @@ -50,7 +50,7 @@ struct BasicIDE_Impl; namespace BasicIDE { - void Organize( INT16 tabId ); + void Organize( sal_Int16 tabId ); // Hilfsmethoden fuer den allg. Gebrauch: @@ -60,10 +60,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 ); @@ -94,13 +94,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 f9871446b..4dc9638e2 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -70,14 +70,14 @@ sal_Int32 searchEOL( const ::rtl::OUString& rStr, sal_Int32 fromIndex ); struct BasicStatus { - BOOL bIsRunning : 1; - BOOL bError : 1; - BOOL bIsInReschedule : 1; - USHORT nBasicFlags; + 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 @@ -96,10 +96,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: @@ -141,7 +141,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); } @@ -169,9 +169,13 @@ public: #define BASWIN_INRESCHEDULE 0x08 class Printer; -class SfxUndoManager; class BasicEntryDescriptor; +namespace svl +{ + class IUndoManager; +} + class IDEBaseWindow : public Window { private: @@ -179,7 +183,7 @@ private: ScrollBar* pShellVScrollBar; DECL_LINK( ScrollHdl, ScrollBar * ); - BYTE nStatus; + sal_uInt8 nStatus; ScriptDocument m_aDocument; String m_aLibName; @@ -207,7 +211,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; @@ -218,30 +222,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; } @@ -279,10 +284,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 ); @@ -292,7 +297,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 @@ -322,16 +327,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 e4afea267..ea76d105e 100644 --- a/basctl/source/inc/dlged.hxx +++ b/basctl/source/inc/dlged.hxx @@ -119,15 +119,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; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument; @@ -171,33 +171,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 c207d363d..31ca5b109 100644 --- a/basctl/source/inc/dlgeddef.hxx +++ b/basctl/source/inc/dlgeddef.hxx @@ -32,36 +32,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 d5915663b..f75901b18 100644 --- a/basctl/source/inc/dlgedfunc.hxx +++ b/basctl/source/inc/dlgedfunc.hxx @@ -53,10 +53,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 ); }; //============================================================================ @@ -69,9 +69,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 ); }; //============================================================================ @@ -81,15 +81,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/dlgedpage.hxx b/basctl/source/inc/dlgedpage.hxx index ab321ef1b..41ccab2f4 100644 --- a/basctl/source/inc/dlgedpage.hxx +++ b/basctl/source/inc/dlgedpage.hxx @@ -56,7 +56,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 5fedf6d4b..24bf0681d 100644 --- a/basctl/source/inc/dlgedview.hxx +++ b/basctl/source/inc/dlgedview.hxx @@ -55,7 +55,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 03324e9f2..5746360bd 100644 --- a/basctl/source/inc/iderid.hxx +++ b/basctl/source/inc/iderid.hxx @@ -34,7 +34,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 2578e1d2c..4a09f4db4 100644 --- a/basctl/source/inc/sbxitem.hxx +++ b/basctl/source/inc/sbxitem.hxx @@ -31,12 +31,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 @@ -45,12 +45,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; @@ -69,8 +69,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/basctl.component b/basctl/util/basctl.component new file mode 100644 index 000000000..f101deaf2 --- /dev/null +++ b/basctl/util/basctl.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.basic.BasicIDE"> + <service name="com.sun.star.script.BasicIDE"/> + </implementation> +</component> diff --git a/basctl/util/basctl.map b/basctl/util/basctl.map index 80359606c..83193fe17 100755 --- a/basctl/util/basctl.map +++ b/basctl/util/basctl.map @@ -4,7 +4,6 @@ UDK_3_0_0 { basicide_macro_organizer; basicide_handle_basic_error; component_getImplementationEnvironment; - component_writeInfo; component_getFactory; local: *; diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk index 47de65cc5..1719a7c9c 100644 --- a/basctl/util/makefile.mk +++ b/basctl/util/makefile.mk @@ -54,6 +54,7 @@ SHL1STDLIBS= \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFX2LIB) \ + $(FWELIB) \ $(BASICLIB) \ $(SVTOOLLIB) \ $(TKLIB) \ @@ -91,8 +92,6 @@ SRSFILELIST=\ $(SRS)$/basicide.srs \ $(SRS)$/dlged.srs -SRSFILELIST+= $(SOLARCOMMONRESDIR)$/sfx.srs - RESLIB1NAME=basctl RESLIB1IMAGES =$(PRJ)$/res RESLIB1SRSFILES= $(SRSFILELIST) @@ -103,3 +102,11 @@ RESLIB1SRSFILES= $(SRSFILELIST) .ENDIF # "$(header)" == "" + +ALLTAR : $(MISC)/basctl.component + +$(MISC)/basctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + basctl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt basctl.component |