diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-24 13:21:11 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-02-25 10:34:26 +0200 |
commit | fcf339ca5f198529a1eaf70e2ec893f75a843558 (patch) | |
tree | 97dd80e34cf4b7371b5ad210181fc5e1b5bce82f /sfx2 | |
parent | 1c4e95db104cd5f732bc41a539a7dc5fd9269ef6 (diff) |
convert SFX_SLOT_ constants to enum class
Change-Id: Icc3aad14d9d0c59c1c1c8f124f0626a9f947b93f
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appdispatchprovider.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/bindings.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/control/ctrlitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/control/request.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/control/shell.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 8 |
10 files changed, 31 insertions, 31 deletions
diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx index 53c33651aa39..d761f83676c6 100644 --- a/sfx2/source/appl/appdispatchprovider.cxx +++ b/sfx2/source/appl/appdispatchprovider.cxx @@ -184,7 +184,7 @@ throw (uno::RuntimeException, std::exception) std::list< sal_Int16 > aGroupList; SfxSlotPool* pAppSlotPool = &SfxGetpApp()->GetAppSlotPool_Impl(); - const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); + const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG ); // Gruppe anw"ahlen ( Gruppe 0 ist intern ) for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ ) @@ -219,7 +219,7 @@ throw (uno::RuntimeException, std::exception) if ( pAppSlotPool ) { - const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); + const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG ); OUString aCmdPrefix( ".uno:" ); // Gruppe anw"ahlen ( Gruppe 0 ist intern ) diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index a64ec0369229..21091580b60e 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -188,7 +188,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert return; const beans::PropertyValue* pPropsVal = rArgs.getConstArray(); - if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) + if ( !pSlot->IsMode(SfxSlotMode::METHOD) ) { // slot is a property const SfxType* pType = pSlot->GetType(); @@ -936,7 +936,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b #endif const SfxType *pType = pSlot->GetType(); - if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) + if ( !pSlot->IsMode(SfxSlotMode::METHOD) ) { // slot is a property sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); @@ -1126,7 +1126,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b // not really set continue; - if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) ) + if ( !pSlot->IsMode(SfxSlotMode::METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) ) continue; bool bIsMediaDescriptor = isMediaDescriptor( nSlotId ); @@ -1273,7 +1273,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b beans::PropertyValue *pValue = aSequ.getArray(); sal_Int32 nActProp=0; - if ( !pSlot->IsMode(SFX_SLOT_METHOD) ) + if ( !pSlot->IsMode(SfxSlotMode::METHOD) ) { // slot is a property sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 466d8185c774..7aa2e8e1ff52 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -510,7 +510,7 @@ void SfxBindings::Update const SfxSlotServer* pMsgServer = pDispatcher ? pCache->GetSlotServer(*pDispatcher, pImp->xProv) : NULL; if ( !pCache->IsControllerDirty() && ( !pMsgServer || - !pMsgServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) ) ) + !pMsgServer->GetSlot()->IsMode(SfxSlotMode::VOLATILE) ) ) { pImp->bInUpdate = false; InvalidateSlotsInMap_Impl(); @@ -1204,7 +1204,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell // Which value has to be mapped for Attribute slots const sal_uInt16 nSlotId = pSlot->GetSlotId(); aReq.SetSlot( nSlotId ); - if ( pSlot->IsMode(SFX_SLOT_TOGGLE) ) + if ( pSlot->IsMode(SfxSlotMode::TOGGLE) ) { // The value is attached to a toggleable attribute (Bools) sal_uInt16 nWhich = pSlot->GetWhich(rPool); @@ -1651,7 +1651,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer ) { SfxStateCache* pCache = (*pImp->pCaches)[n]; const SfxSlotServer *pSlotServer = pCache->GetSlotServer(*pDispatcher, pImp->xProv); - if ( pSlotServer && pSlotServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) ) + if ( pSlotServer && pSlotServer->GetSlot()->IsMode(SfxSlotMode::VOLATILE) ) { pCache->Invalidate(false); bVolatileSlotsPresent = true; diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index dcc788ea5c7e..c602e443b457 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -28,7 +28,7 @@ #ifdef DBG_UTIL -void SfxControllerItem::CheckConfigure_Impl( sal_uIntPtr nType ) +void SfxControllerItem::CheckConfigure_Impl( SfxSlotMode nType ) { // Real Slot? (i.e. no Separator etc.) if ( !nId ) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 46d1d3f7d330..930ed0b07d83 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -216,7 +216,7 @@ int SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest SFX_STACK(SfxDispatcher::Call_Impl); // The slot may be called (meaning enabled) - if ( rSlot.IsMode(SFX_SLOT_FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) ) + if ( rSlot.IsMode(SfxSlotMode::FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) ) { if ( GetFrame() ) { @@ -238,13 +238,13 @@ int SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest if(xSupplier.is()) xRecorder = xSupplier->getDispatchRecorder(); - if ( bRecord && xRecorder.is() && !rSlot.IsMode(SFX_SLOT_NORECORD) ) + if ( bRecord && xRecorder.is() && !rSlot.IsMode(SfxSlotMode::NORECORD) ) rReq.Record_Impl( rShell, rSlot, xRecorder, GetFrame() ); } } // Get all that is needed, because the slot may not have survived the // Execute if it is a 'pseudo slot' for macros or verbs. - bool bAutoUpdate = rSlot.IsMode(SFX_SLOT_AUTOUPDATE); + bool bAutoUpdate = rSlot.IsMode(SfxSlotMode::AUTOUPDATE); // API-call parentheses and document-lock during the calls { @@ -835,7 +835,7 @@ void SfxDispatcher::_Execute(SfxShell& rShell, const SfxSlot& rSlot, if ( bool(eCallMode & SfxCallMode::ASYNCHRON) || ( (eCallMode & SfxCallMode::SYNCHRON) == SfxCallMode::SLOT && - rSlot.IsMode(SFX_SLOT_ASYNCHRON) ) ) + rSlot.IsMode(SfxSlotMode::ASYNCHRON) ) ) { SfxDispatcher *pDispat = this; while ( pDispat ) @@ -1344,7 +1344,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne if ( bReadOnlyShell ) { // only show ChildWindows if their slot is allowed for readonly documents - if ( pSlot && !pSlot->IsMode( SFX_SLOT_READONLYDOC ) ) + if ( pSlot && !pSlot->IsMode( SfxSlotMode::READONLYDOC ) ) continue; } @@ -1356,7 +1356,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne sal_uInt16 nMode = SFX_VISIBILITY_STANDARD; if( pSlot ) { - if ( pSlot->IsMode(SFX_SLOT_CONTAINER) ) + if ( pSlot->IsMode(SfxSlotMode::CONTAINER) ) { if ( pWorkWin->IsVisible_Impl( SFX_VISIBILITY_CLIENT ) ) nMode |= SFX_VISIBILITY_CLIENT; @@ -1795,13 +1795,13 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b if ( pSlot && pSlot->nDisableFlags && ( pSlot->nDisableFlags & pObjShell->GetDisableFlags() ) != 0 ) return false; - if ( pSlot && !( pSlot->nFlags & SFX_SLOT_READONLYDOC ) && bReadOnly ) + if ( pSlot && !( pSlot->nFlags & SfxSlotMode::READONLYDOC ) && bReadOnly ) return false; if ( pSlot ) { // Slot belongs to Container? - bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER); + bool bIsContainerSlot = pSlot->IsMode(SfxSlotMode::CONTAINER); bool bIsInPlace = xImp->pFrame && xImp->pFrame->GetObjectShell()->IsInPlaceActive(); // Shell belongs to Server? diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 50e71b5779a8..1ef8e2956de2 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -698,7 +698,7 @@ void SfxRequest::Done_Impl SfxItemPool &rPool = pImp->pShell->GetPool(); // Property-Slot? - if ( !pImp->pSlot->IsMode(SFX_SLOT_METHOD) ) + if ( !pImp->pSlot->IsMode(SfxSlotMode::METHOD) ) { // get the property as SfxPoolItem const SfxPoolItem *pItem; @@ -719,7 +719,7 @@ void SfxRequest::Done_Impl } // record everything in a single statement? - else if ( pImp->pSlot->IsMode(SFX_SLOT_RECORDPERSET) ) + else if ( pImp->pSlot->IsMode(SfxSlotMode::RECORDPERSET) ) { uno::Sequence < beans::PropertyValue > aSeq; if ( pSet ) @@ -728,7 +728,7 @@ void SfxRequest::Done_Impl } // record each item as a single statement - else if ( pImp->pSlot->IsMode(SFX_SLOT_RECORDPERITEM) ) + else if ( pImp->pSlot->IsMode(SfxSlotMode::RECORDPERITEM) ) { if ( pSet ) { @@ -743,8 +743,8 @@ void SfxRequest::Done_Impl // play it safe; repair the wrong flags OSL_FAIL( "recursion RecordPerItem - use RecordPerSet!" ); SfxSlot *pSlot = (SfxSlot*) pImp->pSlot; - pSlot->nFlags &= ~((sal_uIntPtr)SFX_SLOT_RECORDPERITEM); - pSlot->nFlags &= SFX_SLOT_RECORDPERSET; + pSlot->nFlags &= ~(SfxSlotMode::RECORDPERITEM); + pSlot->nFlags &= SfxSlotMode::RECORDPERSET; } // Record a Sub-Request diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 3aee3e0c6f27..3d28d8045396 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -570,7 +570,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em // Verb slots must be executed asynchronously, so that they can be // destroyed while executing. - pNewSlot->nFlags = SFX_SLOT_ASYNCHRON | SFX_SLOT_CONTAINER; + pNewSlot->nFlags = SfxSlotMode::ASYNCHRON | SfxSlotMode::CONTAINER; pNewSlot->nMasterSlotId = 0; pNewSlot->nValue = 0; pNewSlot->fnExec = SFX_STUB_PTR(SfxShell,VerbExec); diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 455d517db161..16c42e71fbc2 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -84,7 +84,7 @@ void SfxMenuControl::Bind( SetId( nSlotId ); #ifdef DBG_UTIL - CheckConfigure_Impl(SFX_SLOT_MENUCONFIG); + CheckConfigure_Impl(SfxSlotMode::MENUCONFIG); #endif } diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 610f7e453bb5..3355cde2d3e6 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -96,13 +96,13 @@ void SfxMenuImageControl_Impl::Update() { sal_uInt16 nslotId = pSVMenu->GetItemId( nPos ); const SfxSlot* pSlot = pPool->GetSlot( nslotId ); - if ( pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ) ) + if ( pSlot && pSlot->IsMode( SfxSlotMode::IMAGEROTATION ) ) { pSVMenu->SetItemImageMirrorMode( nslotId, false ); pSVMenu->SetItemImageAngle( nslotId, lRotation ); } - if ( pSlot && pSlot->IsMode( SFX_SLOT_IMAGEREFLECTION ) ) + if ( pSlot && pSlot->IsMode( SfxSlotMode::IMAGEREFLECTION ) ) pSVMenu->SetItemImageMirrorMode( nslotId, bIsMirrored ); } } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 021aea48b351..1d27f842eda2 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -752,7 +752,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const pSlot = rSlotPool.GetUnoSlot( aMasterCommand ); else pSlot = rSlotPool.GetUnoSlot( aURL.Path ); - if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) ) + if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SfxSlotMode::CONTAINER ) ) ) return pAct->GetBindings().GetDispatch( pSlot, aURL, bMasterCommand ); else { @@ -809,7 +809,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( pAct ); const SfxSlot* pSlot = rSlotPool.GetSlot( nId ); - if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) ) + if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SfxSlotMode::CONTAINER ) ) ) return pAct->GetBindings().GetDispatch( pSlot, aURL, false ); else { @@ -1137,7 +1137,7 @@ throw (RuntimeException, std::exception) SfxSlotPool* pPool = &SfxSlotPool::GetSlotPool( pViewFrame ); SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); - const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); + const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG ); // Select Group ( Group 0 is internal ) for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ ) @@ -1169,7 +1169,7 @@ throw (RuntimeException, std::exception) SolarMutexGuard aGuard; if ( m_pData->m_pViewShell ) { - const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG ); + const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG ); SfxViewFrame* pViewFrame( m_pData->m_pViewShell->GetFrame() ); SfxSlotPool* pPool( &SfxSlotPool::GetSlotPool( pViewFrame )); |