diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 17:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 06:08:32 +0000 |
commit | ea733ab5b632109d28bb8f1dc37116340b26229b (patch) | |
tree | 78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /sw/source/ui | |
parent | cc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff) |
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")
Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/numpara.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/pardlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 44 | ||||
-rw-r--r-- | sw/source/ui/dbui/dbinsdlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dialog/macassgn.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/uiregionsw.cxx | 36 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fmtui/tmpdlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/column.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 30 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/titlepage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.cxx | 34 |
19 files changed, 111 insertions, 111 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 5bc41d8206e6..44ea050e3b31 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -152,7 +152,7 @@ SwCharURLPage::SwCharURLPage(Window* pParent, const SfxItemSet& rCoreSet) const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem) || + if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { @@ -191,7 +191,7 @@ SwCharURLPage::~SwCharURLPage() void SwCharURLPage::Reset(const SfxItemSet* rSet) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, &pItem ) ) + if ( SfxItemState::SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, &pItem ) ) { const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*) pItem; m_pURLED->SetText(INetURLObject::decode(pINetFmt->GetValue(), @@ -225,7 +225,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) if( pINetFmt->GetMacroTbl() ) pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() ); } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_SELECTION, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_SELECTION, false, &pItem)) { m_pTextED->SetText(((const SfxStringItem*)pItem)->GetValue()); m_pTextFT->Enable( false ); diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 4585686cc3e3..251d905e9f29 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -69,7 +69,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& const SfxPoolItem* pItem; SfxObjectShell* pObjSh; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) || + if(SfxItemState::SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != ( pObjSh = SfxObjectShell::Current()) && 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE)))) { @@ -165,7 +165,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) SfxItemState eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ); sal_Int16 nOutlineLv; - if( eItemState >= SFX_ITEM_DEFAULT ) + if( eItemState >= SfxItemState::DEFAULT ) { nOutlineLv = ((const SfxUInt16Item &)rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue(); m_pOutlineLvLB->SelectEntryPos( nOutlineLv ) ; @@ -178,7 +178,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_NUMRULE) ); - if( eItemState >= SFX_ITEM_DEFAULT ) + if( eItemState >= SfxItemState::DEFAULT ) { OUString aStyle = ((const SfxStringItem &)rSet->Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue(); if(aStyle.isEmpty()) @@ -204,7 +204,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNumberStyleLB->SaveValue(); eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART ); - if(eItemState > SFX_ITEM_DEFAULT ) + if(eItemState > SfxItemState::DEFAULT ) { bCurNumrule = true; const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(FN_NUMBER_NEWSTART); @@ -219,7 +219,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartCB->SaveValue(); eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART_AT); - if( eItemState > SFX_ITEM_DEFAULT ) + if( eItemState > SfxItemState::DEFAULT ) { const sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); const bool bNotMax = USHRT_MAX != nNewStart; @@ -233,7 +233,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartNF->SaveValue(); m_pNewStartNumberCB->SaveValue(); StyleHdl_Impl(m_pNumberStyleLB); - if( SFX_ITEM_DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) + if( SfxItemState::DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) { SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet->Get(RES_LINENUMBER); sal_uLong nStartValue = rNum.GetStartValue(); diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 96f0d295e589..76106d3adeb3 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -112,7 +112,7 @@ SwParaDlg::SwParaDlg(Window *pParent, RemoveTabPage("labelTP_PARA_ASIAN"); const sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE)); - bool bLRValid = SFX_ITEM_DEFAULT <= rCoreSet.GetItemState(nWhich); + bool bLRValid = SfxItemState::DEFAULT <= rCoreSet.GetItemState(nWhich); if(bHtmlMode || !bLRValid) RemoveTabPage("labelTP_TABULATOR"); else diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index effc5551d3b8..93b740343b65 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -191,7 +191,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) OUString sDocTitle; const SfxPoolItem* pItem = NULL; SfxObjectShell* pObjShell = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) ) m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue(); if ( m_pWrtShell ) { diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index bb9803872653..4444efccbdb5 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -107,7 +107,7 @@ SwLoadOptPage::SwLoadOptPage(Window* pParent, const SfxItemSet& rSet) m_pMetricLB->SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl)); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { m_pTabFT->Hide(); @@ -251,7 +251,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(false); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) m_pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING; @@ -279,7 +279,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pAutoUpdateFields->SaveValue(); m_pAutoUpdateCharts->SaveValue(); m_pMetricLB->SetNoSelection(); - if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); @@ -295,7 +295,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) ::SetFieldUnit(*m_pTabMF, eFieldUnit); } m_pMetricLB->SaveValue(); - if(SFX_ITEM_SET == rSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) { m_nLastTab = ((SfxUInt16Item*)pItem)->GetValue(); m_pTabMF->SetValue(m_pTabMF->Normalize(m_nLastTab), FUNIT_TWIP); @@ -310,7 +310,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pUseSquaredPageMode->SaveValue(); } - if(SFX_ITEM_SET == rSet->GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem)) { bool bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue(); m_pUseCharUnit->Check(bUseCharUnit); @@ -556,7 +556,7 @@ bool SwCaptionOptPage::FillItemSet( SfxItemSet* ) void SwCaptionOptPage::Reset( const SfxItemSet* rSet) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 8e53f3904943..b642e6a5228f 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -101,7 +101,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, /* This part is visible only with Writer/Web->View dialogue. */ const SfxPoolItem* pItem; - if (! (SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if (! (SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)) { m_pSettingsFrame->Hide(); @@ -167,7 +167,7 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if( rSet.GetItemState( nSID, false, &pItem ) >= SFX_ITEM_DEFAULT ) + if( rSet.GetItemState( nSID, false, &pItem ) >= SfxItemState::DEFAULT ) { FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); for ( sal_Int32 i = 0; i < rMetric->GetEntryCount(); ++i ) @@ -338,7 +338,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(Window* pParent, m_pFaxLB->SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) ); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { m_pLeftPageCB->Hide(); @@ -413,7 +413,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet* ) const SfxItemSet& rSet = GetItemSet(); const SwAddPrinterItem* pAddPrinterAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , false, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , false, (const SfxPoolItem**)&pAddPrinterAttr )) { m_pGrfCB->Check(pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw); @@ -751,7 +751,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) const sal_uInt16 nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE : FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE; - if( SFX_ITEM_SET == rSet->GetItemState(nLangSlot, false, &pLang)) + if( SfxItemState::SET == rSet->GetItemState(nLangSlot, false, &pLang)) eLanguage = ((const SvxLanguageItem*)pLang)->GetValue(); OUString sToReplace = sScriptWestern; @@ -768,7 +768,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) delete pPrt; } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem)) { pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue(); } @@ -805,12 +805,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) pIdxBox->InsertEntry( *it ); } } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_STDFONTS, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_STDFONTS, false, &pItem)) { pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) { pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); } @@ -877,30 +877,30 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE); const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); - bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bListDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); sShellList = sListBackup = rFontLS.GetFamilyName(); const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nListHeight = (sal_Int32)rFontHeightList.GetHeight(); - bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bListHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL); - bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bLabelDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellLabel = sCapBackup = rFontCP.GetFamilyName(); const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight(); - bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bLabelHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE); - bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bIdxDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellIndex = sIdxBackup = rFontIDX.GetFamilyName(); const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight(); - bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bIndexHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); } pStandardBox->SetText(sStdBackup ); pTitleBox->SetText(sOutBackup ); @@ -1187,7 +1187,7 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* ) void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) { const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); @@ -1209,7 +1209,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) case TBLVAR_CHGABS: pVarRB->Check(); break; } const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -1291,7 +1291,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, const SfxPoolItem* pItem = 0; SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; m_pOnOffCB->Check( aOpt.IsOn() ); @@ -1301,7 +1301,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, m_pFillTabRB->Check( FILL_TAB == eMode ); m_pFillSpaceRB->Check( FILL_SPACE == eMode ); - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { m_pTabCB->Hide(); @@ -1355,7 +1355,7 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) bool bRet = false; const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ) + if( SfxItemState::SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ) || ((SwShadowCursorItem&)*pItem) != aOpt ) { rSet->Put( aOpt ); @@ -1403,7 +1403,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem = 0; SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) + if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; m_pOnOffCB->Check( aOpt.IsOn() ); @@ -1420,7 +1420,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) m_pMathBaselineAlignmentCB->Hide(); } - 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 )) m_pCrsrInProtCB->Check(((const SfxBoolItem*)pItem)->GetValue()); m_pCrsrInProtCB->SaveValue(); @@ -2384,7 +2384,7 @@ void SwTestTabPage::Reset( const SfxItemSet* ) const SfxItemSet& rSet = GetItemSet(); const SwTestItem* pTestAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , false, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SWTEST , false, (const SfxPoolItem**)&pTestAttr )) { m_pTest1CBox->Check(pTestAttr->bTest1); diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index b29556d85faf..a2eb4d63339a 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1432,12 +1432,12 @@ void SwInsertDBColAutoPilot::SetTabSet() static const sal_uInt16 aIds[3] = { RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE }; for( int i = 0; i < 3; ++i ) - if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ], + if( SfxItemState::SET == pTblSet->GetItemState( aIds[ i ], false, &pItem ) && *pItem == aBrush ) pTblSet->ClearItem( aIds[ i ] ); } - if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, false, + if( SfxItemState::SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, false, &pItem ) && ((const SfxStringItem*)pItem)->GetValue() == rSh.GetTableFmt()->GetName() ) pTblSet->ClearItem( FN_PARAM_TABLE_NAME ); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 0adc59500e23..2938f272f2b9 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -128,7 +128,7 @@ bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, { const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, false, &pItem )) + if( SfxItemState::SET == pOutSet->GetItemState( RES_FRMMACRO, false, &pItem )) { rpINetItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() ); bRet = true; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 9ddfdfe1b572..22fbf2220657 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1077,31 +1077,31 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) SfxItemState eLRState = pOutSet->GetItemState( RES_LR_SPACE, false, &pLRSpaceItem); - if( SFX_ITEM_SET == eColState || - SFX_ITEM_SET == eBrushState || - SFX_ITEM_SET == eFtnState || - SFX_ITEM_SET == eEndState || - SFX_ITEM_SET == eBalanceState|| - SFX_ITEM_SET == eFrmDirState|| - SFX_ITEM_SET == eLRState) + if( SfxItemState::SET == eColState || + SfxItemState::SET == eBrushState || + SfxItemState::SET == eFtnState || + SfxItemState::SET == eEndState || + SfxItemState::SET == eBalanceState|| + SfxItemState::SET == eFrmDirState|| + SfxItemState::SET == eLRState) { SvTreeListEntry* pSelEntry = m_pTree->FirstSelected(); while( pSelEntry ) { SectReprPtr pRepr = (SectReprPtr)pSelEntry->GetUserData(); - if( SFX_ITEM_SET == eColState ) + if( SfxItemState::SET == eColState ) pRepr->GetCol() = *(SwFmtCol*)pColItem; - if( SFX_ITEM_SET == eBrushState ) + if( SfxItemState::SET == eBrushState ) pRepr->GetBackground() = *(SvxBrushItem*)pBrushItem; - if( SFX_ITEM_SET == eFtnState ) + if( SfxItemState::SET == eFtnState ) pRepr->GetFtnNtAtEnd() = *(SwFmtFtnAtTxtEnd*)pFtnItem; - if( SFX_ITEM_SET == eEndState ) + if( SfxItemState::SET == eEndState ) pRepr->GetEndNtAtEnd() = *(SwFmtEndAtTxtEnd*)pEndItem; - if( SFX_ITEM_SET == eBalanceState ) + if( SfxItemState::SET == eBalanceState ) pRepr->GetBalance().SetValue(((SwFmtNoBalancedColumns*)pBalanceItem)->GetValue()); - if( SFX_ITEM_SET == eFrmDirState ) + if( SfxItemState::SET == eFrmDirState ) pRepr->GetFrmDir().SetValue(((SvxFrameDirectionItem*)pFrmDirItem)->GetValue()); - if( SFX_ITEM_SET == eLRState ) + if( SfxItemState::SET == eLRState ) pRepr->GetLRSpace() = *(SvxLRSpaceItem*)pLRSpaceItem; pSelEntry = m_pTree->NextSelected(pSelEntry); @@ -1314,7 +1314,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) + if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) sPassword = ( (SfxStringItem*)pItem )->GetValue(); ::lcl_ReadSections(*pMedium, *m_pSubRegionED); } @@ -1462,7 +1462,7 @@ short SwInsertSectionTabDialog::Ok() { SfxRequest aRequest( pViewFrm, FN_INSERT_REGION); const SfxPoolItem* pCol; - if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, false, &pCol)) + if(SfxItemState::SET == pOutputItemSet->GetItemState(RES_COL, false, &pCol)) { aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS, ((const SwFmtCol*)pCol)->GetColumns().size())); @@ -1780,7 +1780,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); m_sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) + if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue(); m_pFileNameED->SetText( INetURLObject::decode( m_sFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) ); @@ -2120,7 +2120,7 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet) SetMetric(*m_pAfterMF , aMetric); SfxItemState eItemState = rSet->GetItemState( RES_LR_SPACE ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { const SvxLRSpaceItem& rSpace = (const SvxLRSpaceItem&)rSet->Get( RES_LR_SPACE ); diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 4ac2e1063e0d..3250894abcd8 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -305,7 +305,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet(); sal_uInt16 nNewDist; - if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, + if( SfxItemState::SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, false, &pItem ) && nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) { diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 5ddb5ce8859d..5c1fb3ded31c 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -343,10 +343,10 @@ short SwTemplateDlg::Ok() if( RET_OK == nRet ) { const SfxPoolItem *pOutItem, *pExItem; - if( SFX_ITEM_SET == pExampleSet->GetItemState( + if( SfxItemState::SET == pExampleSet->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pExItem ) && ( !GetOutputItemSet() || - SFX_ITEM_SET != GetOutputItemSet()->GetItemState( + SfxItemState::SET != GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pOutItem ) || *pExItem != *pOutItem )) { diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index a05f16b4a88d..d7f5ad88759c 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -311,7 +311,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) } pTabPage->FillItemSet(pSet); - if(pSelectionSet && SFX_ITEM_SET == pSelectionSet->GetItemState(RES_COL)) + if(pSelectionSet && SfxItemState::SET == pSelectionSet->GetItemState(RES_COL)) { //insert region with columns const SwFmtCol& rColItem = (const SwFmtCol&)pSelectionSet->Get(RES_COL); @@ -335,7 +335,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) rWrtShell.SetSectionAttr( *pSectionSet ); } - if(pPageSet && SFX_ITEM_SET == pPageSet->GetItemState(RES_COL) && bPageChanged) + if(pPageSet && SfxItemState::SET == pPageSet->GetItemState(RES_COL) && bPageChanged) { // deterine current PageDescriptor and fill the Set with it const sal_uInt16 nCurIdx = rWrtShell.GetCurPageDesc(); @@ -344,7 +344,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) rFmt.SetFmtAttr(pPageSet->Get(RES_COL)); rWrtShell.ChgPageDesc(nCurIdx, aPageDesc); } - if(pFrameSet && SFX_ITEM_SET == pFrameSet->GetItemState(RES_COL) && bFrameChanged) + if(pFrameSet && SfxItemState::SET == pFrameSet->GetItemState(RES_COL) && bFrameChanged) { SfxItemSet aTmp(*pFrameSet->GetPool(), RES_COL, RES_COL); aTmp.Put(*pFrameSet); @@ -601,14 +601,14 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) if(m_pBalanceColsCB->IsVisible()) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet->GetItemState( RES_COLUMNBALANCE, false, &pItem )) + if( SfxItemState::SET == rSet->GetItemState( RES_COLUMNBALANCE, false, &pItem )) m_pBalanceColsCB->Check(!((const SwFmtNoBalancedColumns*)pItem)->GetValue()); else m_pBalanceColsCB->Check( true ); } //text direction - if( SFX_ITEM_DEFAULT <= rSet->GetItemState( RES_FRAMEDIR ) ) + if( SfxItemState::DEFAULT <= rSet->GetItemState( RES_FRAMEDIR ) ) { const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet->Get(RES_FRAMEDIR); sal_uIntPtr nVal = rItem.GetValue(); @@ -1156,7 +1156,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) { if(!bFrm) { - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) { const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( SID_ATTR_PAGE_SIZE); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index b1c6c5705891..3ad6d4a6f1ee 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -865,9 +865,9 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) const SfxPoolItem* pItem = NULL; const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet->Get(RES_ANCHOR); - if (SFX_ITEM_SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem)) + if (SfxItemState::SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem)) m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue(); - if (SFX_ITEM_SET == rSet->GetItemState(FN_MATH_BASELINE_ALIGNMENT, false, &pItem)) + if (SfxItemState::SET == rSet->GetItemState(FN_MATH_BASELINE_ALIGNMENT, false, &pItem)) m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue(); EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); @@ -897,7 +897,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) { OSL_ENSURE(pSh , "shell not found"); //OS: only for the variant Insert/Graphic/Properties - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_GRF_REALSIZE, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_GRF_REALSIZE, false, &pItem)) aGrfSize = ((const SvxSizeItem*)pItem)->GetSize(); else pSh->GetGrfSize( aGrfSize ); @@ -1822,7 +1822,7 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl) // all columns have to be correct if(GetTabDialog()->GetExampleSet() && - SFX_ITEM_DEFAULT <= GetTabDialog()->GetExampleSet()->GetItemState(RES_COL)) + SfxItemState::DEFAULT <= GetTabDialog()->GetExampleSet()->GetItemState(RES_COL)) { const SwFmtCol& rCol = (const SwFmtCol&)GetTabDialog()->GetExampleSet()->Get(RES_COL); if ( rCol.GetColumns().size() > 1 ) @@ -2232,7 +2232,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) nUpperBorder = rUL.GetUpper(); nLowerBorder = rUL.GetLower(); - if(SFX_ITEM_SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO)) + if(SfxItemState::SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO)) { m_pFixedRatioCB->Check(((const SfxBoolItem&)rSet.Get(FN_KEEP_ASPECT_RATIO)).GetValue()); m_pFixedRatioCB->SaveValue(); @@ -2387,7 +2387,7 @@ void SwGrfExtPage::Reset(const SfxItemSet *rSet) const sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; - if( SFX_ITEM_SET == rSet->GetItemState( FN_PARAM_GRF_CONNECT, true, &pItem) + if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_GRF_CONNECT, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue() ) { m_pBrowseBT->Enable(); @@ -2407,9 +2407,9 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) bool bEnableMirrorRB = false; SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, true, &pItem); - if( SFX_ITEM_UNKNOWN != eState && !bProtCntnt && !bHtmlMode ) + if( SfxItemState::UNKNOWN != eState && !bProtCntnt && !bHtmlMode ) { - if( SFX_ITEM_SET != eState ) + if( SfxItemState::SET != eState ) pItem = &rSet.Get( RES_GRFATR_MIRRORGRF ); bEnable = true; @@ -2450,7 +2450,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) } } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, false, &pItem ) ) { const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem; if( !rBrush.GetGraphicLink().isEmpty() ) @@ -2719,7 +2719,7 @@ SwFrmURLPage::~SwFrmURLPage() void SwFrmURLPage::Reset( const SfxItemSet *rSet ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rSet->GetItemState( SID_DOCFRAME, true, &pItem)) + if ( SfxItemState::SET == rSet->GetItemState( SID_DOCFRAME, true, &pItem)) { boost::scoped_ptr<TargetList> pList(new TargetList); ((const SfxFrameItem*)pItem)->GetFrame()->GetTargetList(*pList); @@ -2733,7 +2733,7 @@ void SwFrmURLPage::Reset( const SfxItemSet *rSet ) } } - if ( SFX_ITEM_SET == rSet->GetItemState( RES_URL, true, &pItem ) ) + if ( SfxItemState::SET == rSet->GetItemState( RES_URL, true, &pItem ) ) { const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem; pURLED->SetText( INetURLObject::decode( pFmtURL->GetURL(), @@ -2885,7 +2885,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) m_pContentAlignFrame->Hide(); } - if(SFX_ITEM_SET == rSet->GetItemState(FN_SET_FRM_ALT_NAME, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_SET_FRM_ALT_NAME, false, &pItem)) { pAltNameED->SetText(((const SfxStringItem*)pItem)->GetValue()); pAltNameED->SaveValue(); @@ -2896,7 +2896,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) // insert graphic - properties // bNew is not set, so recognise by selection OUString aTmpName1; - if(SFX_ITEM_SET == rSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) { aTmpName1 = ((const SfxStringItem*)pItem)->GetValue(); } @@ -3004,7 +3004,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) SfxItemState eState; if( (!bHtmlMode || (0 != (nHtmlMode&HTMLMODE_SOME_STYLES))) && sDlgType != "PictureDialog" && sDlgType != "ObjectDialog" && - SFX_ITEM_UNKNOWN != ( eState = rSet->GetItemState( + SfxItemState::UNKNOWN != ( eState = rSet->GetItemState( RES_FRAMEDIR, true )) ) { pTextFlowFT->Show(); @@ -3031,7 +3031,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) } // Content alignment - if ( rSet->GetItemState(RES_TEXT_VERT_ADJUST) > SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState(RES_TEXT_VERT_ADJUST) > SfxItemState::DEFAULT ) { SdrTextVertAdjust nAdjust = ((const SdrTextVertAdjustItem&)rSet->Get(RES_TEXT_VERT_ADJUST)).GetValue(); sal_Int32 nPos = 0; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 33d898490f21..58659f1a623f 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -528,7 +528,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) boost::scoped_ptr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG )); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK && - SFX_ITEM_SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) ) + SfxItemState::SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) ) { const SvxMacroTableDtor& rTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); pGlossaryHdl->SetMacros( m_pShortNameEdit->GetText(), diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 3cde10f07f5e..08362914a24e 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -366,7 +366,7 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) sal_uInt16 nTmpNumLvl = pOutlineDlg ? SwOutlineTabDialog::GetActNumLevel() : 0; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); - if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SFX_ITEM_UNKNOWN) + if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SfxItemState::UNKNOWN) { bPreset = ((const SfxBoolItem*)pItem)->GetValue(); } @@ -428,7 +428,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet* rSet ) pSaveNum = pOutlineDlg->GetNumRule(); m_pLevelLB->EnableMultiSelection(false); } - else if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_ACT_NUMBER, false, &pItem)) + else if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_ACT_NUMBER, false, &pItem)) pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule(); nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index ac5b3ee5e5e5..ee077af26f8e 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -308,7 +308,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) lMaxHeight = rSize.GetSize().Height(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -322,7 +322,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } } - if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET), + if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET), false, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -337,7 +337,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } } - if ( rSet.GetItemState( RES_UL_SPACE , false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( RES_UL_SPACE , false ) == SfxItemState::SET ) { const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE ); lMaxHeight -= rUL.GetUpper() + rUL.GetLower(); diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index dd656f2da1c7..f3cc570b0c23 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -189,7 +189,7 @@ bool SwTextGridPage::FillItemSet(SfxItemSet *rSet) void SwTextGridPage::Reset(const SfxItemSet *rSet) { - if(SFX_ITEM_DEFAULT <= rSet->GetItemState(RES_TEXTGRID, true)) + if(SfxItemState::DEFAULT <= rSet->GetItemState(RES_TEXTGRID, true)) { const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet->Get(RES_TEXTGRID); RadioButton* pButton = 0; @@ -278,7 +278,7 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet) void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) { - if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, true )) + if( SfxItemState::UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, true )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); @@ -286,7 +286,7 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT; } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) { const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( SID_ATTR_PAGE_SIZE); diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index b31cba9504b5..232c9e25672b 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -36,7 +36,7 @@ namespace if (pSh->GetCurAttr( aSet )) { const SfxPoolItem* pItem(0); - if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem) + if (SfxItemState::SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem) { ::boost::optional<sal_uInt16> oNumOffset = ((const SwFmtPageDesc *)pItem)->GetNumOffset(); if (oNumOffset) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 68c2b34a54e3..2252272406e0 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -96,7 +96,7 @@ SwFormatTablePage::SwFormatTablePage(Window* pParent, const SfxItemSet& rSet) SetExchangeSupport(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem)) bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled(); @@ -445,13 +445,13 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) SetMetric(*m_pBottomMF, aMetric); //Name - if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) { m_pNameED->SetText(((const SfxStringItem*)pItem)->GetValue()); m_pNameED->SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nMinTableWidth = pTblData->GetColCount() * MINLAY; @@ -542,7 +542,7 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) } //Margins - if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, false,&pItem )) + if(SfxItemState::SET == rSet.GetItemState( RES_UL_SPACE, false,&pItem )) { m_pTopMF->SetValue(m_pTopMF->Normalize( ((const SvxULSpaceItem*)pItem)->GetUpper()), FUNIT_TWIP); @@ -553,7 +553,7 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) } //Text direction - if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) { sal_uIntPtr nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); const sal_Int32 nPos = m_pTextDirectionLB->GetEntryPos( (void*) nVal ); @@ -571,7 +571,7 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet ) { OSL_ENSURE(pTblData, "table data not available?"); - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP )) { SwTwips nCurWidth = text::HoriOrientation::FULL != pTblData->GetAlign() ? pTblData->GetWidth() : @@ -745,7 +745,7 @@ SwTableColumnPage::SwTableColumnPage(Window* pParent, const SfxItemSet& rSet) SetExchangeSupport(); const SfxPoolItem* pItem; - Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) + Init((SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)); } @@ -765,7 +765,7 @@ void SwTableColumnPage::Reset( const SfxItemSet* ) const SfxItemSet& rSet = GetItemSet(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nNoOfVisibleCols = pTblData->GetColCount(); @@ -1299,7 +1299,7 @@ SwTextFlowPage::SwTextFlowPage(Window* pParent, const SfxItemSet& rSet) #ifndef SW_FILEFORMAT_40 const SfxPoolItem *pItem; - if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) + if(SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) #endif { @@ -1457,12 +1457,12 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) m_pPageCollLB->InsertEntry( aFmtName ); - if(SFX_ITEM_SET == rSet->GetItemState( RES_KEEP, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_KEEP, false, &pItem )) { m_pKeepCB->Check( ((const SvxFmtKeepItem*)pItem)->GetValue() ); m_pKeepCB->SaveValue(); } - if(SFX_ITEM_SET == rSet->GetItemState( RES_LAYOUT_SPLIT, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_LAYOUT_SPLIT, false, &pItem )) { m_pSplitCB->Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() ); } @@ -1472,7 +1472,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pSplitCB->SaveValue(); SplitHdl_Impl(m_pSplitCB); - if(SFX_ITEM_SET == rSet->GetItemState( RES_ROW_SPLIT, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_ROW_SPLIT, false, &pItem )) { m_pSplitRowCB->Check( ((const SwFmtRowSplit*)pItem)->GetValue() ); } @@ -1482,7 +1482,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) if(bPageBreak) { - if(SFX_ITEM_SET == rSet->GetItemState( RES_PAGEDESC, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_PAGEDESC, false, &pItem )) { OUString sPageDesc; const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc(); @@ -1522,7 +1522,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) } } - if(SFX_ITEM_SET == rSet->GetItemState( RES_BREAK, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_BREAK, false, &pItem )) { const SvxFmtBreakItem* pPageBreak = (const SvxFmtBreakItem*)pItem; SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue(); @@ -1585,7 +1585,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pPageCollLB->Enable(false); } - if(SFX_ITEM_SET == rSet->GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem )) { sal_uInt16 nRep = ((const SfxUInt16Item*)pItem)->GetValue(); m_pHeadLineCB->Check( nRep > 0 ); @@ -1594,13 +1594,13 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pRepeatHeaderNF->SetMin( 1 ); m_pRepeatHeaderNF->SaveValue(); } - if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SfxItemState::DEFAULT ) { sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet->Get(FN_TABLE_BOX_TEXTORIENTATION)).GetValue(); m_pTextDirectionLB->SelectEntryPos(m_pTextDirectionLB->GetEntryPos( (const void*)nDirection )); } - if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SfxItemState::DEFAULT ) { sal_uInt16 nVert = ((const SfxUInt16Item&)rSet->Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); sal_uInt16 nPos = 0; |