diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-07-29 10:56:19 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-07-29 10:56:19 +0800 |
commit | d210c6ccc30466e98240c1409df0550514668d68 (patch) | |
tree | 0c94d52ecaebd283a92275cb372d5ddf926f5131 /svl/source/notify | |
parent | 7f0993d43019a0ccb7f89c11fc23704c063b902f (diff) |
#i112600#: clean up l10ntools, rsc, sot, svl, tools and unotools
Diffstat (limited to 'svl/source/notify')
-rw-r--r-- | svl/source/notify/brdcst.cxx | 28 | ||||
-rw-r--r-- | svl/source/notify/broadcast.cxx | 8 | ||||
-rw-r--r-- | svl/source/notify/cancel.cxx | 16 | ||||
-rw-r--r-- | svl/source/notify/listener.cxx | 14 | ||||
-rw-r--r-- | svl/source/notify/lstner.cxx | 20 | ||||
-rw-r--r-- | svl/source/notify/smplhint.cxx | 2 |
6 files changed, 44 insertions, 44 deletions
diff --git a/svl/source/notify/brdcst.cxx b/svl/source/notify/brdcst.cxx index 29983ecedc17..ad7da10ed4f4 100644 --- a/svl/source/notify/brdcst.cxx +++ b/svl/source/notify/brdcst.cxx @@ -59,7 +59,7 @@ void SfxBroadcaster::Broadcast( const SfxHint &rHint ) if ( aListeners.Count() /*! || aGlobListeners.Count() */ ) { // notify all registered listeners exactly once - for ( USHORT n = 0; n < aListeners.Count(); ++n ) + for ( sal_uInt16 n = 0; n < aListeners.Count(); ++n ) { SfxListener* pListener = aListeners[n]; if ( pListener ) @@ -98,7 +98,7 @@ SfxBroadcaster::~SfxBroadcaster() Broadcast( SfxSimpleHint(SFX_HINT_DYING) ); // remove all still registered listeners - for ( USHORT nPos = 0; nPos < aListeners.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < aListeners.Count(); ++nPos ) { SfxListener *pListener = aListeners[nPos]; if ( pListener ) @@ -124,7 +124,7 @@ SfxBroadcaster::SfxBroadcaster( const SfxBroadcaster &rBC ) { DBG_CTOR(SfxBroadcaster, 0); - for ( USHORT n = 0; n < rBC.aListeners.Count(); ++n ) + for ( sal_uInt16 n = 0; n < rBC.aListeners.Count(); ++n ) { SfxListener *pListener = rBC.aListeners[n]; if ( pListener ) @@ -136,12 +136,12 @@ SfxBroadcaster::SfxBroadcaster( const SfxBroadcaster &rBC ) // add a new SfxListener to the list -BOOL SfxBroadcaster::AddListener( SfxListener& rListener ) +sal_Bool SfxBroadcaster::AddListener( SfxListener& rListener ) { DBG_CHKTHIS(SfxBroadcaster, 0); const SfxListener *pListener = &rListener; const SfxListener *pNull = 0; - USHORT nFreePos = aListeners.GetPos( pNull ); + sal_uInt16 nFreePos = aListeners.GetPos( pNull ); if ( nFreePos < aListeners.Count() ) aListeners.GetData()[nFreePos] = pListener; else if ( aListeners.Count() < (USHRT_MAX-1) ) @@ -149,12 +149,12 @@ BOOL SfxBroadcaster::AddListener( SfxListener& rListener ) else { DBG_ERROR( "array overflow" ); - return FALSE; + return sal_False; } DBG_ASSERT( USHRT_MAX != aListeners.GetPos(pListener), "AddListener failed" ); - return TRUE; + return sal_True; } //-------------------------------------------------------------------- @@ -172,8 +172,8 @@ void SfxBroadcaster::ListenersGone() void SfxBroadcaster::Forward(SfxBroadcaster& rBC, const SfxHint& rHint) { - const USHORT nCount = aListeners.Count(); - for ( USHORT i = 0; i < nCount; ++i ) + const sal_uInt16 nCount = aListeners.Count(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { SfxListener *pListener = aListeners[i]; if ( pListener ) @@ -189,7 +189,7 @@ void SfxBroadcaster::RemoveListener( SfxListener& rListener ) { {DBG_CHKTHIS(SfxBroadcaster, 0);} const SfxListener *pListener = &rListener; - USHORT nPos = aListeners.GetPos(pListener); + sal_uInt16 nPos = aListeners.GetPos(pListener); DBG_ASSERT( nPos != USHRT_MAX, "RemoveListener: Listener unknown" ); aListeners.GetData()[nPos] = 0; if ( !HasListeners() ) @@ -198,12 +198,12 @@ void SfxBroadcaster::RemoveListener( SfxListener& rListener ) //-------------------------------------------------------------------- -BOOL SfxBroadcaster::HasListeners() const +sal_Bool SfxBroadcaster::HasListeners() const { - for ( USHORT n = 0; n < aListeners.Count(); ++n ) + for ( sal_uInt16 n = 0; n < aListeners.Count(); ++n ) if ( aListeners.GetObject(n) != 0 ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } //-------------------------------------------------------------------- diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx index 0179ceaebc34..b09288cc83e4 100644 --- a/svl/source/notify/broadcast.cxx +++ b/svl/source/notify/broadcast.cxx @@ -93,7 +93,7 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint ) if( HasListeners() /* && !IsModifyLocked()*/ ) { // LockModify(); -// bInModify = TRUE; +// bInModify = sal_True; SvtListenerIter aIter( *this ); SvtListener* pLast = aIter.GoStart(); @@ -104,7 +104,7 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint ) break; } while( 0 != ( pLast = aIter.GoNext() )); -// bInModify = FALSE; +// bInModify = sal_False; // UnlockModify(); } } @@ -128,7 +128,7 @@ void SvtBroadcaster::Forward( SvtBroadcaster& rBC, const SfxHint& rHint ) if( rBC.HasListeners() /* && !IsModifyLocked()*/ ) { // LockModify(); -// bInModify = TRUE; +// bInModify = sal_True; SvtListenerIter aIter( rBC ); SvtListener* pLast = aIter.GoStart(); @@ -139,7 +139,7 @@ void SvtBroadcaster::Forward( SvtBroadcaster& rBC, const SfxHint& rHint ) break; } while( 0 != ( pLast = aIter.GoNext() )); -// bInModify = FALSE; +// bInModify = sal_False; // UnlockModify(); } } diff --git a/svl/source/notify/cancel.cxx b/svl/source/notify/cancel.cxx index ffa5c87a26be..2ae43bfaf1ae 100644 --- a/svl/source/notify/cancel.cxx +++ b/svl/source/notify/cancel.cxx @@ -51,17 +51,17 @@ SfxCancelManager::SfxCancelManager( SfxCancelManager *pParent ) SfxCancelManager::~SfxCancelManager() { DBG_ASSERT( _pParent || !_aJobs.Count(), "deleting SfxCancelManager in use" ); - for ( USHORT n = _aJobs.Count(); n--; ) + for ( sal_uInt16 n = _aJobs.Count(); n--; ) _aJobs.GetObject(n)->SetManager( _pParent ); } //------------------------------------------------------------------------- -BOOL SfxCancelManager::CanCancel() const +sal_Bool SfxCancelManager::CanCancel() const /* [Beschreibung] - Liefert TRUE wenn an diesem CancelManager oder an einem Parent + Liefert sal_True wenn an diesem CancelManager oder an einem Parent ein Job l"auft. */ @@ -72,7 +72,7 @@ BOOL SfxCancelManager::CanCancel() const //------------------------------------------------------------------------- -void SfxCancelManager::Cancel( BOOL bDeep ) +void SfxCancelManager::Cancel( sal_Bool bDeep ) /* [Beschreibung] @@ -83,7 +83,7 @@ void SfxCancelManager::Cancel( BOOL bDeep ) { ::vos::OGuard aGuard( lclMutex::get() ); SfxCancelManagerWeak xWeak( this ); - for ( USHORT n = _aJobs.Count(); n-- && xWeak.Is(); ) + for ( sal_uInt16 n = _aJobs.Count(); n-- && xWeak.Is(); ) if ( n < _aJobs.Count() ) _aJobs.GetObject(n)->Cancel(); if ( xWeak.Is() && _pParent ) @@ -133,7 +133,7 @@ void SfxCancelManager::RemoveCancellable( SfxCancellable *pJob ) { ::vos::OClearableGuard aGuard( lclMutex::get() ); const SfxCancellable *pTmp = pJob; - USHORT nPos = _aJobs.GetPos( pTmp ); + sal_uInt16 nPos = _aJobs.GetPos( pTmp ); if ( nPos != 0xFFFF ) { _aJobs.Remove( nPos , 1 ); @@ -172,7 +172,7 @@ void SfxCancellable::Cancel() delete this; } #else - _bCancelled = TRUE; + _bCancelled = sal_True; #endif } @@ -192,7 +192,7 @@ void SfxCancellable::SetManager( SfxCancelManager *pMgr ) TYPEINIT1(SfxCancelHint, SfxHint); -SfxCancelHint::SfxCancelHint( SfxCancellable* pJob, USHORT _nAction ) +SfxCancelHint::SfxCancelHint( SfxCancellable* pJob, sal_uInt16 _nAction ) { pCancellable = pJob; nAction = _nAction; diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx index 0269894bff81..7ee0f290ff31 100644 --- a/svl/source/notify/listener.cxx +++ b/svl/source/notify/listener.cxx @@ -77,7 +77,7 @@ SvtListener::~SvtListener() // registeres at a specific SvtBroadcaster -BOOL SvtListener::StartListening( SvtBroadcaster& rBroadcaster ) +sal_Bool SvtListener::StartListening( SvtBroadcaster& rBroadcaster ) { const SvtListenerBase* pLst = pBrdCastLst; while( pLst ) @@ -85,19 +85,19 @@ BOOL SvtListener::StartListening( SvtBroadcaster& rBroadcaster ) if( &rBroadcaster == pLst->GetBroadcaster() ) { // double, than return - return FALSE; + return sal_False; } pLst = pLst->GetNext(); } new SvtListenerBase( *this, rBroadcaster ); - return TRUE; + return sal_True; } //-------------------------------------------------------------------- // unregisteres at a specific SvtBroadcaster -BOOL SvtListener::EndListening( SvtBroadcaster& rBroadcaster ) +sal_Bool SvtListener::EndListening( SvtBroadcaster& rBroadcaster ) { SvtListenerBase *pLst = pBrdCastLst, *pPrev = pLst; while( pLst ) @@ -110,12 +110,12 @@ BOOL SvtListener::EndListening( SvtBroadcaster& rBroadcaster ) pPrev->SetNext( pLst->GetNext() ); delete pLst; - return TRUE; + return sal_True; } pPrev = pLst; pLst = pLst->GetNext(); } - return FALSE; + return sal_False; } //-------------------------------------------------------------------- @@ -137,7 +137,7 @@ void SvtListener::EndListeningAll() //-------------------------------------------------------------------- -BOOL SvtListener::IsListening( SvtBroadcaster& rBroadcaster ) const +sal_Bool SvtListener::IsListening( SvtBroadcaster& rBroadcaster ) const { const SvtListenerBase *pLst = pBrdCastLst; while( pLst ) diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx index 3f003e6dde8f..36c6b665dd6d 100644 --- a/svl/source/notify/lstner.cxx +++ b/svl/source/notify/lstner.cxx @@ -61,7 +61,7 @@ SfxListener::SfxListener( const SfxListener &rListener ) { DBG_CTOR(SfxListener, 0); - for ( USHORT n = 0; n < rListener.aBCs.Count(); ++n ) + for ( sal_uInt16 n = 0; n < rListener.aBCs.Count(); ++n ) StartListening( *rListener.aBCs[n] ); } //-------------------------------------------------------------------- @@ -73,7 +73,7 @@ SfxListener::~SfxListener() DBG_DTOR(SfxListener, 0); // unregister at all remainding broadcasters - for ( USHORT nPos = 0; nPos < aBCs.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < aBCs.Count(); ++nPos ) { SfxBroadcaster *pBC = aBCs[nPos]; pBC->RemoveListener(*this); @@ -96,7 +96,7 @@ void SfxListener::RemoveBroadcaster_Impl( SfxBroadcaster& rBC ) // registeres at a specific SfxBroadcaster -BOOL SfxListener::StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDups ) +sal_Bool SfxListener::StartListening( SfxBroadcaster& rBroadcaster, sal_Bool bPreventDups ) { DBG_CHKTHIS(SfxListener, 0); @@ -108,23 +108,23 @@ BOOL SfxListener::StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDup aBCs.Insert( pBC, aBCs.Count() ); DBG_ASSERT( IsListening(rBroadcaster), "StartListening failed" ); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } //-------------------------------------------------------------------- // unregisteres at a specific SfxBroadcaster -BOOL SfxListener::EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups ) +sal_Bool SfxListener::EndListening( SfxBroadcaster& rBroadcaster, sal_Bool bAllDups ) { DBG_CHKTHIS(SfxListener, 0); if ( !IsListening( rBroadcaster ) ) - return FALSE; + return sal_False; do { @@ -133,14 +133,14 @@ BOOL SfxListener::EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups ) aBCs.Remove( aBCs.GetPos(pBC), 1 ); } while ( bAllDups && IsListening( rBroadcaster ) ); - return TRUE; + return sal_True; } //-------------------------------------------------------------------- // unregisteres at a specific SfxBroadcaster by index -void SfxListener::EndListening( USHORT nNo ) +void SfxListener::EndListening( sal_uInt16 nNo ) { DBG_CHKTHIS(SfxListener, 0); @@ -168,7 +168,7 @@ void SfxListener::EndListeningAll() //-------------------------------------------------------------------- -BOOL SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const +sal_Bool SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const { const SfxBroadcaster *pBC = &rBroadcaster; return USHRT_MAX != aBCs.GetPos( pBC ); diff --git a/svl/source/notify/smplhint.cxx b/svl/source/notify/smplhint.cxx index 98eecb91cfe2..3a750f2f9a44 100644 --- a/svl/source/notify/smplhint.cxx +++ b/svl/source/notify/smplhint.cxx @@ -39,7 +39,7 @@ TYPEINIT1(SfxSimpleHint, SfxHint); //==================================================================== // creates a SimpleHint with the type nId -SfxSimpleHint::SfxSimpleHint( ULONG nIdP ) +SfxSimpleHint::SfxSimpleHint( sal_uIntPtr nIdP ) { nId = nIdP; } |