diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 15:21:44 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 16:37:20 +0200 |
commit | 39e91c585d55b99a2b73ed2a58312a387763a4bc (patch) | |
tree | 8752da8db5cd2a73d7225a9cd9fccfe72f48627d /sfx2 | |
parent | ce65d21ddb0f77846ecf3f3800ca0f361a9e5dbd (diff) |
Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULT
Change-Id: I88eeac06413fc3935cbbdb357ff8bf9acaa383a8
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/bindings.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/control/ctrlitem.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/querystatus.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/request.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/sfxstatuslistener.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/shell.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/statcach.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/tplcitem.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/inet/inettbc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/statbar/stbitem.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 10 |
16 files changed, 36 insertions, 36 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index ad43c5b924d8..0b95c9bc368a 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -549,7 +549,7 @@ void SfxBindings::SetState // Update status if ( !pCache->IsControllerDirty() ) pCache->Invalidate(false); - pCache->SetState( SFX_ITEM_AVAILABLE, pItem ); + pCache->SetState( SFX_ITEM_DEFAULT, pItem ); //! Not implemented: Updates from EnumSlots via master slots } @@ -583,7 +583,7 @@ void SfxBindings::SetState // Update Status if ( !pCache->IsControllerDirty() ) pCache->Invalidate(false); - pCache->SetState( SFX_ITEM_AVAILABLE, &rItem ); + pCache->SetState( SFX_ITEM_DEFAULT, &rItem ); //! Not implemented: Updates from EnumSlots via master slots } @@ -1171,11 +1171,11 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell if ( eState == SFX_ITEM_DISABLED ) return; - if ( SFX_ITEM_AVAILABLE == eState && SfxItemPool::IsWhich(nWhich) ) + if ( SFX_ITEM_DEFAULT == eState && SfxItemPool::IsWhich(nWhich) ) pOldItem = &aSet.Get(nWhich); if ( SFX_ITEM_SET == eState || - ( SFX_ITEM_AVAILABLE == eState && + ( SFX_ITEM_DEFAULT == eState && SfxItemPool::IsWhich(nWhich) && pOldItem ) ) { @@ -1438,7 +1438,7 @@ void SfxBindings::UpdateControllers_Impl else if ( SFX_ITEM_DISABLED == eState ) pCache->SetState(SFX_ITEM_DISABLED, 0); else - pCache->SetState(SFX_ITEM_AVAILABLE, pItem); + pCache->SetState(SFX_ITEM_DEFAULT, pItem); } // Update the slots for so far available and bound Controllers for @@ -1452,7 +1452,7 @@ void SfxBindings::UpdateControllers_Impl // Items cast on EnumItem const SfxEnumItemInterface *pEnumItem = PTR_CAST(SfxEnumItemInterface,pItem); - if ( eState == SFX_ITEM_AVAILABLE && !pEnumItem ) + if ( eState == SFX_ITEM_DEFAULT && !pEnumItem ) eState = SFX_ITEM_DONTCARE; else eState = SfxControllerItem::GetItemState( pEnumItem ); @@ -1487,12 +1487,12 @@ void SfxBindings::UpdateControllers_Impl // disabled pEnumCache->SetState(SFX_ITEM_DISABLED, 0); } - else if ( SFX_ITEM_AVAILABLE == eState && pEnumItem ) + else if ( SFX_ITEM_DEFAULT == eState && pEnumItem ) { // Determine enum value sal_uInt16 nValue = pEnumItem->GetEnumValue(); SfxBoolItem aBool( pFound->nWhichId, pSlave->GetValue() == nValue ); - pEnumCache->SetState(SFX_ITEM_AVAILABLE, &aBool); + pEnumCache->SetState(SFX_ITEM_DEFAULT, &aBool); } else { @@ -1944,7 +1944,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) if ( pItem ) rpState = pItem->Clone(); } - else if ( eState == SFX_ITEM_AVAILABLE && pItem ) + else if ( eState == SFX_ITEM_DEFAULT && pItem ) { rpState = pItem->Clone(); } diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index 067c938259bf..f28ba9883dac 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -316,7 +316,7 @@ SfxItemState SfxControllerItem::GetItemState Enabled but there were only ambiguous values available (i.e. non that can be queried). - SFX_ITEM_AVAILABLE + SFX_ITEM_DEFAULT Enabled and with available values, which are queried by 'pState'. The Type is thus clearly defined in the entire Program and specified through the Slot. @@ -329,7 +329,7 @@ SfxItemState SfxControllerItem::GetItemState ? SFX_ITEM_DONTCARE : pState->ISA(SfxVoidItem) && !pState->Which() ? SFX_ITEM_UNKNOWN - : SFX_ITEM_AVAILABLE; + : SFX_ITEM_DEFAULT; } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 6fdb0f670f4f..d04075e41fb8 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -2058,7 +2058,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp if ( !rpState ) return SFX_ITEM_DISABLED; else - return SFX_ITEM_AVAILABLE; + return SFX_ITEM_DEFAULT; } return SFX_ITEM_DISABLED; @@ -2089,7 +2089,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: } rAny = aState; - return SFX_ITEM_AVAILABLE; + return SFX_ITEM_DEFAULT; } } diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index ba455387bac3..e97616a68237 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -108,7 +108,7 @@ throw( RuntimeException, std::exception ) if ( rEvent.IsEnabled ) { - m_eState = SFX_ITEM_AVAILABLE; + m_eState = SFX_ITEM_DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getBooleanCppuType() ) diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 47031aab3cbd..fed4e29738b0 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -489,7 +489,7 @@ const SfxPoolItem* SfxRequest::GetItem // Is the item set or available at bDeep == sal_True? const SfxPoolItem *pItem = 0; - if ( ( bDeep ? SFX_ITEM_AVAILABLE : SFX_ITEM_SET ) + if ( ( bDeep ? SFX_ITEM_DEFAULT : SFX_ITEM_SET ) <= pArgs->GetItemState( nWhich, bDeep, &pItem ) ) { // Compare type diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index 543bf3d35e7b..96c77e4565d1 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -167,7 +167,7 @@ throw( RuntimeException, std::exception ) SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_AVAILABLE; + eState = SFX_ITEM_DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::cppu::UnoType< ::cppu::UnoVoidType >::get() ) diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index fbe76d206a17..140726e2e189 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -210,7 +210,7 @@ void SfxShell::PutItem SfxStateCache* pCache = pBindings->GetStateCache( nSlotId ); if ( pCache ) { - pCache->SetState( SFX_ITEM_AVAILABLE, pItem->Clone(), true ); + pCache->SetState( SFX_ITEM_DEFAULT, pItem->Clone(), true ); pCache->SetCachedState( true ); } } diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index b0a4e5935ea9..ec2b36c70a63 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -92,7 +92,7 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame:: } else if (aStatus.State.hasValue()) { - eState = SFX_ITEM_AVAILABLE; + eState = SFX_ITEM_DEFAULT; ::com::sun::star::uno::Any aAny = aStatus.State; ::com::sun::star::uno::Type pType = aAny.getValueType(); @@ -343,7 +343,7 @@ void SfxStateCache::SetState void SfxStateCache::SetVisibleState( bool bShow ) { - SfxItemState eState( SFX_ITEM_AVAILABLE ); + SfxItemState eState( SFX_ITEM_DEFAULT ); const SfxPoolItem* pState( NULL ); bool bDeleteItem( false ); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 1c44eb6f115b..f25c0e6755e0 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -138,7 +138,7 @@ void SAL_CALL SfxUnoControllerItem::statusChanged(const ::com::sun::star::frame: SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_AVAILABLE; + eState = SFX_ITEM_DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == cppu::UnoType< bool >::get() ) @@ -876,7 +876,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( bNotify && pContnr ) { ::com::sun::star::uno::Any aState; - if ( ( eState >= SFX_ITEM_AVAILABLE ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) ) + if ( ( eState >= SFX_ITEM_DEFAULT ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) ) { // Retrieve metric from pool to have correct sub ID when calling QueryValue sal_uInt16 nSubId( 0 ); diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 90657d1230c3..ee897442ad77 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -60,7 +60,7 @@ namespace const SfxPoolItem* pItem; SfxDispatcher* pDisp = pViewSh->GetDispatcher(); SfxItemState nState = pDisp->QueryState( _nSlot, pItem ); - bRet = SFX_ITEM_AVAILABLE <= nState; + bRet = SFX_ITEM_DEFAULT <= nState; if (bRet) _rValue = ( static_cast< const SfxBoolItem* >( pItem ) )->GetValue(); } @@ -261,7 +261,7 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & ) { const SfxPoolItem* pItem; SfxDispatcher* pDisp = pViewSh->GetDispatcher(); - if (SFX_ITEM_AVAILABLE <= pDisp->QueryState( SID_HTML_MODE, pItem )) + if (SFX_ITEM_DEFAULT <= pDisp->QueryState( SID_HTML_MODE, pItem )) { sal_uInt16 nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue(); bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 ); diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 3ed5449d01eb..cdb9899f7e7f 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -66,7 +66,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta case SID_STYLE_FAMILY4: case SID_STYLE_FAMILY5: { - bool bAvailable = SFX_ITEM_AVAILABLE == eState; + bool bAvailable = SFX_ITEM_DEFAULT == eState; if ( !bAvailable ) rTemplateDlg.SetFamilyState(GetId(), 0); else { @@ -100,7 +100,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta { if ( eState == SFX_ITEM_DISABLED ) nWaterCanState = 0xff; - else if( eState == SFX_ITEM_AVAILABLE ) + else if( eState == SFX_ITEM_DEFAULT ) { const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem); assert(pStateItem); //BoolItem expected diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 503d0ddc6518..62146bac2ec4 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -382,7 +382,7 @@ IMPL_LINK_NOARG(SfxVersionDialog, SelectHdl_Impl) const SfxPoolItem *pDummy=NULL; SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy ); eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy ); - m_pCompareButton->Enable(bEnable && eState >= SFX_ITEM_AVAILABLE); + m_pCompareButton->Enable(bEnable && eState >= SFX_ITEM_DEFAULT); return 0L; } diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx index 9e4191ff8feb..f7bfe683da08 100644 --- a/sfx2/source/inet/inettbc.cxx +++ b/sfx2/source/inet/inettbc.cxx @@ -214,7 +214,7 @@ void SfxURLToolBoxControl_Impl::StateChanged if ( GetURLBox()->IsVisible() ) GetURLBox()->GrabFocus(); } - else if ( !GetURLBox()->IsModified() && SFX_ITEM_AVAILABLE == eState ) + else if ( !GetURLBox()->IsModified() && SFX_ITEM_DEFAULT == eState ) { SvtURLBox* pURLBox = GetURLBox(); pURLBox->Clear(); diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index ce1d1bb08ee2..eb4cf2575ac6 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -180,7 +180,7 @@ void SfxMenuControl::StateChanged ? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() ) : eState != SFX_ITEM_DISABLED ); - if ( eState != SFX_ITEM_AVAILABLE ) + if ( eState != SFX_ITEM_DEFAULT ) { // check only for non-Object Menus if ( !bIsObjMenu ) diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 942279b4b04a..41f77ae74fd0 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -253,7 +253,7 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_AVAILABLE; + eState = SFX_ITEM_DEFAULT; uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) @@ -446,11 +446,11 @@ void SfxStatusBarControl::StateChanged DBG_ASSERT( pBar != 0, "setting state to dangling StatusBar" ); const SfxStringItem* pStr = PTR_CAST( SfxStringItem, pState ); - if ( eState == SFX_ITEM_AVAILABLE && pStr ) + if ( eState == SFX_ITEM_DEFAULT && pStr ) pBar->SetItemText( nSID, pStr->GetValue() ); else { - DBG_ASSERT( eState != SFX_ITEM_AVAILABLE || pState->ISA(SfxVoidItem), + DBG_ASSERT( eState != SFX_ITEM_DEFAULT || pState->ISA(SfxVoidItem), "wrong SfxPoolItem subclass in SfxStatusBarControl" ); pBar->SetItemText( nSID, OUString() ); } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 71af4187dafe..47348ec1e989 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -402,7 +402,7 @@ SfxItemState SfxToolBoxControl::GetItemState( Enabled but there were only ambiguous values available (i.e. none that could be queried). - SFX_ITEM_AVAILABLE + SFX_ITEM_DEFAULT Enabled and with available values which can be queried through'pState'. The type is thus by the Slot clearly defined in the entire Program. @@ -415,7 +415,7 @@ SfxItemState SfxToolBoxControl::GetItemState( ? SFX_ITEM_DONTCARE : pState->ISA(SfxVoidItem) && !pState->Which() ? SFX_ITEM_UNKNOWN - : SFX_ITEM_AVAILABLE; + : SFX_ITEM_DEFAULT; } void SfxToolBoxControl::Dispatch( @@ -511,7 +511,7 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_AVAILABLE; + eState = SFX_ITEM_DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) @@ -909,7 +909,7 @@ void SfxToolBoxControl::StateChanged ::TriState eTri = TRISTATE_FALSE; switch ( eState ) { - case SFX_ITEM_AVAILABLE: + case SFX_ITEM_DEFAULT: if ( pState ) { if ( pState->ISA(SfxBoolItem) ) @@ -1059,7 +1059,7 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_AVAILABLE; + eState = SFX_ITEM_DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) |