diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-14 22:22:46 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-14 22:22:46 +0100 |
commit | 0115de354333f0607c1db021447b4393772684db (patch) | |
tree | aca4d2949846bc3bf380245b0c1ce61f92517a2b /sfx2/source/control | |
parent | 7ce87234ca470fe1dc6668ff221300c703b535d8 (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
dba34c: pulled and merged DEV300.m100
Diffstat (limited to 'sfx2/source/control')
-rw-r--r-- | sfx2/source/control/bindings.cxx | 52 | ||||
-rw-r--r-- | sfx2/source/control/ctrlitem.cxx | 24 | ||||
-rwxr-xr-x | sfx2/source/control/dispatch.cxx | 58 | ||||
-rw-r--r-- | sfx2/source/control/macro.cxx | 46 | ||||
-rw-r--r-- | sfx2/source/control/minfitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/msg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/msgpool.cxx | 48 | ||||
-rw-r--r-- | sfx2/source/control/objface.cxx | 110 | ||||
-rw-r--r-- | sfx2/source/control/querystatus.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/request.cxx | 134 | ||||
-rw-r--r-- | sfx2/source/control/sfxstatuslistener.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/control/shell.cxx | 132 | ||||
-rw-r--r-- | sfx2/source/control/sorgitm.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/statcach.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 16 |
15 files changed, 330 insertions, 330 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index cf04de2cb3a4..d8e4258e60d4 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -91,7 +91,7 @@ DBG_NAME(SfxBindingsInvalidateAll) //==================================================================== -static USHORT nTimeOut = 300; +static sal_uInt16 nTimeOut = 300; #define TIMEOUT_FIRST nTimeOut #define TIMEOUT_UPDATING 20 @@ -100,7 +100,7 @@ static USHORT nTimeOut = 300; static sal_uInt32 nCache1 = 0; static sal_uInt32 nCache2 = 0; -typedef std::hash_map< USHORT, bool > InvalidateSlotMap; +typedef std::hash_map< sal_uInt16, bool > InvalidateSlotMap; //==================================================================== @@ -399,7 +399,7 @@ void SfxBindings::Update_Impl { if( pCache->GetDispatch().is() && pCache->GetItemLink() ) { - pCache->SetCachedState(TRUE); + pCache->SetCachedState(sal_True); if ( !pCache->GetInternalController() ) return; } @@ -467,7 +467,7 @@ void SfxBindings::InvalidateSlotsInMap_Impl() //-------------------------------------------------------------------- -void SfxBindings::AddSlotToInvalidateSlotsMap_Impl( USHORT nId ) +void SfxBindings::AddSlotToInvalidateSlotsMap_Impl( sal_uInt16 nId ) { pImp->m_aInvalidateSlots[nId] = sal_True; } @@ -504,10 +504,10 @@ void SfxBindings::Update if (pCache) { - BOOL bInternalUpdate = TRUE; + sal_Bool bInternalUpdate = sal_True; if( pCache->GetDispatch().is() && pCache->GetItemLink() ) { - pCache->SetCachedState(TRUE); + pCache->SetCachedState(sal_True); bInternalUpdate = ( pCache->GetInternalController() != 0 ); } @@ -1027,16 +1027,16 @@ sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt ) //-------------------------------------------------------------------- void SfxBindings::RegisterInternal_Impl( SfxControllerItem& rItem ) { - Register_Impl( rItem, TRUE ); + Register_Impl( rItem, sal_True ); } void SfxBindings::Register( SfxControllerItem& rItem ) { - Register_Impl( rItem, FALSE ); + Register_Impl( rItem, sal_False ); } -void SfxBindings::Register_Impl( SfxControllerItem& rItem, BOOL bInternal ) +void SfxBindings::Register_Impl( SfxControllerItem& rItem, sal_Bool bInternal ) { DBG_MEMTEST(); DBG_ASSERT( nRegLevel > 0, "registration without EnterRegistrations" ); @@ -1150,14 +1150,14 @@ sal_Bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_ return ( pRet != 0 ); } -void SfxBindings::ExecuteGlobal_Impl( USHORT nId ) +void SfxBindings::ExecuteGlobal_Impl( sal_uInt16 nId ) { if( nId && pDispatcher ) - Execute_Impl( nId, NULL, 0, SFX_CALLMODE_ASYNCHRON, NULL, TRUE ); + Execute_Impl( nId, NULL, 0, SFX_CALLMODE_ASYNCHRON, NULL, sal_True ); } const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode, - const SfxPoolItem **ppInternalArgs, BOOL bGlobalOnly ) + const SfxPoolItem **ppInternalArgs, sal_Bool bGlobalOnly ) { SfxStateCache *pCache = GetStateCache( nId ); if ( !pCache ) @@ -1377,10 +1377,10 @@ void SfxBindings::UpdateSlotServer_Impl() ( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY ); //if ( xFrame.is() ) // xFrame->contextChanged(); - pImp->bContextChanged = FALSE; + pImp->bContextChanged = sal_False; } else - pImp->bContextChanged = TRUE; + pImp->bContextChanged = sal_True; } const sal_uInt16 nCount = pImp->pCaches->Count(); @@ -1466,7 +1466,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl pRealSlot->GetSlotId(), pRealSlot->GetWhich(rPool), pRealSlot, pCache ); rFound.Insert( pFound ); - USHORT nSlot = pRealSlot->GetSlotId(); + sal_uInt16 nSlot = pRealSlot->GetSlotId(); if ( !(nSlot >= SID_VERB_START && nSlot <= SID_VERB_END) ) { pInterface = pInterface->GetRealInterfaceForSlot( pRealSlot ); @@ -1496,10 +1496,10 @@ SfxItemSet* SfxBindings::CreateSet_Impl } // Mu\s der Slot "uberhaupt upgedatet werden ? - FASTBOOL bInsert = pSiblingCache && pSiblingCache->IsControllerDirty(); + bool bInsert = pSiblingCache && pSiblingCache->IsControllerDirty(); // Bugfix #26161#: Es reicht nicht, nach der selben Shell zu fragen !! - FASTBOOL bSameMethod = pSiblingCache && pFnc == pSiblingFnc; + bool bSameMethod = pSiblingCache && pFnc == pSiblingFnc; // Wenn der Slot ein nicht-dirty MasterSlot ist, dann ist vielleicht // einer seiner Slaves dirty ? Dann wird der Masterslot doch eingef"ugt. @@ -1543,7 +1543,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl // aus den Ranges ein Set erzeugen sal_uInt16 *pRanges = new sal_uInt16[rFound.Count() * 2 + 1]; int j = 0; - USHORT i = 0; + sal_uInt16 i = 0; while ( i < rFound.Count() ) { pRanges[j++] = rFound[i]->nWhichId; @@ -1729,7 +1729,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer ) pImp->aTimer.SetTimeout(TIMEOUT_UPDATING); // at least 10 loops and further if more jobs are available but no input - FASTBOOL bPreEmptive = pTimer && !pSfxApp->Get_Impl()->nInReschedule; + bool bPreEmptive = pTimer && !pSfxApp->Get_Impl()->nInReschedule; sal_uInt16 nLoops = 10; pImp->bInNextJob = sal_True; const sal_uInt16 nCount = pImp->pCaches->Count(); @@ -1913,7 +1913,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int { if ( pImp->bContextChanged ) { - pImp->bContextChanged = FALSE; + pImp->bContextChanged = sal_False; /* ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame ( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY ); @@ -2125,12 +2125,12 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) if ( !pDisp ) { - BOOL bDeleteCache = FALSE; + sal_Bool bDeleteCache = sal_False; if ( !pCache ) { pCache = new SfxStateCache( nSlot ); pCache->GetSlotServer( *GetDispatcher_Impl(), pImp->xProv ); - bDeleteCache = TRUE; + bDeleteCache = sal_True; } SfxItemState eState = SFX_ITEM_SET; @@ -2346,7 +2346,7 @@ SystemWindow* SfxBindings::GetSystemWindow() const return pTop->GetFrame().GetTopWindow_Impl(); } -BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand ) +sal_Bool SfxBindings::ExecuteCommand_Impl( const String& rCommand ) { ::com::sun::star::util::URL aURL; aURL.Complete = rCommand; @@ -2375,10 +2375,10 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand ) ::comphelper::UiEventsLogger::logDispatch(aURL, source); } new SfxAsyncExec_Impl( aURL, xDisp ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxBindings::GetRecorder() const @@ -2395,7 +2395,7 @@ void SfxBindings::ContextChanged_Impl() { if ( !pImp->bInUpdate && ( !pImp->bContextChanged || !pImp->bAllMsgDirty ) ) { - InvalidateAll( TRUE ); + InvalidateAll( sal_True ); } } diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index 9376b81fa0ff..e90b680ffa13 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -45,7 +45,7 @@ DBG_NAME(SfxControllerItem); //-------------------------------------------------------------------- #ifdef DBG_UTIL -void SfxControllerItem::CheckConfigure_Impl( ULONG nType ) +void SfxControllerItem::CheckConfigure_Impl( sal_uIntPtr nType ) { // echter Slot? (also kein Separator etc.) if ( !nId ) @@ -77,9 +77,9 @@ SfxControllerItem* SfxControllerItem::GetItemLink() //-------------------------------------------------------------------- -// returns TRUE if this binding is really bound to a function +// returns sal_True if this binding is really bound to a function -BOOL SfxControllerItem::IsBound() const +sal_Bool SfxControllerItem::IsBound() const { DBG_MEMTEST(); DBG_CHKTHIS(SfxControllerItem, 0); @@ -90,13 +90,13 @@ BOOL SfxControllerItem::IsBound() const // returns the associated function-id or 0 if none -// USHORT SfxControllerItem::GetId() const; +// sal_uInt16 SfxControllerItem::GetId() const; //==================================================================== // registeres with the id at the bindings -void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx ) +void SfxControllerItem::Bind( sal_uInt16 nNewId, SfxBindings *pBindinx ) { DBG_MEMTEST(); DBG_CHKTHIS(SfxControllerItem, 0); @@ -115,7 +115,7 @@ void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx ) pBindings->Register(*this); } -void SfxControllerItem::BindInternal_Impl( USHORT nNewId, SfxBindings *pBindinx ) +void SfxControllerItem::BindInternal_Impl( sal_uInt16 nNewId, SfxBindings *pBindinx ) { DBG_MEMTEST(); DBG_CHKTHIS(SfxControllerItem, 0); @@ -261,7 +261,7 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLin // changes the id of unbound functions (e.g. for sub-menu-ids) -void SfxControllerItem::SetId( USHORT nItemId ) +void SfxControllerItem::SetId( sal_uInt16 nItemId ) { DBG_MEMTEST(); DBG_CHKTHIS(SfxControllerItem, 0); @@ -286,7 +286,7 @@ SfxControllerItem::SfxControllerItem(): // creates a representation of the function nId and registeres it -SfxControllerItem::SfxControllerItem( USHORT nID, SfxBindings &rBindings ): +SfxControllerItem::SfxControllerItem( sal_uInt16 nID, SfxBindings &rBindings ): nId(nID), pNext(this), pBindings(&rBindings) @@ -312,7 +312,7 @@ SfxControllerItem::~SfxControllerItem() void SfxControllerItem::StateChanged ( - USHORT , // <SID> des ausl"osenden Slot + sal_uInt16 , // <SID> des ausl"osenden Slot SfxItemState , // <SfxItemState> von 'pState' const SfxPoolItem* // Slot-Status, ggf. 0 oder IsInvalidItem() ) @@ -352,7 +352,7 @@ void SfxControllerItem::DeleteFloatingWindow() void SfxStatusForwarder::StateChanged ( - USHORT nSID, // <SID> des ausl"osenden Slot + sal_uInt16 nSID, // <SID> des ausl"osenden Slot SfxItemState eState, // <SfxItemState> von 'pState' const SfxPoolItem* pState // Slot-Status, ggf. 0 oder IsInvalidItem() ) @@ -364,7 +364,7 @@ void SfxStatusForwarder::StateChanged //-------------------------------------------------------------------- SfxStatusForwarder::SfxStatusForwarder( - USHORT nSlotId, + sal_uInt16 nSlotId, SfxControllerItem& rMaster ): SfxControllerItem( nSlotId, rMaster.GetBindings() ), pMaster( &rMaster ) @@ -448,7 +448,7 @@ SfxMapUnit SfxControllerItem::GetCoreMetric() const { SfxShell *pSh = pDispat->GetShell( pServer->GetShellLevel() ); SfxItemPool &rPool = pSh->GetPool(); - USHORT nWhich = rPool.GetWhich( nId ); + sal_uInt16 nWhich = rPool.GetWhich( nId ); return rPool.GetMetric( nWhich ); } } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index ddf3422744cb..9b403e3ddab4 100755 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -796,11 +796,11 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ ) SfxBindings *pBind = GetBindings(); while ( pBind ) { - pBind->HidePopupCtrls_Impl( FALSE ); + pBind->HidePopupCtrls_Impl( sal_False ); pBind = pBind->GetSubBindings_Impl(); } - pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( FALSE, FALSE, 1 ); + pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( sal_False, sal_False, 1 ); } if ( pImp->aToDoStack.Count() ) @@ -882,7 +882,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) for ( sal_uInt16 i = 0; i < pImp->aStack.Count(); ++i ) pImp->aStack.Top(i)->DoDeactivate_Impl(pImp->pFrame, bMDI); - BOOL bHidePopups = bMDI && pImp->pFrame; + sal_Bool bHidePopups = bMDI && pImp->pFrame; if ( pNew && pImp->pFrame ) { com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xOldFrame( @@ -892,7 +892,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) GetFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY ); if ( xOldFrame == xMyFrame ) - bHidePopups = FALSE; + bHidePopups = sal_False; } if ( bHidePopups ) @@ -901,11 +901,11 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) SfxBindings *pBind = GetBindings(); while ( pBind ) { - pBind->HidePopupCtrls_Impl( TRUE ); + pBind->HidePopupCtrls_Impl( sal_True ); pBind = pBind->GetSubBindings_Impl(); } - pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( TRUE, FALSE, 1 ); + pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( sal_True, sal_False, 1 ); } Flush(); @@ -1036,7 +1036,7 @@ void SfxDispatcher::_Execute if ( &rShell == pDispat->pImp->aStack.Top(n) ) { if ( eCallMode & SFX_CALLMODE_RECORD ) - rReq.AllowRecording( TRUE ); + rReq.AllowRecording( sal_True ); pDispat->pImp->xPoster->Post(new SfxRequest(rReq)); // pDispat->pImp->xPoster->Post(new Executer(new SfxRequest(rReq), &rSlot, n )); return; @@ -1283,11 +1283,11 @@ const SfxPoolItem* SfxDispatcher::Execute( const SfxExecuteItem& rItem ) //-------------------------------------------------------------------- const SfxPoolItem* SfxDispatcher::Execute( - USHORT nSlot, + sal_uInt16 nSlot, SfxCallMode nCall, SfxItemSet* pArgs, SfxItemSet* pInternalArgs, - USHORT nModi) + sal_uInt16 nModi) { if ( IsLocked(nSlot) ) return 0; @@ -1408,9 +1408,9 @@ const SfxPoolItem* SfxDispatcher::Execute //-------------------------------------------------------------------- const SfxPoolItem* SfxDispatcher::Execute ( - USHORT nSlot, + sal_uInt16 nSlot, SfxCallMode eCall, - USHORT nModi, + sal_uInt16 nModi, const SfxItemSet &rArgs ) { @@ -1797,10 +1797,10 @@ void SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bo // check for toolboxes that are exclusively for a viewer if ( pImp->pFrame) { - BOOL bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER ); + sal_Bool bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER ); SfxObjectShell* pSh = pImp->pFrame->GetObjectShell(); SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_VIEWONLY, sal_False ); - BOOL bIsViewer = pItem && pItem->GetValue(); + sal_Bool bIsViewer = pItem && pItem->GetValue(); if ( bIsViewer != bViewerTbx ) continue; } @@ -1980,7 +1980,7 @@ void SfxDispatcher::FlushImpl() { // tats"aechlich poppen SfxShell* pPopped = 0; - FASTBOOL bFound = sal_False; + bool bFound = sal_False; do { DBG_ASSERT( pImp->aStack.Count(), "popping from empty stack" ); @@ -2343,12 +2343,12 @@ sal_Bool SfxDispatcher::_FindServer if ( pSlot ) { // Slot geh"ort zum Container? - FASTBOOL bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER); - FASTBOOL bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); + bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER); + bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); // Shell geh"ort zum Server? // AppDispatcher oder IPFrame-Dispatcher - FASTBOOL bIsServerShell = !pImp->pFrame || bIsInPlace; + bool bIsServerShell = !pImp->pFrame || bIsInPlace; // Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf // einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen. @@ -2360,7 +2360,7 @@ sal_Bool SfxDispatcher::_FindServer // Shell geh"ort zum Container? // AppDispatcher oder kein IPFrameDispatcher - FASTBOOL bIsContainerShell = !pImp->pFrame || !bIsInPlace; + bool bIsContainerShell = !pImp->pFrame || !bIsInPlace; // Shell und Slot passen zusammen if ( !( ( bIsContainerSlot && bIsContainerShell ) || ( !bIsContainerSlot && bIsServerShell ) ) ) @@ -2458,12 +2458,12 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot ) if ( pSlot ) { // Slot geh"ort zum Container? - FASTBOOL bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER); - FASTBOOL bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); + bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER); + bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); // Shell geh"ort zum Server? // AppDispatcher oder IPFrame-Dispatcher - FASTBOOL bIsServerShell = !pImp->pFrame || bIsInPlace; + bool bIsServerShell = !pImp->pFrame || bIsInPlace; // Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf // einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen. @@ -2475,7 +2475,7 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot ) // Shell geh"ort zum Container? // AppDispatcher oder kein IPFrameDispatcher - FASTBOOL bIsContainerShell = !pImp->pFrame || !bIsInPlace; + bool bIsContainerShell = !pImp->pFrame || !bIsInPlace; // Shell und Slot passen zusammen if ( !( ( bIsContainerSlot && bIsContainerShell ) || @@ -2529,7 +2529,7 @@ sal_Bool SfxDispatcher::_FillState { DBG_ASSERT(bFlushed, "Dispatcher not flushed after retrieving slot servers!"); if ( !bFlushed ) - return FALSE; + return sal_False; // Flush(); // Objekt ermitteln und Message an diesem Objekt aufrufen @@ -2748,8 +2748,8 @@ void SfxDispatcher::Lock( sal_Bool bLock ) pImp->bLocked = bLock; if ( !bLock ) { - USHORT nCount = pImp->aReqArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = pImp->aReqArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) pImp->xPoster->Post( pImp->aReqArr[i] ); pImp->aReqArr.Remove( 0, nCount ); } @@ -2903,7 +2903,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp return SFX_ITEM_DISABLED; } -SfxItemState SfxDispatcher::QueryState( USHORT nSID, ::com::sun::star::uno::Any& rAny ) +SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno::Any& rAny ) { SfxShell *pShell = 0; const SfxSlot *pSlot = 0; @@ -2919,12 +2919,12 @@ SfxItemState SfxDispatcher::QueryState( USHORT nSID, ::com::sun::star::uno::Any& ::com::sun::star::uno::Any aState; if ( !pItem->ISA(SfxVoidItem) ) { - USHORT nSubId( 0 ); + sal_uInt16 nSubId( 0 ); SfxItemPool& rPool = pShell->GetPool(); - USHORT nWhich = rPool.GetWhich( nSID ); + sal_uInt16 nWhich = rPool.GetWhich( nSID ); if ( rPool.GetMetric( nWhich ) == SFX_MAPUNIT_TWIP ) nSubId |= CONVERT_TWIPS; - pItem->QueryValue( aState, (BYTE)nSubId ); + pItem->QueryValue( aState, (sal_uInt8)nSubId ); } rAny = aState; diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx index 04a820d8e0ac..87879656021e 100644 --- a/sfx2/source/control/macro.cxx +++ b/sfx2/source/control/macro.cxx @@ -62,9 +62,9 @@ SfxMacroStatement::SfxMacroStatement ( const SfxShell& /*rShell*/, // <SfxShell>, die den Request ausf"uhrte const String& /*rTarget*/, // Name des Zielobjektes vor der Ausf"urhung - BOOL /*bAbsolute*/, // obsolet + sal_Bool /*bAbsolute*/, // obsolet const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann - BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt + sal_Bool bRequestDone, // wurde der Request tats"achlich ausgef"uhrt ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs ) @@ -91,7 +91,7 @@ SfxMacroStatement::SfxMacroStatement die Selektion auch deskriptiv z.B. als 'CellSelection("A5-D8")') angesprochen werden, dazu mu\ jedoch vom Anwendungsprogrammierer der Konstruktor <SfxMacroStatement::SfxMacroStatement(const String&, - const SfxSlot&,BOOL,SfxArguments*)> verwendet werden. + const SfxSlot&,sal_Bool,SfxArguments*)> verwendet werden. F"ur das so bezeichnete Objekt wird dann je nach Typ des Slots eine Zuweisung an eines seiner Properties oder der Aufruf einer seiner @@ -112,7 +112,7 @@ SfxMacroStatement::SfxMacroStatement [Querverweise] - <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)> + <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,sal_Bool,SfxArguments*)> <SfxMacroStatement::SfxMacroStatement(const String&)> */ @@ -126,11 +126,11 @@ SfxMacroStatement::SfxMacroStatement return; /* // Objekt-Typ bestimmen - FASTBOOL bIsApp = rShell.ISA(SfxApplication); - FASTBOOL bIsDoc = rShell.ISA(SfxObjectShell); - FASTBOOL bIsWin = !bIsApp && !bIsDoc && + bool bIsApp = rShell.ISA(SfxApplication); + bool bIsDoc = rShell.ISA(SfxObjectShell); + bool bIsWin = !bIsApp && !bIsDoc && ( rShell.ISA(SfxViewShell) || rShell.ISA(SfxViewFrame) ); - FASTBOOL bIsSel = !bIsApp && !bIsDoc && !bIsWin; + bool bIsSel = !bIsApp && !bIsDoc && !bIsWin; // Objekt nicht schon im Slot-Namen enthalten? if ( bIsSel || rSlot.pName[0] == '.' ) @@ -229,7 +229,7 @@ SfxMacroStatement::SfxMacroStatement ( const String& rTarget, // Objekt, was beim Playing angesprochen wird const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann - BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt + sal_Bool bRequestDone, // wurde der Request tats"achlich ausgef"uhrt ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs ) @@ -239,7 +239,7 @@ SfxMacroStatement::SfxMacroStatement [Querverweise] <SfxMacroStatement::SfxMacroStatement(const String&)> - <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)> + <SfxMacroStatement::SfxMacroStatement(const SfxShell&,sal_Bool,const SfxSlot&,sal_Bool,SfxArguments*)> */ : nSlotId( rSlot.GetSlotId() ), @@ -270,13 +270,13 @@ SfxMacroStatement::SfxMacroStatement [Querverweise] - <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)> - <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)> + <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,sal_Bool,SfxArguments*)> + <SfxMacroStatement::SfxMacroStatement(const SfxShell&,sal_Bool,const SfxSlot&,sal_Bool,SfxArguments*)> */ : nSlotId( 0 ), aStatement( rStatement ), - bDone( TRUE ), + bDone( sal_True ), pDummy( 0 ) { } @@ -320,7 +320,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl ( SfxMacro* /*pMacro*/, // darin wird aufgezeichnet const SfxSlot& rSlot, // der Slot, der das Statement abspielen kann - BOOL bRequestDone, // TRUE=wurde ausgef"uhrt, FALSE=abgebrochen + sal_Bool bRequestDone, // sal_True=wurde ausgef"uhrt, sal_False=abgebrochen ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& /*rArgs*/ ) @@ -346,7 +346,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl // alle zusammengesuchten Parameter rausschreiben if ( aArgs.getLength() ) - for ( USHORT nArg = 0; nArg < aArgs.getLength(); ++nArg ) + for ( sal_uInt16 nArg = 0; nArg < aArgs.getLength(); ++nArg ) { // den Parameter textuell darstellen String aArg; @@ -377,8 +377,8 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl // Anf"uhrungszeichen werden verdoppelt XubString aRecordable( sTemp ); - USHORT nPos = 0; - while ( TRUE ) + sal_uInt16 nPos = 0; + while ( sal_True ) { nPos = aRecordable.SearchAndReplace( DEFINE_CONST_UNICODE('"'), DEFINE_CONST_UNICODE("\"\""), nPos ); if ( STRING_NOTFOUND == nPos ) @@ -387,8 +387,8 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl } // nicht druckbare Zeichen werden als chr$(...) geschrieben - FASTBOOL bPrevReplaced = FALSE; - for ( USHORT n = 0; n < aRecordable.Len(); ++n ) + bool bPrevReplaced = sal_False; + for ( sal_uInt16 n = 0; n < aRecordable.Len(); ++n ) { sal_Unicode cChar = aRecordable.GetChar(n); if ( !( cChar>=32 && cChar!=127 ) ) // ALS ERSATZ FUER String::IsPrintable()! @@ -411,10 +411,10 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl aRecordable.Insert( aReplacement, n + 1 ); n = n + aReplacement.Len(); } - bPrevReplaced = TRUE; + bPrevReplaced = sal_True; } else - bPrevReplaced = FALSE; + bPrevReplaced = sal_False; // Argument in Anf"uhrungszeichen aArg = '"'; @@ -425,7 +425,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl case SbxBYTE: { // als Zahl darstellen - aArg = (USHORT) rVar.GetByte(); + aArg = (sal_uInt16) rVar.GetByte(); break; } */ @@ -696,7 +696,7 @@ String SfxMacro::GenerateSource() const { DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING, "invalid call to non-recording SfxMacro" ); String aSource; - for ( USHORT n = 0; n < pImp->aList.Count(); ++n ) + for ( sal_uInt16 n = 0; n < pImp->aList.Count(); ++n ) { aSource += pImp->aList.GetObject(n)->GetStatement(); if ( (n+1) < pImp->aList.Count() ) diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx index b0cdd58d2645..c5e46620a908 100644 --- a/sfx2/source/control/minfitem.cxx +++ b/sfx2/source/control/minfitem.cxx @@ -39,7 +39,7 @@ TYPEINIT1(SfxMacroInfoItem, SfxPoolItem); // ----------------------------------------------------------------------- SfxMacroInfoItem::SfxMacroInfoItem( - USHORT nWhichId, // Slot-ID + sal_uInt16 nWhichId, // Slot-ID const BasicManager* pMgr, const String &rLibName, const String &rModuleName, diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx index 6b05c03160ff..ffedd2632770 100644 --- a/sfx2/source/control/msg.cxx +++ b/sfx2/source/control/msg.cxx @@ -53,7 +53,7 @@ SfxSlotKind SfxSlot::GetKind() const //-------------------------------------------------------------------- -USHORT SfxSlot::GetWhich( const SfxItemPool &rPool ) const +sal_uInt16 SfxSlot::GetWhich( const SfxItemPool &rPool ) const { if ( !nMasterSlotId || nMasterSlotId == USHRT_MAX ) ((SfxSlot*) this) -> nMasterSlotId = rPool.GetWhich(nSlotId); diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx index 9d3661ef1bc1..9cda943c8509 100644 --- a/sfx2/source/control/msgpool.cxx +++ b/sfx2/source/control/msgpool.cxx @@ -52,20 +52,20 @@ struct SfxSIDRegistration_Impl { String _aGroup; String _aName; - USHORT _nSID; + sal_uInt16 _nSID; }; struct SfxSlotType_Impl { - USHORT nId; + sal_uInt16 nId; TypeId nType; - SfxSlotType_Impl( USHORT nTheId, TypeId nTheType ): + SfxSlotType_Impl( sal_uInt16 nTheId, TypeId nTheType ): nId(nTheId), nType(nTheType) {} }; -DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, USHORT, 6, 4) +DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, sal_uInt16, 6, 4) DECL_PTRARRAY(SfxInterfaceArr_Impl, SfxInterface*, 6, 3) DECL_PTRARRAY(SfxSlotTypeArr_Impl, SfxSlotType_Impl*, 8, 8) @@ -98,7 +98,7 @@ SfxSlotPool::~SfxSlotPool() delete _pGroups; if ( _pTypes ) { - for ( USHORT n =_pTypes->Count(); n--; ) + for ( sal_uInt16 n =_pTypes->Count(); n--; ) delete _pTypes->GetObject(n); delete _pTypes; } @@ -131,14 +131,14 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface ) { // Die Groups im parent Slotpool sind auch hier bekannt SfxSlotGroupArr_Impl& rGroups = *_pParentPool->_pGroups; - for ( USHORT n=0; n<rGroups.Count(); n++ ) + for ( sal_uInt16 n=0; n<rGroups.Count(); n++ ) _pGroups->Append( rGroups[n] ); } } if ( !_pTypes ) _pTypes = new SfxSlotTypeArr_Impl; - for ( USHORT nFunc = 0; nFunc < rInterface.Count(); ++nFunc ) + for ( sal_uInt16 nFunc = 0; nFunc < rInterface.Count(); ++nFunc ) { SfxSlot *pDef = rInterface[nFunc]; if ( pDef->GetGroupId() && /* pDef->GetGroupId() != GID_INTERN && */ @@ -153,7 +153,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface ) const TypeId &rTypeId = pDef->GetType()->Type(); if ( /*rTypeId != TYPE(SfxVoidItem) &&*/ rTypeId != 0 ) { - USHORT nPos; + sal_uInt16 nPos; for ( nPos = 0; nPos < _pTypes->Count(); ++nPos ) { if ( _pTypes->GetObject(nPos)->nId == pDef->GetSlotId() ) @@ -174,12 +174,12 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface ) //==================================================================== -TypeId SfxSlotPool::GetSlotType( USHORT nId ) const +TypeId SfxSlotPool::GetSlotType( sal_uInt16 nId ) const { const SfxSlot* pSlot = (const_cast <SfxSlotPool*> (this))->GetSlot( nId ); return pSlot ? pSlot->GetType()->Type() : 0; /* - for ( USHORT nPos = 0; nPos < _pTypes->Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < _pTypes->Count(); ++nPos ) { if ( _pTypes->GetObject(nPos)->nId == nId ) return _pTypes->GetObject(nPos)->nType; @@ -204,13 +204,13 @@ void SfxSlotPool::ReleaseInterface( SfxInterface& rInterface ) // get the first SfxMessage for a special Id (e.g. for getting check-mode) -const SfxSlot* SfxSlotPool::GetSlot( USHORT nId ) +const SfxSlot* SfxSlotPool::GetSlot( sal_uInt16 nId ) { DBG_MEMTEST(); DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" ); // Zun"achst die eigenen Interfaces absuchen - for ( USHORT nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf ) + for ( sal_uInt16 nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf ) { const SfxSlot *pDef = _pInterfaces->GetObject(nInterf)->GetSlot(nId); if ( pDef ) @@ -225,7 +225,7 @@ const SfxSlot* SfxSlotPool::GetSlot( USHORT nId ) // skips to the next group -String SfxSlotPool::SeekGroup( USHORT nNo ) +String SfxSlotPool::SeekGroup( sal_uInt16 nNo ) { DBG_MEMTEST(); DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" ); @@ -237,7 +237,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo ) if ( _pParentPool ) { // Meistens stimmt die Reihenfolge der Ids "uberein - USHORT nParentCount = _pParentPool->_pGroups->Count(); + sal_uInt16 nParentCount = _pParentPool->_pGroups->Count(); if ( nNo < nParentCount && (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[nNo] ) _pParentPool->_nCurGroup = nNo; else @@ -245,7 +245,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo ) // Ansonsten mu\s gesucht werden // Wenn die Gruppe im parent pool nicht gefunden wird, wird // _nCurGroup au\serhalb des g"ultigen Bereiches gesetzt - USHORT i; + sal_uInt16 i; for ( i=1; i<nParentCount; i++ ) if ( (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[i] ) break; @@ -270,7 +270,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo ) //-------------------------------------------------------------------- -USHORT SfxSlotPool::GetGroupCount() +sal_uInt16 SfxSlotPool::GetGroupCount() { return _pGroups->Count(); } @@ -280,13 +280,13 @@ USHORT SfxSlotPool::GetGroupCount() // internal search loop -const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface ) +const SfxSlot* SfxSlotPool::SeekSlot( sal_uInt16 nStartInterface ) { DBG_MEMTEST(); DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" ); // Die Numerierung der interfaces startet beim parent pool - USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0; + sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0; // sind wir am Ende des Parent-Pools angekommen? if ( nStartInterface < nFirstInterface && @@ -302,7 +302,7 @@ const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface ) } // find the first func-def with the current group id - USHORT nCount = _pInterfaces->Count() + nFirstInterface; + sal_uInt16 nCount = _pInterfaces->Count() + nFirstInterface; for ( _nCurInterface = nStartInterface; _nCurInterface < nCount; ++_nCurInterface ) @@ -331,7 +331,7 @@ const SfxSlot* SfxSlotPool::NextSlot() DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" ); // Die Numerierung der interfaces startet beim parent pool - USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0; + sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0; if ( _nCurInterface < nFirstInterface && _nCurGroup >= _pParentPool->_pGroups->Count() ) _nCurInterface = nFirstInterface; @@ -348,7 +348,7 @@ const SfxSlot* SfxSlotPool::NextSlot() return SeekSlot( nFirstInterface ); } - USHORT nInterface = _nCurInterface - nFirstInterface; + sal_uInt16 nInterface = _nCurInterface - nFirstInterface; // possibly we are already at the end if ( nInterface >= _pInterfaces->Count() ) return 0; @@ -386,17 +386,17 @@ SfxInterface* SfxSlotPool::FirstInterface() SfxInterface* SfxSlotPool::NextInterface() { _nCurInterface++; - USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0; + sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0; if ( _nCurInterface < nFirstInterface ) return (*_pParentPool->_pInterfaces)[_nCurInterface]; - USHORT nInterface = _nCurInterface - nFirstInterface; + sal_uInt16 nInterface = _nCurInterface - nFirstInterface; return nInterface < _pInterfaces->Count() ? (*_pInterfaces)[nInterface] : 0; } const SfxSlot* SfxSlotPool::GetUnoSlot( const String& rName ) { const SfxSlot *pSlot = NULL; - for ( USHORT nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ ) + for ( sal_uInt16 nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ ) { pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName ); if ( pSlot ) diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index d0ce2abae773..f73a7f4acf4b 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -69,18 +69,18 @@ SfxCompareSlots_Impl( const void* pSmaller, const void* pBigger ) struct SfxObjectUI_Impl { - USHORT nPos; + sal_uInt16 nPos; ResId aResId; - BOOL bVisible; - BOOL bContext; + sal_Bool bVisible; + sal_Bool bContext; String* pName; sal_uInt32 nFeature; - SfxObjectUI_Impl(USHORT n, const ResId& rResId, BOOL bVis, sal_uInt32 nFeat) : + SfxObjectUI_Impl(sal_uInt16 n, const ResId& rResId, sal_Bool bVis, sal_uInt32 nFeat) : nPos(n), aResId(rResId.GetId(), *rResId.GetResMgr()), bVisible(bVis), - bContext(FALSE), + bContext(sal_False), pName(0), nFeature(nFeat) { @@ -102,12 +102,12 @@ struct SfxInterface_Impl ResId aPopupRes; // registered PopupMenu ResId aStatBarRes; // registered StatusBar SfxModule* pModule; - BOOL bRegistered; + sal_Bool bRegistered; SfxInterface_Impl() : aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()), aStatBarRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()) - , bRegistered(FALSE) + , bRegistered(sal_False) { pObjectBars = new SfxObjectUIArr_Impl; pChildWindows = new SfxObjectUIArr_Impl; @@ -115,7 +115,7 @@ struct SfxInterface_Impl ~SfxInterface_Impl() { - USHORT n; + sal_uInt16 n; for (n=0; n<pObjectBars->Count(); n++) delete (*pObjectBars)[n]; delete pObjectBars; @@ -126,7 +126,7 @@ struct SfxInterface_Impl } }; -static SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr ); +static SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr ); //==================================================================== @@ -137,7 +137,7 @@ SfxInterface::SfxInterface( const char *pClassName, const ResId& rNameResId, SfxInterfaceId nId, const SfxInterface* pParent, - SfxSlot &rSlotMap, USHORT nSlotCount ): + SfxSlot &rSlotMap, sal_uInt16 nSlotCount ): pName(pClassName), pGenoType(pParent), nClassId(nId), @@ -150,7 +150,7 @@ SfxInterface::SfxInterface( const char *pClassName, void SfxInterface::Register( SfxModule* pMod ) { - pImpData->bRegistered = TRUE; + pImpData->bRegistered = sal_True; pImpData->pModule = pMod; if ( pMod ) pMod->GetSlotPool()->RegisterInterface(*this); @@ -158,7 +158,7 @@ void SfxInterface::Register( SfxModule* pMod ) SFX_APP()->GetAppSlotPool_Impl().RegisterInterface(*this); } -void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount ) +void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount ) { pSlots = &rSlotMap; nCount = nSlotCount; @@ -172,7 +172,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount ) qsort( pSlots, nCount, sizeof(SfxSlot), SfxCompareSlots_Impl ); // link masters and slaves - USHORT nIter = 1; + sal_uInt16 nIter = 1; for ( pIter = pSlots; nIter <= nCount; ++pIter, ++nIter ) { //! hier bitte sinnvoll pruefen @@ -196,7 +196,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount ) if ( 0 == pIter->GetNextSlot() ) { SfxSlot *pLastSlot = pIter; - for ( USHORT n = nIter; n < Count(); ++n ) + for ( sal_uInt16 n = nIter; n < Count(); ++n ) { SfxSlot *pCurSlot = (pSlots+n); if ( pCurSlot->nMasterSlotId == pIter->nMasterSlotId ) @@ -212,7 +212,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount ) { // Slots verweisen im Ring auf den n"achten mit derselben Statusmethode SfxSlot *pLastSlot = pIter; - for ( USHORT n = nIter; n < Count(); ++n ) + for ( sal_uInt16 n = nIter; n < Count(); ++n ) { SfxSlot *pCurSlot = (pSlots+n); if ( pCurSlot->GetStateFnc() == pIter->GetStateFnc() ) @@ -228,7 +228,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount ) #ifdef DBG_UTIL else { - USHORT nIter = 1; + sal_uInt16 nIter = 1; for ( SfxSlot *pNext = pIter+1; nIter < nCount; ++pNext, ++nIter ) { @@ -308,7 +308,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount ) SfxInterface::~SfxInterface() { SfxModule *pMod = pImpData->pModule; - BOOL bRegistered = pImpData->bRegistered; + sal_Bool bRegistered = pImpData->bRegistered; delete pImpData; DBG_ASSERT( bRegistered, "Interface not registered!" ); if ( bRegistered ) @@ -325,7 +325,7 @@ SfxInterface::~SfxInterface() // searches for the specified func -const SfxSlot* SfxInterface::GetSlot( USHORT nFuncId ) const +const SfxSlot* SfxInterface::GetSlot( sal_uInt16 nFuncId ) const { DBG_MEMTEST(); DBG_CHKTHIS(SfxInterface, 0); @@ -348,7 +348,7 @@ const SfxSlot* SfxInterface::GetSlot( const String& rCommand ) const if ( aCommand.SearchAscii( UNO_COMMAND ) == 0 ) aCommand.Erase( 0, sizeof( UNO_COMMAND )-1 ); - for ( USHORT n=0; n<nCount; n++ ) + for ( sal_uInt16 n=0; n<nCount; n++ ) { if ( (pSlots+n)->pUnoName && aCommand.CompareIgnoreCaseToAscii( (pSlots+n)->GetUnoName() ) == COMPARE_EQUAL ) @@ -381,7 +381,7 @@ const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const //-------------------------------------------------------------------- -const SfxSlot* SfxInterface::GetRealSlot( USHORT nSlotId ) const +const SfxSlot* SfxInterface::GetRealSlot( sal_uInt16 nSlotId ) const { DBG_MEMTEST(); DBG_CHKTHIS(SfxInterface, 0); @@ -410,26 +410,26 @@ void SfxInterface::RegisterPopupMenu( const ResId& rResId ) //-------------------------------------------------------------------- -void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId, +void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId, const String *pStr ) { RegisterObjectBar( nPos, rResId, 0UL, pStr ); } -void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr ) +void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr ) { SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl( nPos, rResId, nFeature, pStr ); if ( pUI ) pImpData->pObjectBars->Append(pUI); } -SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr ) +SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr ) { if ((nPos & SFX_VISIBILITY_MASK) == 0) nPos |= SFX_VISIBILITY_STANDARD; - SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, TRUE, nFeature); + SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, sal_True, nFeature); if (pStr == 0) { @@ -449,13 +449,13 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_ return pUI; } -const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const +const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const { - BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); if ( bGenoType ) { // Gibt es Toolbars in der Superklasse ? - USHORT nBaseCount = pGenoType->GetObjectBarCount(); + sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount(); if ( nNo < nBaseCount ) // Die der Superklasse kommen zuerst return pGenoType->GetObjectBarResId( nNo ); @@ -464,7 +464,7 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const } #ifdef DBG_UTIL - USHORT nObjBarCount = pImpData->pObjectBars->Count(); + sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count(); DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" ); #endif return (*pImpData->pObjectBars)[nNo]->aResId; @@ -473,13 +473,13 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const //-------------------------------------------------------------------- -USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const +sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const { - BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); if ( bGenoType ) { // Gibt es Toolbars in der Superklasse ? - USHORT nBaseCount = pGenoType->GetObjectBarCount(); + sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount(); if ( nNo < nBaseCount ) // Die der Superklasse kommen zuerst return pGenoType->GetObjectBarPos( nNo ); @@ -488,7 +488,7 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const } #ifdef DBG_UTIL - USHORT nObjBarCount = pImpData->pObjectBars->Count(); + sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count(); DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" ); #endif return (*pImpData->pObjectBars)[nNo]->nPos; @@ -497,7 +497,7 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const //-------------------------------------------------------------------- -USHORT SfxInterface::GetObjectBarCount() const +sal_uInt16 SfxInterface::GetObjectBarCount() const { if (pGenoType && ! pGenoType->HasName()) return pImpData->pObjectBars->Count() + pGenoType->GetObjectBarCount(); @@ -506,14 +506,14 @@ USHORT SfxInterface::GetObjectBarCount() const } //-------------------------------------------------------------------- -void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, const String* pChildWinName) +void SfxInterface::RegisterChildWindow(sal_uInt16 nId, sal_Bool bContext, const String* pChildWinName) { RegisterChildWindow( nId, bContext, 0UL, pChildWinName ); } -void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, sal_uInt32 nFeature, const String*) +void SfxInterface::RegisterChildWindow(sal_uInt16 nId, sal_Bool bContext, sal_uInt32 nFeature, const String*) { - SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, ResId(nId, *SfxApplication::GetOrCreate()->GetOffResManager_Impl()), TRUE, nFeature); + SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, ResId(nId, *SfxApplication::GetOrCreate()->GetOffResManager_Impl()), sal_True, nFeature); pUI->bContext = bContext; pImpData->pChildWindows->Append(pUI); } @@ -524,12 +524,12 @@ void SfxInterface::RegisterStatusBar(const ResId& rResId) } -sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const +sal_uInt32 SfxInterface::GetChildWindowId (sal_uInt16 nNo) const { if ( pGenoType ) { // Gibt es ChildWindows in der Superklasse ? - USHORT nBaseCount = pGenoType->GetChildWindowCount(); + sal_uInt16 nBaseCount = pGenoType->GetChildWindowCount(); if ( nNo < nBaseCount ) // Die der Superklasse kommen zuerst return pGenoType->GetChildWindowId( nNo ); @@ -538,7 +538,7 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const } #ifdef DBG_UTIL - USHORT nCWCount = pImpData->pChildWindows->Count(); + sal_uInt16 nCWCount = pImpData->pChildWindows->Count(); DBG_ASSERT( nNo<nCWCount,"ChildWindow ist unbekannt!" ); #endif sal_uInt32 nRet = (*pImpData->pChildWindows)[nNo]->aResId.GetId(); @@ -547,12 +547,12 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const return nRet; } -sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const +sal_uInt32 SfxInterface::GetChildWindowFeature (sal_uInt16 nNo) const { if ( pGenoType ) { // Gibt es ChildWindows in der Superklasse ? - USHORT nBaseCount = pGenoType->GetChildWindowCount(); + sal_uInt16 nBaseCount = pGenoType->GetChildWindowCount(); if ( nNo < nBaseCount ) // Die der Superklasse kommen zuerst return pGenoType->GetChildWindowFeature( nNo ); @@ -561,7 +561,7 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const } #ifdef DBG_UTIL - USHORT nCWCount = pImpData->pChildWindows->Count(); + sal_uInt16 nCWCount = pImpData->pChildWindows->Count(); DBG_ASSERT( nNo<nCWCount,"ChildWindow ist unbekannt!" ); #endif return (*pImpData->pChildWindows)[nNo]->nFeature; @@ -570,7 +570,7 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const //-------------------------------------------------------------------- -USHORT SfxInterface::GetChildWindowCount() const +sal_uInt16 SfxInterface::GetChildWindowCount() const { if (pGenoType) return pImpData->pChildWindows->Count() + pGenoType->GetChildWindowCount(); @@ -595,13 +595,13 @@ const ResId& SfxInterface::GetStatusBarResId() const -const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const +const String* SfxInterface::GetObjectBarName ( sal_uInt16 nNo ) const { - BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); if ( bGenoType ) { // Gibt es Toolbars in der Superklasse ? - USHORT nBaseCount = pGenoType->GetObjectBarCount(); + sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount(); if ( nNo < nBaseCount ) // Die der Superklasse kommen zuerst return pGenoType->GetObjectBarName( nNo ); @@ -610,19 +610,19 @@ const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const } #ifdef DBG_UTIL - USHORT nObjBarCount = pImpData->pObjectBars->Count(); + sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count(); DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" ); #endif return (*pImpData->pObjectBars)[nNo]->pName; } -sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const +sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const { - BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); if ( bGenoType ) { // Gibt es Toolbars in der Superklasse ? - USHORT nBaseCount = pGenoType->GetObjectBarCount(); + sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount(); if ( nNo < nBaseCount ) // Die der Superklasse kommen zuerst return pGenoType->GetObjectBarFeature( nNo ); @@ -631,19 +631,19 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const } #ifdef DBG_UTIL - USHORT nObjBarCount = pImpData->pObjectBars->Count(); + sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count(); DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" ); #endif return (*pImpData->pObjectBars)[nNo]->nFeature; } -BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const +sal_Bool SfxInterface::IsObjectBarVisible(sal_uInt16 nNo) const { - BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName()); + sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName()); if ( bGenoType ) { // Gibt es Toolbars in der Superklasse ? - USHORT nBaseCount = pGenoType->GetObjectBarCount(); + sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount(); if ( nNo < nBaseCount ) // Die der Superklasse kommen zuerst return pGenoType->IsObjectBarVisible( nNo ); @@ -652,7 +652,7 @@ BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const } #ifdef DBG_UTIL - USHORT nObjBarCount = pImpData->pObjectBars->Count(); + sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count(); DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" ); #endif return (*pImpData->pObjectBars)[nNo]->bVisible; diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index bee4a5c87675..9fb17332c27d 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -59,7 +59,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener , public: SFX_DECL_XINTERFACE_XTYPEPROVIDER - SfxQueryStatus_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const rtl::OUString& aCommand ); + SfxQueryStatus_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const rtl::OUString& aCommand ); virtual ~SfxQueryStatus_Impl(); // Query method @@ -79,7 +79,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener , sal_Bool m_bQueryInProgress; SfxItemState m_eState; SfxPoolItem* m_pItem; - USHORT m_nSlotID; + sal_uInt16 m_nSlotID; osl::Condition m_aCondition; ::com::sun::star::util::URL m_aCommand; com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > m_xDispatch; @@ -88,7 +88,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener , SFX_IMPL_XINTERFACE_2( SfxQueryStatus_Impl, OWeakObject, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener ) SFX_IMPL_XTYPEPROVIDER_2( SfxQueryStatus_Impl, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener ) -SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand ) : +SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) : cppu::OWeakObject(), m_bQueryInProgress( sal_False ), m_eState( SFX_ITEM_DISABLED ), @@ -222,7 +222,7 @@ SfxItemState SfxQueryStatus_Impl::QueryState( SfxPoolItem*& rpPoolItem ) //************************************************************************* -SfxQueryStatus::SfxQueryStatus( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand ) +SfxQueryStatus::SfxQueryStatus( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) { m_pSfxQueryStatusImpl = new SfxQueryStatus_Impl( rDispatchProvider, nSlotId, rCommand ); m_xStatusListener = Reference< XStatusListener >( diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 88a52d0ad0bf..ec6f9a7428e9 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -76,13 +76,13 @@ struct SfxRequest_Impl: public SfxListener SfxPoolItem* pRetVal; // R"uckgabewert geh"ort sich selbst SfxShell* pShell; // ausgef"uhrt an dieser Shell const SfxSlot* pSlot; // ausgef"uhrter Slot - USHORT nModifier; // welche Modifier waren gedrueckt? - BOOL bDone; // "uberhaupt ausgef"uhrt - BOOL bIgnored; // vom User abgebrochen - BOOL bCancelled; // nicht mehr zustellen - BOOL bUseTarget; // aTarget wurde von Applikation gesetzt - USHORT nCallMode; // Synch/Asynch/API/Record - BOOL bAllowRecording; + sal_uInt16 nModifier; // welche Modifier waren gedrueckt? + sal_Bool bDone; // "uberhaupt ausgef"uhrt + sal_Bool bIgnored; // vom User abgebrochen + sal_Bool bCancelled; // nicht mehr zustellen + sal_Bool bUseTarget; // aTarget wurde von Applikation gesetzt + sal_uInt16 nCallMode; // Synch/Asynch/API/Record + sal_Bool bAllowRecording; SfxAllItemSet* pInternalArgs; SfxViewFrame* pViewFrame; @@ -92,9 +92,9 @@ struct SfxRequest_Impl: public SfxListener : pAnti( pOwner) , pPool(0) , nModifier(0) - , bCancelled(FALSE) + , bCancelled(sal_False) , nCallMode( SFX_CALLMODE_SYNCHRON ) - , bAllowRecording( FALSE ) + , bAllowRecording( sal_False ) , pInternalArgs( 0 ) , pViewFrame(0) {} @@ -162,8 +162,8 @@ SfxRequest::SfxRequest DBG_MEMTEST(); pImp->bAllowRecording = rOrig.pImp->bAllowRecording; - pImp->bDone = FALSE; - pImp->bIgnored = FALSE; + pImp->bDone = sal_False; + pImp->bIgnored = sal_False; pImp->pRetVal = 0; pImp->pShell = 0; pImp->pSlot = 0; @@ -186,7 +186,7 @@ SfxRequest::SfxRequest SfxRequest::SfxRequest ( SfxViewFrame* pViewFrame, - USHORT nSlotId + sal_uInt16 nSlotId ) @@ -205,16 +205,16 @@ SfxRequest::SfxRequest { DBG_MEMTEST(); - pImp->bDone = FALSE; - pImp->bIgnored = FALSE; + pImp->bDone = sal_False; + pImp->bIgnored = sal_False; pImp->SetPool( &pViewFrame->GetPool() ); pImp->pRetVal = 0; pImp->pShell = 0; pImp->pSlot = 0; pImp->nCallMode = SFX_CALLMODE_SYNCHRON; - pImp->bUseTarget = FALSE; + pImp->bUseTarget = sal_False; pImp->pViewFrame = pViewFrame; - if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, TRUE, TRUE ) ) + if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, sal_True, sal_True ) ) { pImp->SetPool( &pImp->pShell->GetPool() ); pImp->xRecorder = SfxRequest::GetMacroRecorder( pViewFrame ); @@ -235,7 +235,7 @@ SfxRequest::SfxRequest SfxRequest::SfxRequest ( - USHORT nSlotId, // auszuf"uhrende <Slot-Id> + sal_uInt16 nSlotId, // auszuf"uhrende <Slot-Id> SfxCallMode nMode, // Synch/API/... SfxItemPool& rPool // ggf. f"ur das SfxItemSet f"ur Parameter ) @@ -248,14 +248,14 @@ SfxRequest::SfxRequest { DBG_MEMTEST(); - pImp->bDone = FALSE; - pImp->bIgnored = FALSE; + pImp->bDone = sal_False; + pImp->bIgnored = sal_False; pImp->SetPool( &rPool ); pImp->pRetVal = 0; pImp->pShell = 0; pImp->pSlot = 0; pImp->nCallMode = nMode; - pImp->bUseTarget = FALSE; + pImp->bUseTarget = sal_False; } SfxRequest::SfxRequest @@ -271,14 +271,14 @@ SfxRequest::SfxRequest { DBG_MEMTEST(); - pImp->bDone = FALSE; - pImp->bIgnored = FALSE; + pImp->bDone = sal_False; + pImp->bIgnored = sal_False; pImp->SetPool( &rPool ); pImp->pRetVal = 0; pImp->pShell = 0; pImp->pSlot = 0; pImp->nCallMode = nMode; - pImp->bUseTarget = FALSE; + pImp->bUseTarget = sal_False; TransformParameters( nSlot, rArgs, *pArgs, pSlot ); } @@ -286,8 +286,8 @@ SfxRequest::SfxRequest SfxRequest::SfxRequest ( - USHORT nSlotId, - USHORT nMode, + sal_uInt16 nSlotId, + sal_uInt16 nMode, const SfxAllItemSet& rSfxArgs ) @@ -299,37 +299,37 @@ SfxRequest::SfxRequest { DBG_MEMTEST(); - pImp->bDone = FALSE; - pImp->bIgnored = FALSE; + pImp->bDone = sal_False; + pImp->bIgnored = sal_False; pImp->SetPool( rSfxArgs.GetPool() ); pImp->pRetVal = 0; pImp->pShell = 0; pImp->pSlot = 0; pImp->nCallMode = nMode; - pImp->bUseTarget = FALSE; + pImp->bUseTarget = sal_False; } //-------------------------------------------------------------------- -USHORT SfxRequest::GetCallMode() const +sal_uInt16 SfxRequest::GetCallMode() const { return pImp->nCallMode; } //-------------------------------------------------------------------- -BOOL SfxRequest::IsSynchronCall() const +sal_Bool SfxRequest::IsSynchronCall() const { return SFX_CALLMODE_SYNCHRON == ( SFX_CALLMODE_SYNCHRON & pImp->nCallMode ); } //-------------------------------------------------------------------- -void SfxRequest::SetSynchronCall( BOOL bSynchron ) +void SfxRequest::SetSynchronCall( sal_Bool bSynchron ) { if ( bSynchron ) pImp->nCallMode |= SFX_CALLMODE_SYNCHRON; else - pImp->nCallMode &= ~(USHORT) SFX_CALLMODE_SYNCHRON; + pImp->nCallMode &= ~(sal_uInt16) SFX_CALLMODE_SYNCHRON; } void SfxRequest::SetInternalArgs_Impl( const SfxAllItemSet& rArgs ) @@ -456,7 +456,7 @@ void SfxRequest::AppendItem(const SfxPoolItem &rItem) //-------------------------------------------------------------------- -void SfxRequest::RemoveItem( USHORT nID ) +void SfxRequest::RemoveItem( sal_uInt16 nID ) { if (pArgs) { @@ -470,8 +470,8 @@ void SfxRequest::RemoveItem( USHORT nID ) const SfxPoolItem* SfxRequest::GetArg ( - USHORT nSlotId, // Slot-Id oder Which-Id des Parameters - FASTBOOL bDeep, // FALSE: nicht in Parent-ItemSets suchen + sal_uInt16 nSlotId, // Slot-Id oder Which-Id des Parameters + bool bDeep, // false: nicht in Parent-ItemSets suchen TypeId aType // != 0: RTTI Pruefung mit Assertion ) const { @@ -483,7 +483,7 @@ const SfxPoolItem* SfxRequest::GetArg const SfxPoolItem* SfxRequest::GetItem ( const SfxItemSet* pArgs, - USHORT nSlotId, // Slot-Id oder Which-Id des Parameters + sal_uInt16 nSlotId, // Slot-Id oder Which-Id des Parameters bool bDeep, // false: nicht in Parent-ItemSets suchen TypeId aType // != 0: RTTI Pruefung mit Assertion ) @@ -509,12 +509,12 @@ const SfxPoolItem* SfxRequest::GetItem ... // ein Beispiel ohne Verwendung des Makros const SfxInt32Item *pPosItem = (const SfxUInt32Item*) - rReq.GetArg( SID_POS, FALSE, TYPE(SfxInt32Item) ); - USHORT nPos = pPosItem ? pPosItem->GetValue() : 0; + rReq.GetArg( SID_POS, sal_False, TYPE(SfxInt32Item) ); + sal_uInt16 nPos = pPosItem ? pPosItem->GetValue() : 0; // ein Beispiel mit Verwendung des Makros - SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, FALSE); - USHORT nSize = pSizeItem ? pPosItem->GetValue() : 0; + SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, sal_False); + sal_uInt16 nSize = pSizeItem ? pPosItem->GetValue() : 0; ... } @@ -528,7 +528,7 @@ const SfxPoolItem* SfxRequest::GetItem if ( pArgs ) { // ggf. in Which-Id umrechnen - USHORT nWhich = pArgs->GetPool()->GetWhich(nSlotId); + sal_uInt16 nWhich = pArgs->GetPool()->GetWhich(nSlotId); // ist das Item gesetzt oder bei bDeep==TRUE verf"ugbar? const SfxPoolItem *pItem = 0; @@ -574,11 +574,11 @@ void SfxRequest::Done erfragt wurden, ggf. 0 falls keine Parameter gesetzt wurden */ - FASTBOOL bKeep /* TRUE (default) + bool bKeep /* true (default) 'rSet' wird gepeichert und ist "uber GetArgs() abfragbar - FALSE + false 'rSet' wird nicht kopiert (schneller) */ ) @@ -634,7 +634,7 @@ void SfxRequest::Done //-------------------------------------------------------------------- -void SfxRequest::Done( BOOL bRelease ) +void SfxRequest::Done( sal_Bool bRelease ) // [<SfxRequest::Done(SfxItemSet&)>] { Done_Impl( pArgs ); @@ -652,7 +652,7 @@ void SfxRequest::ForgetAllArgs() //-------------------------------------------------------------------- -BOOL SfxRequest::IsCancelled() const +sal_Bool SfxRequest::IsCancelled() const { return pImp->bCancelled; } @@ -668,7 +668,7 @@ void SfxRequest::Cancel() */ { - pImp->bCancelled = TRUE; + pImp->bCancelled = sal_True; pImp->SetPool( 0 ); DELETEZ( pArgs ); } @@ -694,7 +694,7 @@ void SfxRequest::Ignore() { // als tats"achlich ausgef"uhrt markieren - pImp->bIgnored = TRUE; + pImp->bIgnored = sal_True; } //-------------------------------------------------------------------- @@ -715,7 +715,7 @@ void SfxRequest::Done_Impl { // als tats"achlich ausgef"uhrt markieren - pImp->bDone = TRUE; + pImp->bDone = sal_True; // nicht Recorden if ( !pImp->xRecorder.is() ) @@ -751,8 +751,8 @@ void SfxRequest::Done_Impl { // des Property als SfxPoolItem besorgen const SfxPoolItem *pItem; - USHORT nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId()); - SfxItemState eState = pSet ? pSet->GetItemState( nWhich, FALSE, &pItem ) : SFX_ITEM_UNKNOWN; + sal_uInt16 nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId()); + SfxItemState eState = pSet ? pSet->GetItemState( nWhich, sal_False, &pItem ) : SFX_ITEM_UNKNOWN; #ifdef DBG_UTIL if ( SFX_ITEM_SET != eState ) { @@ -786,13 +786,13 @@ void SfxRequest::Done_Impl for ( const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem() ) { // die Slot-Id f"ur das einzelne Item ermitteln - USHORT nSlotId = rPool.GetSlotId( pItem->Which() ); + sal_uInt16 nSlotId = rPool.GetSlotId( pItem->Which() ); if ( nSlotId == nSlot ) { // mit Hosentr"ager und G"urtel reparieren des falschen Flags DBG_ERROR( "recursion RecordPerItem - use RecordPerSet!" ); SfxSlot *pSlot = (SfxSlot*) pImp->pSlot; - pSlot->nFlags &= ~((ULONG)SFX_SLOT_RECORDPERITEM); + pSlot->nFlags &= ~((sal_uIntPtr)SFX_SLOT_RECORDPERITEM); pSlot->nFlags &= SFX_SLOT_RECORDPERSET; } @@ -813,7 +813,7 @@ void SfxRequest::Done_Impl //-------------------------------------------------------------------- -BOOL SfxRequest::IsDone() const +sal_Bool SfxRequest::IsDone() const /* [Beschreibung] @@ -823,7 +823,7 @@ BOOL SfxRequest::IsDone() const der Kontext f"ur diesen Request falsch war, dieses aber nicht "uber eine separate <SfxShell> realisiert wurde. - SfxRequest-Instanzen, die hier FALSE liefern, werden nicht recorded. + SfxRequest-Instanzen, die hier sal_False liefern, werden nicht recorded. [Querverweise] @@ -881,7 +881,7 @@ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxRe return xRecorder; } -BOOL SfxRequest::HasMacroRecorder( SfxViewFrame* pView ) +sal_Bool SfxRequest::HasMacroRecorder( SfxViewFrame* pView ) { return GetMacroRecorder( pView ).is(); } @@ -889,12 +889,12 @@ BOOL SfxRequest::HasMacroRecorder( SfxViewFrame* pView ) //-------------------------------------------------------------------- -BOOL SfxRequest::IsAPI() const +sal_Bool SfxRequest::IsAPI() const /* [Beschreibung] - Liefert TRUE, wenn dieser SfxRequest von einer API (z.B. BASIC) - erzeugt wurde, sonst FALSE. + Liefert sal_True, wenn dieser SfxRequest von einer API (z.B. BASIC) + erzeugt wurde, sonst sal_False. */ { @@ -904,15 +904,15 @@ BOOL SfxRequest::IsAPI() const //-------------------------------------------------------------------- -FASTBOOL SfxRequest::IsRecording() const +bool SfxRequest::IsRecording() const /* [Beschreibung] - Liefert TRUE, wenn dieser SfxRequest recorded werden soll, d.h. + Liefert sal_True, wenn dieser SfxRequest recorded werden soll, d.h. 1. zu Zeit ein Makro aufgezeichnet wird 2. dieser Request "uberhaupt aufgezeichnet wird 3. der Request nicht von reiner API (z.B. BASIC) ausgeht, - sonst FALSE. + sonst sal_False. */ { @@ -920,13 +920,13 @@ FASTBOOL SfxRequest::IsRecording() const } //-------------------------------------------------------------------- -void SfxRequest::SetModifier( USHORT nModi ) +void SfxRequest::SetModifier( sal_uInt16 nModi ) { pImp->nModifier = nModi; } //-------------------------------------------------------------------- -USHORT SfxRequest::GetModifier() const +sal_uInt16 SfxRequest::GetModifier() const { return pImp->nModifier; } @@ -954,17 +954,17 @@ void SfxRequest::SetTarget( const String &rTarget ) { pImp->aTarget = rTarget; - pImp->bUseTarget = TRUE; + pImp->bUseTarget = sal_True; } -void SfxRequest::AllowRecording( BOOL bSet ) +void SfxRequest::AllowRecording( sal_Bool bSet ) { pImp->bAllowRecording = bSet; } -BOOL SfxRequest::AllowsRecording() const +sal_Bool SfxRequest::AllowsRecording() const { - BOOL bAllow = pImp->bAllowRecording; + sal_Bool bAllow = pImp->bAllowRecording; if( !bAllow ) bAllow = ( SFX_CALLMODE_API != ( SFX_CALLMODE_API & pImp->nCallMode ) ) && ( SFX_CALLMODE_RECORD == ( SFX_CALLMODE_RECORD & pImp->nCallMode ) ); diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index c2cf5f164e7c..96f305f58389 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star::util; SFX_IMPL_XINTERFACE_3( SfxStatusListener, OWeakObject, ::com::sun::star::lang::XComponent, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener ) SFX_IMPL_XTYPEPROVIDER_3( SfxStatusListener, ::com::sun::star::lang::XComponent, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener ) -SfxStatusListener::SfxStatusListener( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand ) : +SfxStatusListener::SfxStatusListener( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) : cppu::OWeakObject(), m_nSlotID( nSlotId ), m_xDispatchProvider( rDispatchProvider ) @@ -79,7 +79,7 @@ SfxStatusListener::~SfxStatusListener() } // old sfx controller item C++ API -void SfxStatusListener::StateChanged( USHORT, SfxItemState, const SfxPoolItem* ) +void SfxStatusListener::StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* ) { // must be implemented by sub class } @@ -100,7 +100,7 @@ void SfxStatusListener::Bind() } } -void SfxStatusListener::Bind( USHORT nSlotId, const rtl::OUString& rNewCommand ) +void SfxStatusListener::Bind( sal_uInt16 nSlotId, const rtl::OUString& rNewCommand ) { // first remove old listener, if we have a dispatch object Reference< XStatusListener > aStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY ); diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index d1605754680a..be365349888f 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -82,10 +82,10 @@ struct SfxShell_Impl: public SfxBroadcaster SfxViewFrame* pFrame; // Frame, falls <UI-aktiv> SfxRepeatTarget* pRepeatTarget; // SbxObjectRef xParent; - BOOL bInAppBASIC; - BOOL bActive; - ULONG nDisableFlags; - ULONG nHelpId; + sal_Bool bInAppBASIC; + sal_Bool bActive; + sal_uIntPtr nDisableFlags; + sal_uIntPtr nHelpId; svtools::AsynchronLink* pExecuter; svtools::AsynchronLink* pUpdater; SfxVerbSlotArr_Impl aSlotArr; @@ -149,9 +149,9 @@ SfxShell::SfxShell() pImp->pViewSh = 0; pImp->pFrame = 0; pImp->pRepeatTarget = 0; - pImp->bInAppBASIC = FALSE; + pImp->bInAppBASIC = sal_False; pImp->nHelpId = 0L; - pImp->bActive = FALSE; + pImp->bActive = sal_False; pImp->nDisableFlags = 0; } @@ -175,9 +175,9 @@ SfxShell::SfxShell( SfxViewShell *pViewSh ) pImp->pViewSh = pViewSh; pImp->pFrame = 0; pImp->pRepeatTarget = 0; - pImp->bInAppBASIC = FALSE; + pImp->bInAppBASIC = sal_False; pImp->nHelpId = 0L; - pImp->bActive = FALSE; + pImp->bActive = sal_False; } //-------------------------------------------------------------------- @@ -310,7 +310,7 @@ SfxViewFrame* SfxShell::GetFrame() const const SfxPoolItem* SfxShell::GetItem ( - USHORT nSlotId // Slot-Id des zu erfragenden <SfxPoolItem>s + sal_uInt16 nSlotId // Slot-Id des zu erfragenden <SfxPoolItem>s ) const /* [Beschreibung] @@ -327,11 +327,11 @@ const SfxPoolItem* SfxShell::GetItem [Querverweise] <SfxShell::PutItem(const SfxPoolItem&)> - <SfxShell::RemoveItem(USHORT)> + <SfxShell::RemoveItem(sal_uInt16)> */ { - for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < pImp->aItems.Count(); ++nPos ) if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId ) return pImp->aItems.GetObject(nPos); return 0; @@ -341,7 +341,7 @@ const SfxPoolItem* SfxShell::GetItem void SfxShell::RemoveItem ( - USHORT nSlotId // Slot-Id des zu l"oschenden <SfxPoolItem>s + sal_uInt16 nSlotId // Slot-Id des zu l"oschenden <SfxPoolItem>s ) /* [Beschreibung] @@ -356,11 +356,11 @@ void SfxShell::RemoveItem [Querverweise] <SfxShell::PutItem(const SfxPoolItem&)> - <SfxShell::GetItem(USHORT)> + <SfxShell::GetItem(sal_uInt16)> */ { - for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < pImp->aItems.Count(); ++nPos ) if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId ) { // Item entfernen und l"oschen @@ -400,8 +400,8 @@ void SfxShell::PutItem [Querverweise] - <SfxShell::RemoveItem(USHORT)> - <SfxShell::GetItem(USHORT)> + <SfxShell::RemoveItem(sal_uInt16)> + <SfxShell::GetItem(sal_uInt16)> */ { @@ -412,9 +412,9 @@ void SfxShell::PutItem // MSC auf WNT/W95 machte hier Mist, Vorsicht bei Umstellungen const SfxPoolItem *pItem = rItem.Clone(); SfxPoolItemHint aItemHint( (SfxPoolItem*) pItem ); - const USHORT nWhich = rItem.Which(); + const sal_uInt16 nWhich = rItem.Which(); SfxPoolItem **ppLoopItem = (SfxPoolItem**) pImp->aItems.GetData(); - USHORT nPos; + sal_uInt16 nPos; for ( nPos = 0; nPos < pImp->aItems.Count(); ++nPos, ++ppLoopItem ) { if ( (*ppLoopItem)->Which() == nWhich ) @@ -430,12 +430,12 @@ void SfxShell::PutItem { SfxBindings* pBindings = pDispat->GetBindings(); pBindings->Broadcast( aItemHint ); - USHORT nSlotId = nWhich; //pItem->GetSlotId(); + sal_uInt16 nSlotId = nWhich; //pItem->GetSlotId(); SfxStateCache* pCache = pBindings->GetStateCache( nSlotId ); if ( pCache ) { - pCache->SetState( SFX_ITEM_AVAILABLE, pItem->Clone(), TRUE ); - pCache->SetCachedState( TRUE ); + pCache->SetState( SFX_ITEM_AVAILABLE, pItem->Clone(), sal_True ); + pCache->SetCachedState( sal_True ); } } return; @@ -523,7 +523,7 @@ void SfxShell::SetUndoManager( ::svl::IUndoManager *pNewUndoMgr ) pUndoMgr = pNewUndoMgr; if ( pUndoMgr ) - pUndoMgr->SetMaxUndoActionCount( (USHORT) SvtUndoOptions().GetUndoCount() ); + pUndoMgr->SetMaxUndoActionCount( (sal_uInt16) SvtUndoOptions().GetUndoCount() ); } //-------------------------------------------------------------------- @@ -579,7 +579,7 @@ void SfxShell::SetRepeatTarget( SfxRepeatTarget *pTarget ) void SfxShell::Invalidate ( - USHORT nId /* Zu invalidierende Slot-Id oder Which-Id. + sal_uInt16 nId /* Zu invalidierende Slot-Id oder Which-Id. Falls diese 0 ist (default), werden alle z.Zt. von dieser Shell bedienten Slot-Ids invalidiert. */ @@ -592,8 +592,8 @@ void SfxShell::Invalidate die von der Subclass ererbt sind, werden ebenfalls invalidert. [Querverweise] - <SfxBindings::Invalidate(USHORT)> - <SfxBindings::InvalidateAll(BOOL)> + <SfxBindings::Invalidate(sal_uInt16)> + <SfxBindings::InvalidateAll(sal_Bool)> */ { @@ -606,11 +606,11 @@ void SfxShell::Invalidate Invalidate_Impl( GetViewShell()->GetViewFrame()->GetBindings(), nId ); } -void SfxShell::Invalidate_Impl( SfxBindings& rBindings, USHORT nId ) +void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId ) { if ( nId == 0 ) { - rBindings.InvalidateShell( *this, FALSE ); + rBindings.InvalidateShell( *this, sal_False ); } else { @@ -646,12 +646,12 @@ void SfxShell::Invalidate_Impl( SfxBindings& rBindings, USHORT nId ) //-------------------------------------------------------------------- -void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) +void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI ) /* [Beschreibung] Diese Methode steuert die Aktivierung der SfxShell-Instanz. Zun"achst - wird durch Aufruf der virtuellen Methode <SfxShell::Activate(BOOL)> + wird durch Aufruf der virtuellen Methode <SfxShell::Activate(sal_Bool)> der Subclass die M"oglichkeit gegeben, auf das Event zu reagieren. Bei bMDI == TRUE wird das zugeh"orige SbxObject 'scharfgeschaltet', @@ -679,7 +679,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) { // Frame merken, in dem aktiviert wird pImp->pFrame = pFrame; - pImp->bActive = TRUE; + pImp->bActive = sal_True; } // Subklasse benachrichtigen @@ -688,7 +688,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) //-------------------------------------------------------------------- -void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) +void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI ) /* [Beschreibung] @@ -698,7 +698,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) k"onnen. Dann erh"alt in jedem Fall die Subclass durch Aufruf der virtuellen - Methode <SfxShell::Deactivate(BOOL)> die M"oglichkeit auf das Event + Methode <SfxShell::Deactivate(sal_Bool)> die M"oglichkeit auf das Event zu reagieren. */ @@ -723,7 +723,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) { // austragen pImp->pFrame = 0; - pImp->bActive = FALSE; + pImp->bActive = sal_False; } // Subklasse benachrichtigen @@ -732,7 +732,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) //-------------------------------------------------------------------- -BOOL SfxShell::IsActive() const +sal_Bool SfxShell::IsActive() const { return pImp->bActive; } @@ -741,7 +741,7 @@ BOOL SfxShell::IsActive() const void SfxShell::Activate ( - BOOL /*bMDI*/ /* TRUE + sal_Bool /*bMDI*/ /* TRUE der <SfxDispatcher>, auf dem die SfxShell sich befindet, ist aktiv geworden oder die SfxShell Instanz wurde auf einen aktiven SfxDispatcher @@ -764,7 +764,7 @@ void SfxShell::Activate [Querverweise] - StarView SystemWindow::Activate(BOOL) + StarView SystemWindow::Activate(sal_Bool) */ { @@ -774,7 +774,7 @@ void SfxShell::Activate void SfxShell::Deactivate ( - BOOL /*bMDI*/ /* TRUE + sal_Bool /*bMDI*/ /* TRUE der <SfxDispatcher>, auf dem die SfxShell sich befindet, ist inaktiv geworden oder die SfxShell Instanz wurde auf einen aktiven SfxDispatcher @@ -797,7 +797,7 @@ void SfxShell::Deactivate [Querverweise] - StarView SystemWindow::Dectivate(BOOL) + StarView SystemWindow::Dectivate(sal_Bool) */ { @@ -857,7 +857,7 @@ ResMgr* SfxShell::GetResMgr() const //-------------------------------------------------------------------- -FASTBOOL SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot ) +bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot ) /* [Beschreibung] @@ -867,7 +867,7 @@ FASTBOOL SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot ) { // Slot-Status holen SfxItemPool &rPool = GetPool(); - const USHORT nId = rSlot.GetWhich( rPool ); + const sal_uInt16 nId = rSlot.GetWhich( rPool ); SfxItemSet aSet(rPool, nId, nId); SfxStateFunc pFunc = rSlot.GetStateFnc(); CallState( pFunc, aSet ); @@ -887,7 +887,7 @@ long ShellCall_Impl( void* pObj, void* pArg ) */ //-------------------------------------------------------------------- -const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, BOOL bAsync ) +const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, sal_Bool bAsync ) { if( !bAsync ) return ExecuteSlot( rReq, (SfxInterface*)0L ); @@ -938,14 +938,14 @@ const SfxPoolItem* SfxShell::ExecuteSlot [Querverweise] - <SfxShell::GetSlotState(USHORT,const SfxInterface*,SfxItemSet*)> + <SfxShell::GetSlotState(sal_uInt16,const SfxInterface*,SfxItemSet*)> */ { if ( !pIF ) pIF = GetInterface(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxSlot* pSlot = NULL; if ( nSlot >= SID_VERB_START && nSlot <= SID_VERB_END ) pSlot = GetVerbSlot_Impl(nSlot); @@ -964,7 +964,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot const SfxPoolItem* SfxShell::GetSlotState ( - USHORT nSlotId, // Slot-Id des zu befragenden Slots + sal_uInt16 nSlotId, // Slot-Id des zu befragenden Slots const SfxInterface* pIF, // default = 0 bedeutet virtuell besorgen SfxItemSet* pStateSet // SfxItemSet der Slot-State-Methode ) @@ -1032,7 +1032,7 @@ const SfxPoolItem* SfxShell::GetSlotState SfxStateFunc pFunc = pSlot->GetStateFnc(); if ( pFunc ) CallState( pFunc, aSet ); - eState = aSet.GetItemState( nSlotId, TRUE, &pItem ); + eState = aSet.GetItemState( nSlotId, sal_True, &pItem ); // ggf. Default-Item besorgen if ( eState == SFX_ITEM_DEFAULT ) @@ -1089,18 +1089,18 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em { SfxBindings *pBindings = pViewSh->GetViewFrame()->GetDispatcher()->GetBindings(); - USHORT nCount = pImp->aSlotArr.Count(); - for (USHORT n1=0; n1<nCount ; n1++) + sal_uInt16 nCount = pImp->aSlotArr.Count(); + for (sal_uInt16 n1=0; n1<nCount ; n1++) { - USHORT nId = SID_VERB_START + n1; - pBindings->Invalidate(nId, FALSE, TRUE); + sal_uInt16 nId = SID_VERB_START + n1; + pBindings->Invalidate(nId, sal_False, sal_True); } } - USHORT nr=0; + sal_uInt16 nr=0; for (sal_Int32 n=0; n<aVerbs.getLength(); n++) { - USHORT nSlotId = SID_VERB_START + nr++; + sal_uInt16 nSlotId = SID_VERB_START + nr++; DBG_ASSERT(nSlotId <= SID_VERB_END, "Zuviele Verben!"); if (nSlotId > SID_VERB_END) break; @@ -1132,7 +1132,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em else pNewSlot->pNextSlot = pNewSlot; - pImp->aSlotArr.Insert(pNewSlot, (USHORT) n); + pImp->aSlotArr.Insert(pNewSlot, (sal_uInt16) n); } pImp->aVerbList = aVerbs; @@ -1143,7 +1143,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em // abgeholt, es reicht also, ein neues StatusUpdate anzuregen SfxBindings *pBindings = pViewSh->GetViewFrame()->GetDispatcher()-> GetBindings(); - pBindings->Invalidate( SID_OBJECT, TRUE, TRUE ); + pBindings->Invalidate( SID_OBJECT, sal_True, sal_True ); } } @@ -1158,11 +1158,11 @@ const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& S void SfxShell::VerbExec(SfxRequest& rReq) { - USHORT nId = rReq.GetSlot(); + sal_uInt16 nId = rReq.GetSlot(); SfxViewShell *pViewShell = GetViewShell(); if ( pViewShell ) { - BOOL bReadOnly = pViewShell->GetObjectShell()->IsReadOnly(); + sal_Bool bReadOnly = pViewShell->GetObjectShell()->IsReadOnly(); com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aList = pViewShell->GetVerbs(); for (sal_Int32 n=0, nVerb=0; n<aList.getLength(); n++) { @@ -1192,12 +1192,12 @@ void SfxShell::VerbState(SfxItemSet& ) //-------------------------------------------------------------------- -const SfxSlot* SfxShell::GetVerbSlot_Impl(USHORT nId) const +const SfxSlot* SfxShell::GetVerbSlot_Impl(sal_uInt16 nId) const { com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > rList = pImp->aVerbList; DBG_ASSERT(nId >= SID_VERB_START && nId <= SID_VERB_END,"Falsche VerbId!"); - USHORT nIndex = nId - SID_VERB_START; + sal_uInt16 nIndex = nId - SID_VERB_START; DBG_ASSERT(nIndex < rList.getLength(),"Falsche VerbId!"); if (nIndex < rList.getLength()) @@ -1208,14 +1208,14 @@ const SfxSlot* SfxShell::GetVerbSlot_Impl(USHORT nId) const //-------------------------------------------------------------------- -void SfxShell::SetHelpId(ULONG nId) +void SfxShell::SetHelpId(sal_uIntPtr nId) { pImp->nHelpId = nId; } //-------------------------------------------------------------------- -ULONG SfxShell::GetHelpId() const +sal_uIntPtr SfxShell::GetHelpId() const { return pImp->nHelpId; } @@ -1239,8 +1239,8 @@ sal_Bool SfxShell::HasUIFeature( sal_uInt32 ) long DispatcherUpdate_Impl( void*, void* pArg ) { - ((SfxDispatcher*) pArg)->Update_Impl( TRUE ); - ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(FALSE); + ((SfxDispatcher*) pArg)->Update_Impl( sal_True ); + ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(sal_False); return 0; } @@ -1256,26 +1256,26 @@ void SfxShell::UIFeatureChanged() pImp->pUpdater = new svtools::AsynchronLink( Link( this, DispatcherUpdate_Impl ) ); // Mehrfachaufrufe gestattet - pImp->pUpdater->Call( pFrame->GetDispatcher(), TRUE ); + pImp->pUpdater->Call( pFrame->GetDispatcher(), sal_True ); } } -void SfxShell::SetDisableFlags( ULONG nFlags ) +void SfxShell::SetDisableFlags( sal_uIntPtr nFlags ) { pImp->nDisableFlags = nFlags; } -ULONG SfxShell::GetDisableFlags() const +sal_uIntPtr SfxShell::GetDisableFlags() const { return pImp->nDisableFlags; } -SfxItemSet* SfxShell::CreateItemSet( USHORT ) +SfxItemSet* SfxShell::CreateItemSet( sal_uInt16 ) { return NULL; } -void SfxShell::ApplyItemSet( USHORT, const SfxItemSet& ) +void SfxShell::ApplyItemSet( sal_uInt16, const SfxItemSet& ) { } diff --git a/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx index cb24fe34e9b6..df627a19e6fb 100644 --- a/sfx2/source/control/sorgitm.cxx +++ b/sfx2/source/control/sorgitm.cxx @@ -88,17 +88,17 @@ int SfxScriptOrganizerItem::operator==( const SfxPoolItem& rItem) const } -sal_Bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const { String aValue; - BOOL bIsString = FALSE; + sal_Bool bIsString = sal_False; sal_Bool bValue = sal_False; nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) { case 0: case MID_SCRIPT_ORGANIZER_LANGUAGE: - bIsString = TRUE; + bIsString = sal_True; aValue = aLanguage; break; default: @@ -113,7 +113,7 @@ sal_Bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, BYT return sal_True; } -sal_Bool SfxScriptOrganizerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +sal_Bool SfxScriptOrganizerItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { ::rtl::OUString aValue; sal_Bool bRet = sal_False; diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 3fdd14369856..889cf97b1b6c 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -366,7 +366,7 @@ void SfxStateCache::SetState ( SfxItemState eState, // <SfxItemState> von 'pState' const SfxPoolItem* pState, // Status des Slots, ggf. 0 oder -1 - BOOL bMaybeDirty + sal_Bool bMaybeDirty ) /* [Beschreibung] @@ -386,7 +386,7 @@ void SfxStateCache::SetState //-------------------------------------------------------------------- -void SfxStateCache::SetVisibleState( BOOL bShow ) +void SfxStateCache::SetVisibleState( sal_Bool bShow ) { SfxItemState eState( SFX_ITEM_AVAILABLE ); const SfxPoolItem* pState( NULL ); @@ -411,7 +411,7 @@ void SfxStateCache::SetVisibleState( BOOL bShow ) } else { - pState = new SfxVisibilityItem( nId, FALSE ); + pState = new SfxVisibilityItem( nId, sal_False ); bDeleteItem = sal_True; } @@ -438,7 +438,7 @@ void SfxStateCache::SetState_Impl ( SfxItemState eState, // <SfxItemState> von 'pState' const SfxPoolItem* pState, // Status des Slots, ggf. 0 oder -1 - BOOL bMaybeDirty + sal_Bool bMaybeDirty ) { (void)bMaybeDirty; //unused @@ -457,10 +457,10 @@ void SfxStateCache::SetState_Impl DBG_PROFSTART(SfxStateCacheSetState); // m"ussen die Controller "uberhaupt benachrichtigt werden? - FASTBOOL bNotify = bItemDirty; + bool bNotify = bItemDirty; if ( !bItemDirty ) { - FASTBOOL bBothAvailable = pLastItem && pState && + bool bBothAvailable = pLastItem && pState && !IsInvalidItem(pState) && !IsInvalidItem(pLastItem); DBG_ASSERT( !bBothAvailable || pState != pLastItem, "setting state with own item" ); if ( bBothAvailable ) @@ -504,7 +504,7 @@ void SfxStateCache::SetState_Impl // alten Status in allen Controllern nochmal setzen -void SfxStateCache::SetCachedState( BOOL bAlways ) +void SfxStateCache::SetCachedState( sal_Bool bAlways ) { DBG_MEMTEST(); DBG_CHKTHIS(SfxStateCache, 0); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 2a6fc0df5860..0bde76cb44b1 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -605,12 +605,12 @@ void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util } else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_BOOL], 4 )) { - // BOOL support + // sal_Bool support rArgs[nLen].Value <<= aValue.toBoolean(); } else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_BYTE], 4 )) { - // BYTE support + // sal_uInt8 support rArgs[nLen].Value <<= sal_Int8( aValue.toInt32() ); } else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_LONG], 4 )) @@ -650,7 +650,7 @@ void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util SfxMapUnit SfxDispatchController_Impl::GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlotId ) { - USHORT nWhich = rPool.GetWhich( nSlotId ); + sal_uInt16 nWhich = rPool.GetWhich( nSlotId ); return rPool.GetMetric( nWhich ); } @@ -770,7 +770,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util { const SfxSlot *pSlot = 0; if ( pDispatcher->GetShellAndSlot_Impl( GetId(), &pShell, &pSlot, sal_False, - SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), FALSE ) ) + SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), sal_False ) ) { if ( bMasterSlave ) { @@ -851,10 +851,10 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch; if ( bSuccess && pItem && !pItem->ISA(SfxVoidItem) ) { - USHORT nSubId( 0 ); + sal_uInt16 nSubId( 0 ); if ( eMapUnit == SFX_MAPUNIT_TWIP ) nSubId |= CONVERT_TWIPS; - pItem->QueryValue( aEvent.Result, (BYTE)nSubId ); + pItem->QueryValue( aEvent.Result, (sal_uInt8)nSubId ); } rListener->dispatchFinished( aEvent ); @@ -957,7 +957,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( ( eState >= SFX_ITEM_AVAILABLE ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) ) { // Retrieve metric from pool to have correct sub ID when calling QueryValue - USHORT nSubId( 0 ); + sal_uInt16 nSubId( 0 ); SfxMapUnit eMapUnit( SFX_MAPUNIT_100TH_MM ); // retrieve the core metric @@ -975,7 +975,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( eMapUnit == SFX_MAPUNIT_TWIP ) nSubId |= CONVERT_TWIPS; - pState->QueryValue( aState, (BYTE)nSubId ); + pState->QueryValue( aState, (sal_uInt8)nSubId ); } else if ( eState == SFX_ITEM_DONTCARE ) { |