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 /sd | |
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
Diffstat (limited to 'sd')
23 files changed, 212 insertions, 212 deletions
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); |