diff options
Diffstat (limited to 'sw/source/uibase')
52 files changed, 324 insertions, 324 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 6bc7f33a1683..3a96259ee8df 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -316,7 +316,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs //set the first used database as default source on the config item const SfxPoolItem* pItem = 0; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( + if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_DATABASE_PROPERTIES, false, &pItem)) { //mailmerge has been called from the database beamer @@ -603,7 +603,7 @@ void SwModule::ExecOther(SfxRequest& rReq) break; case SID_ATTR_METRIC: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nWhich, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(nWhich, false, &pItem)) { FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue(); switch( eUnit ) @@ -629,7 +629,7 @@ void SwModule::ExecOther(SfxRequest& rReq) bool bWebView = 0 != PTR_CAST(SwWebView, ::GetActiveView() ), bSet; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich, false, &pItem )) bSet = ((SfxBoolItem*)pItem)->GetValue(); else @@ -707,7 +707,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } else if(dynamic_cast<const SfxItemSetHint*>(&rHint)) { - if( SFX_ITEM_SET == ((SfxItemSetHint&)rHint).GetItemSet().GetItemState(SID_ATTR_PATHNAME)) + if( SfxItemState::SET == ((SfxItemSetHint&)rHint).GetItemSet().GetItemState(SID_ATTR_PATHNAME)) { ::GetGlossaries()->UpdateGlosPath( false ); SwGlossaryList* pList = ::GetGlossaryList(); diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx index c78c16389aff..cbf9093b5f03 100644 --- a/sw/source/uibase/app/appopt.cxx +++ b/sw/source/uibase/app/appopt.cxx @@ -258,7 +258,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) : NULL; // Interpret the page Documentview - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_DOCDISP, false, &pItem )) { const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem; @@ -284,21 +284,21 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Elements - interpret Item - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ELEM, false, &pItem ) ) { const SwElemItem* pElemItem = (const SwElemItem*)pItem; pElemItem->FillViewOptions( aViewOpt ); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(SID_ATTR_METRIC, false, &pItem ) ) { SfxGetpApp()->SetOptions(rSet); PutItem(*pItem); const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; ::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, + if( SfxItemState::SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem ) ) { SfxGetpApp()->SetOptions(rSet); @@ -306,7 +306,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) ::SetApplyCharUnit(pCharItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(FN_HSCROLL_METRIC, false, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -315,7 +315,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) pAppView->ChangeTabMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(FN_VSCROLL_METRIC, false, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -324,7 +324,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) pAppView->ChangeVRulerMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem ) ) { sal_uInt16 nTabDist = ((const SfxUInt16Item*)pItem)->GetValue(); pPref->SetDefTab(nTabDist); @@ -337,7 +337,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Background only in WebDialog - if(SFX_ITEM_SET == rSet.GetItemState(RES_BACKGROUND)) + if(SfxItemState::SET == rSet.GetItemState(RES_BACKGROUND)) { const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rSet.Get( RES_BACKGROUND); @@ -345,7 +345,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Interpret page Grid Settings - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, false, &pItem )) { const SvxGridItem* pGridItem = (const SvxGridItem*)pItem; @@ -372,7 +372,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Interpret Writer Printer Options - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, &pItem )) { SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog); if (pOpt) @@ -386,7 +386,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) { ((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt ); if(pBindings) @@ -404,7 +404,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) rWrtSh.AlignAllFormulasToBaseline(); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem )) { aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue()); } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 9cecce991bd6..2a1f7e2d7ecd 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -157,7 +157,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, bool bAPICall = false; const SfxPoolItem* pApiItem; const SfxItemSet* pMedSet; - if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SFX_ITEM_SET == + if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SfxItemState::SET == pMedSet->GetItemState( FN_API_CALL, true, &pApiItem ) ) bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue(); @@ -202,7 +202,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { const SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem *pPassItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, true, &pPassItem)) + if(pSet && SfxItemState::SET == pSet->GetItemState(SID_PASSWORD, true, &pPassItem)) aPasswd = ((const SfxStringItem *)pPassItem)->GetValue(); } @@ -227,7 +227,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, SwAsciiOptions aOpt; const SfxItemSet* pSet; const SfxPoolItem* pItem; - if( 0 != ( pSet = rMedium.GetItemSet() ) && SFX_ITEM_SET == + if( 0 != ( pSet = rMedium.GetItemSet() ) && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() ); @@ -699,7 +699,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) const SfxPoolItem* pItem; if( 0 != ( pSet = rMedium.GetItemSet() ) ) { - if( SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, + if( SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) sItemOpt = ((const SfxStringItem*)pItem)->GetValue(); } @@ -1291,7 +1291,7 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword ) IDocumentRedlineAccess* pIDRA = mpWrtShell->getIDocumentRedlineAccess(); Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword(); - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0)) return false; @@ -1326,7 +1326,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal IDocumentRedlineAccess* pIDRA = mpWrtShell->getIDocumentRedlineAccess(); Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() ); - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0)) return false; rPasswordHash = aPasswdHash; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 5caaaf7dc655..4da0bb889835 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -362,7 +362,7 @@ void SwDocShell::Execute(SfxRequest& rReq) aSet.Put( aSwOptions ); const SfxPoolItem* pOpenSmartTagOptionsItem = 0; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, false, &pOpenSmartTagOptionsItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, false, &pOpenSmartTagOptionsItem ) ) aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) ); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -425,7 +425,7 @@ void SwDocShell::Execute(SfxRequest& rReq) pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this); } - if( pArgs && SFX_ITEM_SET == + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_PRINTPREVIEW, false, &pItem )) bSet = ((SfxBoolItem*)pItem)->GetValue(); else @@ -858,7 +858,7 @@ void SwDocShell::Execute(SfxRequest& rReq) sal_Int32 nTemplateOutlineLevel = 0; OUString aFileName, aTemplateName; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, false, &pItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich, false, &pItem ) ) { aFileName = ((const SfxStringItem*)pItem)->GetValue(); SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, false ); @@ -1095,7 +1095,7 @@ void SwDocShell::Execute(SfxRequest& rReq) break; case SID_ATTR_YEAR2000: - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , false, &pItem )) + if ( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich , false, &pItem )) { OSL_ENSURE(pItem->ISA(SfxUInt16Item), "wrong Item"); sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue(); @@ -1529,7 +1529,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh, if( pMed && pMed->GetURLObject() == aTmpObj ) { const SfxPoolItem* pItem; - if( ( SFX_ITEM_SET == pMed->GetItemSet()->GetItemState( + if( ( SfxItemState::SET == pMed->GetItemSet()->GetItemState( SID_VERSION, false, &pItem ) ) ? (nVersion == ((SfxInt16Item*)pItem)->GetValue()) : !nVersion ) diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 9f29674aad81..a04d1ff949c0 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -270,7 +270,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) pColl = mpDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); if( !bHTMLTemplSet || - SFX_ITEM_SET != pColl->GetAttrSet().GetItemState( + SfxItemState::SET != pColl->GetAttrSet().GetItemState( nFontWhich, false ) ) { pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index d6cc65467c6c..77ac35ee8120 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -276,21 +276,21 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) switch (nSlot) { case SID_STYLE_NEW: - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, false, &pItem )) { const sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); OUString sName; sal_uInt16 nMask = 0; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW, + if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_NEW, false, &pItem )) sName = ((const SfxStringItem*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK, + if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_MASK, false, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); OUString sParent; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, + if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_REFERENCE, false, &pItem )) sParent = ((const SfxStringItem*)pItem)->GetValue(); @@ -384,14 +384,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) SAL_WARN_IF( !pArgs->Count(), "sw.ui", "SfxBug ItemSet is empty" ); SwWrtShell* pShell = GetWrtShell(); - if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem )) aParam = ((const SfxStringItem*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY, + if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_FAMILY, false, &pItem )) nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, false, &pItem )) { OUString aFamily = ((const SfxStringItem*)pItem)->GetValue(); if(aFamily.equalsAscii("CharacterStyles")) @@ -410,10 +410,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) nFamily = SFX_STYLE_FAMILY_PSEUDO; } - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK, + if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_MASK, false, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL, + if( SfxItemState::SET == pArgs->GetItemState(FN_PARAM_WRTSHELL, false, &pItem )) pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue(); @@ -443,7 +443,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) } break; case SFX_STYLE_FAMILY_PSEUDO: - if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, false, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, false, &pItem)) { aParam = ((const SfxStringItem*)pItem)->GetValue(); } @@ -587,7 +587,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl) if( SFX_STYLE_FAMILY_PAGE == m_nFamily && SvtLanguageOptions().IsCTLFontEnabled() ) { const SfxPoolItem *pItem = NULL; - if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false ) , true, &pItem ) == SFX_ITEM_SET ) + if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false ) , true, &pItem ) == SfxItemState::SET ) SwChartHelper::DoUpdateAllCharts( pDoc ); } } diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 3da6a018c318..bd515dd98731 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -1272,7 +1272,7 @@ void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet ) OSL_ENSURE( pColl, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style"); if ( pColl->AreListLevelIndentsApplicable() ) { - OSL_ENSURE( pColl->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET, + OSL_ENSURE( pColl->GetItemState( RES_PARATR_NUMRULE ) == SfxItemState::SET, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect -> please inform OD." ); const OUString sNumRule = pColl->GetNumRule().GetValue(); if (!sNumRule.isEmpty()) @@ -1329,13 +1329,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { OSL_ENSURE(pColl, "Where's Collection"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) + if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) { pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } const SwCondCollItem* pCondItem; - if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, false, + if( SfxItemState::SET != rSet.GetItemState( FN_COND_COLL, false, (const SfxPoolItem**)&pCondItem )) pCondItem = 0; @@ -1393,9 +1393,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, pColl = pCColl; } if ( bResetIndentAttrsAtParagraphStyle && - rSet.GetItemState( RES_PARATR_NUMRULE, false, 0 ) == SFX_ITEM_SET && - rSet.GetItemState( RES_LR_SPACE, false, 0 ) != SFX_ITEM_SET && - pColl->GetItemState( RES_LR_SPACE, false, 0 ) == SFX_ITEM_SET ) + rSet.GetItemState( RES_PARATR_NUMRULE, false, 0 ) == SfxItemState::SET && + rSet.GetItemState( RES_LR_SPACE, false, 0 ) != SfxItemState::SET && + pColl->GetItemState( RES_LR_SPACE, false, 0 ) == SfxItemState::SET ) { rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl ); } @@ -1405,7 +1405,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, // neither the paragraph style nor the numbering style is used in the document // the numbering style will not be saved with the document and the assignment got lost. const SfxPoolItem* pNumRuleItem = 0; - if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, false, &pNumRuleItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, false, &pNumRuleItem ) ) { // Setting a numbering rule? const OUString sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue(); if (!sNumRule.isEmpty()) @@ -1454,7 +1454,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { OSL_ENSURE(pFrmFmt, "Where's FrmFmt"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) + if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) { pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } @@ -1489,7 +1489,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, const SfxPoolItem* pItem; switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem )) { - case SFX_ITEM_SET: + case SfxItemState::SET: { SvxNumRule* pSetRule = ((SvxNumBulletItem*)pItem)->GetNumRule(); pSetRule->UnLinkGraphics(); @@ -1498,7 +1498,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, rDoc.ChgNumRuleFmts( aSetRule ); } break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: // set NumRule to default values // what are the default values? { diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 91c0752d4b3c..72aa8c63c840 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -93,7 +93,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) { const SfxPoolItem *pItem = 0; OUString aTmpStr; - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_NAME, true, &pItem) ) { const OUString sRemoveWhenUniStringIsGone = ((const SfxStringItem *)pItem)->GetValue(); @@ -106,8 +106,8 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr)); aSet.Put( *pSet ); - if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, false, &pItem)|| - SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, false, &pItem)) + if(SfxItemState::SET == pSet->GetItemState(SID_ATTR_COLUMNS, false, &pItem)|| + SfxItemState::SET == pSet->GetItemState(FN_INSERT_REGION, false, &pItem)) { SwFmtCol aCol; SwRect aRect; @@ -121,17 +121,17 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) aSet.Put(aCol); } } - else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, false, &pItem)) + else if(SfxItemState::SET == pSet->GetItemState(RES_COL, false, &pItem)) { aSet.Put(*pItem); } - const bool bHidden = SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_REGION_HIDDEN, true, &pItem) && + const bool bHidden = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_HIDDEN, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue(); - const bool bProtect = SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_REGION_PROTECT, true, &pItem) && + const bool bProtect = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_PROTECT, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue(); // #114856# edit in readonly sections - const bool bEditInReadonly = SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, true, &pItem) && + const bool bEditInReadonly = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue(); aSection.SetProtectFlag(bProtect); @@ -139,16 +139,16 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) // #114856# edit in readonly sections aSection.SetEditInReadonlyFlag(bEditInReadonly); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_CONDITION, true, &pItem)) aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue()); OUString aFile, aSub; - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_1, true, &pItem)) aFile = ((const SfxStringItem *)pItem)->GetValue(); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_3, true, &pItem)) aSub = ((const SfxStringItem *)pItem)->GetValue(); @@ -158,7 +158,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) sLinkFileName += OUString(sfx2::cTokenSeparator); sLinkFileName = comphelper::string::setToken(sLinkFileName, 0, sfx2::cTokenSeparator, aFile); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_2, true, &pItem)) { sLinkFileName = comphelper::string::setToken(sLinkFileName, 1, sfx2::cTokenSeparator, diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index d16fb4ee5072..6bb20f076d42 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -439,7 +439,7 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot ) // Create a box info item... needed by the dialog SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; - if ( SFX_ITEM_SET == pHFFmt->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER, + if ( SfxItemState::SET == pHFFmt->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo) ) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; @@ -453,17 +453,17 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot ) if ( svx::ShowBorderBackgroundDlg( this, &aSet, true ) ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == aSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { + if ( SfxItemState::SET == aSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { pHFFmt->SetFmtAttr( *pItem ); rView.GetDocShell()->SetModified(true); } - if ( SFX_ITEM_SET == aSet.GetItemState( RES_BOX, false, &pItem ) ) { + if ( SfxItemState::SET == aSet.GetItemState( RES_BOX, false, &pItem ) ) { pHFFmt->SetFmtAttr( *pItem ); rView.GetDocShell()->SetModified(true); } - if ( SFX_ITEM_SET == aSet.GetItemState( RES_SHADOW, false, &pItem ) ) { + if ( SfxItemState::SET == aSet.GetItemState( RES_SHADOW, false, &pItem ) ) { pHFFmt->SetFmtAttr( *pItem ); rView.GetDocShell()->SetModified(true); } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 5030a4a2c272..debc067ebbb3 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -770,7 +770,7 @@ static sal_uInt16 lcl_isNonDefaultLanguage(LanguageType eBufferLanguage, SwView& SfxItemSet aLangSet(rView.GetPool(), nWhich, nWhich); SwWrtShell& rSh = rView.GetWrtShell(); rSh.GetCurAttr(aLangSet); - if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, true)) + if(SfxItemState::DEFAULT <= aLangSet.GetItemState(nWhich, true)) { LanguageType eLang = static_cast<const SvxLanguageItem&>(aLangSet.Get(nWhich)).GetLanguage(); if ( eLang == eBufferLanguage ) @@ -2205,7 +2205,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { SfxItemSet aSet(rSh.GetAttrPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, false)) + if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false)) { const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, true); bNormalChar = false; diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index fa3c14755b4b..bd9470517eaa 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -61,7 +61,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD { SfxPoolItem *_pItem = 0; SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem ); - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) { EnableItem( nMID, true ); if (_pItem) @@ -115,7 +115,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : aGraphic = *pGrf; const SwFrmFmt* pGrfFmt = rSh.GetFmtFromObj( rDocPos ); const SfxPoolItem* pURLItem; - if( pGrfFmt && SFX_ITEM_SET == pGrfFmt->GetItemState( + if( pGrfFmt && SfxItemState::SET == pGrfFmt->GetItemState( RES_URL, true, &pURLItem )) { const SwFmtURL& rURL = *(SwFmtURL*)pURLItem; @@ -202,14 +202,14 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState ); Check( MN_READONLY_COPY, SID_COPY, rDis ); - if(eState < SFX_ITEM_DEFAULT) + if(eState < SfxItemState::DEFAULT) EnableItem( MN_READONLY_COPY, false ); delete pState; pState = NULL; eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState ); if ( - eState < SFX_ITEM_DEFAULT || + eState < SfxItemState::DEFAULT || (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) ) { diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index c8f0d2004a58..7e68f4cb45ce 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -44,7 +44,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) { SfxItemPool* pPool = rSet.GetPool(); sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE ); - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // alignment const SvxPageItem* pPage = (const SvxPageItem*)&rSet.Get( nWhich ); @@ -55,14 +55,14 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) nWhich = pPool->GetWhich( SID_ATTR_PAGE_SIZE ); - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // orientation and size from PageItem const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich ); SetSize( rSize.GetSize() ); } nWhich = RES_LR_SPACE; - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // set left and right border const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( nWhich ); @@ -78,7 +78,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) nWhich = RES_UL_SPACE; - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // set upper and lower border const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( nWhich ); @@ -94,7 +94,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) // evaluate header-attributes const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET), + if( SfxItemState::SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -117,7 +117,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetHdRight( rLR.GetRight() ); SetHeader( true ); - if(SFX_ITEM_SET == rHeaderSet.GetItemState(RES_BACKGROUND)) + if(SfxItemState::SET == rHeaderSet.GetItemState(RES_BACKGROUND)) { //UUUU create FillAttributes from SvxBrushItem //SetHdColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(RES_BACKGROUND)); @@ -130,7 +130,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) aTempSet))); } - if ( rHeaderSet.GetItemState( RES_BOX ) == SFX_ITEM_SET ) + if ( rHeaderSet.GetItemState( RES_BOX ) == SfxItemState::SET ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rHeaderSet.Get( RES_BOX ); @@ -141,7 +141,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetHeader( false ); } - if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET), + if( SfxItemState::SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET), false, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -164,7 +164,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetFtRight( rLR.GetRight() ); SetFooter( true ); - if( rFooterSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET ) + if( rFooterSet.GetItemState( RES_BACKGROUND ) == SfxItemState::SET ) { //UUUU create FillAttributes from SvxBrushItem //SetFtColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rFooterSet.Get(RES_BACKGROUND)); @@ -177,7 +177,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) aTempSet))); } - if( rFooterSet.GetItemState( RES_BOX ) == SFX_ITEM_SET ) + if( rFooterSet.GetItemState( RES_BOX ) == SfxItemState::SET ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rFooterSet.Get( RES_BOX ); @@ -188,7 +188,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetFooter( false ); } - if(SFX_ITEM_SET == rSet.GetItemState(RES_BACKGROUND, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(RES_BACKGROUND, false, &pItem)) { //UUUU create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(*pItem); @@ -595,9 +595,9 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet ) { DELETEZ(pGridItem); //get the grid information - if(SFX_ITEM_DEFAULT <= rSet.GetItemState(RES_TEXTGRID, true)) + if(SfxItemState::DEFAULT <= rSet.GetItemState(RES_TEXTGRID, true)) pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone(); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( RES_FRAMEDIR, true )) + if( SfxItemState::DEFAULT <= rSet.GetItemState( RES_FRAMEDIR, true )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index b054d13ba610..241cf8c03c85 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -115,7 +115,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm() { const SfxPoolItem* pItem = 0; - if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SFX_ITEM_SET) + if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SfxItemState::SET) m_pOwnSh->SetFlyName(((SfxStringItem *)pItem)->GetValue()); m_pOwnSh->SetModified(); @@ -137,11 +137,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm() { //JP 6.8.2001: set never an invalid anchor into the core. const SfxPoolItem *pGItem, *pItem; - if( SFX_ITEM_SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem )) + if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem )) { SfxItemSet aGetSet( *m_aSet.GetPool(), RES_ANCHOR, RES_ANCHOR ); if( m_pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() && - SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem ) + SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem ) && ((SwFmtAnchor*)pGItem)->GetAnchorId() == ((SwFmtAnchor*)pItem)->GetAnchorId() ) m_aSet.ClearItem( RES_ANCHOR ); diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 6fa877697c3d..99194aeda233 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -92,7 +92,7 @@ static void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq ) static void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) { - if( SFX_ITEM_DEFAULT >= rSet.GetItemState( SID_SAVEDOC, false )) + if( SfxItemState::DEFAULT >= rSet.GetItemState( SID_SAVEDOC, false )) { if( !rSh.GetDoc()->getIDocumentState().IsModified() ) rSet.DisableItem( SID_SAVEDOC ); diff --git a/sw/source/uibase/ribbar/tbxanchr.cxx b/sw/source/uibase/ribbar/tbxanchr.cxx index d111348b1d97..1a2d9661d6b2 100644 --- a/sw/source/uibase/ribbar/tbxanchr.cxx +++ b/sw/source/uibase/ribbar/tbxanchr.cxx @@ -51,9 +51,9 @@ SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { const SfxUInt16Item* pItem = PTR_CAST( SfxUInt16Item, pState ); if(pItem) diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 9fd4c0cb4375..aed90d456adf 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -93,9 +93,9 @@ void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, const SfxPoolItem* pState ) { sal_uInt16 nId = GetId(); - GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( nId, (GetItemState(pState) != SfxItemState::DISABLED) ); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { const SfxImageItem* pItem = PTR_CAST( SfxImageItem, pState ); if(pItem) @@ -238,7 +238,7 @@ void SwTbxAutoTextCtrl::StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); } IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) @@ -344,8 +344,8 @@ void SwTbxFieldCtrl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); - if (eState >= SFX_ITEM_DEFAULT) + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); + if (eState >= SfxItemState::DEFAULT) { GetToolBox().CheckItem( GetId(), ((SfxBoolItem*)pState)->GetValue() ); } @@ -739,9 +739,9 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/, const SfxPoolItem* pState ) { sal_uInt16 nId = GetId(); - GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( nId, (GetItemState(pState) != SfxItemState::DISABLED) ); SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() ); - if(SFX_ITEM_DEFAULT <= eState) + if(SfxItemState::DEFAULT <= eState) { OUString sZoom(unicode::formatPercent(((const SfxUInt16Item*)pState)->GetValue(), Application::GetSettings().GetUILanguageTag())); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index a691a2b246cd..29016e619d9a 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -566,7 +566,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; const SfxPoolItem* pPoolItem; - if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) + if( pNewAttrs && SfxItemState::SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) { if( !( (SfxBoolItem*)pPoolItem)->GetValue() ) bLeftToRight = !bLeftToRight; @@ -577,7 +577,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) 0 ); 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 ) @@ -636,7 +636,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) case SID_ATTR_PARA_LRSPACE: { SfxItemState eState = aEditAttr.GetItemState( EE_PARA_LRSPACE ); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE ) ); aLR.SetWhich(SID_ATTR_PARA_LRSPACE); @@ -649,7 +649,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) case SID_ATTR_PARA_LINESPACE: { SfxItemState eState = aEditAttr.GetItemState( EE_PARA_SBL ); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLineSpacingItem aLR = ( (const SvxLineSpacingItem&) aEditAttr.Get( EE_PARA_SBL ) ); rSet.Put(aLR); @@ -661,7 +661,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) case SID_ATTR_PARA_ULSPACE: { SfxItemState eState = aEditAttr.GetItemState( EE_PARA_ULSPACE ); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxULSpaceItem aULSpace = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); aULSpace.SetWhich(SID_ATTR_PARA_ULSPACE); @@ -839,7 +839,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) if(nEEWhich == EE_CHAR_KERNING) { SfxItemState eState = aEditAttr.GetItemState( EE_CHAR_KERNING, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_CHAR_KERNING); } @@ -917,7 +917,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) { sal_uLong nFormat = 0; const SfxPoolItem* pItem; - if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET && + if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -1455,7 +1455,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq) sal_uInt16 nId = rReq.GetSlot(); sal_uInt16 nCnt = 1; const SfxPoolItem* pItem=0; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem ) ) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); switch( nId ) { diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 49869f4988ae..d531e7209acb 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -287,7 +287,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pFmt; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pFmt ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pFmt ) ) { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( @@ -462,7 +462,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq) sal_uInt16 nId = rReq.GetSlot(), nCnt = 1; const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem )) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem )) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); // #i106349#: save pointer: undo/redo may delete the shell, i.e., this! @@ -740,7 +740,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwFmtCol aFmtCol = rFmt.GetCol(); sal_uInt16 nCount; - if(SFX_ITEM_SET == pArgs->GetItemState(nSlot)) + if(SfxItemState::SET == pArgs->GetItemState(nSlot)) nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue(); else nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue(); @@ -771,7 +771,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwTableAutoFmt const* pTAFmt = 0; boost::scoped_ptr<SwTableAutoFmtTbl> pAutoFmtTbl; bool bDeleteFormat = true; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem)) { aInsTblOpts.mnInsMode = 0; // Delimiter @@ -779,7 +779,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) if(!sDelim.isEmpty()) cDelim = sDelim[0]; // AutoFormat - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_2, true, &pItem)) { OUString sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue(); @@ -798,19 +798,19 @@ void SwBaseShell::Execute(SfxRequest &rReq) } } //WithHeader - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, true, &pItem) && + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, true, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) aInsTblOpts.mnInsMode |= tabopts::HEADLINE; // RepeatHeaderLines - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_4, true, &pItem)) aInsTblOpts.mnRowsToRepeat = (sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue(); //WithBorder - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, true, &pItem) && + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_5, true, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER; //DontSplitTable - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, true, &pItem) && + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_6, true, &pItem) && !static_cast< const SfxBoolItem* >(pItem)->GetValue() ) aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT; } @@ -1108,7 +1108,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_XFORMS_DESIGN_MODE: if( pArgs != NULL - && pArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET + && pArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET && pItem != NULL && pItem->ISA( SfxBoolItem ) ) { diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 3a2e4ffb7381..991a46ba88ed 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -158,7 +158,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { const SfxPoolItem* pWrapItem; const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, false, &pWrapItem)) + if(SfxItemState::SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, false, &pWrapItem)) { short nLayer = ((const SfxInt16Item*)pWrapItem)->GetValue(); if (nLayer == 1) @@ -266,9 +266,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) pSdrView->SetAttributes(*pOutSet); bool bPosCorr = - SFX_ITEM_SET != pOutSet->GetItemState( + SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_TRANSFORM_POS_X, false ) && - SFX_ITEM_SET != pOutSet->GetItemState( + SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_TRANSFORM_POS_Y, false ); SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1); @@ -276,7 +276,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) bool bSingleSelection = rMarkList.GetMarkCount() == 1; const SfxPoolItem* pAnchorItem; - if(SFX_ITEM_SET == pOutSet->GetItemState( + if(SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_TRANSFORM_ANCHOR, false, &pAnchorItem)) { if(!bSingleSelection) diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index a1084394b5c3..6d040ebe94f2 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -525,7 +525,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; const SfxPoolItem* pPoolItem; - if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) + if( pNewAttrs && SfxItemState::SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) { if( !( (SfxBoolItem*)pPoolItem)->GetValue() ) bLeftToRight = !bLeftToRight; @@ -536,7 +536,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) 0 ); 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 ) @@ -671,7 +671,7 @@ ASK_ADJUST: case SID_ATTR_PARA_LRSPACE: { SfxItemState eState = aEditAttr.GetItemState(EE_PARA_LRSPACE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLRSpaceItem aLR = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE ); aLR.SetWhich(SID_ATTR_PARA_LRSPACE); @@ -685,7 +685,7 @@ ASK_ADJUST: case SID_ATTR_PARA_LINESPACE: { SfxItemState eState = aEditAttr.GetItemState(EE_PARA_SBL); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLineSpacingItem aLR = (const SvxLineSpacingItem&) aEditAttr.Get( EE_PARA_SBL ); rSet.Put(aLR); @@ -698,7 +698,7 @@ ASK_ADJUST: case SID_ATTR_PARA_ULSPACE: { SfxItemState eState = aEditAttr.GetItemState(EE_PARA_ULSPACE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxULSpaceItem aULSpace = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); aULSpace.SetWhich(SID_ATTR_PARA_ULSPACE); diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index ddd535fa58fe..3088248459e8 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -525,7 +525,7 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq) { case SID_UNDO: case SID_REDO: - if( SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem ) && + if( SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem ) && 1 < (nCnt = ((SfxUInt16Item*)pItem)->GetValue()) ) { // then we make by ourself. @@ -847,7 +847,7 @@ void SwDrawTextShell::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(); } @@ -856,8 +856,8 @@ void SwDrawTextShell::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/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 02d3c031717f..d501908e2218 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -164,7 +164,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) { // Frame already exists, only the number of columns will be changed. sal_uInt16 nCols = 1; - if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET) nCols = ((SfxUInt16Item *)pItem)->GetValue(); SfxItemSet aSet(GetPool(),RES_COL,RES_COL); @@ -196,7 +196,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) case SID_HYPERLINK_SETLINK: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, false, &pItem)) { const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem; const OUString& rURL = rHLinkItem.GetURL(); @@ -367,7 +367,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) case SID_ATTR_ULSPACE: case SID_ATTR_LRSPACE: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem)) { aMgr.SetAttrSet( *pArgs ); bCopyToFmt = true; @@ -380,13 +380,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) bool bApplyNewSize = false; Size aNewSize = aMgr.GetSize(); - if ( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_WIDTH, false, &pItem ) ) + if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_WIDTH, false, &pItem ) ) { aNewSize.setWidth( static_cast< const SfxUInt32Item* >(pItem)->GetValue() ); bApplyNewSize = true; } - if ( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_HEIGHT, false, &pItem ) ) + if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_HEIGHT, false, &pItem ) ) { aNewSize.setHeight( static_cast< const SfxUInt32Item* >(pItem)->GetValue() ); bApplyNewSize = true; @@ -490,7 +490,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) ); OString sDefPage; - if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, false, &pItem) == SFX_ITEM_SET) + if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, false, &pItem) == SfxItemState::SET) sDefPage = OUStringToOString(((SfxStringItem *)pItem)->GetValue(), RTL_TEXTENCODING_UTF8); aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); @@ -521,13 +521,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) { rReq.Done(*pOutSet); if(nSel & nsSelectionType::SEL_OLE && - SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, true, &pItem)) + SfxItemState::SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, true, &pItem)) { SwViewOption aUsrPref( *pVOpt ); aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue()); SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); } - if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, true, &pItem)) + if (SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, true, &pItem)) { // #i73249# rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue()); @@ -538,7 +538,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) { rSh.AutoUpdateFrame(pFmt, *pOutSet); // Anything which is not supported by the format must be set hard. - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) + if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, RES_SURROUND, RES_SURROUND, @@ -547,14 +547,14 @@ void SwFrameShell::Execute(SfxRequest &rReq) 0); aShellSet.Put(*pOutSet); aMgr.SetAttrSet(aShellSet); - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) + if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); } else aMgr.SetAttrSet( *pOutSet ); const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt(); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS, false, &pItem)) { @@ -589,7 +589,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } rSh.SetChainMarker(); } - if(SFX_ITEM_SET == + if(SfxItemState::SET == pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, false, &pItem)) { @@ -838,7 +838,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL); rSh.GetFlyFrmAttr( aURLSet ); - if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, true, &pItem)) + if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem)) { const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem; aHLinkItem.SetURL(pFmtURL->GetURL()); @@ -1010,7 +1010,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) { case SID_ATTR_BORDER: { - if (pArgs->GetItemState(RES_BOX, true, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(RES_BOX, true, &pItem) == SfxItemState::SET) { SvxBoxItem aNewBox(*((SvxBoxItem *)pItem)); const SvxBorderLine* pBorderLine; @@ -1056,7 +1056,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) case SID_FRAME_LINESTYLE: { - if (pArgs->GetItemState(SID_FRAME_LINESTYLE, false, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_FRAME_LINESTYLE, false, &pItem) == SfxItemState::SET) { const SvxLineItem* pLineItem = (const SvxLineItem*)pItem; @@ -1110,7 +1110,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) case SID_FRAME_LINECOLOR: { - if (pArgs->GetItemState(SID_FRAME_LINECOLOR, false, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_FRAME_LINECOLOR, false, &pItem) == SfxItemState::SET) { const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue(); diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 0e13b3801730..e9e651036b84 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -354,7 +354,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SfxItemSet* pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); rReq.Done(*pSet); // change the 2 frmsize SizeItems to the correct SwFrmSizeItem - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_FRMSIZE, false, &pItem )) { SwFmtFrmSize aSize; @@ -362,7 +362,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSize.SetWidth( rSz.Width() ); aSize.SetHeight( rSz.Height() ); - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_FRMSIZE_PERCENT, false, &pItem )) { const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize(); @@ -392,14 +392,14 @@ void SwGrfShell::Execute(SfxRequest &rReq) aMgr.UpdateFlyFrm(); bool bApplyUsrPref = false; - if (SFX_ITEM_SET == pSet->GetItemState( + if (SfxItemState::SET == pSet->GetItemState( FN_KEEP_ASPECT_RATIO, true, &pItem )) { aUsrPref.SetKeepRatio( ((const SfxBoolItem*)pItem)->GetValue() ); bApplyUsrPref = true; } - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_KEEP_ZOOM, true, &pItem )) { aUsrPref.SetGrfKeepZoom( @@ -411,7 +411,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); // and now set all the graphic attributes and other stuff - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_GRAPHIC, true, &pItem )) { if( !((SvxBrushItem*)pItem)->GetGraphicLink().isEmpty() ) @@ -438,7 +438,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) sFilterNm, 0 ); } } - if ( SFX_ITEM_SET == pSet->GetItemState( + if ( SfxItemState::SET == pSet->GetItemState( FN_SET_FRM_ALT_NAME, true, &pItem )) { // #i73249# @@ -485,7 +485,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; sal_uInt16 nSlot = rReq.GetSlot(); - if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, false, &pItem )) + if( !pArgs || SfxItemState::SET != pArgs->GetItemState( nSlot, false, &pItem )) pItem = 0; switch( nSlot ) diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 17e332f82904..52276bb85888 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -420,17 +420,17 @@ namespace SwLangHelper const SfxPoolItem *pItem = 0; SfxItemState nState = aSet.GetItemState( nLangWhichId, true, &pItem ); - if (nState > SFX_ITEM_DEFAULT && pItem) + if (nState > SfxItemState::DEFAULT && pItem) { // the item is set and can be used nLang = (dynamic_cast<const SvxLanguageItem&>(*pItem)).GetLanguage(); } - else if (nState == SFX_ITEM_DEFAULT) + else if (nState == SfxItemState::DEFAULT) { // since the attribute is not set: retrieve the default value nLang = (dynamic_cast<const SvxLanguageItem&>(aSet.GetPool()->GetDefaultItem( nLangWhichId ))).GetLanguage(); } - else if (nState == SFX_ITEM_DONTCARE) + else if (nState == SfxItemState::DONTCARE) { // there is more than one language... nLang = LANGUAGE_DONTKNOW; diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx index b249289a338e..3f0ee0006150 100644 --- a/sw/source/uibase/shells/mediash.cxx +++ b/sw/source/uibase/shells/mediash.cxx @@ -113,7 +113,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) { 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/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index d5c9ecaf8fb1..1cdd584b1d6b 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -276,23 +276,23 @@ void ItemSetToTableParam( const SfxItemSet& rSet, rSh.StartUndo( UNDO_TABLE_ATTR ); const SfxPoolItem* pItem = 0; - if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem)) { SwViewOption aUsrPref( *rSh.GetViewOptions() ); aUsrPref.SetTblDest((sal_uInt8)((SfxUInt16Item*)pItem)->GetValue()); SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView()); } - bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || - SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); + bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) || + SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); pItem = 0; - bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); + bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); const SfxPoolItem* pSplit = 0; - bool bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pSplit ); + bool bRowSplit = SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pSplit ); const SfxPoolItem* pBoxDirection = 0; - bool bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pBoxDirection ); + bool bBoxDirection = SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pBoxDirection ); if( bBackground || bBorder || bRowSplit || bBoxDirection) { // The border will be applied to the present selection. @@ -357,7 +357,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, SwTableRep* pRep = 0; SwFrmFmt *pFmt = rSh.GetTableFmt(); SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue(); @@ -397,13 +397,13 @@ void ItemSetToTableParam( const SfxItemSet& rSet, } } - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem)) rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() ); - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue()); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() ); // Copy the chosen attributes in the ItemSet. @@ -422,7 +422,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, 0 }; for( const sal_uInt16* pIds = aIds; *pIds; ++pIds ) - if( SFX_ITEM_SET == rSet.GetItemState( *pIds, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( *pIds, false, &pItem)) aSet.Put( *pItem ); if( aSet.Count() ) @@ -478,7 +478,7 @@ void SwTableShell::Execute(SfxRequest &rReq) const SvxBoxItem& rCoreBox = (const SvxBoxItem&) aCoreSet.Get(RES_BOX); const SfxPoolItem *pBoxItem = 0; - if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == SFX_ITEM_SET ) + if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == SfxItemState::SET ) { aBox = *(SvxBoxItem*)pBoxItem; if ( !rReq.IsAPI() ) @@ -491,9 +491,9 @@ void SwTableShell::Execute(SfxRequest &rReq) //since the drawing layer also supports borders the which id might be a different one SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER ); - if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, true, &pBoxItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, true, &pBoxItem) == SfxItemState::SET) aInfo = *(SvxBoxInfoItem*)pBoxItem; - else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, true, &pBoxItem) == SFX_ITEM_SET ) + else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, true, &pBoxItem) == SfxItemState::SET ) { aInfo = *(SvxBoxInfoItem*)pBoxItem; aInfo.SetWhich(SID_ATTR_BORDER_INNER); @@ -629,7 +629,7 @@ void SwTableShell::Execute(SfxRequest &rReq) rSh.GetTblBoxFormulaAttrs( aBoxSet ); SfxItemState eState = aBoxSet.GetItemState(RES_BOXATR_FORMAT); - if(eState == SFX_ITEM_DEFAULT) + if(eState == SfxItemState::DEFAULT) { aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, pFormatter->GetFormatIndex(NF_TEXT, LANGUAGE_SYSTEM))); @@ -668,7 +668,7 @@ void SwTableShell::Execute(SfxRequest &rReq) GetNumberFormatter()->DeleteEntry( pDelArr[i] ); } - if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( + if( SfxItemState::SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, false, &pNumberFormatItem )) { SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(), @@ -827,7 +827,7 @@ void SwTableShell::Execute(SfxRequest &rReq) if (pItem) { nCount = ((const SfxInt16Item* )pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, true, &pItem)) bAfter = ((const SfxBoolItem* )pItem)->GetValue(); } else if( !rReq.IsAPI() ) diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index d7d17a7ffa4b..291f21696e66 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -228,30 +228,30 @@ void SwTextShell::ExecField(SfxRequest &rReq) OUString aPar2; sal_Int32 nCommand = 0; - if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, false, &pItem )) nType = ((SfxUInt16Item *)pItem)->GetValue(); aPar1 += OUString(DB_DELIM); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, false, &pItem )) { aPar1 += ((SfxStringItem *)pItem)->GetValue(); } - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, false, &pItem )) nCommand = ((SfxInt32Item*)pItem)->GetValue(); aPar1 += OUString(DB_DELIM); aPar1 += OUString::number(nCommand); aPar1 += OUString(DB_DELIM); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_2, false, &pItem )) { aPar1 += ((SfxStringItem *)pItem)->GetValue(); } - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_CONTENT, false, &pItem )) aPar2 = ((SfxStringItem *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_FORMAT, false, &pItem )) nFormat = ((SfxUInt32Item *)pItem)->GetValue(); OSL_FAIL("Command is not yet used"); @@ -275,19 +275,19 @@ void SwTextShell::ExecField(SfxRequest &rReq) OUString aPar2; sal_Unicode cSeparator = ' '; - if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, false, &pItem )) nType = ((SfxUInt16Item *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE, + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE, false, &pItem )) nSubType = ((SfxUInt16Item *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_CONTENT, false, &pItem )) aPar2 = ((SfxStringItem *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_FORMAT, false, &pItem )) nFormat = ((SfxUInt32Item *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, false, &pItem )) { OUString sTmp = ((SfxStringItem *)pItem)->GetValue(); @@ -798,7 +798,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) rSh.GetCurAttr( aSet ); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) + if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { // Select links rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, false); diff --git a/sw/source/uibase/shells/textglos.cxx b/sw/source/uibase/shells/textglos.cxx index 1987c36ceb3d..80f4c3a461d9 100644 --- a/sw/source/uibase/shells/textglos.cxx +++ b/sw/source/uibase/shells/textglos.cxx @@ -65,10 +65,10 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) { OUString aGroup = (( const SfxStringItem *)pItem)->GetValue(); OUString aName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) aName = (( const SfxStringItem *)pItem)->GetValue(); OUString aShortName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, false, &pItem )) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_2, false, &pItem )) aShortName = (( const SfxStringItem *)pItem)->GetValue(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); @@ -101,7 +101,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) { OUString aGroup = (( const SfxStringItem *)pItem)->GetValue(); OUString aName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) aName = (( const SfxStringItem *)pItem)->GetValue(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index a0dc80b7f231..2a8210002f33 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -489,9 +489,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if(pArgs) { if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot && - pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SFX_ITEM_SET) + pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET) nCols = ((SfxUInt16Item *)pItem)->GetValue(); - if(pArgs->GetItemState(SID_MODIFIER, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_MODIFIER, false, &pItem) == SfxItemState::SET) bModifier1 |= KEY_MOD1 == ((SfxUInt16Item *)pItem)->GetValue(); } if(bModifier1 ) @@ -543,13 +543,13 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width(); Point aPos = aMgr.GetPos(); RndStdIds eAnchor = FLY_AT_PARA; - if(pArgs->GetItemState(nSlot, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(nSlot, false, &pItem) == SfxItemState::SET) eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue(); - if(pArgs->GetItemState(FN_PARAM_1, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(FN_PARAM_1, false, &pItem) == SfxItemState::SET) aPos = ((SfxPointItem *)pItem)->GetValue(); - if(pArgs->GetItemState(FN_PARAM_2, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(FN_PARAM_2, false, &pItem) == SfxItemState::SET) aSize = ((SvxSizeItem *)pItem)->GetSize(); - if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET) { const sal_uInt16 nCols = ((SfxUInt16Item *)pItem)->GetValue(); if( !bSingleCol && 1 < nCols ) @@ -771,7 +771,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) SvxHyperlinkItem aHLinkItem; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) + if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem; aHLinkItem.SetURL(pINetFmt->GetValue()); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 6a9a0b05b3ae..97f9053f01eb 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -212,7 +212,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const sal_Int32 nInsert = 0; // The old item is for unknown reasons back in the set again. - if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, false, &pSelectionItem) ) + if( !bSelectionPut && SfxItemState::SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, false, &pSelectionItem) ) { OUString sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue(); bInsert = !sInsert.isEmpty(); @@ -837,7 +837,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_INSERT_HYPERLINK: { const sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); - if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState( nWhich ) == SfxItemState::SET ) bUseDialog = false; // intentionally no break } @@ -870,7 +870,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case SID_ATTR_PARA_LRSPACE: { const sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); - if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState( nWhich ) == SfxItemState::SET ) bUseDialog = false; // intentionally no break @@ -1005,7 +1005,7 @@ void SwTextShell::Execute(SfxRequest &rReq) // Apply defaults if nessecary. pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); sal_uInt16 nNewDist; - if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, false, &pItem ) && + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, false, &pItem ) && nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); @@ -1014,13 +1014,13 @@ void SwTextShell::Execute(SfxRequest &rReq) pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS ); } - if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,false,&pItem) ) + if ( SfxItemState::SET == pSet->GetItemState(FN_PARAM_1,false,&pItem) ) { pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue())); pSet->ClearItem(FN_PARAM_1); } - if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, false, &pItem )) + if( SfxItemState::SET == pSet->GetItemState( RES_PARATR_DROP, false, &pItem )) { OUString sCharStyleName; if(((const SwFmtDrop*)pItem)->GetCharFmt()) @@ -1037,8 +1037,8 @@ void SwTextShell::Execute(SfxRequest &rReq) // enclose all undos. // Thus, check conditions, if actions will be performed. const bool bUndoNeeded( pSet->Count() || - SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) || - SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ); + SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART) || + SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ); if ( bUndoNeeded ) { rWrtSh.StartUndo( UNDO_INSATTR ); @@ -1046,7 +1046,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if( pSet->Count() ) { rWrtSh.StartAction(); - if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, false, &pItem) ) + if ( SfxItemState::SET == pSet->GetItemState(FN_DROP_TEXT, false, &pItem) ) { if ( !((SfxStringItem*)pItem)->GetValue().isEmpty() ) rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue(), pPaM); @@ -1060,7 +1060,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } } - if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) ) + if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART) ) { //SetNumRuleStart(sal_True) restarts the numbering at the value //that is defined at the starting point of the numbering level @@ -1073,14 +1073,14 @@ void SwTextShell::Execute(SfxRequest &rReq) // in order to indicate that the restart value of the list // style has to be used on restart. sal_uInt16 nNumStart = USHRT_MAX; - if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) + if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); } rWrtSh.SetNumRuleStart(bStart, pPaM); rWrtSh.SetNodeNumStart(nNumStart); } - else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) + else if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { rWrtSh.SetNodeNumStart(((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue()); rWrtSh.SetNumRuleStart(false, pPaM); @@ -1268,7 +1268,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if(pItem) sStyleName = ((const SfxStringItem*)pItem)->GetValue(); bool bOn = true; - if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem)) + if( SfxItemState::SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem)) bOn = ((const SfxBoolItem*)pItem)->GetValue(); rWrtSh.ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI()); rReq.Done(); @@ -1286,7 +1286,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_SELECTION_MODE_BLOCK : { bool bSetBlockMode = !rWrtSh.IsBlockMode(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem)) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem)) bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue(); if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) != bSetBlockMode ) rWrtSh.EnterBlockMode(); @@ -1304,7 +1304,7 @@ void SwTextShell::Execute(SfxRequest &rReq) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rWrtSh.GetCurAttr(aSet); - if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, true )) + if(SfxItemState::SET <= aSet.GetItemState( RES_TXTATR_INETFMT, true )) { const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, true) ); if( nSlot == FN_COPY_HYPERLINK_LOCATION ) @@ -1660,7 +1660,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, true ) || rSh.HasReadonlySel()) + if(SfxItemState::SET > aSet.GetItemState( RES_TXTATR_INETFMT, true ) || rSh.HasReadonlySel()) { rSet.DisableItem(nWhich); } @@ -1674,7 +1674,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSh.GetCurAttr(aSet); // If a hyperlink is selected, either alone or along with other text... - if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != SFX_ITEM_DONTCARE || rSh.HasReadonlySel()) + if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != SfxItemState::DONTCARE || rSh.HasReadonlySel()) { rSet.DisableItem(nWhich); } @@ -1713,7 +1713,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, false )) + if(SfxItemState::SET > aSet.GetItemState( RES_TXTATR_INETFMT, false )) rSet.DisableItem(nWhich); } break; diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index cda3f3b4e225..22b658379c71 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -275,7 +275,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq) { case SID_ATTR_PARA_ADJUST: { - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_PARATR_ADJUST) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(RES_PARATR_ADJUST) ) { const SvxAdjustItem& rAdj = (const SvxAdjustItem&) pArgs->Get(RES_PARATR_ADJUST); SvxAdjustItem aAdj( rAdj.GetAdjust(), RES_PARATR_ADJUST ); @@ -301,7 +301,7 @@ SET_ADJUST: break; case SID_ATTR_PARA_LINESPACE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( GetPool().GetWhich(nSlot) )) + if(pArgs && SfxItemState::SET == pArgs->GetItemState( GetPool().GetWhich(nSlot) )) { SvxLineSpacingItem aLineSpace = (const SvxLineSpacingItem&)pArgs->Get( GetPool().GetWhich(nSlot)); @@ -333,7 +333,7 @@ SET_LINESPACE: GetShell().GetCurAttr(aAdjustSet); bool bChgAdjust = false; SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, false); - if(eAdjustState >= SFX_ITEM_DEFAULT) + if(eAdjustState >= SfxItemState::DEFAULT) { int eAdjust = (int)(( const SvxAdjustItem& ) aAdjustSet.Get(RES_PARATR_ADJUST)).GetAdjust(); @@ -447,7 +447,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) { rSh.StartAction(); rSh.StartUndo( UNDO_START ); - if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,false,&pItem) ) + if ( SfxItemState::SET == aSet.GetItemState(HINT_END,false,&pItem) ) { if ( !((SfxStringItem*)pItem)->GetValue().isEmpty() ) rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue()); @@ -505,23 +505,23 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) int eAdjust = -1; // Illegal value to recognize DONTCARE. SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, false, &pItem); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST); - if( SFX_ITEM_DEFAULT <= eState ) + if( SfxItemState::DEFAULT <= eState ) eAdjust = (int)(( SvxAdjustItem* ) pItem)->GetAdjust(); short nEsc = 0; eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, false, &pItem); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) nEsc = ((SvxEscapementItem* )pItem)->GetEsc(); sal_uInt16 nLineSpace = 0; eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, false, &pItem); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING); - if( SFX_ITEM_DEFAULT <= eState && + if( SfxItemState::DEFAULT <= eState && ((SvxLineSpacingItem* )pItem)->GetLineSpaceRule() == SVX_LINE_SPACE_AUTO ) { if(SVX_INTER_LINE_SPACE_OFF == @@ -621,7 +621,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) case FN_UNDERLINE_DOUBLE: { eState = aCoreSet.GetItemState(RES_CHRATR_UNDERLINE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { FontUnderline eUnderline = ((const SvxUnderlineItem&) aCoreSet.Get(RES_CHRATR_UNDERLINE)).GetLineStyle(); @@ -642,7 +642,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) case SID_ATTR_PARA_LRSPACE: { eState = aCoreSet.GetItemState(RES_LR_SPACE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aCoreSet.Get( RES_LR_SPACE ) ); aLR.SetWhich(SID_ATTR_PARA_LRSPACE); @@ -667,7 +667,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) // is the item set? sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) && - aCoreSet.GetItemState( RES_FRAMEDIR, false ) >= SFX_ITEM_DEFAULT) + aCoreSet.GetItemState( RES_FRAMEDIR, false ) >= SfxItemState::DEFAULT) { SvxFrameDirection eFrmDir = (SvxFrameDirection) ((const SvxFrameDirectionItem& )aCoreSet.Get(RES_FRAMEDIR)).GetValue(); diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 50bc83f3751f..6b9fb2fb69b9 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -54,9 +54,9 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq) if(pArgs) { const SfxPoolItem *pItem; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, true, &pItem)) nCount = ((const SfxInt32Item *)pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, true, &pItem)) bSelect = ((const SfxBoolItem *)pItem)->GetValue(); } switch(rReq.GetSlot()) diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 2e71deff6df6..663927ece749 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -191,7 +191,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) const SfxPoolItem* pItem; if ( RET_OK == nRet ) { - if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem )) + if( SfxItemState::SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem )) { rReq.AppendItem( *pItem ); rReq.Done(); @@ -211,7 +211,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) // If the Dialog was leaved with OK but nothing was chosen then the // numbering must be at least activated, if it is not already. else if ( pNumRuleAtCurrentSelection == NULL - && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem ) ) + && SfxItemState::SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem ) ) { rReq.AppendItem( *pItem ); rReq.Done(); diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx index 2db942542b5c..39f13a54f445 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -464,7 +464,7 @@ void PagePropertyPanel::NotifyItemUpdate( { case SID_ATTR_PAGE_COLUMN: { - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxInt16Item) ) { mpPageColumnTypeItem.reset( static_cast<SfxInt16Item*>(pState->Clone()) ); @@ -473,7 +473,7 @@ void PagePropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_PAGE_LRSPACE: - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxLongLRSpaceItem) ) { mpPageLRMarginItem.reset( static_cast<SvxLongLRSpaceItem*>(pState->Clone()) ); @@ -482,7 +482,7 @@ void PagePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_PAGE_ULSPACE: - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxLongULSpaceItem) ) { mpPageULMarginItem.reset( static_cast<SvxLongULSpaceItem*>(pState->Clone()) ); @@ -491,7 +491,7 @@ void PagePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_PAGE: - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxPageItem) ) { const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION); @@ -515,7 +515,7 @@ void PagePropertyPanel::NotifyItemUpdate( { mpBindings->Invalidate( SID_ATTR_PAGE, true, false ); } - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxSizeItem) ) { mpPageSizeItem.reset( static_cast<SvxSizeItem*>(pState->Clone()) ); @@ -531,7 +531,7 @@ void PagePropertyPanel::NotifyItemUpdate( void PagePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pState ) { meFUnit = FUNIT_NONE; - if ( pState && eState >= SFX_ITEM_DEFAULT ) + if ( pState && eState >= SfxItemState::DEFAULT ) { meFUnit = (FieldUnit)( (const SfxUInt16Item*)pState )->GetValue(); } diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 540042aa9d02..afac9912ae1e 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -185,7 +185,7 @@ void WrapPropertyPanel::NotifyItemUpdate( { (void)bIsEnabled; - if ( eState == SFX_ITEM_DEFAULT && + if ( eState == SfxItemState::DEFAULT && pState->ISA(SfxBoolItem) ) { //Set Radio Button enable diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index cf81558ba8b5..4815149ebdd9 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -131,12 +131,12 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh ) void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) { const SfxPoolItem* pItem = 0; - bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || - SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); - bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); + bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) || + SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); + bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); if(bBackground) { @@ -158,7 +158,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) if(bBorder) rSh.SetTabBorders( rSet ); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem) ) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem) ) rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() ); SwFrmFmt* pFrmFmt = rSh.GetTableFmt(); @@ -201,17 +201,17 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) pFrmFmt->SetFmtAttr( *pItem ); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pItem) ) + if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pItem) ) { SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ); aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue()); rSh.SetBoxDirection(aDirection); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue()); - if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pItem) ) + if( SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pItem) ) rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem)); } }//end anonymous namespace @@ -424,7 +424,7 @@ static void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyl for ( sal_uInt16 nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rStyleAttrSet.GetItemState( nWhich, false, &pItem ) ) + if( SfxItemState::SET == rStyleAttrSet.GetItemState( nWhich, false, &pItem ) ) { rItemVector.push_back( SfxPoolItemSharedPtr( pItem->Clone() ) ); } @@ -440,7 +440,7 @@ static void lcl_RemoveEqualItems( SfxItemSet& rTemplateItemSet, const ItemVector while( aIter != aEnd ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rTemplateItemSet.GetItemState( (*aIter)->Which(), true, &pItem ) && + if( SfxItemState::SET == rTemplateItemSet.GetItemState( (*aIter)->Which(), true, &pItem ) && *pItem == *(*aIter) ) { rTemplateItemSet.ClearItem( (*aIter)->Which() ); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 5ab8185eebf5..56430f459528 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -705,7 +705,7 @@ void SwPagePreview::Execute( SfxRequest &rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; bool bBookPreview = GetViewShell()->GetViewOptions()->IsPagePrevBookview(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, false, &pItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, false, &pItem ) ) { bBookPreview = static_cast< const SfxBoolItem* >( pItem )->GetValue(); ( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview ); @@ -773,12 +773,12 @@ void SwPagePreview::Execute( SfxRequest &rReq ) { enum SvxZoomType eType = SVX_ZOOM_PERCENT; sal_uInt16 nZoomFactor = USHRT_MAX; - if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOM, true, &pItem)) { eType = ((const SvxZoomItem *)pItem)->GetType(); nZoomFactor = ((const SvxZoomItem *)pItem)->GetValue(); } - else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, true, &pItem)) + else if(SfxItemState::SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, true, &pItem)) nZoomFactor = ((const SfxUInt16Item *)pItem)->GetValue(); if(USHRT_MAX != nZoomFactor) SetZoom(eType, nZoomFactor); @@ -790,7 +790,7 @@ void SwPagePreview::Execute( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) ) + if ( pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) ) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); @@ -1046,10 +1046,10 @@ void SwPagePreview::GetState( SfxItemSet& rSet ) const SfxPoolItem* pItem; SfxItemSet aSet( *rSet.GetPool(), SID_PRINTDOC, SID_PRINTDOC ); GetSlotState( SID_PRINTDOC, SfxViewShell::GetInterface(), &aSet ); - if( SFX_ITEM_DISABLED == aSet.GetItemState( SID_PRINTDOC, + if( SfxItemState::DISABLED == aSet.GetItemState( SID_PRINTDOC, false, &pItem )) rSet.DisableItem( nWhich ); - else if( SFX_ITEM_SET == aSet.GetItemState( SID_PRINTDOC, + else if( SfxItemState::SET == aSet.GetItemState( SID_PRINTDOC, false, &pItem )) { ((SfxPoolItem*)pItem)->SetWhich( FN_PRINT_PAGEPREVIEW ); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 452d8329d4a7..993b26bed8d7 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -496,7 +496,7 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify) m_aTimer.Start(); const SfxPoolItem *pItem; - if ( SFX_ITEM_SET != GetObjectShell()->GetMedium()->GetItemSet()-> + if ( SfxItemState::SET != GetObjectShell()->GetMedium()->GetItemSet()-> GetItemState( SID_HIDDEN, false, &pItem ) || !((SfxBoolItem*)pItem)->GetValue() ) { @@ -603,7 +603,7 @@ void SwView::_CheckReadonlyState() qsort( (void*)aROIds, sizeof(aROIds)/sizeof(sal_uInt16), sizeof(sal_uInt16), lcl_CmpIds ); bFirst = false; } - if ( SFX_ITEM_DISABLED == eStateRO ) + if ( SfxItemState::DISABLED == eStateRO ) { rDis.SetSlotFilter( SFX_SLOT_FILTER_ENABLED_READONLY, sizeof(aROIds)/sizeof(sal_uInt16), aROIds ); bChgd = true; @@ -611,7 +611,7 @@ void SwView::_CheckReadonlyState() } else if( m_pWrtShell->IsAllProtect() ) { - if ( SFX_ITEM_DISABLED == eStateProtAll ) + if ( SfxItemState::DISABLED == eStateProtAll ) { static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC, FN_EDIT_REGION }; static bool bAllProtFirst = true; @@ -626,8 +626,8 @@ void SwView::_CheckReadonlyState() bChgd = true; } } - else if ( SFX_ITEM_DISABLED != eStateRO || - SFX_ITEM_DISABLED != eStateProtAll ) + else if ( SfxItemState::DISABLED != eStateRO || + SfxItemState::DISABLED != eStateProtAll ) { bChgd = true; rDis.SetSlotFilter(); diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index b4667ae9692f..6359ae839c20 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -361,7 +361,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) sal_uInt16 nSlot = rReq.GetSlot(); const SfxPoolItem* pAttr=NULL; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlot , false, &pAttr )) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr )) { bSet = ((SfxBoolItem*)pAttr)->GetValue(); eState = bSet ? STATE_ON : STATE_OFF; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 6c875c933c31..9e0fc75da0db 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -573,7 +573,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_ON: { if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem )) + SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem )) { IDocumentRedlineAccess* pIDRA = m_pWrtShell->getIDocumentRedlineAccess(); Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword(); @@ -583,7 +583,7 @@ void SwView::Execute(SfxRequest &rReq) // xmlsec05: new password dialog Window* pParent; const SfxPoolItem* pParentItem; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); @@ -613,7 +613,7 @@ void SwView::Execute(SfxRequest &rReq) { IDocumentRedlineAccess* pIDRA = m_pWrtShell->getIDocumentRedlineAccess(); Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == ( aPasswd.getLength() != 0 ) ) break; @@ -621,7 +621,7 @@ void SwView::Execute(SfxRequest &rReq) // message box for wrong password Window* pParent; const SfxPoolItem* pParentItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); @@ -656,7 +656,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_SHOW: if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem)) + SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem)) { sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) & m_pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT; @@ -756,19 +756,19 @@ void SwView::Execute(SfxRequest &rReq) if( pArgs ) { - if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_FILE_NAME, false, &pItem )) sFileName = ((const SfxStringItem*)pItem)->GetValue(); bHasFileName = !sFileName.isEmpty(); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_FILTER_NAME, false, &pItem )) sFilterName = ((const SfxStringItem*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_VERSION, false, &pItem )) { nVersion = ((const SfxInt16Item *)pItem)->GetValue(); m_pViewImpl->SetParam( nVersion ); } - if( SFX_ITEM_SET == pArgs->GetItemState( SID_NO_ACCEPT_DIALOG, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_NO_ACCEPT_DIALOG, false, &pItem )) { bNoAcceptDialog = ((const SfxBoolItem *)pItem)->GetValue(); } @@ -968,7 +968,7 @@ void SwView::Execute(SfxRequest &rReq) break; case SID_ATTR_BRUSH: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(RES_BACKGROUND, false, &pItem)) { const sal_uInt16 nCurIdx = m_pWrtShell->GetCurPageDesc(); SwPageDesc aDesc( m_pWrtShell->GetPageDesc( nCurIdx )); @@ -991,7 +991,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_INSERT_CTRL: case FN_INSERT_OBJ_CTRL: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem)) { const sal_uInt16 nValue = ((SfxUInt16Item*)pItem)->GetValue(); switch ( nSlot ) @@ -1021,7 +1021,7 @@ void SwView::Execute(SfxRequest &rReq) case SID_ATTR_DEFTABSTOP: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); const sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue(); @@ -1031,7 +1031,7 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_ATTR_LANGUAGE : - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, false, &pItem)) { SvxLanguageItem aLang(((SvxLanguageItem*)pItem)->GetLanguage(), RES_CHRATR_LANGUAGE); m_pWrtShell->SetDefault( aLang ); @@ -1039,14 +1039,14 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_ATTR_CHAR_CTL_LANGUAGE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, false, &pItem)) { m_pWrtShell->SetDefault( *pItem ); lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CTL_LANGUAGE ); } break; case SID_ATTR_CHAR_CJK_LANGUAGE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, false, &pItem)) { m_pWrtShell->SetDefault( *pItem ); lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CJK_LANGUAGE ); @@ -1077,7 +1077,7 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_JUMPTOMARK: - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, false, &pItem)) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(SID_JUMPTOMARK, false, &pItem)) JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() ); break; case SID_GALLERY : @@ -1106,7 +1106,7 @@ void SwView::Execute(SfxRequest &rReq) { bool bShow = false; if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem )) + SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem )) bShow = ((const SfxBoolItem*)pItem)->GetValue(); if((bShow && m_bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot)) GetViewFrame()->ToggleChildWindow(nSlot); @@ -1143,7 +1143,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_QRY_MERGE: { bool bUseCurrentDocument = true; - bool bQuery = !pArgs || SFX_ITEM_SET != pArgs->GetItemState(nSlot); + bool bQuery = !pArgs || SfxItemState::SET != pArgs->GetItemState(nSlot); if(bQuery) { SfxViewFrame* pTmpFrame = GetViewFrame(); @@ -1556,7 +1556,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) SfxItemSet aSet(GetPool(), RES_PARATR_NUMRULE, RES_PARATR_NUMRULE); rShell.GetCurAttr(aSet); - if(SFX_ITEM_DEFAULT <= + if(SfxItemState::DEFAULT <= aSet.GetItemState(RES_PARATR_NUMRULE, true)) { const OUString& rNumStyle = @@ -1658,7 +1658,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) case FN_STAT_BOOKMARK: if ( pArgs ) { - if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, true, &pItem)) + if (SfxItemState::SET == pArgs->GetItemState( nWhich, true, &pItem)) { const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess(); const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); @@ -1728,14 +1728,14 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } const SfxPoolItem* pViewLayoutItem = 0; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem)) + if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem)) { const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue(); const bool bBookMode = ((const SvxViewLayoutItem *)pViewLayoutItem)->IsBookMode(); SetViewLayout( nColumns, bBookMode ); } - if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, true, &pItem)) + if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_ZOOM, true, &pItem)) { enum SvxZoomType eType = ((const SvxZoomItem *)pItem)->GetType(); SetZoom( eType, ((const SvxZoomItem *)pItem)->GetValue() ); @@ -1753,7 +1753,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) if ( pArgs && !rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) ) { - if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pItem )) + if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pItem )) { const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue(); const bool bBookMode = (0 == nColumns || 0 != (nColumns % 2)) ? @@ -1775,7 +1775,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) { if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) ) { - if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem )) + if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem )) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); @@ -1824,7 +1824,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) { if ( pArgs ) { - if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, true, &pItem)) + if (SfxItemState::SET == pArgs->GetItemState( nWhich, true, &pItem)) { switch ( ((const SfxUInt16Item *)pItem)->GetValue() ) { @@ -2071,9 +2071,9 @@ static sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc ) const SwPageDesc& rPageDesc = rDoc.GetPageDesc( i ); const SwFrmFmt& rMaster = rPageDesc.GetMaster(); const SfxPoolItem* pItem; - if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, false, &pItem ) && + if( ( SfxItemState::SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, false, &pItem ) && ((SwFmtHeader*)pItem)->IsActive() ) || - ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, false, &pItem ) && + ( SfxItemState::SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, false, &pItem ) && ((SwFmtFooter*)pItem)->IsActive()) ) ++nRet; } @@ -2095,7 +2095,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ) { OUString sFile, sFilter; sFile = ( (const SfxStringItem *)pItem )->GetValue(); - if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, true, &pItem ) ) + if ( SfxItemState::SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, true, &pItem ) ) sFilter = ( (const SfxStringItem *)pItem )->GetValue(); bool bHasFileName = !sFile.isEmpty(); diff --git a/sw/source/uibase/uiview/viewcoll.cxx b/sw/source/uibase/uiview/viewcoll.cxx index 0f155a47d89e..15cc3e47b47c 100644 --- a/sw/source/uibase/uiview/viewcoll.cxx +++ b/sw/source/uibase/uiview/viewcoll.cxx @@ -46,7 +46,7 @@ void SwView::ExecColl(SfxRequest &rReq) if( pArgs ) { if (pArgs && - SFX_ITEM_SET == pArgs->GetItemState( nWhich , true, &pItem )) + SfxItemState::SET == pArgs->GetItemState( nWhich , true, &pItem )) { if( ((SfxStringItem*)pItem)->GetValue() != GetWrtShell().GetCurPageStyle(false) ) diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 0ec9e5c40c41..73d0106b3a5d 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -83,7 +83,7 @@ void SwView::ExecDraw(SfxRequest& rReq) bool bDeselect = false; sal_uInt16 nSlotId = rReq.GetSlot(); - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlotId), false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(GetPool().GetWhich(nSlotId), false, &pItem)) { pEItem = dynamic_cast< const SfxAllEnumItem*>(pItem); pStringItem = dynamic_cast< const SfxStringItem*>(pItem); @@ -751,7 +751,7 @@ bool SwView::IsDrawTextHyphenate() SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE ); if( pSdrView->GetAttributes( aNewAttr ) && - aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_DEFAULT ) + aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT ) bHyphenate = ((const SfxBoolItem&)aNewAttr.Get( EE_PARA_HYPHENATE )). GetValue(); diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index f136f3331d72..d5e83bc2d173 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -94,7 +94,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, bool bWeb ) const SfxItemSet& rSet = pNew->GetOptions(); const SwAddPrinterItem* pAddPrinterAttr; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, (const SfxPoolItem**)&pAddPrinterAttr ) ) { if( pIDDA ) diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 94e6dc6b91c7..d2ecd16bb983 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -88,7 +88,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; bool bQuiet = false; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem)) bQuiet = ((const SfxBoolItem*) pItem)->GetValue(); bool bApi = bQuiet || bNoMessage; diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 88b7238c2a32..452e720a79ea 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -926,7 +926,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } bool bSingleLine = false; const SfxPoolItem* pSingleLine; - if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, false, &pSingleLine)) + if( SfxItemState::SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, false, &pSingleLine)) bSingleLine = ((const SfxBoolItem*)pSingleLine)->GetValue(); if ( m_bSetTabRowFromDoc ) { @@ -1189,7 +1189,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) ( nSelType & nsSelectionType::SEL_GRF ) || ( nSelType & nsSelectionType::SEL_FRM ) || ( nSelType & nsSelectionType::SEL_OLE ) || - ( SFX_ITEM_DEFAULT > aCoreSet.GetItemState(RES_LR_SPACE) ) || + ( SfxItemState::DEFAULT > aCoreSet.GetItemState(RES_LR_SPACE) ) || (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich) ) || ( bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)) ) @@ -1258,7 +1258,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aUL.SetWhich(nWhich); SfxItemState e = aCoreSet.GetItemState(RES_UL_SPACE); - if( e >= SFX_ITEM_DEFAULT ) + if( e >= SfxItemState::DEFAULT ) rSet.Put( aUL ); else rSet.InvalidateItem(nWhich); diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index 15db91a8a88d..f64ae4eb702e 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -72,7 +72,7 @@ SwBookmarkControl::~SwBookmarkControl() void SwBookmarkControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_DEFAULT || pState->ISA( SfxVoidItem ) ) + if( eState != SfxItemState::DEFAULT || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else if ( pState->ISA( SfxStringItem ) ) { diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 05648f09230f..abbc71a6c7aa 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -415,7 +415,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) } const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); - if( SFX_ITEM_SET == pOutSet->GetItemState( + if( SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, false, &pItem )) { sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue(); @@ -426,7 +426,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) // SetDefFormat uses eCurLanguage to look for if this format already in the list SetDefFormat(nNumberFormat); } - if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState( + if( bShowLanguageControl && SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_NUMBERFORMAT_ADD_AUTO, false, &pItem )) { bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue(); diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 1a6574ff4334..29a3f0c0283d 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -72,7 +72,7 @@ SwTemplateControl::~SwTemplateControl() void SwTemplateControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_DEFAULT || pState->ISA( SfxVoidItem ) ) + if( eState != SfxItemState::DEFAULT || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else if ( pState->ISA( SfxStringItem ) ) { diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 8299564d46b9..b354bb2af5d2 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -101,7 +101,7 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh) { SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo)) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; @@ -125,7 +125,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode) // Background { const SfxPoolItem *pTmpBrush; - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, true, &pTmpBrush ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, true, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_BACKGROUND ); @@ -139,7 +139,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode) { // Border const SfxPoolItem *pTmpItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BOX, true, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BOX, true, &pTmpItem ) ) { SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpItem) ); aTmpBox.SetWhich( RES_BOX ); @@ -149,7 +149,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode) rSet.ClearItem(RES_BOX); // Border shadow - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_SHADOW, false, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_SHADOW, false, &pTmpItem ) ) { SvxShadowItem aTmpShadow( *((SvxShadowItem*)pTmpItem) ); aTmpShadow.SetWhich( RES_SHADOW ); @@ -165,7 +165,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode) // Background { const SfxPoolItem *pTmpBrush; - if( SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, false, &pTmpBrush ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -178,7 +178,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode) { // Border const SfxPoolItem *pTmpItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, false, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_BOX, false, &pTmpItem ) ) { SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpItem) ); aTmpBox.SetWhich( RES_CHRATR_BOX ); @@ -187,7 +187,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode) rSet.ClearItem( RES_BOX ); // Border shadow - if( SFX_ITEM_SET == rSet.GetItemState( RES_SHADOW, false, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_SHADOW, false, &pTmpItem ) ) { SvxShadowItem aTmpShadow( *((SvxShadowItem*)pTmpItem) ); aTmpShadow.SetWhich( RES_CHRATR_SHADOW ); @@ -256,7 +256,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) rMaster.SetFmtAttr(rSet); // PageData - if(rSet.GetItemState(SID_ATTR_PAGE) == SFX_ITEM_SET) + if(rSet.GetItemState(SID_ATTR_PAGE) == SfxItemState::SET) { const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE); @@ -269,7 +269,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) rPageDesc.SetNumType(aNumType); } // Size - if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SFX_ITEM_SET) + if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET) { const SvxSizeItem& rSizeItem = (const SvxSizeItem&)rSet.Get(SID_ATTR_PAGE_SIZE); SwFmtFrmSize aSize(ATT_FIX_SIZE); @@ -278,7 +278,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) } // Evaluate header attributes const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET, false, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -318,7 +318,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) } // Evaluate footer attributes - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET, false, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -359,7 +359,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Footnotes - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_FTN_INFO, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_FTN_INFO, false, &pItem ) ) rPageDesc.SetFtnInfo( ((SwPageFtnInfoItem*)pItem)->GetPageFtnInfo() ); @@ -367,13 +367,13 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Register compliant - if(SFX_ITEM_SET == rSet.GetItemState( + if(SfxItemState::SET == rSet.GetItemState( SID_SWREGISTER_MODE, false, &pItem)) { bool bSet = ((const SfxBoolItem*)pItem)->GetValue(); if(!bSet) rPageDesc.SetRegisterFmtColl(0); - else if(SFX_ITEM_SET == rSet.GetItemState( + else if(SfxItemState::SET == rSet.GetItemState( SID_SWREGISTER_COLLECTION, false, &pItem)) { const OUString& rColl = ((const SfxStringItem*)pItem)->GetValue(); @@ -421,7 +421,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo) ) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; @@ -585,12 +585,12 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) bool bChanged = false; // Page number - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, false, &pItem)) { aPgDesc.SetNumOffset(((SfxUInt16Item*)pItem)->GetValue()); bChanged = true; } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, false, &pItem )) { const OUString& rDescName = ((SvxPageModelItem*)pItem)->GetValue(); if( !rDescName.isEmpty() ) // No name -> disable PageDesc! @@ -609,7 +609,7 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) { SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC ); rShell.GetCurAttr( aCoreSet ); - if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) + if(SfxItemState::SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { if( ((SwFmtPageDesc*)pItem)->GetPageDesc() ) { @@ -631,7 +631,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) bool bPut = true; switch( rCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { - case SFX_ITEM_SET: + case SfxItemState::SET: { if( ((SwFmtPageDesc*)pItem)->GetPageDesc() ) { @@ -643,7 +643,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) } break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: break; default: diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx index b81fa35dfdf7..bc58ff865d91 100644 --- a/sw/source/uibase/utlui/viewlayoutctrl.cxx +++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx @@ -85,7 +85,7 @@ SwViewLayoutControl::~SwViewLayoutControl() void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_DEFAULT != eState || pState->ISA( SfxVoidItem ) ) + if ( SfxItemState::DEFAULT != eState || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else { diff --git a/sw/source/uibase/utlui/zoomctrl.cxx b/sw/source/uibase/utlui/zoomctrl.cxx index 3c7fbc81cb10..50640d89611c 100644 --- a/sw/source/uibase/utlui/zoomctrl.cxx +++ b/sw/source/uibase/utlui/zoomctrl.cxx @@ -43,7 +43,7 @@ SwZoomControl::~SwZoomControl() void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if(SFX_ITEM_DEFAULT == eState && pState->ISA( SfxStringItem )) + if(SfxItemState::DEFAULT == eState && pState->ISA( SfxStringItem )) { sPreviewZoom = ((const SfxStringItem*)pState)->GetValue(); GetStatusBar().SetItemText( GetId(), sPreviewZoom ); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 92262cbd237a..1284f10a9d7a 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1537,8 +1537,8 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet if(!IsInvalidItem(pParaItem)) { sal_uInt16 nWhich = pParaItem->Which(); - if(SFX_ITEM_SET == aCoreSet.GetItemState(nWhich) && - SFX_ITEM_SET == rStyleSet.GetItemState(nWhich)) + if(SfxItemState::SET == aCoreSet.GetItemState(nWhich) && + SfxItemState::SET == rStyleSet.GetItemState(nWhich)) { aCoreSet.ClearItem(nWhich); bReset = true; |