diff options
Diffstat (limited to 'basctl/source/basicide/basicbox.cxx')
-rw-r--r-- | basctl/source/basicide/basicbox.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index fa7954172134..0ff56f208cad 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star::uno; SFX_IMPL_TOOLBOX_CONTROL( LibBoxControl, SfxStringItem ); -LibBoxControl::LibBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +LibBoxControl::LibBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { } @@ -69,7 +69,7 @@ LibBoxControl::~LibBoxControl() -void LibBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState ) +void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { BasicLibBox* pBox = (BasicLibBox*) GetToolBox().GetItemWindow( GetId() ); @@ -165,12 +165,12 @@ BasicLibBox::BasicLibBox( Window* pParent, const uno::Reference< frame::XFrame > m_xFrame( rFrame ) { FillBox(); - bIgnoreSelect = TRUE; // Select von 0 noch nicht weiterleiten - bFillBox = TRUE; + bIgnoreSelect = sal_True; // Select von 0 noch nicht weiterleiten + bFillBox = sal_True; SelectEntryPos( 0 ); aCurText = GetEntry( 0 ); SetSizePixel( Size( 250, 200 ) ); - bIgnoreSelect = FALSE; + bIgnoreSelect = sal_False; } @@ -214,8 +214,8 @@ void __EXPORT BasicLibBox::ReleaseFocus() void BasicLibBox::FillBox() { - SetUpdateMode( FALSE ); - bIgnoreSelect = TRUE; + SetUpdateMode( sal_False ); + bIgnoreSelect = sal_True; aCurText = GetSelectEntry(); @@ -223,7 +223,7 @@ void BasicLibBox::FillBox() ClearBox(); // create list box entries - USHORT nPos = InsertEntry( String( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND ); + sal_uInt16 nPos = InsertEntry( String( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND ); SetEntryData( nPos, new BasicLibEntry( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_UNKNOWN, String() ) ); InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_USER ); InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_SHARE ); @@ -237,7 +237,7 @@ void BasicLibBox::FillBox() InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT ); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); SelectEntry( aCurText ); if ( !GetSelectEntryCount() ) @@ -245,7 +245,7 @@ void BasicLibBox::FillBox() SelectEntryPos( GetEntryCount() ); // gibst es nicht => leer? aCurText = GetSelectEntry(); } - bIgnoreSelect = FALSE; + bIgnoreSelect = sal_False; } void BasicLibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLocation ) @@ -262,7 +262,7 @@ void BasicLibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocatio { String aName( rDocument.getTitle( eLocation ) ); String aEntryText( CreateMgrAndLibStr( aName, aLibName ) ); - USHORT nPos = InsertEntry( aEntryText, LISTBOX_APPEND ); + sal_uInt16 nPos = InsertEntry( aEntryText, LISTBOX_APPEND ); SetEntryData( nPos, new BasicLibEntry( rDocument, eLocation, aLibName ) ); } } @@ -274,7 +274,7 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt ) if( rNEvt.GetType() == EVENT_KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); - USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode(); + sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); switch( nKeyCode ) { case KEY_RETURN: @@ -298,15 +298,15 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt ) if ( bFillBox ) { FillBox(); - bFillBox = FALSE; + bFillBox = sal_False; } } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - if ( !HasChildPathFocus( TRUE ) ) + if ( !HasChildPathFocus( sal_True ) ) { - bIgnoreSelect = TRUE; - bFillBox = TRUE; + bIgnoreSelect = sal_True; + bFillBox = sal_True; } } @@ -326,7 +326,7 @@ void __EXPORT BasicLibBox::Select() void BasicLibBox::NotifyIDE() { - USHORT nSelPos = GetSelectEntryPos(); + sal_uInt16 nSelPos = GetSelectEntryPos(); BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( nSelPos ); if ( pEntry ) { @@ -348,8 +348,8 @@ void BasicLibBox::NotifyIDE() void BasicLibBox::ClearBox() { - USHORT nCount = GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( i ); delete pEntry; @@ -361,7 +361,7 @@ void BasicLibBox::ClearBox() SFX_IMPL_TOOLBOX_CONTROL( LanguageBoxControl, SfxStringItem ); -LanguageBoxControl::LanguageBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +LanguageBoxControl::LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { } @@ -370,7 +370,7 @@ LanguageBoxControl::~LanguageBoxControl() { } -void LanguageBoxControl::StateChanged( USHORT _nID, SfxItemState _eState, const SfxPoolItem* _pItem ) +void LanguageBoxControl::StateChanged( sal_uInt16 _nID, SfxItemState _eState, const SfxPoolItem* _pItem ) { (void)_nID; @@ -420,7 +420,7 @@ BasicLanguageBox::~BasicLanguageBox() void BasicLanguageBox::FillBox() { - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); m_bIgnoreSelect = true; m_sCurrentText = GetSelectEntry(); ClearBox(); @@ -434,8 +434,8 @@ void BasicLanguageBox::FillBox() Locale aCurrentLocale = pCurMgr->getStringResourceManager()->getCurrentLocale(); Sequence< Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales(); const Locale* pLocale = aLocaleSeq.getConstArray(); - INT32 i, nCount = aLocaleSeq.getLength(); - USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND; + sal_Int32 i, nCount = aLocaleSeq.getLength(); + sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND; for ( i = 0; i < nCount; ++i ) { bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] ); @@ -447,7 +447,7 @@ void BasicLanguageBox::FillBox() sLanguage += ' '; sLanguage += m_sDefaultLanguageStr; } - USHORT nPos = InsertEntry( sLanguage ); + sal_uInt16 nPos = InsertEntry( sLanguage ); SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) ); if ( bIsCurrent ) @@ -467,14 +467,14 @@ void BasicLanguageBox::FillBox() Disable(); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); m_bIgnoreSelect = false; } void BasicLanguageBox::ClearBox() { - USHORT nCount = GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { LanguageEntry* pEntry = (LanguageEntry*)GetEntryData(i); delete pEntry; @@ -502,7 +502,7 @@ long BasicLanguageBox::PreNotify( NotifyEvent& rNEvt ) long nDone = 0; if( rNEvt.GetType() == EVENT_KEYINPUT ) { - USHORT nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); + sal_uInt16 nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch( nKeyCode ) { case KEY_RETURN: |