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 | |
parent | Replace uses of old SFX_ITEM_ON alias with SFX_ITEM_SET (diff) | |
download | core-39e91c585d55b99a2b73ed2a58312a387763a4bc.tar.gz core-39e91c585d55b99a2b73ed2a58312a387763a4bc.zip |
Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULT
Change-Id: I88eeac06413fc3935cbbdb357ff8bf9acaa383a8
119 files changed, 441 insertions, 444 deletions
diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index 40c270e14317..0a1499babf4b 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -122,7 +122,7 @@ void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eSta const MediaItem* pMediaItem = PTR_CAST( MediaItem, pState ); - if( pMediaItem && ( SFX_ITEM_AVAILABLE == eState ) ) + if( pMediaItem && ( SFX_ITEM_DEFAULT == eState ) ) pCtrl->setState( *pMediaItem ); } } diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 545f07bb036c..9b9e04584d2d 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -67,7 +67,7 @@ void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPool if ( !pBox ) return; - if ( eState != SFX_ITEM_AVAILABLE ) + if ( eState != SFX_ITEM_DEFAULT ) pBox->Disable(); else { @@ -357,7 +357,7 @@ void LanguageBoxControl::StateChanged( sal_uInt16 nID, SfxItemState eState, cons (void)nID; if (LanguageBox* pBox = static_cast<LanguageBox*>(GetToolBox().GetItemWindow(GetId()))) { - if (eState != SFX_ITEM_AVAILABLE) + if (eState != SFX_ITEM_DEFAULT) pBox->Disable(); else { diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index ede512f2a248..9b1a65f91781 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -45,7 +45,7 @@ SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkD void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if ( eState == SFX_ITEM_AVAILABLE ) + if ( eState == SFX_ITEM_DEFAULT ) { switch ( nSID ) { diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 724ca7c35652..acfd02d746ed 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -73,7 +73,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ); OUString aAuthorStr, aDateStr; - if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) { bNew = false; const SvxPostItAuthorItem& rAuthor = @@ -85,7 +85,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ); - if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) { const SvxPostItDateItem& rDate = (const SvxPostItDateItem&)rSet.Get( nWhich ); @@ -100,7 +100,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ); OUString aTextStr; - if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) { const SvxPostItTextItem& rText = (const SvxPostItTextItem&)rSet.Get( nWhich ); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 6776974be81b..d5cf0e386101 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1198,7 +1198,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); // miscellaneous - Year2000 - if( SFX_ITEM_AVAILABLE <= pDispatch->QueryState( SID_ATTR_YEAR2000, pItem ) ) + if( SFX_ITEM_DEFAULT <= pDispatch->QueryState( SID_ATTR_YEAR2000, pItem ) ) pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, ((const SfxUInt16Item*)pItem)->GetValue() ) ); else pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (sal_uInt16)aMisc.GetYear2000() ) ); @@ -1247,15 +1247,15 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) if ( pViewFrame ) { SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); - if(SFX_ITEM_AVAILABLE <= pDispatch->QueryState(SID_ATTR_LANGUAGE, pItem)) + if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_ATTR_LANGUAGE, pItem)) pRet->Put(SfxUInt16Item(SID_ATTR_LANGUAGE, ((const SvxLanguageItem*)pItem)->GetLanguage())); - if(SFX_ITEM_AVAILABLE <= pDispatch->QueryState(SID_ATTR_CHAR_CJK_LANGUAGE, pItem)) + if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CJK_LANGUAGE, pItem)) pRet->Put(SfxUInt16Item(SID_ATTR_CHAR_CJK_LANGUAGE, ((const SvxLanguageItem*)pItem)->GetLanguage())); - if(SFX_ITEM_AVAILABLE <= pDispatch->QueryState(SID_ATTR_CHAR_CTL_LANGUAGE, pItem)) + if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CTL_LANGUAGE, pItem)) pRet->Put(SfxUInt16Item(SID_ATTR_CHAR_CTL_LANGUAGE, ((const SvxLanguageItem*)pItem)->GetLanguage())); pRet->Put(aHyphen); - if(SFX_ITEM_AVAILABLE <= pDispatch->QueryState(SID_AUTOSPELL_CHECK, pItem)) + if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_AUTOSPELL_CHECK, pItem)) { pClone = pItem->Clone(); pRet->Put(*pClone); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 6c65cfc499ec..2885744305da 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -476,7 +476,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) // but it must be existing in the rSet! // const SfxPoolItem* pX = GetOldItem( rSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) + if(SFX_ITEM_DEFAULT <= rSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) { ResetFromWallpaperItem( *rSet ); return; @@ -543,7 +543,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) nDestValue = 0; sal_uInt16 nWhich = GetWhich( nSlot ); - if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); m_pBtnTile->Check(); @@ -584,21 +584,21 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) pTableBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); pTableBck_Impl->pCellBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nCellWhich = nWhich; - if ( rSet->GetItemState( SID_ATTR_BRUSH_ROW, false ) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( SID_ATTR_BRUSH_ROW, false ) >= SFX_ITEM_DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( SID_ATTR_BRUSH_ROW ) ); pTableBck_Impl->pRowBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW; - if ( rSet->GetItemState( SID_ATTR_BRUSH_TABLE, false ) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( SID_ATTR_BRUSH_TABLE, false ) >= SFX_ITEM_DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( SID_ATTR_BRUSH_TABLE ) ); pTableBck_Impl->pTableBrush = new SvxBrushItem(*pBgdAttr); @@ -623,7 +623,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) pParaBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); pParaBck_Impl->pParaBrush = new SvxBrushItem(*pBgdAttr); @@ -632,7 +632,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_BRUSH_CHAR ); rSet->GetItemState( nWhich, true ); rSet->GetItemState( nWhich, false ); - if ( rSet->GetItemState( nWhich, true ) > SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( nWhich, true ) > SFX_ITEM_DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); pParaBck_Impl->pCharBrush = new SvxBrushItem(*pBgdAttr); @@ -660,7 +660,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) sal_uInt16 nWhich = GetWhich( nSlot ); boost::scoped_ptr<SvxBrushItem> pTemp; - if ( rSet.GetItemState( nWhich, false ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) { const CntWallpaperItem* pItem = (const CntWallpaperItem*)&rSet.Get( nWhich ); pTemp.reset(new SvxBrushItem( *pItem, nWhich )); @@ -729,7 +729,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) // const SfxPoolItem* pX = GetOldItem( rCoreSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rCoreSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) + if(SFX_ITEM_DEFAULT <= rCoreSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) return FillItemSetWithWallpaperItem( *rCoreSet, SID_VIEW_FLD_PIC ); bool bModified = false; @@ -790,7 +790,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) { // Brush-treatment: if ( rOldItem.GetColor() != aBgdColor || - (SFX_ITEM_AVAILABLE >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection())) + (SFX_ITEM_DEFAULT >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection())) { bModified = true; rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) ); diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index f83eeaa584b5..4ddeea586354 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -217,7 +217,7 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs sal_uInt16 nWhich = GetWhich( SID_ATTR_BORDER_INNER, false ); bool bIsDontCare = true; - if ( rCoreAttrs.GetItemState( nWhich, true ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreAttrs.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) { // paragraph or table const SvxBoxInfoItem* pBoxInfo = diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 6c02b90434c6..9f93183d6afa 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -1361,7 +1361,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) { const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH)); - if(rHeaderSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE) + if(rHeaderSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) { //UUUU aBspWin.SetHdColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(nWhich)); @@ -1375,7 +1375,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) m_pBspWin->setHeaderFillAttributes(aHeaderFillAttributes); const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER)); - if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) + if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rHeaderSet.Get( nWhich ); @@ -1423,7 +1423,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) { const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH)); - if(rFooterSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE) + if(rFooterSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) { //UUUU aBspWin.SetFtColor(rItem.GetColor()); const SvxBrushItem& rItem = (const SvxBrushItem&)rFooterSet.Get(nWhich); @@ -1437,7 +1437,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) m_pBspWin->setFooterFillAttributes(aFooterFillAttributes); const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER)); - if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) + if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rFooterSet.Get( nWhich ); @@ -1535,9 +1535,9 @@ IMPL_LINK_NOARG(SvxPageDescPage, RangeHdl_Impl) Size aBorder; if ( _pSet->GetItemState( GetWhich(SID_ATTR_BORDER_SHADOW) ) >= - SFX_ITEM_AVAILABLE && + SFX_ITEM_DEFAULT && _pSet->GetItemState( GetWhich(SID_ATTR_BORDER_OUTER) ) >= - SFX_ITEM_AVAILABLE ) + SFX_ITEM_DEFAULT ) { aBorder = ( GetMinBorderSpace_Impl( (const SvxShadowItem&)_pSet->Get(GetWhich(SID_ATTR_BORDER_SHADOW)), diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index db62e93c85d8..9f17b543c7ca 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -367,7 +367,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) sal_uInt16 _nWhich = GetWhich( SID_ATTR_TABSTOP ); const SfxItemSet& rInSet = GetItemSet(); - if ( rInSet.GetItemState( _nWhich ) >= SFX_ITEM_AVAILABLE ) + if ( rInSet.GetItemState( _nWhich ) >= SFX_ITEM_DEFAULT ) { const SvxTabStopItem& rTabItem = (const SvxTabStopItem&)rInSet.Get( _nWhich ); @@ -434,7 +434,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 _nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxItemState eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { SfxMapUnit eUnit = pPool->GetMetric( _nWhich ); @@ -504,7 +504,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_ULSPACE ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { SfxMapUnit eUnit = pPool->GetMetric( _nWhich ); @@ -559,7 +559,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_LINESPACE ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) SetLineSpacing_Impl( (const SvxLineSpacingItem &)rSet->Get( _nWhich ) ); else m_pLineDist->SetNoSelection(); @@ -567,7 +567,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) m_pRegisterCB->Check( ((const SfxBoolItem &)rSet->Get( _nWhich )).GetValue()); m_pRegisterCB->SaveValue(); sal_uInt16 nHtmlMode = GetHtmlMode_Impl(*rSet); @@ -1153,7 +1153,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) SfxItemState eItemState = rSet->GetItemState( _nWhich ); sal_Int32 nLBSelect = 0; - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { const SvxAdjustItem& rAdj = (const SvxAdjustItem&)rSet->Get( _nWhich ); @@ -1205,7 +1205,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) } _nWhich = GetWhich(SID_ATTR_PARA_SNAPTOGRID); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { const SvxParaGridItem& rSnap = (const SvxParaGridItem&)rSet->Get( _nWhich ); m_pSnapToGridCB->Check(rSnap.GetValue()); @@ -1214,7 +1214,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_PARA_VERTALIGN ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { m_pVertAlignFL->Show(); @@ -1225,7 +1225,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_FRAMEDIRECTION ); //text direction - if( SFX_ITEM_AVAILABLE <= rSet->GetItemState( _nWhich ) ) + if( SFX_ITEM_DEFAULT <= rSet->GetItemState( _nWhich ) ) { const SvxFrameDirectionItem& rFrameDirItem = ( const SvxFrameDirectionItem& ) rSet->Get( _nWhich ); m_pTextDirectionLB->SelectEntryValue( (SvxFrameDirection)rFrameDirItem.GetValue() ); @@ -1537,7 +1537,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); SfxItemState eItemState = rSet->GetItemState( _nWhich ); - bool bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE; + bool bItemAvailable = eItemState >= SFX_ITEM_DEFAULT; bool bIsHyphen = false; if( !bHtmlMode && bItemAvailable ) { @@ -1566,7 +1566,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_PAGENUM ); - if ( rSet->GetItemState(_nWhich) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState(_nWhich) >= SFX_ITEM_DEFAULT ) { const sal_uInt16 nPageNum = ( (const SfxUInt16Item&)rSet->Get( _nWhich ) ).GetValue(); @@ -1634,7 +1634,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_PAGEBREAK ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { const SvxFmtBreakItem& rPageBreak = (const SvxFmtBreakItem&)rSet->Get( _nWhich ); @@ -1705,7 +1705,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_KEEP ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { m_pKeepParaBox->EnableTriState( false ); const SvxFmtKeepItem& rKeep = @@ -1724,7 +1724,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_SPLIT ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { const SvxFmtSplitItem& rSplit = (const SvxFmtSplitItem&)rSet->Get( _nWhich ); @@ -1741,7 +1741,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_WIDOWS ); SfxItemState eTmpState = rSet->GetItemState( _nWhich ); - if ( eTmpState >= SFX_ITEM_AVAILABLE ) + if ( eTmpState >= SFX_ITEM_DEFAULT ) { const SvxWidowsItem& rWidow = (const SvxWidowsItem&)rSet->Get( _nWhich ); @@ -1764,7 +1764,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_ORPHANS ); eTmpState = rSet->GetItemState( _nWhich ); - if ( eTmpState >= SFX_ITEM_AVAILABLE ) + if ( eTmpState >= SFX_ITEM_DEFAULT ) { const SvxOrphansItem& rOrphan = (const SvxOrphansItem&)rSet->Get( _nWhich ); @@ -2190,7 +2190,7 @@ static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, CheckBox& rBo SfxItemState eState = rSet.GetItemState(_nWhich, true); if( eState == SFX_ITEM_UNKNOWN || eState == SFX_ITEM_DISABLED ) rBox.Enable(false); - else if(eState >= SFX_ITEM_AVAILABLE) + else if(eState >= SFX_ITEM_DEFAULT) { rBox.EnableTriState( false ); rBox.Check(((const SfxBoolItem&)rSet.Get(_nWhich)).GetValue()); diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index 614a0a40350d..ee1a88b88eaf 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -135,9 +135,6 @@ enum SfxItemState { SFX_ITEM_SET = 0x0030 }; -// old stuff - dont use!!! -#define SFX_ITEM_AVAILABLE SFX_ITEM_DEFAULT - class SvXMLUnitConverter; class SfxItemPool; class SfxItemSet; diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx index 5c116e928f5f..6f9d1abb80eb 100644 --- a/reportdesign/source/ui/misc/statusbarcontroller.cxx +++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx @@ -139,7 +139,7 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv { SvxZoomSliderItem aZoomSlider(100,20,400); aZoomSlider.PutValue(_aEvent.State); - static_cast<SvxZoomSliderControl*>(m_rController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoomSlider); + static_cast<SvxZoomSliderControl*>(m_rController.get())->StateChanged(m_nSlotId,SFX_ITEM_DEFAULT,&aZoomSlider); } } else if ( m_aCommandURL == ".uno:Zoom" ) @@ -149,7 +149,7 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv { SvxZoomItem aZoom; aZoom.PutValue(_aEvent.State); - static_cast<SvxZoomStatusBarControl*>(m_rController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoom); + static_cast<SvxZoomStatusBarControl*>(m_rController.get())->StateChanged(m_nSlotId,SFX_ITEM_DEFAULT,&aZoom); } } } diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index 18588de9ed36..5146903025c1 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -255,7 +255,7 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event { SvxFontItem aItem(ITEMID_FONT); aItem.PutValue(Event.State); - static_cast<SvxFontNameToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_AVAILABLE : SFX_ITEM_DISABLED,&aItem); + static_cast<SvxFontNameToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_DEFAULT : SFX_ITEM_DISABLED,&aItem); } break; } diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx index 4332cc283834..7f017f7e0a2e 100644 --- a/sc/source/ui/cctrl/tbinsert.cxx +++ b/sc/source/ui/cctrl/tbinsert.cxx @@ -53,7 +53,7 @@ void ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, { 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 ); diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 9cd27838a2fe..817cf4f5ef65 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -61,7 +61,7 @@ void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId )); OSL_ENSURE( pBox ,"Control not found!" ); - if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) ) + if ( SFX_ITEM_DEFAULT != eState || pState->ISA( SfxVoidItem ) ) { SvxZoomSliderItem aZoomSliderItem( 100 ); pBox->Disable(); diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 294e630e0d90..eeaa2fbf5664 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -266,7 +266,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl { SfxItemSet aAttrs( pView->GetModel()->GetItemPool() ); pView->GetAttributes( aAttrs ); - if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) + if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_DEFAULT ) { bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 9403a4f4a907..e34680efd1d4 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -442,7 +442,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) SdrView* pView = pViewData->GetScDrawView(); SfxItemSet aAttrs( pView->GetModel()->GetItemPool() ); pView->GetAttributes( aAttrs ); - if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) + if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_DEFAULT ) { bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 3293770cc079..2e42029b6234 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -525,7 +525,7 @@ bool ScTpLayoutOptions::FillItemSet( SfxItemSet* rCoreSet ) void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet ) { m_pUnitLB->SetNoSelection(); - if ( rCoreSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index fa74838e152c..71dd44e3182c 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -164,7 +164,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet ) // scaling: nWhich = GetWhich(SID_SCATTR_PAGE_SCALE); - if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) { sal_uInt16 nScale = ((const SfxUInt16Item&)rCoreSet->Get(nWhich)).GetValue(); if( nScale > 0 ) @@ -173,7 +173,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet ) } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETO); - if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) { const ScPageScaleToItem& rItem = static_cast< const ScPageScaleToItem& >( rCoreSet->Get( nWhich ) ); sal_uInt16 nWidth = rItem.GetWidth(); @@ -189,7 +189,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet ) } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETOPAGES); - if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) { sal_uInt16 nPages = ((const SfxUInt16Item&)rCoreSet->Get(nWhich)).GetValue(); if( nPages > 0 ) diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index 649fdf4a5e08..462a69c7ea00 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -311,7 +311,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_ALIGN_DEGREES: - if (eState >= SFX_ITEM_AVAILABLE) + if (eState >= SFX_ITEM_DEFAULT) { long nTmp = ((const SfxInt32Item*)pState)->GetValue(); mpMtrAngle->SetValue( nTmp / 100); //wj @@ -350,7 +350,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_ALIGN_STACKED: - if (eState >= SFX_ITEM_AVAILABLE) + if (eState >= SFX_ITEM_DEFAULT) { mpCbStacked->EnableTriState(false); const SfxBoolItem* aStackItem = (const SfxBoolItem*)pState; diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 3a162f9434de..51bc433e63ff 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -216,7 +216,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( { case SID_NUMBER_TYPE_FORMAT: { - if( eState >= SFX_ITEM_AVAILABLE) + if( eState >= SFX_ITEM_DEFAULT) { const SfxInt16Item* pItem = (const SfxInt16Item*)pState; sal_uInt16 nVal = pItem->GetValue(); @@ -254,7 +254,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( bool bNegRed = false; sal_uInt16 nPrecision = 0; sal_uInt16 nLeadZeroes = 0; - if( eState >= SFX_ITEM_AVAILABLE) + if( eState >= SFX_ITEM_DEFAULT) { const SfxStringItem* pItem = (const SfxStringItem*)pState; OUString aCode = pItem->GetValue(); diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 2bdb132ad6cb..cb376c5c0271 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -2456,7 +2456,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) { sal_Int16 aFormatCode = -1; const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) >= SFX_ITEM_AVAILABLE ) //Modify for more robust + if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) >= SFX_ITEM_DEFAULT ) //Modify for more robust { SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); sal_uInt32 nNumberFormat = pTabViewShell->GetSelectionPattern()->GetNumberFormat( pFormatter ); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7d875f773b2b..ee75b7d6c9c7 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1905,7 +1905,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR nFontHeight = long(nFontHeight * (double) aFractY); rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT)); - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) { rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CJK); nFontHeight = rOldHgt.GetHeight(); @@ -1913,7 +1913,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK)); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) { rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CTL); nFontHeight = rOldHgt.GetHeight(); @@ -1944,7 +1944,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR nFontHeight = long(nFontHeight * (double) aFractY); aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT)); - if( SFX_ITEM_AVAILABLE == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) + if( SFX_ITEM_DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) { rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CJK); nFontHeight = rOldHgt.GetHeight(); @@ -1952,7 +1952,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK)); } - if( SFX_ITEM_AVAILABLE == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) + if( SFX_ITEM_DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) { rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CTL); nFontHeight = rOldHgt.GetHeight(); @@ -1972,7 +1972,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR // Special treatment: only the valid parts // of the BulletItems - if (aTempSet.GetItemState(EE_PARA_BULLET) == SFX_ITEM_AVAILABLE) + if (aTempSet.GetItemState(EE_PARA_BULLET) == SFX_ITEM_DEFAULT) { SvxBulletItem aOldBulItem((SvxBulletItem&) pOutlineSheet->GetItemSet().Get(EE_PARA_BULLET)); SvxBulletItem& rNewBulItem = (SvxBulletItem&) aTempSet.Get(EE_PARA_BULLET); diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index c588a2c1f2f7..ccaafc5776fc 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -343,7 +343,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) } } - if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_METRIC ) ) + if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_METRIC ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() ); if(pDocSh) @@ -371,7 +371,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) rItemSet.Put(*pItem); } - if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_AUTOSPELL_CHECK ) ) + if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_AUTOSPELL_CHECK ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); @@ -382,21 +382,21 @@ void SdModule::GetState(SfxItemSet& rItemSet) } } - if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_LANGUAGE ) ) + if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_LANGUAGE ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocSh ) rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE ), SID_ATTR_LANGUAGE ) ); } - if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE ) ) + if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocSh ) rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE_CJK ), SID_ATTR_CHAR_CJK_LANGUAGE ) ); } - if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE ) ) + if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocSh ) diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index 5a7b12e02ba3..734112851e02 100644 --- a/sd/source/ui/app/tbxww.cxx +++ b/sd/source/ui/app/tbxww.cxx @@ -132,7 +132,7 @@ void SdTbxControl::StateChanged( sal_uInt16 nSId, { SfxToolBoxControl::StateChanged( nSId, eState, pState ); - if( eState == SFX_ITEM_AVAILABLE ) + if( eState == SFX_ITEM_DEFAULT ) { TbxImageItem* pItem = PTR_CAST( TbxImageItem, pState ); // StarDesktop can also receive another item, diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx index 984a8752971d..4f6380d6c84f 100644 --- a/sd/source/ui/app/tmplctrl.cxx +++ b/sd/source/ui/app/tmplctrl.cxx @@ -73,7 +73,7 @@ SdTemplateControl::~SdTemplateControl() void SdTemplateControl::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/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 0fa83e45f29c..89dabc6a7a1b 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -1220,7 +1220,7 @@ AnimationControllerItem::AnimationControllerItem( void AnimationControllerItem::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pItem ) { - if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_ANIMATOR_STATE ) + if( eState >= SFX_ITEM_DEFAULT && nSId == SID_ANIMATOR_STATE ) { const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pItem ); assert(pStateItem); //SfxUInt16Item expected diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx index c093b95098c9..09da8ea9e653 100644 --- a/sd/source/ui/dlg/diactrl.cxx +++ b/sd/source/ui/dlg/diactrl.cxx @@ -122,7 +122,7 @@ void SdTbxCtlDiaPages::StateChanged( sal_uInt16, pFld->Enable(); const SfxUInt16Item* pItem = 0; - if ( eState == SFX_ITEM_AVAILABLE ) + if ( eState == SFX_ITEM_DEFAULT ) { pItem = dynamic_cast< const SfxUInt16Item* >( pState ); DBG_ASSERT( pItem, "sd::SdTbxCtlDiaPages::StateChanged(), wrong item type!" ); diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx index fbffc0846447..f3d7da4f3172 100644 --- a/sd/source/ui/dlg/gluectrl.cxx +++ b/sd/source/ui/dlg/gluectrl.cxx @@ -130,7 +130,7 @@ SdTbxCtlGlueEscDir::SdTbxCtlGlueEscDir( void SdTbxCtlGlueEscDir::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState == SFX_ITEM_AVAILABLE ) + if( eState == SFX_ITEM_DEFAULT ) { GlueEscDirLB* pGlueEscDirLB = (GlueEscDirLB*) ( GetToolBox(). GetItemWindow( GetId() ) ); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index be7b2cd18dfd..e9f9bc21c280 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -863,7 +863,7 @@ SdNavigatorControllerItem::SdNavigatorControllerItem( void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pItem ) { - if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_NAVIGATOR_STATE ) + if( eState >= SFX_ITEM_DEFAULT && nSId == SID_NAVIGATOR_STATE ) { const SfxUInt32Item* pStateItem = PTR_CAST( SfxUInt32Item, pItem ); DBG_ASSERT( pStateItem, "SfxUInt16Item expected"); @@ -946,7 +946,7 @@ SdPageNameControllerItem::SdPageNameControllerItem( void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pItem ) { - if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_NAVIGATOR_PAGENAME ) + if( eState >= SFX_ITEM_DEFAULT && nSId == SID_NAVIGATOR_PAGENAME ) { // only if doc in LB is the active NavDocInfo* pInfo = pNavigatorWin->GetDocInfo(); diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 069fb40a7fb4..bfecb9288bd3 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -111,7 +111,7 @@ bool SdParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) void SdParagraphNumTabPage::Reset( const SfxItemSet* rSet ) { SfxItemState eItemState = rSet->GetItemState( ATTR_NUMBER_NEWSTART ); - if(eItemState > SFX_ITEM_AVAILABLE ) + if(eItemState > SFX_ITEM_DEFAULT ) { const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(ATTR_NUMBER_NEWSTART); m_pNewStartCB->SetState( rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -125,7 +125,7 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartCB->SaveValue(); eItemState = rSet->GetItemState( ATTR_NUMBER_NEWSTART_AT); - if( eItemState > SFX_ITEM_AVAILABLE ) + if( eItemState > SFX_ITEM_DEFAULT ) { sal_Int16 nNewStart = ((const SfxInt16Item&)rSet->Get(ATTR_NUMBER_NEWSTART_AT)).GetValue(); m_pNewStartNumberCB->Check(-1 != nNewStart); diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 273816f54b15..fc123faa32b2 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -217,7 +217,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(Window* pParent, const SfxItemSet& rInAttrs) FieldUnit eFUnit; sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC ); - if ( rInAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) + if ( rInAttrs.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rInAttrs.Get( nWhich ); eFUnit = (FieldUnit)rItem.GetValue(); @@ -441,7 +441,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC ); m_pLbMetric->SetNoSelection(); - if ( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) + if ( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs->Get( nWhich ); long nFieldUnit = (long)rItem.GetValue(); @@ -458,7 +458,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) // tabulator space nWhich = GetWhich( SID_ATTR_DEFTABSTOP ); - if( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) + if( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { SfxMapUnit eUnit = rAttrs->GetPool()->GetMetric( nWhich ); const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs->Get( nWhich ); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index aae59784899b..7409c4c0d4ab 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -290,14 +290,14 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* pViewShell, SfxViewFrame* pViewFrame ) { - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHARMAP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_INSERT_RLM ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_INSERT_LRM ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_INSERT_ZWNBSP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_INSERT_ZWSP )) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CHARMAP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_RLM ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_LRM ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_ZWNBSP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_ZWSP )) { ::sd::View* pView = pViewShell ? pViewShell->GetView() : 0; OutlinerView* pOLV = pView ? pView->GetTextEditOutlinerView() : 0; diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx index 9d1d71e3b1b6..3423c23bb1db 100644 --- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx @@ -186,7 +186,7 @@ void AllMasterPagesSelector::GetState (SfxItemSet& rItemSet) { // MasterPagesSelector::GetState(rItemSet); - if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_AVAILABLE) + if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_DEFAULT) rItemSet.DisableItem(SID_TP_EDIT_MASTER); } diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index a22be58d8673..ea1df06df56c 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -628,10 +628,10 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) } // Output quality. - if (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SFX_ITEM_AVAILABLE - ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SFX_ITEM_AVAILABLE - ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_AVAILABLE - ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SFX_ITEM_DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SFX_ITEM_DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_DEFAULT) { if (mrSlideSorter.GetContentWindow()) { @@ -661,7 +661,7 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) } } - if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_DEFAULT) { rSet.Put (SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true)); } diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index a11e20a3fcbc..f3572685579a 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -550,7 +550,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) rSet.DisableItem(SID_SEARCH_DLG); } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) { bool bDisable = true; if (eEditMode == EM_PAGE) @@ -593,7 +593,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) rSet.DisableItem (SID_EXPAND_PAGE); } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) { bool bDisable = true; if (eEditMode == EM_PAGE) @@ -618,8 +618,8 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } // starting of presentation possible? - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) { bool bDisable = true; model::PageEnumeration aAllPages ( @@ -641,9 +641,9 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) // Disable the rename slots when there are no or more than one slides/master // pages selected; disable the duplicate slot when there are no slides // selected: - if (rSet.GetItemState(SID_RENAMEPAGE) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_RENAME_MASTER_PAGE) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_RENAMEPAGE) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_RENAME_MASTER_PAGE) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_DEFAULT) { int n = mrSlideSorter.GetController().GetPageSelector() .GetSelectedPageCount(); @@ -658,8 +658,8 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } } - if (rSet.GetItemState(SID_HIDE_SLIDE) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_SHOW_SLIDE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_HIDE_SLIDE) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_SHOW_SLIDE) == SFX_ITEM_DEFAULT) { model::PageEnumeration aSelectedPages ( model::PageEnumerationProvider::CreateSelectedPagesEnumeration( @@ -700,9 +700,9 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) // Disable some slots when in master page mode. if (eEditMode == EM_MASTERPAGE) { - if (rSet.GetItemState(SID_INSERTPAGE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_INSERTPAGE) == SFX_ITEM_DEFAULT) rSet.DisableItem(SID_INSERTPAGE); - if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_DEFAULT) rSet.DisableItem(SID_DUPLICATE_PAGE); } } @@ -711,8 +711,8 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet) { SdTransferable* pTransferClip = SD_MOD()->pTransferClip; - if (rSet.GetItemState(SID_PASTE) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT) { // no own clipboard data? if ( !pTransferClip || !pTransferClip->GetDocShell() ) @@ -755,30 +755,30 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet) } // Cut, copy and paste of master pages is not yet implemented properly - if (rSet.GetItemState(SID_COPY) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_PASTE) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_CUT) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_COPY) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT) { if (mrSlideSorter.GetModel().GetEditMode() == EM_MASTERPAGE) { - if (rSet.GetItemState(SID_CUT) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT) rSet.DisableItem(SID_CUT); - if (rSet.GetItemState(SID_COPY) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_COPY) == SFX_ITEM_DEFAULT) rSet.DisableItem(SID_COPY); - if (rSet.GetItemState(SID_PASTE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT) rSet.DisableItem(SID_PASTE); - if (rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT) rSet.DisableItem(SID_PASTE_SPECIAL); } } // Cut, copy, and delete page are disabled when there is no selection. - if (rSet.GetItemState(SID_CUT) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_COPY) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_DELETE) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_DELETE_PAGE) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_DELETE_MASTER_PAGE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_COPY) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_DELETE) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_DELETE_PAGE) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_DELETE_MASTER_PAGE) == SFX_ITEM_DEFAULT) { model::PageEnumeration aSelectedPages ( model::PageEnumerationProvider::CreateSelectedPagesEnumeration( diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 8b5b396ee1d1..37f5de8f848f 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -191,7 +191,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) // gets enabled, through it doesn't really work (see above) SfxItemSet aEditAttr( mpView->GetDoc().GetPool() ); mpView->GetAttributes( aEditAttr ); - if( aEditAttr.GetItemState( EE_PARA_ULSPACE ) >= SFX_ITEM_AVAILABLE ) + if( aEditAttr.GetItemState( EE_PARA_ULSPACE ) >= SFX_ITEM_DEFAULT ) { SfxItemSet aNewAttrs(*(aEditAttr.GetPool()), aEditAttr.GetRanges()); const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 67df3b2e3ce1..59a05ede3e10 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -904,7 +904,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) { SfxItemSet aEditAttr( GetDoc()->GetPool() ); mpDrawView->GetAttributes( aEditAttr ); - if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SFX_ITEM_AVAILABLE ) + if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SFX_ITEM_DEFAULT ) { const SvxTabStopItem& rItem = (const SvxTabStopItem&) aEditAttr.Get( EE_PARA_TABS ); rSet.Put( rItem ); @@ -963,7 +963,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) aProtect.SetPosProtect( true ); } - if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SFX_ITEM_AVAILABLE ) + if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SFX_ITEM_DEFAULT ) { const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ); rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, rItem.GetValue() == ::com::sun::star::text::WritingMode_RL_TB)); diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 2f8aa8eb52cd..cf7631823c89 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -217,42 +217,42 @@ void DrawViewShell::GetAnimationWinState( SfxItemSet& rSet ) void DrawViewShell::SetChildWindowState( SfxItemSet& rSet ) { // State of SfxChild-Windows (Animator, Fontwork etc.) - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FONTWORK ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_FONTWORK ) ) { sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem(SID_FONTWORK, GetViewFrame()->HasChildWindow(nId))); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COLOR_CONTROL ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COLOR_CONTROL ) ) { sal_uInt16 nId = SvxColorChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem(SID_COLOR_CONTROL, GetViewFrame()->HasChildWindow(nId))); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ANIMATION_OBJECTS ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ANIMATION_OBJECTS ) ) { sal_uInt16 nId = AnimationChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_ANIMATION_OBJECTS, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_NAVIGATOR ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_NAVIGATOR ) ) { sal_uInt16 nId = SID_NAVIGATOR; rSet.Put( SfxBoolItem( SID_NAVIGATOR, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BMPMASK ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BMPMASK ) ) { sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_BMPMASK, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_IMAP ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_IMAP ) ) { sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_IMAP, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_3D_WIN ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_3D_WIN ) ) { sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_3D_WIN, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_AVMEDIA_PLAYER ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_AVMEDIA_PLAYER ) ) { sal_uInt16 nId = ::avmedia::MediaPlayer::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_AVMEDIA_PLAYER, GetViewFrame()->HasChildWindow( nId ) ) ); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 6c179c8b8ac6..86353ff12403 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -317,7 +317,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) GetMenuStateSel(rSet); - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ASSIGN_LAYOUT)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) { bool bDisable = true; if( pPageView ) @@ -337,7 +337,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) { bool bDisable = true; if( pPageView ) @@ -378,7 +378,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) { bool bDisable = true; if( pPageView ) @@ -402,7 +402,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ASSIGN_LAYOUT)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) { bool bDisable = true; if( pPageView ) @@ -423,8 +423,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // is it possible to start the presentation? - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) { bool bDisable = true; sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD ); @@ -445,20 +445,20 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // glue points - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_EDITMODE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_INSERT_POINT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_PERCENT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_ESCDIR ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_ESCDIR_LEFT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_ESCDIR_RIGHT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_ESCDIR_TOP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_ESCDIR_BOTTOM ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_HORZALIGN_CENTER ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_HORZALIGN_LEFT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_HORZALIGN_RIGHT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_VERTALIGN_CENTER ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_VERTALIGN_TOP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GLUE_VERTALIGN_BOTTOM ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_EDITMODE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_INSERT_POINT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_PERCENT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_LEFT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_RIGHT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_TOP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_BOTTOM ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_CENTER ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_LEFT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_RIGHT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_CENTER ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_TOP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_BOTTOM ) ) { // percent TRISTATE eState = mpDrawView->IsMarkedGluePointsPercent(); @@ -521,8 +521,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_BOTTOM, eState == TRISTATE_TRUE ) ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GRID_FRONT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_HELPLINES_FRONT ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GRID_FRONT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_HELPLINES_FRONT ) ) { rSet.Put( SfxBoolItem( SID_GRID_FRONT, mpDrawView->IsGridFront() ) ); rSet.Put( SfxBoolItem( SID_HELPLINES_FRONT, mpDrawView->IsHlplFront() ) ); @@ -597,7 +597,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) else rSet.Put( SfxBoolItem( SID_LEAVE_ALL_GROUPS, true ) ); - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_THESAURUS ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) { if ( !mpDrawView->IsTextEdit() ) { @@ -618,8 +618,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_THESAURUS ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SELECTALL ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SIZE_ALL ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SELECTALL ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SIZE_ALL ) ) { if( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) { @@ -629,14 +629,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONTEXT ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONTEXT ) ) rSet.Put( SfxStringItem( SID_CONTEXT, mpDrawView->GetStatusText() ) ); // clipboard (paste) - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PASTE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PASTE_SPECIAL ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PASTE_UNFORMATTED ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE_SPECIAL ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE_UNFORMATTED ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) { if ( !mpClipEvtLstnr ) { @@ -665,7 +665,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_PASTE_UNFORMATTED ); rSet.DisableItem( SID_CLIPBOARD_FORMAT_ITEMS ); } - else if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) + else if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) { if (mpCurrentClipboardFormats.get() != NULL) rSet.Put(*mpCurrentClipboardFormats); @@ -701,7 +701,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_CONVERT_TO_3D_LATHE_FAST); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MANAGE_LINKS ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MANAGE_LINKS ) ) { if ( GetDoc()->GetLinkCount() == 0 ) { @@ -784,7 +784,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, false)); if (mePageKind == PK_STANDARD && - rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_AVAILABLE) + rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_DEFAULT) { // Is there a page with the AutoLayout "Title"? bool bDisable = true; @@ -836,7 +836,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, false)); - if (rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_DEFAULT) { bool bCheck = false; bool bDisable = true; @@ -904,12 +904,12 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // set state of the ruler - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_RULER ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_RULER ) ) rSet.Put( SfxBoolItem( SID_RULER, HasRuler() ) ); // do not delete the last page or a master page - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DELETE_PAGE ) - || SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DELETE_MASTER_PAGE ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_PAGE ) + || SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_MASTER_PAGE ) ) { if (maTabControl.GetPageCount() == 1 || meEditMode == EM_MASTERPAGE || @@ -917,15 +917,15 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) mePageKind == PK_HANDOUT || (GetShellType()!=ST_DRAW&&IsLayerModeActive())) { - if (rSet.GetItemState(SID_DELETE_PAGE) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_DELETE_PAGE) == SFX_ITEM_DEFAULT) rSet.DisableItem(SID_DELETE_PAGE); - if (rSet.GetItemState(SID_DELETE_MASTER_PAGE)==SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_DELETE_MASTER_PAGE)==SFX_ITEM_DEFAULT) rSet.DisableItem(SID_DELETE_MASTER_PAGE); } } // is it allowed to delete the current layer? - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DELETE_LAYER ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_LAYER ) ) { if(GetLayerTabControl()) // #i87182# { @@ -951,9 +951,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CUT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COPY ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTLINE_BULLET )) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CUT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COPY ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTLINE_BULLET )) { OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView(); @@ -1017,9 +1017,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // Zoom-State - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ZOOM_IN ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ZOOM_OUT )|| - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ZOOM_PANNING ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_OUT )|| + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_PANNING ) ) { if( GetActiveWindow()->GetZoom() <= GetActiveWindow()->GetMinZoom() || GetDocSh()->IsUIActive() ) { @@ -1039,7 +1039,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_ZOOM_PREV); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REMOTE_DLG ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REMOTE_DLG ) ) { bool bDisableSdremoteForGood = false; @@ -1573,17 +1573,17 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) if(HasCurrentFunction()) nCurrentSId = GetCurrentFunction()->GetSlotID(); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DRAWTBX_CS_BASIC ) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_BASIC ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_BASIC, SID_DRAWTBX_CS_BASIC == nCurrentSId )); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DRAWTBX_CS_SYMBOL ) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_SYMBOL ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_SYMBOL, SID_DRAWTBX_CS_SYMBOL == nCurrentSId )); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DRAWTBX_CS_ARROW ) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_ARROW ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_ARROW, SID_DRAWTBX_CS_ARROW == nCurrentSId )); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DRAWTBX_CS_FLOWCHART ) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_FLOWCHART ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_FLOWCHART, SID_DRAWTBX_CS_FLOWCHART == nCurrentSId )); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DRAWTBX_CS_CALLOUT ) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_CALLOUT ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_CALLOUT,SID_DRAWTBX_CS_CALLOUT == nCurrentSId )); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DRAWTBX_CS_STAR ) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_STAR ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_STAR, SID_DRAWTBX_CS_STAR == nCurrentSId )); } @@ -1639,8 +1639,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) // Set the state of two entries in the 'Slide' context sub-menu // concerning the visibility of master page background and master page // shapes. - if (rSet.GetItemState(SID_DISPLAY_MASTER_BACKGROUND) == SFX_ITEM_AVAILABLE - || rSet.GetItemState(SID_DISPLAY_MASTER_OBJECTS) == SFX_ITEM_AVAILABLE) + if (rSet.GetItemState(SID_DISPLAY_MASTER_BACKGROUND) == SFX_ITEM_DEFAULT + || rSet.GetItemState(SID_DISPLAY_MASTER_OBJECTS) == SFX_ITEM_DEFAULT) { SdPage* pPage = GetActualPage(); if (pPage != NULL @@ -1658,7 +1658,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } #if !HAVE_FEATURE_GLTF - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_INSERT_3DMODEL)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_INSERT_3DMODEL)) { rSet.DisableItem(SID_INSERT_3DMODEL); rSet.Put(SfxVisibilityItem(SID_INSERT_3DMODEL, false)); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 110289a158bb..094ee9fea530 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -574,7 +574,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) /* Zoom-Item Here we should propagate the corresponding value (Optimal ?, page width or page) with the help of the ZoomItems !!! */ - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOM ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) { if (GetDocSh()->IsUIActive() || (SlideShow::IsRunning(GetViewShellBase())) ) { @@ -604,7 +604,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) rSet.Put( *pZoomItem ); } } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) { rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) ); if (GetDocSh()->IsUIActive() || (xSlideshow.is() && xSlideshow->isRunning()) || !GetActiveWindow() ) @@ -696,7 +696,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) } // Display of current page and layer. - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STATUS_PAGE ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_STATUS_PAGE ) ) { sal_Int32 nPageCount = sal_Int32(GetDoc()->GetSdPageCount(mePageKind)); sal_Int32 nActivePageCount = sal_Int32(GetDoc()->GetActiveSdPageCount()); @@ -758,7 +758,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) rSet.Put (SfxStringItem (SID_STATUS_PAGE, aOUString)); } // Layout - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STATUS_LAYOUT ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_STATUS_LAYOUT ) ) { OUString aString = mpActualPage->GetLayoutName(); sal_Int32 nPos = aString.indexOf(SD_LT_SEPARATOR); diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 0391bd31e6a3..b9015ba7df7f 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -81,7 +81,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) GetViewFrame()->GetSlotState (SID_RELOAD, NULL, &rSet); } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_HYPERLINK_GETLINK)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) { SvxHyperlinkItem aHLinkItem; @@ -187,10 +187,10 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) rSet.Put( SfxBoolItem( SID_READONLY_MODE, mbReadOnly ) ); // output quality - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTPUT_QUALITY_COLOR ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTPUT_QUALITY_GRAYSCALE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTPUT_QUALITY_BLACKWHITE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTPUT_QUALITY_CONTRAST ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_COLOR ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_GRAYSCALE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_BLACKWHITE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_CONTRAST ) ) { const sal_uLong nMode = (sal_Int32)GetActiveWindow()->GetDrawMode(); rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_COLOR, (sal_uLong)OUTPUT_DRAWMODE_COLOR == nMode ) ); @@ -199,12 +199,12 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_CONTRAST, (sal_uLong)OUTPUT_DRAWMODE_CONTRAST == nMode ) ); } - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) { rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true ) ); } - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ATTR_YEAR2000) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ATTR_YEAR2000) ) { FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell(); if (pFormShell != NULL) @@ -420,7 +420,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) { SfxItemSet aAttrs( GetDoc()->GetPool() ); mpDrawView->GetAttributes( aAttrs ); - if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) + if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_DEFAULT ) { bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_HYPHENATION, bValue ) ); diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 99f1d16409ef..e03d97d6fbbd 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -65,50 +65,50 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) if ( nMarkCount == 1 ) { - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEZIER_EDIT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_UNGROUP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ENTER_GROUP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_NAME_GROUP ) || + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BEZIER_EDIT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_UNGROUP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ENTER_GROUP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_NAME_GROUP ) || // #i68101# - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) || - - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEBEZIER ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEPOLYGON ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_LINEEND_POLYGON ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( OBJ_TITLETEXT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( OBJ_OUTLINETEXT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_4BIT_GRAYS ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_4BIT_COLORS ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_8BIT_GRAYS ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_8BIT_COLORS ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_24BIT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FRAME_TO_TOP ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MOREFRONT ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MOREBACK ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEFORE_OBJ ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEHIND_OBJ ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REVERSE_ORDER ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ORIGINAL_SIZE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SAVE_GRAPHIC ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) ) + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) || + + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CHANGEBEZIER ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CHANGEPOLYGON ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_LINEEND_POLYGON ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MEASURE_DLG ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONNECTION_DLG ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_SHEAR ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_GRAYS ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_COLORS ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_GRAYS ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_COLORS ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_24BIT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_FRAME_TO_TOP ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MOREFRONT ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MOREBACK ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BEFORE_OBJ ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BEHIND_OBJ ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REVERSE_ORDER ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ORIGINAL_SIZE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SAVE_GRAPHIC ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_TEXTATTR_DLG ) ) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj); @@ -201,9 +201,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) SfxItemSet aAttrSet( GetDoc()->GetPool() ); GetView()->GetAttributes( aAttrSet ); - if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SFX_ITEM_AVAILABLE && - aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SFX_ITEM_AVAILABLE && - aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SFX_ITEM_AVAILABLE ) + if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SFX_ITEM_DEFAULT && + aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SFX_ITEM_DEFAULT && + aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SFX_ITEM_DEFAULT ) { long nVal1 = ( ( const SdrMetricItem& ) aAttrSet.Get( SDRATTR_EDGELINE1DELTA ) ).GetValue(); long nVal2 = ( ( const SdrMetricItem& ) aAttrSet.Get( SDRATTR_EDGELINE2DELTA ) ).GetValue(); @@ -243,8 +243,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) } } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DISMANTLE ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BREAK ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DISMANTLE ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BREAK ) ) { if ( !mpDrawView->IsDismantlePossible(false) ) { @@ -258,7 +258,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) rSet.DisableItem( SID_BREAK ); } } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MODIFY_FIELD ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) { OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView(); @@ -277,7 +277,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) else rSet.DisableItem( SID_MODIFY_FIELD ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) ) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); const bool bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE; diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 8e8b35ee978a..83f4405d8611 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -373,7 +373,7 @@ void OutlineViewShell::Deactivate( bool bIsMDIActivate ) */ void OutlineViewShell::GetCtrlState(SfxItemSet &rSet) { - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_HYPERLINK_GETLINK)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) { SvxHyperlinkItem aHLinkItem; @@ -400,13 +400,13 @@ void OutlineViewShell::GetCtrlState(SfxItemSet &rSet) } rSet.Put( SfxBoolItem( SID_READONLY_MODE, GetDocSh()->IsReadOnly() ) ); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true ) ); - if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_TRANSLITERATE_HALFWIDTH) || - SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_TRANSLITERATE_FULLWIDTH) || - SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_TRANSLITERATE_HIRAGANA) || - SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_TRANSLITERATE_KATAGANA) ) + if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HALFWIDTH) || + SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_FULLWIDTH) || + SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HIRAGANA) || + SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_KATAGANA) ) { SvtCJKOptions aCJKOptions; if( !aCJKOptions.IsChangeCaseMapEnabled() ) @@ -762,8 +762,8 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_ZOOM_PREV); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ZOOM_IN ) || - SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ZOOM_OUT ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || + SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_OUT ) ) { if( GetActiveWindow()->GetZoom() <= GetActiveWindow()->GetMinZoom() || GetDocSh()->IsUIActive() ) rSet.DisableItem( SID_ZOOM_IN ); @@ -774,7 +774,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) ::Outliner& rOutl = pOlView->GetOutliner(); // allow 'Select All'? - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SELECTALL ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SELECTALL ) ) { sal_Int32 nParaCount = rOutl.GetParagraphCount(); bool bDisable = nParaCount == 0; @@ -900,7 +900,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) if (bDisableCollapseAll) rSet.DisableItem(SID_OUTLINE_COLLAPSE_ALL); - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PASTE ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE ) ) { if ( !pClipEvtLstnr ) { @@ -957,7 +957,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } // field commands - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MODIFY_FIELD ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) { const SvxFieldItem* pFldItem = pOutlinerView->GetFieldAtSelection(); @@ -970,7 +970,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) { bool bDisable = true; sal_uInt16 i = 0; @@ -1017,7 +1017,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) { bool bDisable = true; sal_uInt16 i = 0; @@ -1047,7 +1047,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_THESAURUS ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) { if ( !pOlView->IsTextEdit() ) { @@ -1064,7 +1064,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } // is starting the presentation possible? - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) ) { bool bDisable = true; sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD ); @@ -1291,7 +1291,7 @@ void OutlineViewShell::ExecStatusBar(SfxRequest&) void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) { // Zoom-Item - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOM ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) { sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom(); @@ -1307,7 +1307,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) rSet.Put( *pZoomItem ); } - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) { if (GetDocSh()->IsUIActive() || !GetActiveWindow() ) { diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 07e2e5613d44..72448daab8a2 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -86,7 +86,7 @@ namespace sd { */ void ViewShell::GetMenuState( SfxItemSet &rSet ) { - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STYLE_FAMILY ) ) + if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_STYLE_FAMILY ) ) { sal_uInt16 nFamily = (sal_uInt16)GetDocSh()->GetStyleFamily(); @@ -112,17 +112,17 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxUInt16Item(SID_STYLE_FAMILY, nFamily )); } - if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_GETUNDOSTRINGS)) + if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_GETUNDOSTRINGS)) { ImpGetUndoStrings(rSet); } - if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_GETREDOSTRINGS)) + if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_GETREDOSTRINGS)) { ImpGetRedoStrings(rSet); } - if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_UNDO)) + if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_UNDO)) { ::svl::IUndoManager* pUndoManager = ImpGetUndoManager(); bool bActivate(false); @@ -149,7 +149,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) } } - if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_REDO)) + if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_REDO)) { ::svl::IUndoManager* pUndoManager = ImpGetUndoManager(); bool bActivate(false); 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() ) diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 1de26e063407..295c3f798d93 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -879,7 +879,7 @@ const SfxPoolItem* SfxItemSet::GetItem // Is the Item set or 'bDeep == true' available? const SfxPoolItem *pItem = 0; SfxItemState eState = GetItemState( nWhich, bSrchInParent, &pItem ); - if ( bSrchInParent && SFX_ITEM_AVAILABLE == eState && + if ( bSrchInParent && SFX_ITEM_DEFAULT == eState && nWhich <= SFX_WHICH_MAX ) pItem = &_pPool->GetDefaultItem(nWhich); diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index 4890faacd06f..d7f167c6bdb6 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -279,40 +279,40 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj void SvxGraphicFilter::DisableGraphicFilterSlots( SfxItemSet& rSet ) { - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER ) ) rSet.DisableItem( SID_GRFFILTER ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_INVERT ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_INVERT ) ) rSet.DisableItem( SID_GRFFILTER_INVERT ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SMOOTH ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SMOOTH ) ) rSet.DisableItem( SID_GRFFILTER_SMOOTH ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SHARPEN ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SHARPEN ) ) rSet.DisableItem( SID_GRFFILTER_SHARPEN ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_REMOVENOISE ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_REMOVENOISE ) ) rSet.DisableItem( SID_GRFFILTER_REMOVENOISE ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SOBEL ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SOBEL ) ) rSet.DisableItem( SID_GRFFILTER_SOBEL ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_MOSAIC ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_MOSAIC ) ) rSet.DisableItem( SID_GRFFILTER_MOSAIC ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_EMBOSS ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_EMBOSS ) ) rSet.DisableItem( SID_GRFFILTER_EMBOSS ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_POSTER ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_POSTER ) ) rSet.DisableItem( SID_GRFFILTER_POSTER ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_POPART ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_POPART ) ) rSet.DisableItem( SID_GRFFILTER_POPART ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SEPIA ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SEPIA ) ) rSet.DisableItem( SID_GRFFILTER_SEPIA ); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SOLARIZE ) ) + if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SOLARIZE ) ) rSet.DisableItem( SID_GRFFILTER_SOLARIZE ); }; diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 616ff403b266..3b9c05d887e2 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -872,7 +872,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) { nWhich = GetWhich(SID_ATTR_BRUSH); - if(rSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE) + if(rSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) { //UUUU create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rSet.Get(nWhich)); @@ -886,7 +886,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) m_pBspWin->setPageFillAttributes(aPageFillAttributes); nWhich = GetWhich(SID_ATTR_BORDER_OUTER); - if(rSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE) + if(rSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) { const SvxBoxItem& rItem = static_cast< const SvxBoxItem& >(rSet.Get(nWhich)); m_pBspWin->SetBorder(rItem); diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index e02fdb9cac8f..4133eaea288b 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -47,7 +47,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) { // SFX_ITEM_DONTCARE => pState == -1 => PTR_CAST buff - if ( eState != SFX_ITEM_AVAILABLE ) + if ( eState != SFX_ITEM_DEFAULT ) pState = 0; switch(nSID) diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 5e71d5015d90..804b11ee74fa 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -291,7 +291,7 @@ void SvxRubyDialog::Activate() SfxModelessDialog::Activate(); SfxPoolItem* pState = 0; SfxItemState eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState ); - bool bEnable = (eState < SFX_ITEM_AVAILABLE) || !pState || !((SfxBoolItem*)pState)->GetValue(); + bool bEnable = (eState < SFX_ITEM_DEFAULT) || !pState || !((SfxBoolItem*)pState)->GetValue(); delete pState; m_pStylistPB->Enable(bEnable); //get selection from current view frame diff --git a/svx/source/dialog/srchctrl.cxx b/svx/source/dialog/srchctrl.cxx index 46c6a9baa37c..8b11d6d5ed82 100644 --- a/svx/source/dialog/srchctrl.cxx +++ b/svx/source/dialog/srchctrl.cxx @@ -43,7 +43,7 @@ SvxSearchController::SvxSearchController void SvxSearchController::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { if ( SID_STYLE_FAMILY1 <= nSID && nSID <= SID_STYLE_FAMILY4 ) { diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 8d4fee971643..fbb3b368d721 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -759,7 +759,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe SfxPoolItem* pItem = NULL; eState = pCurrentFrame->GetBindings().QueryState(SID_FM_CTL_PROPERTIES, pItem); - if (eState >= SFX_ITEM_AVAILABLE && pItem ) + if (eState >= SFX_ITEM_DEFAULT && pItem ) { bChecked = pItem->ISA(SfxBoolItem) && ((SfxBoolItem*)pItem)->GetValue(); rMenu.CheckItem(SID_FM_SHOW_PROPERTY_BROWSER,bChecked); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 2b2fae5a3458..0d746437043c 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2162,7 +2162,7 @@ namespace svxform if ( !pState || SID_FM_DATANAVIGATOR_CONTROL != nSID ) return; - if ( eState >= SFX_ITEM_AVAILABLE ) + if ( eState >= SFX_ITEM_DEFAULT ) { FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() ); Update( pShell ); diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index c5c1c3504d35..efd0890eb4a5 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1910,7 +1910,7 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c if( !pState || SID_FM_FILTER_NAVIGATOR_CONTROL != nSID ) return; - if( eState >= SFX_ITEM_AVAILABLE ) + if( eState >= SFX_ITEM_DEFAULT ) { FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() ); UpdateContent( pShell ); diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 3b92a972c40b..86964972ba5c 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -627,7 +627,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool m_bInStateChange = true; try { - if (eState >= SFX_ITEM_AVAILABLE) + if (eState >= SFX_ITEM_DEFAULT) { FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell()); InterfaceBag aSelection; diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 4c24ad1c73cc..aae32a4fc7b0 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -529,7 +529,7 @@ namespace svxform if( !pState || SID_FM_FMEXPLORER_CONTROL != nSID ) return; - if( eState >= SFX_ITEM_AVAILABLE ) + if( eState >= SFX_ITEM_DEFAULT ) { FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() ); UpdateContent( pShell ); diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index a5c524b985b1..12baa61a787e 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -277,7 +277,7 @@ void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoo if (!pState || SID_FM_FIELDS_CONTROL != nSID) return; - if (eState >= SFX_ITEM_AVAILABLE) + if (eState >= SFX_ITEM_DEFAULT) { FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell()); UpdateContent(pShell); diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 667bb6473676..6405cf53afbc 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -156,7 +156,7 @@ void SvxFmTbxCtlConfig::StateChanged(sal_uInt16 nSID, SfxItemState eState, const if (nSID == SID_FM_CONFIG) { sal_uInt16 nSlot = 0; - if (eState >= SFX_ITEM_AVAILABLE) + if (eState >= SFX_ITEM_DEFAULT) nSlot = ((SfxUInt16Item*)pState)->GetValue(); switch( nSlot ) diff --git a/svx/source/mnuctrls/SmartTagCtl.cxx b/svx/source/mnuctrls/SmartTagCtl.cxx index 43c06f15586f..78a2ffb9999c 100644 --- a/svx/source/mnuctrls/SmartTagCtl.cxx +++ b/svx/source/mnuctrls/SmartTagCtl.cxx @@ -140,7 +140,7 @@ void SvxSmartTagsControl::StateChanged( sal_uInt16, SfxItemState eState, const S { mrParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState ); - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { const SvxSmartTagItem* pSmartTagItem = PTR_CAST( SvxSmartTagItem, pState ); if ( 0 != pSmartTagItem ) diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index 94f197f5e6bd..ecd4c5303c41 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -119,7 +119,7 @@ void SvxClipBoardControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co if ( SID_CLIPBOARD_FORMAT_ITEMS == nSID ) { DELETEZ( pClipboardFmtItem ); - if ( eState >= SFX_ITEM_AVAILABLE ) + if ( eState >= SFX_ITEM_DEFAULT ) { pClipboardFmtItem = pState->Clone(); GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) | TIB_DROPDOWN ); diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx index 5f4e7966d570..8a36eb685a1c 100644 --- a/svx/source/mnuctrls/fntctl.cxx +++ b/svx/source/mnuctrls/fntctl.cxx @@ -95,7 +95,7 @@ void SvxFontMenuControl::StateChanged( { rParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState ); - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { if ( !pMenu->GetItemCount() ) FillMenu(); diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index 2ec67f07fd0a..1b17c56ebb68 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -82,7 +82,7 @@ void SvxFontSizeMenuControl::StateChanged( { rParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState ); - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { if ( pState->ISA(SvxFontHeightItem) ) { diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index dc283b94f140..c43e09c47f9b 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -749,7 +749,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { bFillTransparenceChanged = true; - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState); @@ -771,7 +771,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { bFillTransparenceChanged = true; - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { const XFillFloatTransparenceItem* pItem = dynamic_cast< const XFillFloatTransparenceItem* >(pState); @@ -812,7 +812,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpStyleItem.reset(); } - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { const XFillStyleItem* pItem = dynamic_cast< const XFillStyleItem* >(pState); @@ -847,7 +847,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_COLOR: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpColorItem.reset(pState ? (XFillColorItem*)pState->Clone() : 0); } @@ -857,7 +857,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Hide(); mpToolBoxColor->Show(); - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpToolBoxColor->Enable(); mbColorAvail = true; @@ -880,7 +880,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_GRADIENT: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpFillGradientItem.reset(pState ? (XFillGradientItem*)pState->Clone() : 0); } @@ -890,7 +890,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Show(); mpToolBoxColor->Hide(); - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpLbFillAttr->Enable(); Update(); @@ -909,7 +909,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_HATCH: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpHatchItem.reset(pState ? (XFillHatchItem*)pState->Clone() : 0); } @@ -919,7 +919,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Show(); mpToolBoxColor->Hide(); - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpLbFillAttr->Enable(); Update(); @@ -938,7 +938,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_BITMAP: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpBitmapItem.reset(pState ? (XFillBitmapItem*)pState->Clone() : 0); } @@ -948,7 +948,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Show(); mpToolBoxColor->Hide(); - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { mpLbFillAttr->Enable(); Update(); @@ -967,7 +967,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_COLOR_TABLE: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue()) { @@ -992,7 +992,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_GRADIENT_LIST: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) { @@ -1017,7 +1017,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_HATCH_LIST: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) { @@ -1042,7 +1042,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_BITMAP_LIST: { - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) { diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index 7c660c5a5a47..506894c72f22 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -263,7 +263,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( { case SID_ATTR_GRAF_LUMINANCE: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpMtrBrightness->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -287,7 +287,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_CONTRAST: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpMtrContrast->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -311,7 +311,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_TRANSPARENCE: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpMtrTrans->Enable(); const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState); @@ -335,7 +335,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_MODE: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpLBColorMode->Enable(); const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState); @@ -359,7 +359,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_RED: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpMtrRed->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -383,7 +383,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_GREEN: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpMtrGreen->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -407,7 +407,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_BLUE: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpMtrBlue->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -431,7 +431,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_GAMMA: { - if(eState >= SFX_ITEM_AVAILABLE) + if(eState >= SFX_ITEM_DEFAULT) { mpMtrGamma->Enable(); const SfxUInt32Item* pItem = dynamic_cast< const SfxUInt32Item* >(pState); diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index c69c03f07f21..e844acb2efa3 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -264,7 +264,7 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe pActLineDistFld->SetText( "" ); //bool bValueSetFocus = sal_False; //wj - if( eState >= SFX_ITEM_AVAILABLE ) + if( eState >= SFX_ITEM_DEFAULT ) { // SfxMapUnit eUnit = maLNSpaceControl.GetCoreMetric(); SfxMapUnit eUnit = SFX_MAPUNIT_100TH_MM; diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index d8742cf39183..e57252c4487f 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -761,7 +761,7 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat const sal_uInt16 nIdHangingIndent = mpTbxIndent_IncDec->GetItemId(UNO_HANGINGINDENT); const sal_uInt16 nIdHangingIndent2 = mpTbxIndent_IncDec->GetItemId(UNO_HANGINGINDENT2); - if( pState && eState >= SFX_ITEM_AVAILABLE ) + if( pState && eState >= SFX_ITEM_DEFAULT ) { SvxLRSpaceItem* pSpace = ( SvxLRSpaceItem*)pState; maTxtLeft = pSpace->GetTxtLeft(); @@ -871,7 +871,7 @@ void ParaPropertyPanel::StateChangedLnSPImpl( sal_uInt16 /*nSID*/, SfxItemState { meLnSpState = eState; - if( pState && eState >= SFX_ITEM_AVAILABLE ) + if( pState && eState >= SFX_ITEM_DEFAULT ) { if(mpLnSPItem) delete mpLnSPItem; @@ -884,7 +884,7 @@ void ParaPropertyPanel::StateChangedULImpl( sal_uInt16 /*nSID*/, SfxItemState eS mpTopDist->SetMax( mpTopDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) ); mpBottomDist->SetMax( mpBottomDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) ); - if( pState && eState >= SFX_ITEM_AVAILABLE ) + if( pState && eState >= SFX_ITEM_DEFAULT ) { SvxULSpaceItem* pOldItem = (SvxULSpaceItem*)pState; diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 7f5c40e619dc..d218e0a5222e 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -599,7 +599,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( switch (nSID) { case SID_ATTR_TRANSFORM_WIDTH: - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { pWidthItem = dynamic_cast< const SfxUInt32Item* >(pState); @@ -619,7 +619,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_HEIGHT: - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { pHeightItem = dynamic_cast< const SfxUInt32Item* >(pState); @@ -639,7 +639,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_POS_X: - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -657,7 +657,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_POS_Y: - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -675,7 +675,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_ROT_X: - if (SFX_ITEM_AVAILABLE == eState) + if (SFX_ITEM_DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -688,7 +688,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_ROT_Y: - if (SFX_ITEM_AVAILABLE == eState) + if (SFX_ITEM_DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -701,7 +701,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_PROTECT_POS: - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -717,7 +717,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_PROTECT_SIZE: - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -733,7 +733,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_AUTOWIDTH: - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -745,7 +745,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_AUTOHEIGHT: - if(SFX_ITEM_AVAILABLE == eState) + if(SFX_ITEM_DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -757,7 +757,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_ANGLE: - if (eState >= SFX_ITEM_AVAILABLE) + if (eState >= SFX_ITEM_DEFAULT) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 680d73950ebc..f8a1f716c05a 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -260,7 +260,7 @@ void TextPropertyPanel::NotifyItemUpdate ( break; case SID_ATTR_CHAR_KERNING: { - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { mbKernLBAvailable = true; diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx index 3d1b43751979..a3076e2c2fda 100644 --- a/svx/source/stbctrls/insctrl.cxx +++ b/svx/source/stbctrls/insctrl.cxx @@ -49,7 +49,7 @@ SvxInsertStatusBarControl::~SvxInsertStatusBarControl() void SvxInsertStatusBarControl::StateChanged( sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_AVAILABLE != eState ) + if ( SFX_ITEM_DEFAULT != eState ) GetStatusBar().SetItemText( GetId(), "" ); else { diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index a08bdd2a2a8d..f1bf93424434 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -90,7 +90,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, Status void SvxModifyControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_AVAILABLE != eState ) + if ( SFX_ITEM_DEFAULT != eState ) return; DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" ); diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 6fc3f922acdd..cd4f6020a21b 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -235,7 +235,7 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( nSID == SID_PSZ_FUNCTION ) { - if ( eState == SFX_ITEM_AVAILABLE ) + if ( eState == SFX_ITEM_DEFAULT ) { pImp->bHasMenu = true; if ( pState && pState->ISA(SfxUInt16Item) ) @@ -244,7 +244,7 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt else pImp->bHasMenu = false; } - else if ( SFX_ITEM_AVAILABLE != eState ) + else if ( SFX_ITEM_DEFAULT != eState ) { // don't switch to empty display before an empty state was // notified for all display types diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index 1566e164c367..c7dc22af0619 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -93,7 +93,7 @@ SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId, void SvxSelectionModeControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { DBG_ASSERT( pState->ISA( SfxUInt16Item ), "invalid item type" ); SfxUInt16Item* pItem = (SfxUInt16Item*)pState; diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index ad31b54802a9..35950a4ea4e5 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -85,7 +85,7 @@ XmlSecStatusBarControl::~XmlSecStatusBarControl() void XmlSecStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if( SFX_ITEM_AVAILABLE != eState ) + if( SFX_ITEM_DEFAULT != eState ) { mpImpl->mnState = (sal_uInt16)SIGNATURESTATE_UNKNOWN; } diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index eb8c7dbc8b85..9c7e5b50660c 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -108,7 +108,7 @@ SvxZoomStatusBarControl::SvxZoomStatusBarControl( sal_uInt16 _nSlotId, void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if( SFX_ITEM_AVAILABLE != eState ) + if( SFX_ITEM_DEFAULT != eState ) { GetStatusBar().SetItemText( GetId(), "" ); nValueSet = 0; diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index e02063e83da2..bc03af8ae244 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -185,7 +185,7 @@ SvxZoomSliderControl::~SvxZoomSliderControl() void SvxZoomSliderControl::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(), "" ); mpImpl->mbValuesSet = false; diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index ac8ad1f3bdd6..5b46ff9d2311 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -104,7 +104,7 @@ void SvxFillToolBoxControl::StateChanged( mpFillAttrLB->Disable(); mpFillAttrLB->SetNoSelection(); } - else if(SFX_ITEM_AVAILABLE == eState) + else if(SFX_ITEM_DEFAULT == eState) { bool bEnableControls(false); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 9ff2bb2cc502..23a0d24ce4ad 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -482,7 +482,7 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const { pCtrl->Enable(); - if( eState == SFX_ITEM_AVAILABLE ) + if( eState == SFX_ITEM_DEFAULT ) pCtrl->Update( pState ); else pCtrl->Update( NULL ); @@ -569,7 +569,7 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c { pCtrl->Enable(); - if( eState == SFX_ITEM_AVAILABLE ) + if( eState == SFX_ITEM_DEFAULT ) pCtrl->Update( pState ); else pCtrl->Update( NULL ); @@ -898,7 +898,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { case( SID_ATTR_GRAF_MODE ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) ) { if( bEnableColors ) { @@ -915,7 +915,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_RED ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) ) { if( bEnableColors ) { @@ -932,7 +932,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_GREEN ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) ) { if( bEnableColors ) { @@ -949,7 +949,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_BLUE ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) ) { if( bEnableColors ) { @@ -966,7 +966,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_LUMINANCE ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) ) { if( bEnableColors ) { @@ -983,7 +983,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_CONTRAST ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) ) { if( bEnableColors ) { @@ -1000,7 +1000,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_GAMMA ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) ) { if( bEnableColors ) { @@ -1017,7 +1017,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_TRANSPARENCE ): { - if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) ) + if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) ) { if( bEnableTransparency ) { diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index ea8ca940e9be..a02b499abfc4 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -88,7 +88,7 @@ void SvxLineStyleToolBoxControl::StateChanged ( { pBox->Enable(); - if ( eState == SFX_ITEM_AVAILABLE ) + if ( eState == SFX_ITEM_DEFAULT ) { if( nSID == SID_ATTR_LINE_STYLE ) { @@ -224,7 +224,7 @@ void SvxLineWidthToolBoxControl::StateChanged( { pFld->Enable(); - if ( eState == SFX_ITEM_AVAILABLE ) + if ( eState == SFX_ITEM_DEFAULT ) { DBG_ASSERT( pState->ISA(XLineWidthItem), "wrong ItemType" ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index f5a80913f083..1b5972446ecb 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1598,7 +1598,7 @@ void SfxStyleControllerItem_Impl::StateChanged( { const sal_uInt16 nIdx = GetId() - SID_STYLE_FAMILY_START; - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { const SfxTemplateItem* pStateItem = PTR_CAST( SfxTemplateItem, pState ); @@ -2059,7 +2059,7 @@ void SvxStyleToolBoxControl::StateChanged( switch ( eState ) { - case SFX_ITEM_AVAILABLE: + case SFX_ITEM_DEFAULT: eTri = ((const SfxBoolItem*)pState)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE; @@ -2123,7 +2123,7 @@ void SvxFontNameToolBoxControl::StateChanged( { pBox->Enable(); - if ( SFX_ITEM_AVAILABLE == eState ) + if ( SFX_ITEM_DEFAULT == eState ) { const SvxFontItem* pFontItem = dynamic_cast< const SvxFontItem* >( pState ); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 765c6cdff09b..e2bad0b9a95b 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -330,7 +330,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, pDoc->getIDocumentContentOperations().InsertItemSet( rPam, rSet, nFlags ); } - if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SFX_ITEM_AVAILABLE ) + if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SFX_ITEM_DEFAULT ) { SwTxtNode * pTmpNode = rPam.GetNode().GetTxtNode(); if ( pTmpNode ) diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 68b042dfca19..4585686cc3e3 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -165,7 +165,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) SfxItemState eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ); sal_Int16 nOutlineLv; - if( eItemState >= SFX_ITEM_AVAILABLE ) + if( eItemState >= SFX_ITEM_DEFAULT ) { nOutlineLv = ((const SfxUInt16Item &)rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue(); m_pOutlineLvLB->SelectEntryPos( nOutlineLv ) ; @@ -178,7 +178,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_NUMRULE) ); - if( eItemState >= SFX_ITEM_AVAILABLE ) + if( eItemState >= SFX_ITEM_DEFAULT ) { OUString aStyle = ((const SfxStringItem &)rSet->Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue(); if(aStyle.isEmpty()) @@ -204,7 +204,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNumberStyleLB->SaveValue(); eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART ); - if(eItemState > SFX_ITEM_AVAILABLE ) + if(eItemState > SFX_ITEM_DEFAULT ) { bCurNumrule = true; const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(FN_NUMBER_NEWSTART); @@ -219,7 +219,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartCB->SaveValue(); eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART_AT); - if( eItemState > SFX_ITEM_AVAILABLE ) + if( eItemState > SFX_ITEM_DEFAULT ) { const sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); const bool bNotMax = USHRT_MAX != nNewStart; @@ -233,7 +233,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartNF->SaveValue(); m_pNewStartNumberCB->SaveValue(); StyleHdl_Impl(m_pNumberStyleLB); - if( SFX_ITEM_AVAILABLE <= rSet->GetItemState(RES_LINENUMBER)) + if( SFX_ITEM_DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) { SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet->Get(RES_LINENUMBER); sal_uLong nStartValue = rNum.GetStartValue(); diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 9be12488b524..96f0d295e589 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -112,7 +112,7 @@ SwParaDlg::SwParaDlg(Window *pParent, RemoveTabPage("labelTP_PARA_ASIAN"); const sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE)); - bool bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich); + bool bLRValid = SFX_ITEM_DEFAULT <= rCoreSet.GetItemState(nWhich); if(bHtmlMode || !bLRValid) RemoveTabPage("labelTP_TABULATOR"); else diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index fd598f4bf8dd..bb9803872653 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -279,7 +279,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pAutoUpdateFields->SaveValue(); m_pAutoUpdateCharts->SaveValue(); m_pMetricLB->SetNoSelection(); - if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 7352a06ea6a7..8e53f3904943 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -167,7 +167,7 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if( rSet.GetItemState( nSID, false, &pItem ) >= SFX_ITEM_AVAILABLE ) + if( rSet.GetItemState( nSID, false, &pItem ) >= SFX_ITEM_DEFAULT ) { FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); for ( sal_Int32 i = 0; i < rMetric->GetEntryCount(); ++i ) @@ -1187,7 +1187,7 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* ) void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) { const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 14e078f78bfe..9ddfdfe1b572 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -2120,7 +2120,7 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet) SetMetric(*m_pAfterMF , aMetric); SfxItemState eItemState = rSet->GetItemState( RES_LR_SPACE ); - if ( eItemState >= SFX_ITEM_AVAILABLE ) + if ( eItemState >= SFX_ITEM_DEFAULT ) { const SvxLRSpaceItem& rSpace = (const SvxLRSpaceItem&)rSet->Get( RES_LR_SPACE ); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index ce66d33cc966..a05f16b4a88d 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -608,7 +608,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) } //text direction - if( SFX_ITEM_AVAILABLE <= rSet->GetItemState( RES_FRAMEDIR ) ) + if( SFX_ITEM_DEFAULT <= rSet->GetItemState( RES_FRAMEDIR ) ) { const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet->Get(RES_FRAMEDIR); sal_uIntPtr nVal = rItem.GetValue(); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index c866f5218c07..b1c6c5705891 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -3031,7 +3031,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) } // Content alignment - if ( rSet->GetItemState(RES_TEXT_VERT_ADJUST) > SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState(RES_TEXT_VERT_ADJUST) > SFX_ITEM_DEFAULT ) { SdrTextVertAdjust nAdjust = ((const SdrTextVertAdjustItem&)rSet->Get(RES_TEXT_VERT_ADJUST)).GetValue(); sal_Int32 nPos = 0; diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 130a23df89b3..dd656f2da1c7 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -189,7 +189,7 @@ bool SwTextGridPage::FillItemSet(SfxItemSet *rSet) void SwTextGridPage::Reset(const SfxItemSet *rSet) { - if(SFX_ITEM_AVAILABLE <= rSet->GetItemState(RES_TEXTGRID, true)) + if(SFX_ITEM_DEFAULT <= rSet->GetItemState(RES_TEXTGRID, true)) { const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet->Get(RES_TEXTGRID); RadioButton* pButton = 0; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 4a3567105867..68c2b34a54e3 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1594,13 +1594,13 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pRepeatHeaderNF->SetMin( 1 ); m_pRepeatHeaderNF->SaveValue(); } - if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SFX_ITEM_DEFAULT ) { sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet->Get(FN_TABLE_BOX_TEXTORIENTATION)).GetValue(); m_pTextDirectionLB->SelectEntryPos(m_pTextDirectionLB->GetEntryPos( (const void*)nDirection )); } - if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_AVAILABLE ) + if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_DEFAULT ) { sal_uInt16 nVert = ((const SfxUInt16Item&)rSet->Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); sal_uInt16 nPos = 0; 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 ); |