diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 17:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 06:08:32 +0000 |
commit | ea733ab5b632109d28bb8f1dc37116340b26229b (patch) | |
tree | 78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /sd/source/ui | |
parent | cc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff) |
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")
Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/source/ui')
56 files changed, 382 insertions, 382 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 71e99321b3af..1c10fddcf32c 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -303,7 +303,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, true, &pPoolItem ) ) { OUString sAuthor( (( const SfxStringItem* ) pPoolItem )->GetValue() ); DeleteAnnotationsByAuthor( sAuthor ); @@ -319,7 +319,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETE_POSTIT, true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_DELETE_POSTIT, true, &pPoolItem ) ) ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue() >>= xAnnotation; } } @@ -419,7 +419,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( rReq.GetSlot(), true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( rReq.GetSlot(), true, &pPoolItem ) ) ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue() >>= xAnnotation; } @@ -947,25 +947,25 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation { SfxItemSet aSet(pAnnotationWindow->getView()->GetAttribs()); - if ( aSet.GetItemState( EE_CHAR_WEIGHT ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_WEIGHT ) == SfxItemState::SET ) { if( ((const SvxWeightItem&)aSet.Get( EE_CHAR_WEIGHT )).GetWeight() == WEIGHT_BOLD ) pMenu->CheckItem( SID_ATTR_CHAR_WEIGHT ); } - if ( aSet.GetItemState( EE_CHAR_ITALIC ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_ITALIC ) == SfxItemState::SET ) { if( ((const SvxPostureItem&)aSet.Get( EE_CHAR_ITALIC )).GetPosture() != ITALIC_NONE ) pMenu->CheckItem( SID_ATTR_CHAR_POSTURE ); } - if ( aSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) { if( ((const SvxUnderlineItem&)aSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() != UNDERLINE_NONE ) pMenu->CheckItem( SID_ATTR_CHAR_UNDERLINE ); } - if ( aSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_STRIKEOUT ) == SfxItemState::SET ) { if( ((const SvxCrossedOutItem&)aSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() != STRIKEOUT_NONE ) pMenu->CheckItem( SID_ATTR_CHAR_STRIKEOUT ); diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index ccaafc5776fc..77a34765c753 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -107,7 +107,7 @@ void SdModule::Execute(SfxRequest& rReq) { // automatic spell checker const SfxPoolItem* pItem; - if( pSet && SFX_ITEM_SET == pSet->GetItemState( + if( pSet && SfxItemState::SET == pSet->GetItemState( SID_AUTOSPELL_CHECK, false, &pItem ) ) { bool bOnlineSpelling = ( (const SfxBoolItem*) pItem )->GetValue(); @@ -125,7 +125,7 @@ void SdModule::Execute(SfxRequest& rReq) case SID_ATTR_METRIC: { const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_METRIC, true, &pItem ) ) + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_ATTR_METRIC, true, &pItem ) ) { FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue(); switch( eUnit ) @@ -164,9 +164,9 @@ void SdModule::Execute(SfxRequest& rReq) const SfxPoolItem* pItem; if( pSet && ( - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, false, &pItem ) || - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem ) || - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem ) + SfxItemState::SET == pSet->GetItemState(SID_ATTR_LANGUAGE, false, &pItem ) || + SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem ) || + SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem ) ) ) { @@ -320,7 +320,7 @@ static bool bOnce = false; void SdModule::GetState(SfxItemSet& rItemSet) { // disable Autopilot during presentation - if (rItemSet.GetItemState(SID_SD_AUTOPILOT) != SFX_ITEM_UNKNOWN) + if (rItemSet.GetItemState(SID_SD_AUTOPILOT) != SfxItemState::UNKNOWN) { if (!SvtModuleOptions().IsImpress()) { @@ -343,7 +343,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) } } - if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_METRIC ) ) + if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_METRIC ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() ); if(pDocSh) @@ -356,7 +356,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) } // state of SID_OPENDOC is determined by the base class - if (rItemSet.GetItemState(SID_OPENDOC) != SFX_ITEM_UNKNOWN) + if (rItemSet.GetItemState(SID_OPENDOC) != SfxItemState::UNKNOWN) { const SfxPoolItem* pItem = SfxGetpApp()->GetSlotState(SID_OPENDOC, SfxGetpApp()->GetInterface()); if (pItem) @@ -364,14 +364,14 @@ void SdModule::GetState(SfxItemSet& rItemSet) } // state of SID_OPENHYPERLINK is determined by the base class - if (rItemSet.GetItemState(SID_OPENHYPERLINK) != SFX_ITEM_UNKNOWN) + if (rItemSet.GetItemState(SID_OPENHYPERLINK) != SfxItemState::UNKNOWN) { const SfxPoolItem* pItem = SfxGetpApp()->GetSlotState(SID_OPENHYPERLINK, SfxGetpApp()->GetInterface()); if (pItem) rItemSet.Put(*pItem); } - if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_AUTOSPELL_CHECK ) ) + if( SfxItemState::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_DEFAULT == rItemSet.GetItemState( SID_ATTR_LANGUAGE ) ) + if( SfxItemState::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_DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE ) ) + if( SfxItemState::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_DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE ) ) + if( SfxItemState::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/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 6ef224f1a3fc..12b5aa7b45cb 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -526,7 +526,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) } SdOptions* pOptions = GetSdOptions(eDocType); // Grid - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , false, (const SfxPoolItem**) &pItem )) { const SdOptionsGridItem* pGridItem = (SdOptionsGridItem*) pItem; @@ -535,14 +535,14 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Layout const SdOptionsLayoutItem* pLayoutItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_LAYOUT, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_LAYOUT, false, (const SfxPoolItem**) &pLayoutItem )) { pLayoutItem->SetOptions( pOptions ); } // Metric - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC, false, &pItem ) ) { if( pDoc && eDocType == pDoc->GetDocumentType() ) PutItem( *pItem ); @@ -550,7 +550,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) } sal_uInt16 nDefTab = pOptions->GetDefTab(); // Default-Tabulator - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_DEFTABSTOP, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_DEFTABSTOP, false, &pItem ) ) { nDefTab = ( (SfxUInt16Item*) pItem )->GetValue(); pOptions->SetDefTab( nDefTab ); @@ -559,10 +559,10 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) } // Scale - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_X, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_X, false, &pItem ) ) { sal_Int32 nX = ( (SfxInt32Item*) pItem )->GetValue(); - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_Y, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_Y, false, &pItem ) ) { sal_Int32 nY = ( (SfxInt32Item*) pItem )->GetValue(); pOptions->SetScale( nX, nY ); @@ -579,7 +579,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Contents const SdOptionsContentsItem* pContentsItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_CONTENTS, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_CONTENTS, false, (const SfxPoolItem**) &pContentsItem )) { pContentsItem->SetOptions( pOptions ); @@ -587,7 +587,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Misc const SdOptionsMiscItem* pMiscItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_MISC, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_MISC, false, (const SfxPoolItem**) &pMiscItem )) { pMiscItem->SetOptions( pOptions ); @@ -596,7 +596,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Snap const SdOptionsSnapItem* pSnapItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SNAP, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_SNAP, false, (const SfxPoolItem**) &pSnapItem )) { pSnapItem->SetOptions( pOptions ); @@ -610,7 +610,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Print const SdOptionsPrintItem* pPrintItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_PRINT, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrintItem )) { pPrintItem->SetOptions( pOptions ); diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index 734112851e02..e48084fc07fc 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_DEFAULT ) + if( eState == SfxItemState::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 4f6380d6c84f..30f0b8b1eeb0 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_DEFAULT || pState->ISA( SfxVoidItem ) ) + if( eState != SfxItemState::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 89dabc6a7a1b..d39ef489a6d7 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_DEFAULT && nSId == SID_ANIMATOR_STATE ) + if( eState >= SfxItemState::DEFAULT && nSId == SID_ANIMATOR_STATE ) { const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pItem ); assert(pStateItem); //SfxUInt16Item expected diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index 607678441ce4..33e41a5c8b67 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -120,37 +120,37 @@ void CopyDlg::Reset() if (comphelper::string::getTokenCount(aStr, TOKEN) < 8) { - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) m_pNumFldCopies->SetValue( ( ( const SfxUInt16Item* ) pPoolItem )->GetValue() ); else m_pNumFldCopies->SetValue( 1L ); long nMoveX = 500L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) nMoveX = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldMoveX, Fraction(nMoveX) / maUIScale, SFX_MAPUNIT_100TH_MM); long nMoveY = 500L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) nMoveY = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldMoveY, Fraction(nMoveY) / maUIScale, SFX_MAPUNIT_100TH_MM); - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) m_pMtrFldAngle->SetValue( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); else m_pMtrFldAngle->SetValue( 0L ); long nWidth = 0L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) nWidth = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldWidth, Fraction(nWidth) / maUIScale, SFX_MAPUNIT_100TH_MM); long nHeight = 0L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) nHeight = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldHeight, Fraction(nHeight) / maUIScale, SFX_MAPUNIT_100TH_MM); - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); m_pLbStartColor->SelectEntry( aColor ); @@ -256,7 +256,7 @@ IMPL_LINK_NOARG(CopyDlg, SetViewData) // sets color attribute const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); m_pLbStartColor->SelectEntry( aColor ); @@ -283,7 +283,7 @@ IMPL_LINK_NOARG(CopyDlg, SetDefault) // set color attribute const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); m_pLbStartColor->SelectEntry( aColor ); diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx index 09da8ea9e653..674185f0305a 100644 --- a/sd/source/ui/dlg/diactrl.cxx +++ b/sd/source/ui/dlg/diactrl.cxx @@ -112,7 +112,7 @@ void SdTbxCtlDiaPages::StateChanged( sal_uInt16, SdPagesField* pFld = (SdPagesField*) GetToolBox().GetItemWindow( GetId() ); DBG_ASSERT( pFld, "Window not found" ); - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) { pFld->Disable(); pFld->SetText( OUString() ); @@ -122,7 +122,7 @@ void SdTbxCtlDiaPages::StateChanged( sal_uInt16, pFld->Enable(); const SfxUInt16Item* pItem = 0; - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { pItem = dynamic_cast< const SfxUInt16Item* >( pState ); DBG_ASSERT( pItem, "sd::SdTbxCtlDiaPages::StateChanged(), wrong item type!" ); diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx index 48069700a855..d79043d75367 100644 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -289,7 +289,7 @@ void SdModifyFieldDlg::FillControls() m_pRbtVar->SaveValue(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == maInputSet.GetItemState(EE_CHAR_LANGUAGE, true, &pItem ) ) + if( SfxItemState::SET == maInputSet.GetItemState(EE_CHAR_LANGUAGE, true, &pItem ) ) m_pLbLanguage->SelectLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() ); m_pLbLanguage->SaveValue(); diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index 0bbcc57a574c..4db3a43b5ee5 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -89,7 +89,7 @@ OutlineBulletDlg::OutlineBulletDlg( } } - if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET)) + if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET)) { const SvxNumBulletItem *pItem = NULL; if(bOutliner) @@ -109,7 +109,7 @@ OutlineBulletDlg::OutlineBulletDlg( aInputSet.Put(*pItem, EE_PARA_NUMBULLET); } - if(bTitle && aInputSet.GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && aInputSet.GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pItem = (SvxNumBulletItem*)aInputSet.GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pRule = pItem->GetNumRule(); @@ -171,14 +171,14 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const pOutputSet->Put( aSet ); const SfxPoolItem *pItem = NULL; - if( SFX_ITEM_SET == pOutputSet->GetItemState(pOutputSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE), false, &pItem )) + if( SfxItemState::SET == pOutputSet->GetItemState(pOutputSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE), false, &pItem )) { SdBulletMapper::MapFontsInNumRule( *((SvxNumBulletItem*)pItem)->GetNumRule(), *pOutputSet ); // #i35937 - removed EE_PARA_BULLETSTATE setting } - if(bTitle && pOutputSet->GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && pOutputSet->GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)pOutputSet->GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pRule = pBulletItem->GetNumRule(); diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx index f3d7da4f3172..195d5d3dce0c 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_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { GlueEscDirLB* pGlueEscDirLB = (GlueEscDirLB*) ( GetToolBox(). GetItemWindow( GetId() ) ); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index e9f9bc21c280..12cae5bbc49d 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_DEFAULT && nSId == SID_NAVIGATOR_STATE ) + if( eState >= SfxItemState::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_DEFAULT && nSId == SID_NAVIGATOR_PAGENAME ) + if( eState >= SfxItemState::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 bfecb9288bd3..b571cbbf83ff 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_DEFAULT ) + if(eItemState > SfxItemState::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_DEFAULT ) + if( eItemState > SfxItemState::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/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 6d5542af4f71..428a98c0e494 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -97,13 +97,13 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, // If there is no bullet item in this stylesheet, we get it // from 'Outline 1' style sheet. - if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem )) + if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem )) { OUString aStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1"); SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO); if(pFirstStyleSheet) - if( SFX_ITEM_SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, &pItem) ) + if( SfxItemState::SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, &pItem) ) aInputSet.Put( *pItem ); } @@ -287,7 +287,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const pOutSet->Put( *SfxTabDialog::GetOutputItemSet() ); const SvxNumBulletItem *pSvxNumBulletItem = NULL; - if( SFX_ITEM_SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, (const SfxPoolItem**)&pSvxNumBulletItem )) + if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, (const SfxPoolItem**)&pSvxNumBulletItem )) SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet ); return pOutSet; } diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index e1cbbd50a23d..e886dbc83996 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -130,7 +130,7 @@ bool SdPrintOptions::FillItemSet( SfxItemSet* rAttrs ) void SdPrintOptions::Reset( const SfxItemSet* rAttrs ) { const SdOptionsPrintItem* pPrintOpts = NULL; - if( SFX_ITEM_SET == rAttrs->GetItemState( ATTR_OPTIONS_PRINT, false, + if( SfxItemState::SET == rAttrs->GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrintOpts ) ) { m_pCbxDraw->Check( pPrintOpts->GetOptionsPrint().IsDraw() ); diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index d6b14c909c9d..13c92f49f622 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -66,7 +66,7 @@ void SdPresLayoutDlg::Reset() long nName; // replace master page - if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, false, &pPoolItem ) == SFX_ITEM_SET ) + if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, false, &pPoolItem ) == SfxItemState::SET ) { bool bMasterPage = ( (const SfxBoolItem*) pPoolItem)->GetValue(); m_pCbxMasterPage->Enable( !bMasterPage ); @@ -76,7 +76,7 @@ void SdPresLayoutDlg::Reset() // remove not used master pages m_pCbxCheckMasters->Check(false); - if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, true, &pPoolItem) == SFX_ITEM_SET) + if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, true, &pPoolItem) == SfxItemState::SET) maName = ((const SfxStringItem*)pPoolItem)->GetValue(); else maName = ""; diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 300bc8f9cc87..38ebfe206e44 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -305,7 +305,7 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs ) OUString aFileName; // m_pLbAction - if( rAttrs->GetItemState( ATTR_ACTION ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( ATTR_ACTION ) != SfxItemState::DONTCARE ) { eCA = (presentation::ClickAction) ( ( const SfxAllEnumItem& ) rAttrs-> Get( ATTR_ACTION ) ).GetValue(); @@ -315,7 +315,7 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs ) m_pLbAction->SetNoSelection(); // m_pEdtSound - if( rAttrs->GetItemState( ATTR_ACTION_FILENAME ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( ATTR_ACTION_FILENAME ) != SfxItemState::DONTCARE ) { aFileName = ( ( const SfxStringItem& ) rAttrs->Get( ATTR_ACTION_FILENAME ) ).GetValue(); SetEditText( aFileName ); diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index fc123faa32b2..d80266fcef0b 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_DEFAULT ) + if ( rInAttrs.GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rInAttrs.Get( nWhich ); eFUnit = (FieldUnit)rItem.GetValue(); @@ -286,7 +286,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet ) // change metric if necessary (since TabPage is in the Dialog where // the metric is set) const SfxPoolItem* pAttr = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , false, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC , false, (const SfxPoolItem**)&pAttr )) { const SfxUInt16Item* pItem = (SfxUInt16Item*) pAttr; @@ -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_DEFAULT ) + if ( rAttrs->GetItemState( nWhich ) >= SfxItemState::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_DEFAULT ) + if( rAttrs->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { SfxMapUnit eUnit = rAttrs->GetPool()->GetMetric( nWhich ); const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs->Get( nWhich ); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index b4c43625897a..7190485673ec 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -272,12 +272,12 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) if( pSet ) { - if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) + if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) { mpDoc->SetStarDrawPreviewMode( true ); } - if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& + if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() ) { bStartPresentation = true; @@ -379,7 +379,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium, SfxItemSet* pSet = rMedium.GetItemSet(); if( pSet ) { - if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& + if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() ) { mpDoc->SetStartWithPresentation( true ); @@ -413,12 +413,12 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) SfxItemSet* pSet = rMedium.GetItemSet(); if( pSet ) { - if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) + if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) { mpDoc->SetStarDrawPreviewMode( true ); } - if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& + if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() ) { bStartPresentation = true; @@ -1075,7 +1075,7 @@ bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) OUString aLayoutName; SfxStringItem* pLayoutItem; - if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, false, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET ) + if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, false, (const SfxPoolItem**) & pLayoutItem ) == SfxItemState::SET ) { aLayoutName = pLayoutItem->GetValue(); } diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 180aede5cbd4..a184ccf93d10 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -275,7 +275,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) if (pFrame) { - if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN) { pFrame->GetSlotState(SID_RELOAD, pFrame->GetInterface(), &rSet); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 7409c4c0d4ab..7fdee9ce7011 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_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 )) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CHARMAP ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_RLM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_LRM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_ZWNBSP ) || + SfxItemState::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/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index 8b929c373df7..174391ac74da 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -115,9 +115,9 @@ void FuChar::DoExecute( SfxRequest& rReq ) if( mpDoc->GetOnlineSpell() ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, false, &pItem ) || - SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pItem ) || - SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, false, &pItem ) || + SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pItem ) || + SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pItem ) ) { mpDoc->StopOnlineSpelling(); mpDoc->StartOnlineSpelling(); diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index ad605555c805..bf74e9c2414b 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -79,7 +79,7 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq ) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) ) maTargets = ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue(); } } diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index ced9706fe4e2..3ed1773d8790 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -599,7 +599,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) long nWidth = 300; // (1/100th mm) // determine line width and calculate with it the line end width - if( aSet.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE ) + if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) { long nValue = ( ( const XLineWidthItem& ) aSet.Get( XATTR_LINEWIDTH ) ).GetValue(); if( nValue > 0 ) diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index c4bc3d791c1f..03477a588620 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -84,12 +84,12 @@ void FuCopy::DoExecute( SfxRequest& rReq ) mpView->GetAttributes( aAttr ); const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) ) + if( SfxItemState::SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) ) { drawing::FillStyle eStyle = ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); if( eStyle == drawing::FillStyle_SOLID && - SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLCOLOR, true, &pPoolItem ) ) + SfxItemState::SET == aAttr.GetItemState( XATTR_FILLCOLOR, true, &pPoolItem ) ) { const XFillColorItem* pItem = ( const XFillColorItem* ) pPoolItem; XColorItem aXColorItem( ATTR_COPY_START_COLOR, pItem->GetName(), @@ -134,30 +134,30 @@ void FuCopy::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pPoolItem = NULL; // Count - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) nNumber = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue(); // translation - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) lSizeX = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) lSizeY = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) lAngle = ( ( const SfxInt32Item* )pPoolItem )->GetValue(); // scale - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) lWidth = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) lHeight = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); // start/end color - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { aStartColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); bColor = true; } - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) { aEndColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); if( aStartColor == aEndColor ) diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index 604e04cff453..24a3f0b1212f 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -164,11 +164,11 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const Fo const bool bHasParent = !pStyle->GetParent().isEmpty(); - if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, false ) == SFX_ITEM_SET ) + if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, false ) == SfxItemState::SET ) rSet.Put( SvxLanguageItem( nTargetLanguage, EE_CHAR_LANGUAGE_CJK ) ); if( pTargetFont && - ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, false ) == SFX_ITEM_SET ) ) + ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, false ) == SfxItemState::SET ) ) { // set new font attribute SvxFontItem aFontItem( (SvxFontItem&) rSet.Get( EE_CHAR_FONTINFO_CJK ) ); diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 0f1e27d7185d..fe23ac51e4fb 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -461,7 +461,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) } // evaluation of the ItemSets - if (pArgs->GetItemState(ATTR_ANIMATION_ACTIVE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_ACTIVE) == SfxItemState::SET) { bActive = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_ACTIVE)).GetValue(); nAnimationSet = ATTR_SET; @@ -469,7 +469,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nAnimationSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SfxItemState::SET) { eEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_EFFECT)).GetValue(); @@ -478,7 +478,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SfxItemState::SET) { eTextEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_TEXTEFFECT)).GetValue(); @@ -487,7 +487,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nTextEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SfxItemState::SET) { eSpeed = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_SPEED)).GetValue(); @@ -496,7 +496,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSpeedSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_FADEOUT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_FADEOUT) == SfxItemState::SET) { bFadeOut = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_FADEOUT)).GetValue(); nFadeOutSet = ATTR_SET; @@ -504,7 +504,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nFadeOutSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_INVISIBLE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_INVISIBLE) == SfxItemState::SET) { bInvisible = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_INVISIBLE)).GetValue(); nInvisibleSet = ATTR_SET; @@ -512,7 +512,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nInvisibleSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDON) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDON) == SfxItemState::SET) { bSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_SOUNDON)).GetValue(); nSoundOnSet = ATTR_SET; @@ -520,7 +520,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSoundOnSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDFILE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDFILE) == SfxItemState::SET) { aSound = ((SfxStringItem&)pArgs->Get(ATTR_ANIMATION_SOUNDFILE)).GetValue(); nSoundFileSet = ATTR_SET; @@ -528,7 +528,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSoundFileSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_COLOR) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_COLOR) == SfxItemState::SET) { aFadeColor = ((SvxColorItem&)pArgs->Get(ATTR_ANIMATION_COLOR)).GetValue(); nFadeColorSet = ATTR_SET; @@ -536,7 +536,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nFadeColorSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_PLAYFULL) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_PLAYFULL) == SfxItemState::SET) { bPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_PLAYFULL)).GetValue(); nPlayFullSet = ATTR_SET; @@ -544,7 +544,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nPlayFullSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION) == SfxItemState::SET) { eClickAction = (presentation::ClickAction)((SfxAllEnumItem&)pArgs-> Get(ATTR_ACTION)).GetValue(); @@ -553,7 +553,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nClickActionSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_FILENAME) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_FILENAME) == SfxItemState::SET) { aBookmark = ((SfxStringItem&)pArgs-> Get(ATTR_ACTION_FILENAME)).GetValue(); @@ -562,7 +562,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nBookmarkSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SfxItemState::SET) { eSecondEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ACTION_EFFECT)).GetValue(); @@ -571,7 +571,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SfxItemState::SET) { eSecondSpeed = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs-> Get(ATTR_ACTION_EFFECTSPEED)).GetValue(); @@ -580,7 +580,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondSpeedSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_SOUNDON) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_SOUNDON) == SfxItemState::SET) { bSecondSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_SOUNDON)).GetValue(); nSecondSoundOnSet = ATTR_SET; @@ -588,7 +588,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondSoundOnSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_PLAYFULL) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_PLAYFULL) == SfxItemState::SET) { bSecondPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_PLAYFULL)).GetValue(); nSecondPlayFullSet = ATTR_SET; diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 2bc9809f53ae..c4776f558875 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -207,7 +207,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) { sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF; const SfxPoolItem* pNumLevelItem = NULL; - if(SFX_ITEM_SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pNumLevelItem)) + if(SfxItemState::SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pNumLevelItem)) nActNumLvl = ((const SfxUInt16Item*)pNumLevelItem)->GetValue(); pNumRuleMgr->SetItems(&aNewAttr); @@ -301,7 +301,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u //SvxNumBulletItem* pRetItem = NULL; const SfxPoolItem* pTmpItem = NULL; - if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SFX_ITEM_SET) + if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SfxItemState::SET) { return pTmpItem; } @@ -309,7 +309,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u { nNumItemId = aNewAttr.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); SfxItemState eState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) return pTmpItem; else { @@ -356,7 +356,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u aNewAttr.Put(*pItem, EE_PARA_NUMBULLET); - if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)aNewAttr.GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pLclRule = pBulletItem->GetNumRule(); @@ -371,11 +371,11 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u } SfxItemState eItemState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eItemState == SFX_ITEM_SET) + if (eItemState == SfxItemState::SET) return pTmpItem; } - //DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!") + //DBG_ASSERT(eState == SfxItemState::SET, "kein Item gefunden!") } return pTmpItem; } diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 53429c37f7b8..fe3e1f145a86 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -326,9 +326,9 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) bool bChanges = false; for( sal_uInt16 i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ ) { - if( aMergedAttr.GetItemState( i ) != SFX_ITEM_DEFAULT ) + if( aMergedAttr.GetItemState( i ) != SfxItemState::DEFAULT ) { - if( pTempSet->GetItemState( i ) == SFX_ITEM_DEFAULT ) + if( pTempSet->GetItemState( i ) == SfxItemState::DEFAULT ) pTempSet->Put( aMergedAttr.Get( i ) ); else if( aMergedAttr.GetItem( i ) != pTempSet->GetItem( i ) ) @@ -338,7 +338,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) // if the background for this page was set to invisible, the background-object has to be deleted, too. if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) || - ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) && + ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT ) && ( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) ) ) mbPageBckgrdDeleted = true; @@ -451,7 +451,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) } const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) ) + if( SfxItemState::SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) ) { sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); mpDoc->SetDefaultWritingMode( nVal == FRMDIR_HORI_RIGHT_TOP ? ::com::sun::star::text::WritingMode_RL_TB : ::com::sun::star::text::WritingMode_LR_TB ); @@ -495,7 +495,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) bool bFullSize = pMasterPage->IsBackgroundFullSize(); sal_uInt16 nPaperBin = mpPage->GetPaperBin(); - if( pArgs->GetItemState(SID_ATTR_PAGE, true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(SID_ATTR_PAGE, true, &pPoolItem) == SfxItemState::SET ) { mpDoc->SetPageNumType(((const SvxPageItem*) pPoolItem)->GetNumType()); @@ -508,7 +508,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) mpDrawViewShell->ResetActualPage(); } - if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, true, &pPoolItem) == SfxItemState::SET ) { aNewSize = ((const SvxSizeItem*) pPoolItem)->GetSize(); @@ -517,7 +517,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE), - true, &pPoolItem) == SFX_ITEM_SET ) + true, &pPoolItem) == SfxItemState::SET ) { nLeft = ((const SvxLRSpaceItem*) pPoolItem)->GetLeft(); nRight = ((const SvxLRSpaceItem*) pPoolItem)->GetRight(); @@ -528,7 +528,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE), - true, &pPoolItem) == SFX_ITEM_SET ) + true, &pPoolItem) == SfxItemState::SET ) { nUpper = ((const SvxULSpaceItem*) pPoolItem)->GetUpper(); nLower = ((const SvxULSpaceItem*) pPoolItem)->GetLower(); @@ -537,12 +537,12 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) bSetPageSizeAndBorder = true; } - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), true, &pPoolItem) == SfxItemState::SET ) { bScaleAll = ((const SfxBoolItem*) pPoolItem)->GetValue(); } - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), true, &pPoolItem) == SfxItemState::SET ) { bFullSize = ((const SfxBoolItem*) pPoolItem)->GetValue(); @@ -551,7 +551,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } // Paper Bin - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), true, &pPoolItem) == SfxItemState::SET ) { nPaperBin = ((const SvxPaperBinItem*) pPoolItem)->GetValue(); diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx index 08db2fb6dc3d..2b62f4013d05 100644 --- a/sd/source/ui/func/fuparagr.cxx +++ b/sd/source/ui/func/fuparagr.cxx @@ -118,13 +118,13 @@ void FuParagraph::DoExecute( SfxRequest& rReq ) ESelection eSelection = pOutlView->GetSelection(); const SfxPoolItem *pItem = 0; - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, false, &pItem ) ) { const bool bNewStart = ((SfxBoolItem*)pItem)->GetValue() ? sal_True : sal_False; pOutliner->SetParaIsNumberingRestart( eSelection.nStartPara, bNewStart ); } - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART_AT, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART_AT, false, &pItem ) ) { const sal_Int16 nStartAt = ((SfxInt16Item*)pItem)->GetValue(); pOutliner->SetNumberingStartValue( eSelection.nStartPara, nStartAt ); diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index d91aa0527915..53f901639a85 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -1048,7 +1048,7 @@ void FuPoor::ReceiveRequest(SfxRequest& rReq) if (pSet) { - if( pSet->GetItemState( nSlotId ) == SFX_ITEM_SET ) + if( pSet->GetItemState( nSlotId ) == SfxItemState::SET ) { const SfxPoolItem& rItem = pSet->Get( nSlotId ); diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index dfd71bc2a90d..283916836247 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -135,13 +135,13 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) if (pArgs) { - if (pArgs->GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET) bLoad = ((SfxBoolItem&)pArgs->Get(ATTR_PRESLAYOUT_LOAD)).GetValue(); - if( pArgs->GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET ) + if( pArgs->GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET ) bMasterPage = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue(); - if( pArgs->GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET ) + if( pArgs->GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET ) bCheckMasters = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue(); - if (pArgs->GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET) aFile = ((SfxStringItem&)pArgs->Get(ATTR_PRESLAYOUT_NAME)).GetValue(); } else @@ -156,13 +156,13 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) case RET_OK: { pDlg->GetAttr(aSet); - if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET) + if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET) bLoad = ((SfxBoolItem&)aSet.Get(ATTR_PRESLAYOUT_LOAD)).GetValue(); - if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET ) + if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET ) bMasterPage = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue(); - if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET ) + if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET ) bCheckMasters = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue(); - if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET) + if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET) aFile = ((SfxStringItem&)aSet.Get(ATTR_PRESLAYOUT_NAME)).GetValue(); } break; diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 4c730bfd7671..bdb8fe32bfbe 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -105,12 +105,12 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pItem; sal_uInt16 nFamily = USHRT_MAX; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, false, &pItem )) { nFamily = ( (const SfxUInt16Item &) pArgs->Get( SID_STYLE_FAMILY ) ).GetValue(); } - else if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, + else if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, false, &pItem )) { OUString sFamily = ( (const SfxStringItem &) pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue(); @@ -154,7 +154,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } } - if (pArgs && pArgs->GetItemState(nSId) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(nSId) == SfxItemState::SET) aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); } } @@ -171,7 +171,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } pStyleSheet = &pSSPool->Make( aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_USERDEF ); - if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SfxItemState::SET) { OUString aParentName(((const SfxStringItem&) pArgs->Get(SID_STYLE_REFERENCE)).GetValue()); pStyleSheet->SetParent(aParentName); @@ -255,7 +255,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { if( !SD_MOD()->GetWaterCan() ) { - if (pArgs && pArgs->GetItemState( nSId ) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState( nSId ) == SfxItemState::SET) { aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); SD_MOD()->SetWaterCan( true ); @@ -410,7 +410,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) // EE_PARA_NUMBULLET item is only valid in first outline template if( (ePO >= PO_OUTLINE_2) && (ePO <= PO_OUTLINE_9) ) { - if (aTempSet.GetItemState(EE_PARA_NUMBULLET) == SFX_ITEM_SET) + if (aTempSet.GetItemState(EE_PARA_NUMBULLET) == SfxItemState::SET) { SvxNumRule aRule(*((SvxNumBulletItem*)aTempSet.GetItem(EE_PARA_NUMBULLET))->GetNumRule()); @@ -437,7 +437,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) sdr::properties::CleanupFillProperties( rAttr ); // check for unique names of named items for xml - if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLBITMAP ); SfxPoolItem* pNewItem = ((XFillBitmapItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -447,7 +447,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINEDASH ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINEDASH ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEDASH ); SfxPoolItem* pNewItem = ((XLineDashItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -457,7 +457,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINESTART ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINESTART ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINESTART ); SfxPoolItem* pNewItem = ((XLineStartItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -467,7 +467,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINEEND ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINEEND ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEEND ); SfxPoolItem* pNewItem = ((XLineEndItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -477,7 +477,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLGRADIENT ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLGRADIENT ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLGRADIENT ); SfxPoolItem* pNewItem = ((XFillGradientItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -487,7 +487,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLFLOATTRANSPARENCE ); SfxPoolItem* pNewItem = ((XFillFloatTransparenceItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -497,7 +497,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLHATCH ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLHATCH ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLHATCH ); SfxPoolItem* pNewItem = ((XFillHatchItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -543,9 +543,9 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( mpDoc->GetOnlineSpell() ) { const SfxPoolItem* pTempItem; - if( SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, false, &pTempItem ) || - SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pTempItem ) || - SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pTempItem ) ) + if( SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, false, &pTempItem ) || + SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pTempItem ) || + SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pTempItem ) ) { mpDoc->StopOnlineSpelling(); mpDoc->StartOnlineSpelling(); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 2b4ca731a409..8f518dedae9b 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -235,7 +235,7 @@ void FuText::DoExecute( SfxRequest& ) // test for type before using && SID_TEXTEDIT == nSlotId - && SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT) + && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) && (sal_uInt16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) { @@ -1260,7 +1260,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq) // test for type before using && SID_TEXTEDIT == nSlotId - && SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT) + && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) && (sal_uInt16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) { diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx index 3423c23bb1db..08c9dda54c65 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_DEFAULT) + if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SfxItemState::DEFAULT) rItemSet.DisableItem(SID_TP_EDIT_MASTER); } diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 832e31592f47..ebf319ce6ce9 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -616,7 +616,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) const SfxPoolItem* pItem = NULL; const SfxItemState aState ( mrBase.GetViewFrame()->GetDispatcher()->QueryState(SID_INSERTPAGE, pItem)); - if (aState == SFX_ITEM_DISABLED) + if (aState == SfxItemState::DISABLED) pMenu->EnableItem(SID_INSERTPAGE_LAYOUT_MENU, false); // Show the menu. diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index ea1df06df56c..b3f920a4692a 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -611,7 +611,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent) void SlideSorterController::GetCtrlState (SfxItemSet& rSet) { - if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN) { // let SFx en-/disable "last version" SfxViewFrame* pSlideViewFrame = SfxViewFrame::Current(); @@ -628,10 +628,10 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) } // Output quality. - 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 (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SfxItemState::DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SfxItemState::DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SfxItemState::DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SfxItemState::DEFAULT) { if (mrSlideSorter.GetContentWindow()) { @@ -661,7 +661,7 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) } } - if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SfxItemState::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 f3572685579a..dba3fa2cf7b7 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_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SfxItemState::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_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SfxItemState::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_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || + SfxItemState::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_DEFAULT - || rSet.GetItemState(SID_RENAME_MASTER_PAGE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_RENAMEPAGE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_RENAME_MASTER_PAGE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DUPLICATE_PAGE) == SfxItemState::DEFAULT) { int n = mrSlideSorter.GetController().GetPageSelector() .GetSelectedPageCount(); @@ -658,8 +658,8 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } } - if (rSet.GetItemState(SID_HIDE_SLIDE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_SHOW_SLIDE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_HIDE_SLIDE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_SHOW_SLIDE) == SfxItemState::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_DEFAULT) + if (rSet.GetItemState(SID_INSERTPAGE) == SfxItemState::DEFAULT) rSet.DisableItem(SID_INSERTPAGE); - if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SfxItemState::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_DEFAULT - || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_PASTE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::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_DEFAULT - || rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_COPY) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_PASTE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_CUT) == SfxItemState::DEFAULT) { if (mrSlideSorter.GetModel().GetEditMode() == EM_MASTERPAGE) { - if (rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_CUT) == SfxItemState::DEFAULT) rSet.DisableItem(SID_CUT); - if (rSet.GetItemState(SID_COPY) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_COPY) == SfxItemState::DEFAULT) rSet.DisableItem(SID_COPY); - if (rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_PASTE) == SfxItemState::DEFAULT) rSet.DisableItem(SID_PASTE); - if (rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::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_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) + if (rSet.GetItemState(SID_CUT) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_COPY) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DELETE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DELETE_PAGE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DELETE_MASTER_PAGE) == SfxItemState::DEFAULT) { model::PageEnumeration aSelectedPages ( model::PageEnumerationProvider::CreateSelectedPagesEnumeration( diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 094c08d7a2b1..a0de11fb609f 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -413,7 +413,7 @@ throw (UnknownPropertyException, PropertyVetoException, if( pPrinter ) { SdOptionsPrintItem* pPrinterOptions = NULL; - if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) + if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SfxItemState::SET) aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint(); } else @@ -977,7 +977,7 @@ throw (UnknownPropertyException, WrappedTargetException, RuntimeException) if( pPrinter ) { SdOptionsPrintItem* pPrinterOptions = NULL; - if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) + if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SfxItemState::SET) aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint(); } else diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 8c8f396c82f1..8b50af5c0498 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -340,8 +340,8 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr { if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE ) { - if( mpSet->GetItemState( XATTR_FILLBMP_STRETCH, false ) == SFX_ITEM_SET || - mpSet->GetItemState( XATTR_FILLBMP_TILE, false ) == SFX_ITEM_SET ) + if( mpSet->GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET || + mpSet->GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET ) { return beans::PropertyState_DIRECT_VALUE; } @@ -353,14 +353,14 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr switch( mpSet->GetItemState( pEntry->nWID, false ) ) { - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: + case SfxItemState::READONLY: + case SfxItemState::SET: return beans::PropertyState_DIRECT_VALUE; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: return beans::PropertyState_DEFAULT_VALUE; default: -// case SFX_ITEM_DONTCARE: -// case SFX_ITEM_DISABLED: +// case SfxItemState::DONTCARE: +// case SfxItemState::DISABLED: return beans::PropertyState_AMBIGUOUS_VALUE; } } diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index 8d074fa12c05..5d904cefba0b 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -118,7 +118,7 @@ void MediaObjectBar::Execute( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) + if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) pItem = NULL; if( pItem ) diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 3c4ea2923d19..69dcb5d9b0a5 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -207,7 +207,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, aTempSet.Put( rSet ); aTempSet.ClearInvalidItems(); - if( nDepth > 0 && aTempSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET ) + if( nDepth > 0 && aTempSet.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET ) { // no SvxNumBulletItem in outline level 1 to 8! aTempSet.ClearItem( EE_PARA_NUMBULLET ); @@ -237,7 +237,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, pPara = iter != aSelList.rend() ? *iter : NULL; bool bJumpToLevel1 = false; - if( !pPara && nDepth > 0 && rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET ) + if( !pPara && nDepth > 0 && rSet.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET ) bJumpToLevel1 = true; if (bJumpToLevel1) @@ -318,7 +318,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, sal_uInt16 nWhich(aWhichIter.FirstWhich()); while( nWhich ) { - if( SFX_ITEM_SET == rSet.GetItemState( nWhich ) ) + if( SfxItemState::SET == rSet.GetItemState( nWhich ) ) aTempSet.ClearItem( nWhich ); nWhich = aWhichIter.NextWhich(); } @@ -345,7 +345,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, sal_uInt16 nWhich(aWhichIter.FirstWhich()); while( nWhich ) { - if( SFX_ITEM_SET == rSet.GetItemState( nWhich ) ) + if( SfxItemState::SET == rSet.GetItemState( nWhich ) ) pObject->ClearMergedItem( nWhich ); nWhich = aWhichIter.NextWhich(); } diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index d7ec657e8fbf..37c82a1e7ace 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -140,7 +140,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet ) rSet.Put(aKern); SfxItemState eState = aCharAttrSet.GetItemState( EE_CHAR_KERNING, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_CHAR_KERNING); } @@ -559,7 +559,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) Invalidate(SID_ATTR_PARA_LRSPACE); //Added by xuxu SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_LRSPACE); rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 37f5de8f848f..7f435665ab42 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_DEFAULT ) + if( aEditAttr.GetItemState( EE_PARA_ULSPACE ) >= SfxItemState::DEFAULT ) { SfxItemSet aNewAttrs(*(aEditAttr.GetPool()), aEditAttr.GetRanges()); const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); @@ -592,7 +592,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; sal_uInt16 nAdjust = SVX_ADJUST_LEFT; - if( SFX_ITEM_SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) + if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue(); if( bLeftToRight ) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index e93b366ccecc..05c6c4086b83 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -905,12 +905,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) boost::scoped_ptr<SfxItemSet> pNewSet(rAttr.first); SdrObjUserCall* pUserCall = rAttr.second; - if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SFX_ITEM_SET ) + if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SfxItemState::SET ) { pObj->SetMergedItem(pNewSet->Get(SDRATTR_TEXT_MINFRAMEHEIGHT)); } - if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) == SFX_ITEM_SET ) + if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) == SfxItemState::SET ) { pObj->SetMergedItem(pNewSet->Get(SDRATTR_TEXT_AUTOGROWHEIGHT)); } @@ -3180,7 +3180,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet) case SID_TABLE_VERT_BOTTOM: bool bContour = false; SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ); - if( eConState != SFX_ITEM_DONTCARE ) + if( eConState != SfxItemState::DONTCARE ) { bContour = ( ( const SdrOnOffItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); } @@ -3189,8 +3189,8 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet) SfxItemState eVState = aAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ); //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - //if(SFX_ITEM_DONTCARE != eVState && SFX_ITEM_DONTCARE != eHState) - if(SFX_ITEM_DONTCARE != eVState) + //if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) + if(SfxItemState::DONTCARE != eVState) { SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 59a05ede3e10..414923858bab 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -457,7 +457,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { const SfxPoolItem* pItem; if (rReq.GetArgs()->GetItemState( - SID_ATTR_YEAR2000, true, &pItem) == SFX_ITEM_SET) + SID_ATTR_YEAR2000, true, &pItem) == SfxItemState::SET) pFormShell->SetY2KState ( static_cast<const SfxUInt16Item*>(pItem)->GetValue()); } @@ -904,7 +904,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) { SfxItemSet aEditAttr( GetDoc()->GetPool() ); mpDrawView->GetAttributes( aEditAttr ); - if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SFX_ITEM_DEFAULT ) + if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SfxItemState::DEFAULT ) { const SvxTabStopItem& rItem = (const SvxTabStopItem&) aEditAttr.Get( EE_PARA_TABS ); rSet.Put( rItem ); @@ -932,7 +932,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) Point aPos( aPagePos + maMarkRect.TopLeft() ); - if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SFX_ITEM_SET ) + if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET ) { const SdrMetricItem& rTLDItem = (const SdrMetricItem&) aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); @@ -944,7 +944,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) aLRSpace.SetLeft( aPagePos.X() + maMarkRect.Left() ); - if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SFX_ITEM_SET ) + if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET ) { const SdrMetricItem& rTLDItem = (const SdrMetricItem&) aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); @@ -963,7 +963,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) aProtect.SetPosProtect( true ); } - if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SFX_ITEM_DEFAULT ) + if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SfxItemState::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 cf7631823c89..d754afecf0fc 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_DEFAULT == rSet.GetItemState( SID_FONTWORK ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_FONTWORK ) ) { sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem(SID_FONTWORK, GetViewFrame()->HasChildWindow(nId))); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COLOR_CONTROL ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_COLOR_CONTROL ) ) { sal_uInt16 nId = SvxColorChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem(SID_COLOR_CONTROL, GetViewFrame()->HasChildWindow(nId))); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ANIMATION_OBJECTS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ANIMATION_OBJECTS ) ) { sal_uInt16 nId = AnimationChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_ANIMATION_OBJECTS, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_NAVIGATOR ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_NAVIGATOR ) ) { sal_uInt16 nId = SID_NAVIGATOR; rSet.Put( SfxBoolItem( SID_NAVIGATOR, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BMPMASK ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_BMPMASK ) ) { sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_BMPMASK, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_IMAP ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_IMAP ) ) { sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_IMAP, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_3D_WIN ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_3D_WIN ) ) { sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_3D_WIN, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_AVMEDIA_PLAYER ) ) + if( SfxItemState::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 86353ff12403..b6dff0c24dd6 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_DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) { bool bDisable = true; if( pPageView ) @@ -337,7 +337,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) { bool bDisable = true; if( pPageView ) @@ -378,7 +378,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) { bool bDisable = true; if( pPageView ) @@ -402,7 +402,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) + if (SfxItemState::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_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || + SfxItemState::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_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 ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_EDITMODE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_INSERT_POINT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_PERCENT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_LEFT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_RIGHT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_TOP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_BOTTOM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_CENTER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_LEFT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_RIGHT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_CENTER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_TOP ) || + SfxItemState::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_DEFAULT == rSet.GetItemState( SID_GRID_FRONT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_HELPLINES_FRONT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_GRID_FRONT ) || + SfxItemState::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_DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) { if ( !mpDrawView->IsTextEdit() ) { @@ -618,8 +618,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_THESAURUS ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SELECTALL ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SIZE_ALL ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_SELECTALL ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_SIZE_ALL ) ) { if( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) { @@ -629,14 +629,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONTEXT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CONTEXT ) ) rSet.Put( SfxStringItem( SID_CONTEXT, mpDrawView->GetStatusText() ) ); // clipboard (paste) - 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( SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE_SPECIAL ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE_UNFORMATTED ) || + SfxItemState::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_DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) + else if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_MANAGE_LINKS ) ) + if( SfxItemState::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_DEFAULT) + rSet.GetItemState(SID_TITLE_MASTERPAGE) == SfxItemState::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_DEFAULT) + if (rSet.GetItemState(SID_TITLE_MASTERPAGE) == SfxItemState::DEFAULT) { bool bCheck = false; bool bDisable = true; @@ -904,12 +904,12 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // set state of the ruler - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_RULER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_RULER ) ) rSet.Put( SfxBoolItem( SID_RULER, HasRuler() ) ); // do not delete the last page or a master page - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_PAGE ) - || SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_MASTER_PAGE ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_DELETE_PAGE ) + || SfxItemState::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_DEFAULT) + if (rSet.GetItemState(SID_DELETE_PAGE) == SfxItemState::DEFAULT) rSet.DisableItem(SID_DELETE_PAGE); - if (rSet.GetItemState(SID_DELETE_MASTER_PAGE)==SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_DELETE_MASTER_PAGE)==SfxItemState::DEFAULT) rSet.DisableItem(SID_DELETE_MASTER_PAGE); } } // is it allowed to delete the current layer? - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_LAYER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_DELETE_LAYER ) ) { if(GetLayerTabControl()) // #i87182# { @@ -951,9 +951,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CUT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COPY ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTLINE_BULLET )) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CUT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_COPY ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTLINE_BULLET )) { OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView(); @@ -1017,9 +1017,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // Zoom-State - 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( SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_OUT )|| + SfxItemState::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_DEFAULT == rSet.GetItemState( SID_REMOTE_DLG ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_BASIC ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_BASIC ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_BASIC, SID_DRAWTBX_CS_BASIC == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_SYMBOL ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_SYMBOL ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_SYMBOL, SID_DRAWTBX_CS_SYMBOL == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_ARROW ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_ARROW ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_ARROW, SID_DRAWTBX_CS_ARROW == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_FLOWCHART ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_FLOWCHART ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_FLOWCHART, SID_DRAWTBX_CS_FLOWCHART == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_CALLOUT ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_CALLOUT ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_CALLOUT,SID_DRAWTBX_CS_CALLOUT == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_STAR ) ) + if ( SfxItemState::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_DEFAULT - || rSet.GetItemState(SID_DISPLAY_MASTER_OBJECTS) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_DISPLAY_MASTER_BACKGROUND) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DISPLAY_MASTER_OBJECTS) == SfxItemState::DEFAULT) { SdPage* pPage = GetActualPage(); if (pPage != NULL @@ -1658,7 +1658,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } #if !HAVE_FEATURE_GLTF - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_INSERT_3DMODEL)) + if (SfxItemState::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 094ee9fea530..d183d947e817 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_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_STATUS_PAGE ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_STATUS_LAYOUT ) ) + if( SfxItemState::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/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 30109bdce1cd..45f0fd775694 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -113,7 +113,7 @@ void ImpAddPrintableCharactersToTextEdit(SfxRequest& rReq, ::sd::View* pView) { OUString aInputString; - if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR)) + if(SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR)) aInputString = ((SfxStringItem&)pSet->Get(SID_ATTR_CHAR)).GetValue(); if(!aInputString.isEmpty()) diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index b9015ba7df7f..3a06f3c583fc 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -75,13 +75,13 @@ namespace sd { */ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) { - if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN) { // let "last version" of SFx en/disable GetViewFrame()->GetSlotState (SID_RELOAD, NULL, &rSet); } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) + if (SfxItemState::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_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 ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_COLOR ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_GRAYSCALE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_BLACKWHITE ) || + SfxItemState::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_DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) { rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true ) ); } - if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ATTR_YEAR2000) ) + if ( SfxItemState::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_DEFAULT ) + if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT ) { bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_HYPHENATION, bValue ) ); @@ -691,14 +691,14 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) if( bAttr && pSet ) { // if the view owns selected objects, corresponding items have to be - // changed from SFX_ITEM_DEFAULT (_ON) to SFX_ITEM_DISABLED + // changed from SfxItemState::DEFAULT (_ON) to SfxItemState::DISABLED if( mpDrawView->AreObjectsMarked() ) { SfxWhichIter aNewIter( *pSet, XATTR_LINE_FIRST, XATTR_FILL_LAST ); nWhich = aNewIter.FirstWhich(); while( nWhich ) { - if( SFX_ITEM_DEFAULT == pSet->GetItemState( nWhich ) ) + if( SfxItemState::DEFAULT == pSet->GetItemState( nWhich ) ) { rSet.ClearItem( nWhich ); rSet.DisableItem( nWhich ); @@ -708,19 +708,19 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_LRSPACE); rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); } eState = pSet->GetItemState( EE_PARA_SBL ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_SBL); rSet.InvalidateItem(SID_ATTR_PARA_LINESPACE); } eState = pSet->GetItemState( EE_PARA_ULSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_ULSPACE); rSet.InvalidateItem(SID_ATTR_PARA_ULSPACE); @@ -738,7 +738,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } eState = pSet->GetItemState( EE_CHAR_KERNING, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_CHAR_KERNING); rSet.InvalidateItem(SID_ATTR_CHAR_KERNING); diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index e03d97d6fbbd..d48c46243766 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_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 ) || + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_BEZIER_EDIT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_UNGROUP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ENTER_GROUP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_NAME_GROUP ) || // #i68101# - 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 ) ) + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) || + + SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CHANGEBEZIER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CHANGEPOLYGON ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_LINEEND_POLYGON ) || + SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || + SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_MEASURE_DLG ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONNECTION_DLG ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_SHEAR ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_GRAYS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_COLORS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_GRAYS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_COLORS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_24BIT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_TOP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREFRONT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREBACK ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_BEFORE_OBJ ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_BEHIND_OBJ ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_REVERSE_ORDER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ORIGINAL_SIZE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_SAVE_GRAPHIC ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) || + SfxItemState::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_DEFAULT && - aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SFX_ITEM_DEFAULT && - aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SFX_ITEM_DEFAULT ) + if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SfxItemState::DEFAULT && + aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SfxItemState::DEFAULT && + aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SfxItemState::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_DEFAULT == rSet.GetItemState( SID_DISMANTLE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BREAK ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_DISMANTLE ) || + SfxItemState::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_DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) ) + if( SfxItemState::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 83f4405d8611..802cadb880e7 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_DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) + if (SfxItemState::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_DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true ) ); - 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) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HALFWIDTH) || + SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_FULLWIDTH) || + SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HIRAGANA) || + SfxItemState::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_DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_OUT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || + SfxItemState::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_DEFAULT == rSet.GetItemState( SID_SELECTALL ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_PASTE ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE ) ) { if ( !pClipEvtLstnr ) { @@ -957,7 +957,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } // field commands - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) { const SvxFieldItem* pFldItem = pOutlinerView->GetFieldAtSelection(); @@ -970,7 +970,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SfxItemState::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_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SfxItemState::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_DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) { if (GetDocSh()->IsUIActive() || !GetActiveWindow() ) { diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 47cdee4557b4..3751311a5f25 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -771,7 +771,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) // restore the old bullet item but not if the style changed if ( pOutliner->GetPrevDepth() != -1 && nDepth != -1 && - aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET ) + aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET ) { SfxItemSet aAttrs( pOutliner->GetParaAttribs( nPara ) ); aAttrs.Put( *aOldAttrs.GetItem( EE_PARA_NUMBULLET ) ); diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 72448daab8a2..c1886cd5bf74 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_DEFAULT == rSet.GetItemState( SID_STYLE_FAMILY ) ) + if( SfxItemState::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_DEFAULT == rSet.GetItemState(SID_GETUNDOSTRINGS)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_GETUNDOSTRINGS)) { ImpGetUndoStrings(rSet); } - if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_GETREDOSTRINGS)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_GETREDOSTRINGS)) { ImpGetRedoStrings(rSet); } - if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_UNDO)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_UNDO)) { ::svl::IUndoManager* pUndoManager = ImpGetUndoManager(); bool bActivate(false); @@ -149,7 +149,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) } } - if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_REDO)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_REDO)) { ::svl::IUndoManager* pUndoManager = ImpGetUndoManager(); bool bActivate(false); diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 95eb3e90a81e..e0a1800deaff 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -722,7 +722,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& { const SfxPoolItem* pTmpItem = NULL; - if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SFX_ITEM_SET) + if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SfxItemState::SET) { return pTmpItem; } @@ -730,7 +730,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& { nNumItemId = aNewAttr.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); SfxItemState eState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) return pTmpItem; else { @@ -775,7 +775,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& aNewAttr.Put(*pItem, EE_PARA_NUMBULLET); - if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)aNewAttr.GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pRule = pBulletItem->GetNumRule(); @@ -790,7 +790,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& } SfxItemState eNumState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eNumState == SFX_ITEM_SET) + if (eNumState == SfxItemState::SET) return pTmpItem; } |