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 /sw/source/uibase | |
parent | ce65d21ddb0f77846ecf3f3800ca0f361a9e5dbd (diff) |
Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULT
Change-Id: I88eeac06413fc3935cbbdb357ff8bf9acaa383a8
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/romenu.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/frmdlg/colex.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/misc/glshell.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/tbxanchr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PagePropertyPanel.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/bookctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/tmplctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/viewlayoutctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/zoomctrl.cxx | 2 |
15 files changed, 23 insertions, 23 deletions
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 33f1e175a43c..fa3c14755b4b 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -61,7 +61,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD { SfxPoolItem *_pItem = 0; SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem ); - if (eState >= SFX_ITEM_AVAILABLE) + if (eState >= SFX_ITEM_DEFAULT) { EnableItem( nMID, true ); if (_pItem) @@ -202,7 +202,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState ); Check( MN_READONLY_COPY, SID_COPY, rDis ); - if(eState < SFX_ITEM_AVAILABLE) + if(eState < SFX_ITEM_DEFAULT) EnableItem( MN_READONLY_COPY, false ); delete pState; pState = NULL; diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index b1f04173bf80..c8f0d2004a58 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -595,9 +595,9 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet ) { DELETEZ(pGridItem); //get the grid information - if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, true)) + if(SFX_ITEM_DEFAULT <= rSet.GetItemState(RES_TEXTGRID, true)) pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone(); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, true )) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( RES_FRAMEDIR, true )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index adc97e02d0fc..6fa877697c3d 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -92,7 +92,7 @@ static void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq ) static void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) { - if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, false )) + if( SFX_ITEM_DEFAULT >= rSet.GetItemState( SID_SAVEDOC, false )) { if( !rSh.GetDoc()->getIDocumentState().IsModified() ) rSet.DisableItem( SID_SAVEDOC ); diff --git a/sw/source/uibase/ribbar/tbxanchr.cxx b/sw/source/uibase/ribbar/tbxanchr.cxx index e90b3ab9905e..d111348b1d97 100644 --- a/sw/source/uibase/ribbar/tbxanchr.cxx +++ b/sw/source/uibase/ribbar/tbxanchr.cxx @@ -53,7 +53,7 @@ void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const { GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); - if( eState == SFX_ITEM_AVAILABLE ) + if( eState == SFX_ITEM_DEFAULT ) { const SfxUInt16Item* pItem = PTR_CAST( SfxUInt16Item, pState ); if(pItem) diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 48a4a789b352..9fd4c0cb4375 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -95,7 +95,7 @@ void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, sal_uInt16 nId = GetId(); GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); - if( eState == SFX_ITEM_AVAILABLE ) + if( eState == SFX_ITEM_DEFAULT ) { const SfxImageItem* pItem = PTR_CAST( SfxImageItem, pState ); if(pItem) @@ -741,7 +741,7 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/, sal_uInt16 nId = GetId(); GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() ); - if(SFX_ITEM_AVAILABLE <= eState) + if(SFX_ITEM_DEFAULT <= eState) { OUString sZoom(unicode::formatPercent(((const SfxUInt16Item*)pState)->GetValue(), Application::GetSettings().GetUILanguageTag())); diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx index f065af29f433..2db942542b5c 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -464,7 +464,7 @@ void PagePropertyPanel::NotifyItemUpdate( { case SID_ATTR_PAGE_COLUMN: { - if ( eState >= SFX_ITEM_AVAILABLE && + if ( eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SfxInt16Item) ) { mpPageColumnTypeItem.reset( static_cast<SfxInt16Item*>(pState->Clone()) ); @@ -473,7 +473,7 @@ void PagePropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_PAGE_LRSPACE: - if ( eState >= SFX_ITEM_AVAILABLE && + if ( eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxLongLRSpaceItem) ) { mpPageLRMarginItem.reset( static_cast<SvxLongLRSpaceItem*>(pState->Clone()) ); @@ -482,7 +482,7 @@ void PagePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_PAGE_ULSPACE: - if ( eState >= SFX_ITEM_AVAILABLE && + if ( eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxLongULSpaceItem) ) { mpPageULMarginItem.reset( static_cast<SvxLongULSpaceItem*>(pState->Clone()) ); @@ -491,7 +491,7 @@ void PagePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_PAGE: - if ( eState >= SFX_ITEM_AVAILABLE && + if ( eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxPageItem) ) { const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION); @@ -515,7 +515,7 @@ void PagePropertyPanel::NotifyItemUpdate( { mpBindings->Invalidate( SID_ATTR_PAGE, true, false ); } - if ( eState >= SFX_ITEM_AVAILABLE && + if ( eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxSizeItem) ) { mpPageSizeItem.reset( static_cast<SvxSizeItem*>(pState->Clone()) ); diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 96d8d344b6f0..540042aa9d02 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -185,7 +185,7 @@ void WrapPropertyPanel::NotifyItemUpdate( { (void)bIsEnabled; - if ( eState == SFX_ITEM_AVAILABLE && + if ( eState == SFX_ITEM_DEFAULT && pState->ISA(SfxBoolItem) ) { //Set Radio Button enable diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index eb908f179b79..6c875c933c31 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1556,7 +1556,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) SfxItemSet aSet(GetPool(), RES_PARATR_NUMRULE, RES_PARATR_NUMRULE); rShell.GetCurAttr(aSet); - if(SFX_ITEM_AVAILABLE <= + if(SFX_ITEM_DEFAULT <= aSet.GetItemState(RES_PARATR_NUMRULE, true)) { const OUString& rNumStyle = diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 81a1c1bc910c..0ec9e5c40c41 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -751,7 +751,7 @@ bool SwView::IsDrawTextHyphenate() SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE ); if( pSdrView->GetAttributes( aNewAttr ) && - aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) + aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_DEFAULT ) bHyphenate = ((const SfxBoolItem&)aNewAttr.Get( EE_PARA_HYPHENATE )). GetValue(); diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index f3da0ba3bd21..88b7238c2a32 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -1189,7 +1189,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) ( nSelType & nsSelectionType::SEL_GRF ) || ( nSelType & nsSelectionType::SEL_FRM ) || ( nSelType & nsSelectionType::SEL_OLE ) || - ( SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE) ) || + ( SFX_ITEM_DEFAULT > aCoreSet.GetItemState(RES_LR_SPACE) ) || (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich) ) || ( bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)) ) @@ -1258,7 +1258,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aUL.SetWhich(nWhich); SfxItemState e = aCoreSet.GetItemState(RES_UL_SPACE); - if( e >= SFX_ITEM_AVAILABLE ) + if( e >= SFX_ITEM_DEFAULT ) rSet.Put( aUL ); else rSet.InvalidateItem(nWhich); diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index 65d8d090bd8a..15db91a8a88d 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -72,7 +72,7 @@ SwBookmarkControl::~SwBookmarkControl() void SwBookmarkControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) ) + if( eState != SFX_ITEM_DEFAULT || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else if ( pState->ISA( SfxStringItem ) ) { diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index d86eadba4464..1a6574ff4334 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -72,7 +72,7 @@ SwTemplateControl::~SwTemplateControl() void SwTemplateControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) ) + if( eState != SFX_ITEM_DEFAULT || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else if ( pState->ISA( SfxStringItem ) ) { diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index cb44f35e1c08..8299564d46b9 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -643,7 +643,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) } break; - case SFX_ITEM_AVAILABLE: + case SFX_ITEM_DEFAULT: break; default: diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx index 633af0550e22..b81fa35dfdf7 100644 --- a/sw/source/uibase/utlui/viewlayoutctrl.cxx +++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx @@ -85,7 +85,7 @@ SwViewLayoutControl::~SwViewLayoutControl() void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) ) + if ( SFX_ITEM_DEFAULT != eState || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else { diff --git a/sw/source/uibase/utlui/zoomctrl.cxx b/sw/source/uibase/utlui/zoomctrl.cxx index ac592474eb80..3c7fbc81cb10 100644 --- a/sw/source/uibase/utlui/zoomctrl.cxx +++ b/sw/source/uibase/utlui/zoomctrl.cxx @@ -43,7 +43,7 @@ SwZoomControl::~SwZoomControl() void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if(SFX_ITEM_AVAILABLE == eState && pState->ISA( SfxStringItem )) + if(SFX_ITEM_DEFAULT == eState && pState->ISA( SfxStringItem )) { sPreviewZoom = ((const SfxStringItem*)pState)->GetValue(); GetStatusBar().SetItemText( GetId(), sPreviewZoom ); |