summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-10 17:53:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-12 06:08:32 +0000
commitea733ab5b632109d28bb8f1dc37116340b26229b (patch)
tree78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /sw/source
parentcc3294e127a6aedb8f6da5741ac9063da1cc2135 (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')
-rw-r--r--sw/source/core/access/accpara.cxx2
-rw-r--r--sw/source/core/attr/format.cxx16
-rw-r--r--sw/source/core/attr/swatrset.cxx14
-rw-r--r--sw/source/core/crsr/crstrvl.cxx6
-rw-r--r--sw/source/core/crsr/findattr.cxx24
-rw-r--r--sw/source/core/crsr/trvltbl.cxx2
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx38
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx2
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx2
-rw-r--r--sw/source/core/doc/doc.cxx2
-rw-r--r--sw/source/core/doc/docdesc.cxx4
-rw-r--r--sw/source/core/doc/docedt.cxx8
-rw-r--r--sw/source/core/doc/docfly.cxx16
-rw-r--r--sw/source/core/doc/docfmt.cxx20
-rw-r--r--sw/source/core/doc/doclay.cxx26
-rw-r--r--sw/source/core/doc/docnum.cxx2
-rw-r--r--sw/source/core/doc/docsort.cxx18
-rw-r--r--sw/source/core/doc/fmtcol.cxx22
-rw-r--r--sw/source/core/doc/gctable.cxx12
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/doc/tblafmt.cxx2
-rw-r--r--sw/source/core/doc/tblcpy.cxx8
-rw-r--r--sw/source/core/doc/tblrwcl.cxx4
-rw-r--r--sw/source/core/docnode/ndcopy.cxx8
-rw-r--r--sw/source/core/docnode/ndsect.cxx8
-rw-r--r--sw/source/core/docnode/ndtbl.cxx50
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx4
-rw-r--r--sw/source/core/docnode/node.cxx14
-rw-r--r--sw/source/core/docnode/section.cxx18
-rw-r--r--sw/source/core/draw/dcontact.cxx18
-rw-r--r--sw/source/core/edit/acorrect.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx10
-rw-r--r--sw/source/core/edit/edfcol.cxx8
-rw-r--r--sw/source/core/edit/edfmt.cxx2
-rw-r--r--sw/source/core/edit/edsect.cxx2
-rw-r--r--sw/source/core/edit/edtab.cxx4
-rw-r--r--sw/source/core/fields/cellfml.cxx6
-rw-r--r--sw/source/core/frmedt/fefly1.cxx18
-rw-r--r--sw/source/core/frmedt/tblsel.cxx2
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/flyincnt.cxx4
-rw-r--r--sw/source/core/layout/flylay.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/layout/tabfrm.cxx6
-rw-r--r--sw/source/core/layout/wsfrm.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx46
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/text/atrstck.cxx8
-rw-r--r--sw/source/core/text/itrform2.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/text/pormulti.cxx4
-rw-r--r--sw/source/core/text/redlnitr.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx28
-rw-r--r--sw/source/core/text/txtftn.cxx4
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx48
-rw-r--r--sw/source/core/txtnode/swfont.cxx82
-rw-r--r--sw/source/core/txtnode/thints.cxx18
-rw-r--r--sw/source/core/txtnode/txtedt.cxx6
-rw-r--r--sw/source/core/undo/rolbck.cxx2
-rw-r--r--sw/source/core/undo/unattr.cxx14
-rw-r--r--sw/source/core/undo/undel.cxx8
-rw-r--r--sw/source/core/undo/unsect.cxx6
-rw-r--r--sw/source/core/undo/unspnd.cxx4
-rw-r--r--sw/source/core/undo/untbl.cxx16
-rw-r--r--sw/source/core/unocore/unodraw.cxx4
-rw-r--r--sw/source/core/unocore/unoframe.cxx14
-rw-r--r--sw/source/core/unocore/unoobj.cxx6
-rw-r--r--sw/source/core/unocore/unoobj2.cxx4
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx6
-rw-r--r--sw/source/core/unocore/unostyle.cxx30
-rw-r--r--sw/source/core/unocore/unotbl.cxx14
-rw-r--r--sw/source/filter/ascii/parasc.cxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx52
-rw-r--r--sw/source/filter/html/htmlatr.cxx20
-rw-r--r--sw/source/filter/html/htmlcss1.cxx58
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx6
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx2
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx22
-rw-r--r--sw/source/filter/html/htmlform.cxx20
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlsect.cxx14
-rw-r--r--sw/source/filter/html/htmltab.cxx18
-rw-r--r--sw/source/filter/html/htmltabw.cxx6
-rw-r--r--sw/source/filter/html/svxcss1.cxx14
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.cxx14
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx2
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx10
-rw-r--r--sw/source/filter/ww1/fltshell.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx4
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx10
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx24
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx20
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx12
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx12
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx22
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx14
-rw-r--r--sw/source/filter/ww8/ww8par.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx2
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx2
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx4
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx6
-rw-r--r--sw/source/filter/xml/xmliteme.cxx2
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx8
-rw-r--r--sw/source/filter/xml/xmltble.cxx32
-rw-r--r--sw/source/filter/xml/xmltbli.cxx12
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx6
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx12
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx2
-rw-r--r--sw/source/ui/config/optcomp.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx12
-rw-r--r--sw/source/ui/config/optpage.cxx44
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/dialog/macassgn.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx36
-rw-r--r--sw/source/ui/envelp/envfmt.cxx2
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx4
-rw-r--r--sw/source/ui/frmdlg/column.cxx12
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx30
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx4
-rw-r--r--sw/source/ui/misc/pgfnote.cxx6
-rw-r--r--sw/source/ui/misc/pggrid.cxx6
-rw-r--r--sw/source/ui/misc/titlepage.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx34
-rw-r--r--sw/source/uibase/app/apphdl.cxx8
-rw-r--r--sw/source/uibase/app/appopt.cxx24
-rw-r--r--sw/source/uibase/app/docsh.cxx12
-rw-r--r--sw/source/uibase/app/docsh2.cxx10
-rw-r--r--sw/source/uibase/app/docshini.cxx2
-rw-r--r--sw/source/uibase/app/docst.cxx22
-rw-r--r--sw/source/uibase/app/docstyle.cxx20
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx22
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx8
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
-rw-r--r--sw/source/uibase/docvw/romenu.cxx8
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx26
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx6
-rw-r--r--sw/source/uibase/misc/glshell.cxx2
-rw-r--r--sw/source/uibase/ribbar/tbxanchr.cxx4
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx14
-rw-r--r--sw/source/uibase/shells/annotsh.cxx16
-rw-r--r--sw/source/uibase/shells/basesh.cxx20
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx8
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx10
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx8
-rw-r--r--sw/source/uibase/shells/frmsh.cxx32
-rw-r--r--sw/source/uibase/shells/grfsh.cxx14
-rw-r--r--sw/source/uibase/shells/langhelper.cxx6
-rw-r--r--sw/source/uibase/shells/mediash.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx38
-rw-r--r--sw/source/uibase/shells/textfld.cxx24
-rw-r--r--sw/source/uibase/shells/textglos.cxx6
-rw-r--r--sw/source/uibase/shells/textsh.cxx14
-rw-r--r--sw/source/uibase/shells/textsh1.cxx36
-rw-r--r--sw/source/uibase/shells/txtattr.cxx26
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx4
-rw-r--r--sw/source/uibase/shells/txtnum.cxx4
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx12
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.cxx2
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx22
-rw-r--r--sw/source/uibase/uiview/pview.cxx12
-rw-r--r--sw/source/uibase/uiview/view.cxx10
-rw-r--r--sw/source/uibase/uiview/view0.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx56
-rw-r--r--sw/source/uibase/uiview/viewcoll.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx4
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx2
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx2
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx6
-rw-r--r--sw/source/uibase/utlui/bookctrl.cxx2
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx4
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx2
-rw-r--r--sw/source/uibase/utlui/uitool.cxx40
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx2
-rw-r--r--sw/source/uibase/utlui/zoomctrl.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
187 files changed, 1097 insertions, 1097 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 77ace642a3e6..8041a6356657 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -2027,7 +2027,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
const SfxPoolItem* pItem( 0 );
// #i82637# - Found character attributes, whose value equals the value of
// the corresponding default character attributes, are excluded.
- if ( aSet.GetItemState( aPropIt->nWID, true, &pItem ) == SFX_ITEM_SET )
+ if ( aSet.GetItemState( aPropIt->nWID, true, &pItem ) == SfxItemState::SET )
{
uno::Any aVal;
pItem->QueryValue( aVal, aPropIt->nMemberId );
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 180b19ef858d..6a34f60756d7 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -328,7 +328,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
default:
{
// attribute is defined in this format
- if( SFX_ITEM_SET == aSet.GetItemState( nWhich, false ))
+ if( SfxItemState::SET == aSet.GetItemState( nWhich, false ))
{
// DropCaps might come into this block
OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify was sent without sender" );
@@ -430,15 +430,15 @@ SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, bool bSrchInParent, const S
if( ppItem )
*ppItem = &aSvxBrushItem;
- return SFX_ITEM_SET;
+ return SfxItemState::SET;
}
- // if not, reset pointer and return SFX_ITEM_DEFAULT to signal that
+ // if not, reset pointer and return SfxItemState::DEFAULT to signal that
// the item is not set
if( ppItem )
*ppItem = NULL;
- return SFX_ITEM_DEFAULT;
+ return SfxItemState::DEFAULT;
}
return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
@@ -458,11 +458,11 @@ SfxItemState SwFmt::GetBackgroundState(SvxBrushItem &rItem, bool bSrchInParent)
// as good as possible to have an instance for the pointer to point
// to and return as state that it is set
rItem = getSvxBrushItemFromSourceSet(aSet, RES_BACKGROUND, bSrchInParent);
- return SFX_ITEM_SET;
+ return SfxItemState::SET;
}
- // if not return SFX_ITEM_DEFAULT to signal that the item is not set
- return SFX_ITEM_DEFAULT;
+ // if not return SfxItemState::DEFAULT to signal that the item is not set
+ return SfxItemState::DEFAULT;
}
const SfxPoolItem* pItem = 0;
@@ -589,7 +589,7 @@ bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
{
const SfxPoolItem* pSource = 0;
- if(SFX_ITEM_SET == aTempSet.GetItemState(RES_BACKGROUND, false, &pSource))
+ if(SfxItemState::SET == aTempSet.GetItemState(RES_BACKGROUND, false, &pSource))
{
//UUUU FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
SAL_INFO("sw.core", "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 20c787446cdd..383abcfaa80e 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -177,7 +177,7 @@ SfxItemSet* SwAttrSet::Clone( bool bItems, SfxItemPool *pToPool ) const
while ( nWhich )
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == GetItemState( nWhich, false, &pItem ) )
+ if ( SfxItemState::SET == GetItemState( nWhich, false, &pItem ) )
pTmpSet->Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
@@ -266,14 +266,14 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
bool bSet = false;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == GetItemState( RES_PAGEDESC, false, &pItem ) &&
+ if( SfxItemState::SET == GetItemState( RES_PAGEDESC, false, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetDefinedIn() != pModify )
{
((SwFmtPageDesc*)pItem)->ChgDefinedIn( pModify );
bSet = true;
}
- if( SFX_ITEM_SET == GetItemState( RES_PARATR_DROP, false, &pItem ) &&
+ if( SfxItemState::SET == GetItemState( RES_PARATR_DROP, false, &pItem ) &&
((SwFmtDrop*)pItem)->GetDefinedIn() != pModify )
{
// If CharFormat is set and it is set in different attribute pools then
@@ -289,7 +289,7 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
bSet = true;
}
- if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, false, &pItem ) &&
+ if( SfxItemState::SET == GetItemState( RES_BOXATR_FORMULA, false, &pItem ) &&
((SwTblBoxFormula*)pItem)->GetDefinedIn() != pModify )
{
((SwTblBoxFormula*)pItem)->ChgDefinedIn( pModify );
@@ -318,7 +318,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// Does the NumRule has to be copied?
if( pSrcDoc != pDstDoc &&
- SFX_ITEM_SET == GetItemState( RES_PARATR_NUMRULE, false, &pItem ) )
+ SfxItemState::SET == GetItemState( RES_PARATR_NUMRULE, false, &pItem ) )
{
const OUString& rNm = ((SwNumRuleItem*)pItem)->GetValue();
if( !rNm.isEmpty() )
@@ -335,7 +335,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// for text nodes
if ( pSrcDoc != pDstDoc &&
pCNd && pCNd->IsTxtNode() &&
- GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SFX_ITEM_SET )
+ GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SfxItemState::SET )
{
const OUString& sListId =
dynamic_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -381,7 +381,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
const SwPageDesc* pPgDesc;
- if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState(
+ if( pSrcDoc != pDstDoc && SfxItemState::SET == GetItemState(
RES_PAGEDESC, false, &pItem ) &&
0 != ( pPgDesc = ((SwFmtPageDesc*)pItem)->GetPageDesc()) )
{
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 898f56b118bc..18608424398a 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1479,12 +1479,12 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
0 != ( pBox = pTblNd->GetTable().GetTblBox(
pSttNd->GetIndex() )) &&
#ifdef DBG_UTIL
- ( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
+ ( SfxItemState::SET == pBox->GetFrmFmt()->GetItemState(
RES_BOXATR_FORMULA, false, &pItem ) ||
- SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
+ SfxItemState::SET == pBox->GetFrmFmt()->GetItemState(
RES_BOXATR_VALUE, false, &pItem ))
#else
- SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
+ SfxItemState::SET == pBox->GetFrmFmt()->GetItemState(
RES_BOXATR_FORMULA, false, &pItem )
#endif
)
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 310c8d6c89de..21390e527123 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -289,7 +289,7 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
if( RES_TXTATR_END <= nWhich )
break; // end of text attributes
- if( SFX_ITEM_SET == rSet.GetItemState( nWhich, !bNoColls, &pFndItem )
+ if( SfxItemState::SET == rSet.GetItemState( nWhich, !bNoColls, &pFndItem )
&& !CmpAttr( *pFndItem, rSet.GetPool()->GetDefaultItem( nWhich ) ))
{
pFndArr[ nWhich - nArrStart ] =
@@ -358,7 +358,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
pIter = new SfxWhichIter( *pSet );
nWhch = pIter->FirstWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
+ SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
pTmpItem = NULL;
@@ -370,7 +370,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
while( pTmpItem )
{
SfxItemState eState = aCmpSet.GetItemState( nWhch, false, &pItem );
- if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState )
+ if( SfxItemState::DONTCARE == eState || SfxItemState::SET == eState )
{
sal_uInt16 n;
_SwSrchChrAttr* pCmp;
@@ -421,7 +421,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
bool bContinue = false;
- if( SFX_ITEM_DONTCARE == eState )
+ if( SfxItemState::DONTCARE == eState )
{
// Will the attribute become valid?
if( !CmpAttr( aCmpSet.GetPool()->GetDefaultItem( nWhch ),
@@ -472,7 +472,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
{
nWhch = pIter->NextWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
+ SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
break;
@@ -511,7 +511,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
pIter = new SfxWhichIter( *pSet );
nWhch = pIter->FirstWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
+ SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
pTmpItem = NULL;
@@ -523,7 +523,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
while( pTmpItem )
{
SfxItemState eState = aCmpSet.GetItemState( nWhch, false, &pItem );
- if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState )
+ if( SfxItemState::DONTCARE == eState || SfxItemState::SET == eState )
{
sal_uInt16 n;
_SwSrchChrAttr* pCmp;
@@ -572,7 +572,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
}
bool bContinue = false;
- if( SFX_ITEM_DONTCARE == eState )
+ if( SfxItemState::DONTCARE == eState )
{
// Will the attribute become valid?
if( !CmpAttr( aCmpSet.GetPool()->GetDefaultItem( nWhch ),
@@ -623,7 +623,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
{
nWhch = pIter->NextWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
+ SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
break;
@@ -860,7 +860,7 @@ static int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, bool
if( IsInvalidItem( pItem ))
{
nWhich = rCmpSet.GetWhichByPos( aIter.GetCurPos() );
- if( SFX_ITEM_SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
+ if( SfxItemState::SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
|| CmpAttr( *pNdItem, rNdSet.GetPool()->GetDefaultItem( nWhich ) ))
return sal_False;
}
@@ -938,7 +938,7 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
aFmtArr.insert( pTmpFmt );
}
- if( SFX_ITEM_SET == pNode->GetSwAttrSet().GetItemState( nWhich,
+ if( SfxItemState::SET == pNode->GetSwAttrSet().GetItemState( nWhich,
true, &pItem ) && ( !bValue || *pItem == rAttr ) )
{
// FORWARD: SPoint at the end, GetMark at the beginning of the node
@@ -1190,7 +1190,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
while( true )
{
// reset all that are not set with pool defaults
- if( !IsInvalidItem( pItem ) && SFX_ITEM_SET !=
+ if( !IsInvalidItem( pItem ) && SfxItemState::SET !=
pReplSet->GetItemState( pItem->Which(), false ))
aSet.Put( pPool->GetDefaultItem( pItem->Which() ));
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 93329f62cab8..e72992c0b174 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -817,7 +817,7 @@ bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
pSttNd->GetIndex() + 1 ]->GetTxtNode();
if( !pNd ||
( pNd->GetTxt() == SwViewShell::GetShellRes()->aCalc_Error &&
- SFX_ITEM_SET == pChkBox->GetFrmFmt()->
+ SfxItemState::SET == pChkBox->GetFrmFmt()->
GetItemState( RES_BOXATR_FORMULA )) )
pChkBox = 0;
}
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index c6cabe87a99a..c801788ffab0 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1197,7 +1197,7 @@ namespace //local functions originally from docfmt.cxx
{
SwTableNode* pTblNd;
const SwFmtPageDesc* pDesc;
- if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pOtherSet->GetItemState( RES_PAGEDESC,
false, (const SfxPoolItem**)&pDesc ))
{
if( pNode )
@@ -1244,7 +1244,7 @@ namespace //local functions originally from docfmt.cxx
const SvxFmtBreakItem* pBreak;
if( pNode && 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) &&
0 != (pTblNd = pNode->FindTableNode() ) &&
- SFX_ITEM_SET == pOtherSet->GetItemState( RES_BREAK,
+ SfxItemState::SET == pOtherSet->GetItemState( RES_BREAK,
false, (const SfxPoolItem**)&pBreak ) )
{
SwTableNode* pCurTblNd = pTblNd;
@@ -1275,7 +1275,7 @@ namespace //local functions originally from docfmt.cxx
// If we have a PoolNumRule, create it if needed
const SwNumRuleItem* pRule;
sal_uInt16 nPoolId=0;
- if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PARATR_NUMRULE,
+ if( SfxItemState::SET == pOtherSet->GetItemState( RES_PARATR_NUMRULE,
false, (const SfxPoolItem**)&pRule ) &&
!pDoc->FindNumRulePtr( pRule->GetValue() ) &&
USHRT_MAX != (nPoolId = SwStyleNameMapper::GetPoolIdFromUIName ( pRule->GetValue(),
@@ -1498,8 +1498,8 @@ namespace //local functions originally from docfmt.cxx
}
bool bCreateSwpHints = pCharSet && (
- SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, false ) ||
- SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, false ) );
+ SfxItemState::SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, false ) ||
+ SfxItemState::SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, false ) );
for(; aSt < aEnd; ++aSt )
{
@@ -1769,14 +1769,14 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
{
const SfxPoolItem *pItem;
const SfxItemSet* pSet = ((SwCntntNode*)pNd)->GetpSwAttrSet();
- if( pSet && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,
+ if( pSet && SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC,
false, &pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
bSavePageDesc = true;
}
- if( pSet && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK,
+ if( pSet && SfxItemState::SET == pSet->GetItemState( RES_BREAK,
false, &pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
@@ -2835,8 +2835,8 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
{
// Only if the table has page breaks!
const SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
- if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, false) &&
- SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, false ) )
+ if( SfxItemState::SET != pFrmFmt->GetItemState(RES_PAGEDESC, false) &&
+ SfxItemState::SET != pFrmFmt->GetItemState( RES_BREAK, false ) )
pNd = 0;
}
}
@@ -2856,13 +2856,13 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
{
SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pFrmFmt->GetItemState( RES_PAGEDESC,
false, &pItem ) )
{
pTxtNd->SetAttr( *pItem );
pFrmFmt->ResetFmtAttr( RES_PAGEDESC );
}
- if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_BREAK,
+ if( SfxItemState::SET == pFrmFmt->GetItemState( RES_BREAK,
false, &pItem ) )
{
pTxtNd->SetAttr( *pItem );
@@ -3999,9 +3999,9 @@ SwFlyFrmFmt* DocumentContentOperationsManager::_InsNoTxtNode( const SwPosition&
}
#define NUMRULE_STATE \
- SfxItemState aNumRuleState = SFX_ITEM_UNKNOWN; \
+ SfxItemState aNumRuleState = SfxItemState::UNKNOWN; \
SwNumRuleItem aNumRuleItem; \
- SfxItemState aListIdState = SFX_ITEM_UNKNOWN; \
+ SfxItemState aListIdState = SfxItemState::UNKNOWN; \
SfxStringItem aListIdItem( RES_PARATR_LIST_ID, OUString() ); \
#define PUSH_NUMRULE_STATE \
@@ -4021,12 +4021,12 @@ static void lcl_PushNumruleState( SfxItemState &aNumRuleState, SwNumRuleItem &aN
{
const SfxPoolItem * pItem = NULL;
aNumRuleState = pAttrSet->GetItemState(RES_PARATR_NUMRULE, false, &pItem);
- if (SFX_ITEM_SET == aNumRuleState)
+ if (SfxItemState::SET == aNumRuleState)
aNumRuleItem = *((SwNumRuleItem *) pItem);
aListIdState =
pAttrSet->GetItemState(RES_PARATR_LIST_ID, false, &pItem);
- if (SFX_ITEM_SET == aListIdState)
+ if (SfxItemState::SET == aListIdState)
{
aListIdItem.SetValue( static_cast<const SfxStringItem*>(pItem)->GetValue() );
}
@@ -4042,7 +4042,7 @@ static void lcl_PopNumruleState( SfxItemState aNumRuleState, const SwNumRuleItem
// #i86492# - restore also <ListId> item
if ( !lcl_MarksWholeNode(rPam) )
{
- if (SFX_ITEM_SET == aNumRuleState)
+ if (SfxItemState::SET == aNumRuleState)
{
pDestTxtNd->SetAttr(aNumRuleItem);
}
@@ -4050,7 +4050,7 @@ static void lcl_PopNumruleState( SfxItemState aNumRuleState, const SwNumRuleItem
{
pDestTxtNd->ResetAttr(RES_PARATR_NUMRULE);
}
- if (SFX_ITEM_SET == aListIdState)
+ if (SfxItemState::SET == aListIdState)
{
pDestTxtNd->SetAttr(aListIdItem);
}
@@ -4354,9 +4354,9 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if( !bOneNode && pSttTxtNd && bCopyCollFmt && pDestTxtNd->HasSwAttrSet() )
{
aBrkSet.Put( *pDestTxtNd->GetpSwAttrSet() );
- if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_BREAK, false ) )
+ if( SfxItemState::SET == aBrkSet.GetItemState( RES_BREAK, false ) )
pDestTxtNd->ResetAttr( RES_BREAK );
- if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_PAGEDESC, false ) )
+ if( SfxItemState::SET == aBrkSet.GetItemState( RES_PAGEDESC, false ) )
pDestTxtNd->ResetAttr( RES_PAGEDESC );
}
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index 870685e656b9..95e51f852550 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -817,7 +817,7 @@ void DocumentFieldsManager::UpdateTblFlds( SfxPoolItem* pHt )
if( pCalc->IsCalcError() )
nValue = DBL_MAX;
aTmp.Put( SwTblBoxValue( nValue ));
- if( SFX_ITEM_SET != pFmt->GetItemState( RES_BOXATR_FORMAT ))
+ if( SfxItemState::SET != pFmt->GetItemState( RES_BOXATR_FORMAT ))
aTmp.Put( SwTblBoxNumFormat( 0 ));
pFmt->SetFmtAttr( aTmp );
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index d094df7d8f78..3837e0ebb63e 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -575,7 +575,7 @@ static OUString lcl_dbg_out(const SwNode & rNode)
const SfxPoolItem * pItem = NULL;
- if (pAttrSet && SFX_ITEM_SET ==
+ if (pAttrSet && SfxItemState::SET ==
pAttrSet->GetItemState(RES_PARATR_NUMRULE, false, &pItem))
{
aTmpStr += "(";
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 081225629496..4459b55e9164 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -655,7 +655,7 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm )
const SfxPoolItem *pItem = NULL;
SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, false, &pItem );
const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem);
- if (eState > SFX_ITEM_DEFAULT && pPaperBinItem)
+ if (eState > SfxItemState::DEFAULT && pPaperBinItem)
nRes = pPaperBinItem->GetValue();
return nRes;
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index c6eafa0c4781..b7bc4c4523a2 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -169,7 +169,7 @@ static void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
// All in aIdArr except from RES_HEADER_FOOTER_EAT_SPACING
case RES_HEADER_FOOTER_EAT_SPACING:
//UUUU take out SvxBrushItem; it's the result of the fallback
- // at SwFmt::GetItemState and not really in state SFX_ITEM_SET
+ // at SwFmt::GetItemState and not really in state SfxItemState::SET
case RES_BACKGROUND:
bExecuteId = false;
break;
@@ -194,7 +194,7 @@ static void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
if(bExecuteId)
{
- if (SFX_ITEM_SET == rSource.GetItemState(nId, false, &pItem))
+ if (SfxItemState::SET == rSource.GetItemState(nId, false, &pItem))
{
rDest.SetFmtAttr(*pItem);
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 1b46038e5ee8..456740a84c78 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -357,11 +357,11 @@ void sw_JoinText( SwPaM& rPam, bool bJoinPrev )
if( ( pTxtNd = aIdx.GetNode().GetTxtNode())->HasSwAttrSet() )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pTxtNd->GetpSwAttrSet()->GetItemState(
+ if( SfxItemState::SET == pTxtNd->GetpSwAttrSet()->GetItemState(
RES_BREAK, false, &pItem ) )
pTxtNd->ResetAttr( RES_BREAK );
if( pTxtNd->HasSwAttrSet() &&
- SFX_ITEM_SET == pTxtNd->GetpSwAttrSet()->GetItemState(
+ SfxItemState::SET == pTxtNd->GetpSwAttrSet()->GetItemState(
RES_PAGEDESC, false, &pItem ) )
pTxtNd->ResetAttr( RES_PAGEDESC );
}
@@ -372,10 +372,10 @@ void sw_JoinText( SwPaM& rPam, bool bJoinPrev )
const SfxPoolItem* pItem;
SfxItemSet aSet( pDoc->GetAttrPool(), aBreakSetRange );
const SfxItemSet* pSet = pOldTxtNd->GetpSwAttrSet();
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK,
+ if( SfxItemState::SET == pSet->GetItemState( RES_BREAK,
false, &pItem ) )
aSet.Put( *pItem );
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC,
false, &pItem ) )
aSet.Put( *pItem );
if( aSet.Count() )
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 97f8f5dac583..1cc791c4ba7f 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -306,7 +306,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms
pNd->InsertItem( aFmt, pPos->nContent.GetIndex(), 0 );
}
- if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem ))
+ if( SfxItemState::SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem ))
{
SwFmtVertOrient aOldV( rFmt.GetVertOrient() );
bool bSet = true;
@@ -333,7 +333,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms
// such that the fly's document coordinates are preserved.
// If only the alignment changes in the position attributes (text::RelOrientation::FRAME
// vs. text::RelOrientation::PRTAREA), we also correct the position.
- if( SFX_ITEM_SET != rSet.GetItemState( RES_HORI_ORIENT, false, &pItem ))
+ if( SfxItemState::SET != rSet.GetItemState( RES_HORI_ORIENT, false, &pItem ))
pItem = 0;
SwFmtHoriOrient aOldH( rFmt.GetHoriOrient() );
@@ -354,7 +354,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms
rSet.Put( aOldH );
}
- if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem ))
+ if( SfxItemState::SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem ))
pItem = 0;
SwFmtVertOrient aOldV( rFmt.GetVertOrient() );
@@ -399,7 +399,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc,
// If so, we pass it to a special method, which returns sal_True
// if the Fly needs to be created anew, because we e.g change the FlyType.
sal_Int8 const nMakeFrms =
- (SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false ))
+ (SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false ))
? (rDoc.*pSetFlyFrmAnchor)( rFlyFmt, rSet, false )
: DONTMAKEFRMS;
@@ -425,7 +425,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc,
break;
default:
- if( !IsInvalidItem( aIter.GetCurItem() ) && ( SFX_ITEM_SET !=
+ if( !IsInvalidItem( aIter.GetCurItem() ) && ( SfxItemState::SET !=
rFlyFmt.GetAttrSet().GetItemState( nWhich, true, &pItem ) ||
*pItem != *aIter.GetCurItem() ))
aTmpSet.Put( *aIter.GetCurItem() );
@@ -605,7 +605,7 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
// Set the column first, or we'll have trouble with
//Set/Reset/Synch. and so on
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET != rNewFmt.GetAttrSet().GetItemState( RES_COL ))
+ if( SfxItemState::SET != rNewFmt.GetAttrSet().GetItemState( RES_COL ))
rFmt.ResetFmtAttr( RES_COL );
if( rFmt.DerivedFrom() != &rNewFmt )
@@ -614,7 +614,7 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
// 1. If not automatic = ignore; else = dispose
// 2. Dispose of it!
- if( SFX_ITEM_SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, false ))
+ if( SfxItemState::SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, false ))
{
rFmt.ResetFmtAttr( RES_FRM_SIZE );
bFrmSz = true;
@@ -622,7 +622,7 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
const SfxItemSet* pAsk = pSet;
if( !pAsk ) pAsk = &rNewFmt.GetAttrSet();
- if( SFX_ITEM_SET == pAsk->GetItemState( RES_ANCHOR, false, &pItem )
+ if( SfxItemState::SET == pAsk->GetItemState( RES_ANCHOR, false, &pItem )
&& ((SwFmtAnchor*)pItem)->GetAnchorId() !=
rFmt.GetAnchor().GetAnchorId() )
{
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 690555ab97cd..19858903db3e 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -131,7 +131,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
sal_uInt16 const aSavIds[3] = { RES_PAGEDESC, RES_BREAK, RES_PARATR_NUMRULE };
for (sal_uInt16 n = 0; n < 3; ++n)
{
- if (SFX_ITEM_SET == pAttrSetOfNode->GetItemState(aSavIds[n], false, &pItem))
+ if (SfxItemState::SET == pAttrSetOfNode->GetItemState(aSavIds[n], false, &pItem))
{
bool bSave = false;
switch( aSavIds[ n ] )
@@ -181,7 +181,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
if ( ( pItem->Which() != RES_PAGEDESC &&
pItem->Which() != RES_BREAK &&
pItem->Which() != RES_PARATR_NUMRULE ) ||
- ( aSavedAttrsSet.GetItemState( pItem->Which(), false ) != SFX_ITEM_SET ) )
+ ( aSavedAttrsSet.GetItemState( pItem->Which(), false ) != SfxItemState::SET ) )
{
pNode->ResetAttr( pItem->Which() );
}
@@ -602,7 +602,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
}
const SfxPoolItem* pTmpItem;
- if( ( SFX_ITEM_SET ==
+ if( ( SfxItemState::SET ==
aNew.GetItemState( RES_PARATR_TABSTOP, false, &pTmpItem ) ) &&
((SvxTabStopItem*)pTmpItem)->Count() )
{
@@ -999,7 +999,7 @@ static bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
// #i62675# check, if paragraph style has changed
if ( pPara->bResetListAttrs &&
pFmt != pCNd->GetFmtColl() &&
- pFmt->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET )
+ pFmt->GetItemState( RES_PARATR_NUMRULE ) == SfxItemState::SET )
{
// Check, if the list style of the paragraph will change.
bool bChangeOfListStyleAtParagraph( true );
@@ -1188,7 +1188,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
if( this != rColl.GetDoc() )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pNewColl->GetItemState( RES_PARATR_NUMRULE,
+ if( SfxItemState::SET == pNewColl->GetItemState( RES_PARATR_NUMRULE,
false, &pItem ))
{
const SwNumRule* pRule;
@@ -1285,7 +1285,7 @@ void SwDoc::CopyFmtArr( const SwFmtsBase& rSourceArr,
// #i94285#: existing <SwFmtPageDesc> instance, before copying attributes
const SfxPoolItem* pItem;
if( &GetAttrPool() != pSrc->GetAttrSet().GetPool() &&
- SFX_ITEM_SET == pSrc->GetAttrSet().GetItemState(
+ SfxItemState::SET == pSrc->GetAttrSet().GetItemState(
RES_PAGEDESC, false, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
@@ -1344,7 +1344,7 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
// Copy content nodes across documents!
sal_uInt16 nAttr = static_cast<sal_uInt16>( bCpyHeader ? RES_HEADER : RES_FOOTER );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, false, &pItem ))
+ if( SfxItemState::SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, false, &pItem ))
return ;
// The header only contains the reference to the format from the other document!
@@ -1362,7 +1362,7 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
GetDfltFrmFmt() );
pNewFmt->CopyAttrs( *pOldFmt, true );
- if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState(
+ if( SfxItemState::SET == pNewFmt->GetAttrSet().GetItemState(
RES_CNTNT, false, &pItem ))
{
SwFmtCntnt* pCntnt = (SwFmtCntnt*)pItem;
@@ -1760,7 +1760,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
aTmp.Differentiate( *pSet );
// we handle the adjust item separately
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pTNd->GetpSwAttrSet()->GetItemState(
+ if( SfxItemState::SET == pTNd->GetpSwAttrSet()->GetItemState(
RES_PARATR_ADJUST, false, &pItem ))
aTmp.Put( *pItem );
aExtraData.SetItemSet( aTmp );
@@ -1942,7 +1942,7 @@ namespace docfunc
if ( !pParentTxtFmtColl )
continue;
- if ( SFX_ITEM_SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) )
+ if ( SfxItemState::SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) )
{
// #i106218# consider that the outline style is set
const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule();
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 0fb8c41e3b10..865324ac2bf5 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -109,7 +109,7 @@ static bool lcl_IsItemSet(const SwCntntNode & rNode, sal_uInt16 which)
{
bool bResult = false;
- if (SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState(which))
+ if (SfxItemState::SET == rNode.GetSwAttrSet().GetItemState(which))
bResult = true;
return bResult;
@@ -192,7 +192,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
{
pFlySet->GetItemState( RES_ANCHOR, false,
(const SfxPoolItem**)&pAnchor );
- if( SFX_ITEM_SET == pFlySet->GetItemState( RES_CNTNT, false ))
+ if( SfxItemState::SET == pFlySet->GetItemState( RES_CNTNT, false ))
{
SfxItemSet aTmpSet( *pFlySet );
aTmpSet.ClearItem( RES_CNTNT );
@@ -225,7 +225,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
else
{
if( eRequestId != aAnch.GetAnchorId() &&
- SFX_ITEM_SET != pFmt->GetItemState( RES_ANCHOR, true ) )
+ SfxItemState::SET != pFmt->GetItemState( RES_ANCHOR, true ) )
{
aAnch.SetType( eRequestId );
}
@@ -262,7 +262,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
}
}
- if( SFX_ITEM_SET != pFmt->GetAttrSet().GetItemState( RES_FRM_SIZE ))
+ if( SfxItemState::SET != pFmt->GetAttrSet().GetItemState( RES_FRM_SIZE ))
{
SwFmtFrmSize aFmtSize( ATT_VAR_SIZE, 0, DEF_FLY_WIDTH );
const SwNoTxtNode* pNoTxtNode = rNode.GetNoTxtNode();
@@ -308,9 +308,9 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
if ( !pAnchorPos && (FLY_AT_PAGE != eAnchorType) )
{
const SwFmtAnchor* pAnch;
- if( (pFlySet && SFX_ITEM_SET == pFlySet->GetItemState(
+ if( (pFlySet && SfxItemState::SET == pFlySet->GetItemState(
RES_ANCHOR, false, (const SfxPoolItem**)&pAnch )) ||
- ( pFrmFmt && SFX_ITEM_SET == pFrmFmt->GetItemState(
+ ( pFrmFmt && SfxItemState::SET == pFrmFmt->GetItemState(
RES_ANCHOR, true, (const SfxPoolItem**)&pAnch )) )
{
if ( (FLY_AT_PAGE != pAnch->GetAnchorId()) )
@@ -343,7 +343,7 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
const SfxPoolItem * pItem = NULL;
if (bCalledFromShell && !lcl_IsItemSet(*pNewTxtNd, RES_PARATR_ADJUST) &&
- SFX_ITEM_SET == pAnchorNode->GetSwAttrSet().
+ SfxItemState::SET == pAnchorNode->GetSwAttrSet().
GetItemState(RES_PARATR_ADJUST, true, &pItem))
{
static_cast<SwCntntNode *>(pNewTxtNd)->SetAttr(*pItem);
@@ -761,17 +761,17 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
// If there's no BoxItem at graphic, but the new Format has one, then set the
// default item in the new Set. Because the graphic's size has never changed!
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pOldFmt->GetAttrSet().
+ if( SfxItemState::SET == pOldFmt->GetAttrSet().
GetItemState( RES_BOX, true, &pItem ))
pNewSet->Put( *pItem );
- else if( SFX_ITEM_SET == pNewFmt->GetAttrSet().
+ else if( SfxItemState::SET == pNewFmt->GetAttrSet().
GetItemState( RES_BOX, true ))
pNewSet->Put( *GetDfltAttr( RES_BOX ) );
- if( SFX_ITEM_SET == pOldFmt->GetAttrSet().
+ if( SfxItemState::SET == pOldFmt->GetAttrSet().
GetItemState( RES_SHADOW, true, &pItem ))
pNewSet->Put( *pItem );
- else if( SFX_ITEM_SET == pNewFmt->GetAttrSet().
+ else if( SfxItemState::SET == pNewFmt->GetAttrSet().
GetItemState( RES_SHADOW, true ))
pNewSet->Put( *GetDfltAttr( RES_SHADOW ) );
}
@@ -1099,10 +1099,10 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
rDoc.getIDocumentStylePoolAccess().GetFrmFmtFromPool( RES_POOLFRM_FRAME ) );
// Set border and shadow to default if the template contains any.
- if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState( RES_BOX, true ))
+ if( SfxItemState::SET == pNewFmt->GetAttrSet().GetItemState( RES_BOX, true ))
pNewSet->Put( *GetDfltAttr( RES_BOX ) );
- if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState(RES_SHADOW,true))
+ if( SfxItemState::SET == pNewFmt->GetAttrSet().GetItemState(RES_SHADOW,true))
pNewSet->Put( *GetDfltAttr( RES_SHADOW ) );
pNewFmt->SetFmtAttr( SwFmtCntnt( pSttNd ));
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index e2ad87b1f9e5..1b078e2b152d 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1322,7 +1322,7 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
// list style is applied
const SfxItemSet* pAttrSet = pTNd->GetpSwAttrSet();
if ( pAttrSet &&
- pAttrSet->GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET )
+ pAttrSet->GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET )
pTNd->ResetAttr( RES_PARATR_NUMRULE );
else
pTNd->SetAttr( aEmptyRule );
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 7c76282869ec..a335a290c2d4 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -630,9 +630,9 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
const SfxItemSet* pSSet = rBox.GetItemSet( i, nS );
if( pSSet ||
- SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) ||
- SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) ||
- SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) )
+ SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) ||
+ SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) ||
+ SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) )
{
pTFmt = ((SwTableBox*)pT)->ClaimFrmFmt();
pTFmt->LockModify();
@@ -674,9 +674,9 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
const SfxItemSet* pSSet = rBox.GetItemSet( nS, i );
if( pSSet ||
- SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) ||
- SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) ||
- SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) )
+ SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) ||
+ SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) ||
+ SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) )
{
pTFmt = ((SwTableBox*)pT)->ClaimFrmFmt();
pTFmt->LockModify();
@@ -895,9 +895,9 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, bool bLastBox)
// Save the Formula/Format/Value values
const SwFrmFmt* pFmt = pBox->GetBox()->GetFrmFmt();
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT ) ||
- SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA ) ||
- SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE ) )
+ if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMAT ) ||
+ SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMULA ) ||
+ SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE ) )
{
SfxItemSet* pSet = new SfxItemSet( pDoc->GetAttrPool(),
RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index 37332818b0d2..759462ca5edb 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -205,7 +205,7 @@ void SwTxtFmtColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
bool bContinue = true;
// Check against the own attributes
- if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, false,
+ if( pNewLRSpace && SfxItemState::SET == GetItemState( RES_LR_SPACE, false,
(const SfxPoolItem**)&pOldLRSpace ))
{
bool bChg = false;
@@ -246,7 +246,7 @@ void SwTxtFmtColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
}
}
- if( pNewULSpace && SFX_ITEM_SET == GetItemState(
+ if( pNewULSpace && SfxItemState::SET == GetItemState(
RES_UL_SPACE, false, (const SfxPoolItem**)&pOldULSpace ) &&
pOldULSpace != pNewULSpace ) // Avoid recursion (SetAttr!)
{
@@ -281,7 +281,7 @@ void SwTxtFmtColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
nC < nArrLen; ++nC )
{
SvxFontHeightItem *pFSize = aFontSizeArr[ nC ], *pOldFSize;
- if( pFSize && SFX_ITEM_SET == GetItemState(
+ if( pFSize && SfxItemState::SET == GetItemState(
pFSize->Which(), false, (const SfxPoolItem**)&pOldFSize ) &&
// Avoid recursion (SetAttr!)
pFSize != pOldFSize )
@@ -350,7 +350,7 @@ bool SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
bool SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet )
{
const bool bIsNumRuleItemAffected =
- rSet.GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET;
+ rSet.GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET;
if ( bIsNumRuleItemAffected )
{
TxtFmtCollFunc::RemoveFromNumRule( *this );
@@ -413,17 +413,17 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
{
bool bAreListLevelIndentsApplicable( true );
- if ( GetItemState( RES_PARATR_NUMRULE ) != SFX_ITEM_SET )
+ if ( GetItemState( RES_PARATR_NUMRULE ) != SfxItemState::SET )
{
// no list style applied to paragraph style
bAreListLevelIndentsApplicable = false;
}
- else if ( GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET )
+ else if ( GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET )
{
// paragraph style has hard-set indent attributes
bAreListLevelIndentsApplicable = false;
}
- else if ( GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET )
+ else if ( GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET )
{
// list style is directly applied to paragraph style and paragraph
// style has no hard-set indent attributes
@@ -438,14 +438,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
const SwTxtFmtColl* pColl = dynamic_cast<const SwTxtFmtColl*>(DerivedFrom());
while ( pColl )
{
- if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET )
{
// indent attributes found in the paragraph style hierarchy.
bAreListLevelIndentsApplicable = false;
break;
}
- if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET )
{
// paragraph style with the list style found and until now no
// indent attributes are found in the paragraph style hierarchy.
@@ -638,12 +638,12 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
{
if ( !pDerivedTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() )
{
- if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_DEFAULT )
+ if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::DEFAULT )
{
SwNumRuleItem aItem(aEmptyOUStr);
pDerivedTxtFmtColl->SetFmtAttr( aItem );
}
- if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, false ) == SFX_ITEM_DEFAULT )
+ if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, false ) == SfxItemState::DEFAULT )
{
pDerivedTxtFmtColl->SetAttrOutlineLevel( 0 );
}
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 71adadbc683a..bac1c50627fe 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -35,7 +35,7 @@ bool _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrmFmt& rFmt )
{
const SvxBorderLine* pBrd;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rFmt.GetItemState( RES_BOX, true, &pItem ) &&
+ if( SfxItemState::SET == rFmt.GetItemState( RES_BOX, true, &pItem ) &&
0 != ( pBrd = ((SvxBoxItem*)pItem)->GetLeft() ) )
{
if( *pBrdLn == *pBrd )
@@ -104,7 +104,7 @@ static sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
const SvxBorderLine* pBrd;
const SwTableBox& rBox = rCollTLB.GetBox( rStt, &nPos );
- if( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,true, &pItem )
+ if( SfxItemState::SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,true, &pItem )
|| 0 == ( pBrd = GetLineTB( (SvxBoxItem*)pItem, bTop ))
|| !( *pBrd == rBrdLn ))
break;
@@ -117,7 +117,7 @@ static inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBo
bool bTop,
const SfxPoolItem** ppItem )
{
- return SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, true, ppItem )
+ return SfxItemState::SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, true, ppItem )
? GetLineTB( (SvxBoxItem*)*ppItem, bTop )
: 0;
}
@@ -183,7 +183,7 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
SwTableBox* pBox;
for( sal_uInt16 i = aBoxes.size(); i; )
- if( SFX_ITEM_SET == (pBox = aBoxes[ --i ])->GetFrmFmt()->
+ if( SfxItemState::SET == (pBox = aBoxes[ --i ])->GetFrmFmt()->
GetItemState( RES_BOX, true, &pItem ) &&
0 != ( pBrd = ((SvxBoxItem*)pItem)->GetRight() ) )
{
@@ -394,12 +394,12 @@ static bool lcl_MergeGCLine(SwTableLine* pLn, _GCLinePara* pGCPara)
// JP 31.03.99: Bug 60000
// Pass the attributes of the to-be-deleted Lines to the "inserted" one
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pLn->GetFrmFmt()->GetItemState(
+ if( SfxItemState::SET == pLn->GetFrmFmt()->GetItemState(
RES_BACKGROUND, true, &pItem ))
{
SwTableLines& rBoxLns = pBox->GetTabLines();
for( sal_uInt16 nLns = 0; nLns < nLen; ++nLns )
- if( SFX_ITEM_SET != rBoxLns[ nLns ]->GetFrmFmt()->
+ if( SfxItemState::SET != rBoxLns[ nLns ]->GetFrmFmt()->
GetItemState( RES_BACKGROUND, true ))
pGCPara->pShareFmts->SetAttr( *rBoxLns[ nLns ], *pItem );
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 87d635187c9e..82d653a25006 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -618,7 +618,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
sal_uInt16 n;
for( n = RES_GRFATR_BEGIN; n < RES_GRFATR_END; ++n )
- if( SFX_ITEM_SET == ((SwAttrSetChg*)pOld)->GetChgSet()->
+ if( SfxItemState::SET == ((SwAttrSetChg*)pOld)->GetChgSet()->
GetItemState( n, false ))
{
CLEARCACHE( (SwGrfNode*) GetNode() )
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 546e86fddbc0..977dd406c37d 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -731,7 +731,7 @@ void SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
const SwTblBoxNumFormat* pNumFmtItem;
const SvNumberformat* pNumFormat = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, true,
+ if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, true,
(const SfxPoolItem**)&pNumFmtItem ) && pNFmtr &&
0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) )
pFmt->SetValueFormat( ((SvNumberformat*)pNumFormat)->GetFormatstring(),
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 8f5d1558f70e..0dd85ad45d0f 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -628,9 +628,9 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
}
// Delete the current Formula/Format/Value values
- if( SFX_ITEM_SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT ) ||
- SFX_ITEM_SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA ) ||
- SFX_ITEM_SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE ) )
+ if( SfxItemState::SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT ) ||
+ SfxItemState::SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA ) ||
+ SfxItemState::SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE ) )
{
pDstBox->ClaimFrmFmt()->ResetFmtAttr( RES_BOXATR_FORMAT,
RES_BOXATR_VALUE );
@@ -646,7 +646,7 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
{
const SfxPoolItem* pItem;
SvNumberFormatter* pN = pDoc->GetNumberFormatter( false );
- if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet.
+ if( pN && pN->HasMergeFmtTbl() && SfxItemState::SET == aBoxAttrSet.
GetItemState( RES_BOXATR_FORMAT, false, &pItem ) )
{
sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index b136668aace4..1ce8a372c978 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1973,7 +1973,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara)
{
const SfxPoolItem* pItem;
SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( false );
- if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet.
+ if( pN && pN->HasMergeFmtTbl() && SfxItemState::SET == aBoxAttrSet.
GetItemState( RES_BOXATR_FORMAT, false, &pItem ) )
{
sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
@@ -4438,7 +4438,7 @@ SwFrmFmt* SwShareBoxFmt::GetFormat( const SfxPoolItem& rItem ) const
SwFrmFmt *pRet = 0, *pTmp;
const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, false );
for( sal_uInt16 n = aNewFmts.size(); n; )
- if( SFX_ITEM_SET == ( pTmp = aNewFmts[ --n ])->
+ if( SfxItemState::SET == ( pTmp = aNewFmts[ --n ])->
GetItemState( nWhich, false, &pItem ) && *pItem == rItem &&
pTmp->GetFmtAttr( RES_FRM_SIZE, false ) == rFrmSz )
{
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 37ad94d5baea..59ef2fc5ffe1 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -146,7 +146,7 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT )
if( pBoxFmt == pBox->GetFrmFmt() ) // Create a new one?
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, false,
+ if( SfxItemState::SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, false,
&pItem ) && ((SwTblBoxFormula*)pItem)->IsIntrnlName() )
{
((SwTblBoxFormula*)pItem)->PtrToBoxNm( pCT->pOldTable );
@@ -158,7 +158,7 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT )
if( pBox->GetSttIdx() )
{
SvNumberFormatter* pN = pCT->pDoc->GetNumberFormatter( false );
- if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == pBoxFmt->
+ if( pN && pN->HasMergeFmtTbl() && SfxItemState::SET == pBoxFmt->
GetItemState( RES_BOXATR_FORMAT, false, &pItem ) )
{
sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
@@ -331,10 +331,10 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd )
{
// Special cases for Break-Attributes
const SfxPoolItem* pAttr;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pAttr ) )
+ if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pAttr ) )
aPgBrkSet.Put( *pAttr );
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pAttr ) )
+ if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pAttr ) )
aPgBrkSet.Put( *pAttr );
}
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index f8680b44b61d..7e265985b3a3 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -523,9 +523,9 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, bool bDelNodes )
{
const SwNodeIndex* pIdx = pFmt->GetCntnt( false ).GetCntntIdx();
const SfxPoolItem* pFtnEndAtTxtEnd;
- if( SFX_ITEM_SET != pFmt->GetItemState(
+ if( SfxItemState::SET != pFmt->GetItemState(
RES_FTN_AT_TXTEND, true, &pFtnEndAtTxtEnd ) ||
- SFX_ITEM_SET != pFmt->GetItemState(
+ SfxItemState::SET != pFmt->GetItemState(
RES_END_AT_TXTEND, true, &pFtnEndAtTxtEnd ))
pFtnEndAtTxtEnd = 0;
@@ -864,8 +864,8 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
{
// Move PageDesc/Break to the first Node of the section
const SfxItemSet& rSet = *pCpyTNd->GetpSwAttrSet();
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK ) ||
- SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC ))
+ if( SfxItemState::SET == rSet.GetItemState( RES_BREAK ) ||
+ SfxItemState::SET == rSet.GetItemState( RES_PAGEDESC ))
{
SfxItemSet aSet( rSet );
if( bInsAtStart )
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index b6473ac504fc..d5956b7e2001 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -400,7 +400,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
const SwAttrSet & aNdSet = pCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
+ if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -442,14 +442,14 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
{
const SfxItemSet* pNdSet = pNextNd->GetpSwAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, false,
+ if( SfxItemState::SET == pNdSet->GetItemState( RES_PAGEDESC, false,
&pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
pNextNd->ResetAttr( RES_PAGEDESC );
pNdSet = pNextNd->GetpSwAttrSet();
}
- if( pNdSet && SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, false,
+ if( pNdSet && SfxItemState::SET == pNdSet->GetItemState( RES_BREAK, false,
&pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
@@ -602,8 +602,8 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
const sal_uInt16* pIdx = aPropagateItems;
while ( *pIdx != 0 )
{
- if ( SFX_ITEM_SET != pTmpNd->GetSwAttrSet().GetItemState( *pIdx ) &&
- SFX_ITEM_SET == pAttrSet->GetItemState( *pIdx, true, &pItem ) )
+ if ( SfxItemState::SET != pTmpNd->GetSwAttrSet().GetItemState( *pIdx ) &&
+ SfxItemState::SET == pAttrSet->GetItemState( *pIdx, true, &pItem ) )
static_cast<SwCntntNode *>(pTmpNd)->SetAttr(*pItem);
++pIdx;
}
@@ -711,7 +711,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
+ if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -895,7 +895,7 @@ static void lcl_RemoveBreaks(SwCntntNode & rNode, SwTableFmt *const pTableFmt)
if (pSet)
{
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == pSet->GetItemState(RES_BREAK, false, &pItem))
+ if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false, &pItem))
{
if (pTableFmt)
{
@@ -906,7 +906,7 @@ static void lcl_RemoveBreaks(SwCntntNode & rNode, SwTableFmt *const pTableFmt)
}
if (pSet
- && (SFX_ITEM_SET == pSet->GetItemState(RES_PAGEDESC, false, &pItem))
+ && (SfxItemState::SET == pSet->GetItemState(RES_PAGEDESC, false, &pItem))
&& static_cast<SwFmtPageDesc const*>(pItem)->GetPageDesc())
{
if (pTableFmt)
@@ -1202,7 +1202,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
+ if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -1586,9 +1586,9 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// What about UNDO?
const SfxItemSet& rTblSet = pTblNd->pTable->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pBreak, *pDesc;
- if( SFX_ITEM_SET != rTblSet.GetItemState( RES_PAGEDESC, false, &pDesc ))
+ if( SfxItemState::SET != rTblSet.GetItemState( RES_PAGEDESC, false, &pDesc ))
pDesc = 0;
- if( SFX_ITEM_SET != rTblSet.GetItemState( RES_BREAK, false, &pBreak ))
+ if( SfxItemState::SET != rTblSet.GetItemState( RES_BREAK, false, &pBreak ))
pBreak = 0;
if( pBreak || pDesc )
@@ -2018,14 +2018,14 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
{
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC,
false, &pItem ) )
{
pNextNd->SetAttr( *pItem );
bSavePageDesc = true;
}
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK,
false, &pItem ) )
{
pNextNd->SetAttr( *pItem );
@@ -2067,11 +2067,11 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
{
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
}
@@ -3673,7 +3673,7 @@ static bool lcl_SetAFmtBox( _FndBox & rBox, _SetAFmtTabPara *pSetPara )
if( aBoxSet.Count() )
{
if( pSetPara->pUndo &&
- SFX_ITEM_SET == aBoxSet.GetItemState( RES_BOXATR_FORMAT ))
+ SfxItemState::SET == aBoxSet.GetItemState( RES_BOXATR_FORMAT ))
pSetPara->pUndo->SaveBoxCntnt( *pSetBox );
pSetBox->ClaimFrmFmt()->SetFmtAttr( aBoxSet );
@@ -3970,7 +3970,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, bool bCallUpdate )
{
// Optimization: If the Box says it's Text, it remains Text
const SfxPoolItem* pNumFmtItem = 0;
- if( SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
+ if( SfxItemState::SET == rBox.GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
false, &pNumFmtItem ) && GetNumberFormatter()->IsTextFormat(
((SwTblBoxNumFormat*)pNumFmtItem)->GetValue() ))
return ;
@@ -4055,9 +4055,9 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, bool bCallUpdate )
// It's not a number
const SfxPoolItem* pValueItem = 0, *pFmtItem = 0;
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)rBox.GetFrmFmt();
- if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMAT,
+ if( SfxItemState::SET == pBoxFmt->GetItemState( RES_BOXATR_FORMAT,
false, &pFmtItem ) ||
- SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_VALUE,
+ SfxItemState::SET == pBoxFmt->GetItemState( RES_BOXATR_VALUE,
false, &pValueItem ))
{
if (GetIDocumentUndoRedo().DoesUndo())
@@ -4116,13 +4116,13 @@ void SwDoc::SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet )
}
SwFrmFmt* pBoxFmt = rBox.ClaimFrmFmt();
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA ))
+ if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA ))
{
pBoxFmt->LockModify();
pBoxFmt->ResetFmtAttr( RES_BOXATR_VALUE );
pBoxFmt->UnlockModify();
}
- else if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE ))
+ else if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_VALUE ))
{
pBoxFmt->LockModify();
pBoxFmt->ResetFmtAttr( RES_BOXATR_FORMULA );
@@ -4150,7 +4150,7 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
RES_PARATR_BEGIN, RES_PARATR_END - 1,
0);
pTxtNode->SwCntntNode::GetAttr( rSet );
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE , false , &pFmtItem ) )
+ if ( SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE , false , &pFmtItem ) )
{
SwUndoDelNum * pUndo;
if( GetIDocumentUndoRedo().DoesUndo() )
@@ -4186,9 +4186,9 @@ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
const SfxPoolItem* pFmtItem = 0;
const SfxItemSet& rSet = pBox->GetFrmFmt()->GetAttrSet();
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, false, &pFmtItem ) ||
- SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA, false ) ||
- SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE, false ))
+ if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, false, &pFmtItem ) ||
+ SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA, false ) ||
+ SfxItemState::SET == rSet.GetItemState( RES_BOXATR_VALUE, false ))
{
if (GetIDocumentUndoRedo().DoesUndo())
{
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index dee8291e43a9..344d54eb620a 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -575,7 +575,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
bLeftValid = true, bRightValid = true;
// The Flags in the BoxInfo Item decide whether a BorderLine is valid!
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, false,
+ if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, false,
(const SfxPoolItem**)&pSetBoxInfo) )
{
pHori = pSetBoxInfo->GetHori();
@@ -591,7 +591,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
bRightValid = pSetBoxInfo->IsValid(VALID_RIGHT);
}
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, false,
+ if( SfxItemState::SET == rSet.GetItemState( RES_BOX, false,
(const SfxPoolItem**)&pSetBox) )
{
pLeft = pSetBox->GetLeft();
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index cc73f02836f7..00f82acf58dd 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -150,7 +150,7 @@ bool Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rN
// #i76273# Robust
SfxItemSet* pStyleNames = 0;
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
+ if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
@@ -198,7 +198,7 @@ bool Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
// #i76273# Robust
SfxItemSet* pStyleNames = 0;
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
+ if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
@@ -981,7 +981,7 @@ void SwCntntNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewV
case RES_ATTRSET_CHG:
if (GetNodes().IsDocNodes() && IsTxtNode() && pOldValue)
{
- if( SFX_ITEM_SET == ((SwAttrSetChg*)pOldValue)->GetChgSet()->GetItemState(
+ if( SfxItemState::SET == ((SwAttrSetChg*)pOldValue)->GetChgSet()->GetItemState(
RES_CHRATR_HIDDEN, false ) )
{
((SwTxtNode*)this)->SetCalcHiddenCharFlags();
@@ -1379,7 +1379,7 @@ bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
}
const SfxPoolItem* pFnd = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, false, &pFnd ) )
+ if( SfxItemState::SET == rSet.GetItemState( RES_AUTO_STYLE, false, &pFnd ) )
{
OSL_ENSURE( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
const SwFmtAutoFmt* pTmp = static_cast<const SwFmtAutoFmt*>(pFnd);
@@ -1408,7 +1408,7 @@ bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
// the string is empty.
const SfxPoolItem* pNameItem = 0;
if ( 0 != GetCondFmtColl() ||
- SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, false, &pNameItem ) ||
+ SfxItemState::SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, false, &pNameItem ) ||
static_cast<const SfxStringItem*>(pNameItem)->GetValue().isEmpty() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFmtColl(), GetFmtColl() );
else
@@ -1425,7 +1425,7 @@ bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
// If Modify is locked, do not send any Modifys
if ( IsModifyLocked() ||
( !GetDepends() &&
- SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, false ) ) )
+ SfxItemState::SET != rSet.GetItemState( RES_PARATR_NUMRULE, false ) ) )
{
// Some special treatment for Attributes
bRet = AttrSetHandleHelper::Put( mpAttrSet, *this, rSet );
@@ -1612,7 +1612,7 @@ const SfxPoolItem* SwCntntNode::GetNoCondAttr( sal_uInt16 nWhich,
const SfxPoolItem* pFnd = 0;
if( pCondColl && pCondColl->GetRegisteredIn() )
{
- if( !GetpSwAttrSet() || ( SFX_ITEM_SET != GetpSwAttrSet()->GetItemState(
+ if( !GetpSwAttrSet() || ( SfxItemState::SET != GetpSwAttrSet()->GetItemState(
nWhich, false, &pFnd ) && bInParents ))
((SwFmt*)GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd );
}
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 683c2d27976e..a4e829d5ee31 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -425,7 +425,7 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
SfxItemSet* pOldSet = ((SwAttrSetChg*)pOld)->GetChgSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pNewSet->GetItemState(
+ if( SfxItemState::SET == pNewSet->GetItemState(
RES_PROTECT, false, &pItem ) )
{
m_Data.SetProtectFlag( static_cast<SvxProtectItem const*>(pItem)
@@ -435,7 +435,7 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
}
// --> edit in readonly sections
- if( SFX_ITEM_SET == pNewSet->GetItemState(
+ if( SfxItemState::SET == pNewSet->GetItemState(
RES_EDIT_IN_READONLY, false, &pItem ) )
{
m_Data.SetEditInReadonlyFlag(
@@ -444,9 +444,9 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
pOldSet->ClearItem( RES_EDIT_IN_READONLY );
}
- if( SFX_ITEM_SET == pNewSet->GetItemState(
+ if( SfxItemState::SET == pNewSet->GetItemState(
RES_FTN_AT_TXTEND, false, &pItem ) ||
- SFX_ITEM_SET == pNewSet->GetItemState(
+ SfxItemState::SET == pNewSet->GetItemState(
RES_END_AT_TXTEND, false, &pItem ))
{
bUpdateFtn = true;
@@ -749,7 +749,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
SfxItemSet* pNewSet = ((SwAttrSetChg*)pNew)->GetChgSet();
SfxItemSet* pOldSet = ((SwAttrSetChg*)pOld)->GetChgSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pNewSet->GetItemState(
+ if( SfxItemState::SET == pNewSet->GetItemState(
RES_PROTECT, false, &pItem ))
{
ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
@@ -758,7 +758,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
}
// --> edit in readonly sections
- if( SFX_ITEM_SET == pNewSet->GetItemState(
+ if( SfxItemState::SET == pNewSet->GetItemState(
RES_EDIT_IN_READONLY, false, &pItem ) )
{
ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
@@ -766,14 +766,14 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
pOldSet->ClearItem( RES_EDIT_IN_READONLY );
}
- if( SFX_ITEM_SET == pNewSet->GetItemState(
+ if( SfxItemState::SET == pNewSet->GetItemState(
RES_FTN_AT_TXTEND, false, &pItem ))
{
ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_FTN_AT_TXTEND ), (SfxPoolItem*)pItem );
pNewSet->ClearItem( RES_FTN_AT_TXTEND );
pOldSet->ClearItem( RES_FTN_AT_TXTEND );
}
- if( SFX_ITEM_SET == pNewSet->GetItemState(
+ if( SfxItemState::SET == pNewSet->GetItemState(
RES_END_AT_TXTEND, false, &pItem ))
{
ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_END_AT_TXTEND ), (SfxPoolItem*)pItem );
@@ -1284,7 +1284,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
rSection.GetLinkFilePassword().isEmpty() )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == xDocSh->GetMedium()->GetItemSet()->
+ if( SfxItemState::SET == xDocSh->GetMedium()->GetItemSet()->
GetItemState( SID_PASSWORD, false, &pItem ) )
rSection.SetLinkFilePassword(
((SfxStringItem*)pItem)->GetValue() );
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 47d1a8de2591..d9c9af706e65 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1452,7 +1452,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if ( pNewAnchorFmt )
{
// Do not respond to a Reset Anchor !!!!!
- if ( SFX_ITEM_SET ==
+ if ( SfxItemState::SET ==
GetFmt()->GetAttrSet().GetItemState( RES_ANCHOR, false ) )
{
// no connect to layout during disconnection
@@ -1503,11 +1503,11 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
RES_OPAQUE == nWhich ||
RES_WRAP_INFLUENCE_ON_OBJPOS == nWhich ||
( RES_ATTRSET_CHG == nWhich &&
- ( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ ( SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_SURROUND, false ) ||
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_OPAQUE, false ) ||
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_WRAP_INFLUENCE_ON_OBJPOS, false ) ) ) )
{
lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
@@ -1519,15 +1519,15 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
// #i28701# - add attribute 'Follow text flow'
RES_FOLLOW_TEXT_FLOW == nWhich ||
( RES_ATTRSET_CHG == nWhich &&
- ( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ ( SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_LR_SPACE, false ) ||
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_UL_SPACE, false ) ||
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_HORI_ORIENT, false ) ||
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_VERT_ORIENT, false ) ||
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_FOLLOW_TEXT_FLOW, false ) ) ) )
{
lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 916a22c7aa50..5d828e1db39c 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -502,7 +502,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
( nAttrStart == *pAttrEnd || !nStart ))) )
{
const SfxPoolItem* pItem;
- if( !pDontExpItems || SFX_ITEM_SET != pDontExpItems->
+ if( !pDontExpItems || SfxItemState::SET != pDontExpItems->
GetItemState( pHt->Which(), false, &pItem ) ||
*pItem != pHt->GetAttr() )
{
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 110ab73b4f21..c1088a245897 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -978,7 +978,7 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText )
aSet.Put( *m_pCurTxtNd->GetpSwAttrSet() );
// take HeaderLine/TextBody only if centered or right aligned, otherwise only justification
SvxAdjustItem* pAdj;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_PARATR_ADJUST,
+ if( SfxItemState::SET == aSet.GetItemState( RES_PARATR_ADJUST,
false, (const SfxPoolItem**)&pAdj ))
{
SvxAdjust eAdj = pAdj->GetAdjust();
@@ -1023,11 +1023,11 @@ bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
return false;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pItem )
+ if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem )
&& SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
return true;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem )
+ if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem )
&& ((SwFmtPageDesc*)pItem)->GetPageDesc()
&& nsUseOnPage::PD_NONE != ((SwFmtPageDesc*)pItem)->GetPageDesc()->GetUseOn() )
return true;
@@ -2239,7 +2239,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
short nSz;
SvxLRSpaceItem* pLRSpace;
- if( SFX_ITEM_SET == m_pCurTxtNd->GetSwAttrSet().
+ if( SfxItemState::SET == m_pCurTxtNd->GetSwAttrSet().
GetItemState( RES_LR_SPACE, true,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
@@ -2477,7 +2477,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
short nSz;
SvxLRSpaceItem* pLRSpace;
if( bReplaceStyles &&
- SFX_ITEM_SET == m_pCurTxtNd->GetSwAttrSet().
+ SfxItemState::SET == m_pCurTxtNd->GetSwAttrSet().
GetItemState( RES_LR_SPACE, false,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 1a02d9fd0715..4d703e939120 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -103,9 +103,9 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, bool bReset)
// Do NOT copy AutoNumRules into the template
const SfxPoolItem* pItem;
const SwNumRule* pRule = 0;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false ) ||
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,false ) ||
- ( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
+ if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false ) ||
+ SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC,false ) ||
+ ( SfxItemState::SET == pSet->GetItemState( RES_PARATR_NUMRULE,
false, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() )
@@ -115,7 +115,7 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, bool bReset)
aSet.ClearItem( RES_BREAK );
aSet.ClearItem( RES_PAGEDESC );
- if( pRule || (SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
+ if( pRule || (SfxItemState::SET == pSet->GetItemState( RES_PARATR_NUMRULE,
false, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() ))
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index e0ec77c66725..96324535832d 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -45,7 +45,7 @@ SwCharFmt* SwEditShell::GetCurCharFmt() const
SfxItemSet aSet( GetDoc()->GetAttrPool(), RES_TXTATR_CHARFMT,
RES_TXTATR_CHARFMT );
const SfxPoolItem* pItem;
- if( GetCurAttr( aSet ) && SFX_ITEM_SET ==
+ if( GetCurAttr( aSet ) && SfxItemState::SET ==
aSet.GetItemState( RES_TXTATR_CHARFMT, false, &pItem ) )
pFmt = ((SwFmtCharFmt*)pItem)->GetCharFmt();
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index f401746614a2..d874c567d525 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -232,7 +232,7 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
const SfxItemSet& rSet )
{
StartAllAction();
- if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, false))
+ if(SfxItemState::SET == rSet.GetItemState(RES_CNTNT, false))
{
SfxItemSet aSet(rSet);
aSet.ClearItem(RES_CNTNT);
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 511d9563fabe..d4066b4591d9 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -353,7 +353,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
}
// When setting a formula, do not check further!
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA ))
+ if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA ))
ClearTblBoxCntnt();
StartAllAction();
@@ -386,7 +386,7 @@ bool SwEditShell::IsTableBoxTextFormat() const
sal_uInt32 nFmt = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet().GetItemState(
+ if( SfxItemState::SET == pBox->GetFrmFmt()->GetAttrSet().GetItemState(
RES_BOXATR_FORMAT, true, &pItem ))
{
nFmt = ((SwTblBoxNumFormat*)pItem)->GetValue();
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 2bead09c28ab..a9a01d8362af 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -103,7 +103,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
SwDoc* pDoc = GetFrmFmt()->GetDoc();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == GetFrmFmt()->GetItemState(
+ if( SfxItemState::SET == GetFrmFmt()->GetItemState(
RES_BOXATR_FORMULA, false, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // reset status
@@ -120,7 +120,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
SfxItemSet aTmp( pDoc->GetAttrPool(),
RES_BOXATR_BEGIN,RES_BOXATR_END-1 );
aTmp.Put( SwTblBoxValue( nRet ) );
- if( SFX_ITEM_SET != pFmt->GetItemState( RES_BOXATR_FORMAT ))
+ if( SfxItemState::SET != pFmt->GetItemState( RES_BOXATR_FORMAT ))
aTmp.Put( SwTblBoxNumFormat( 0 ));
pFmt->SetFmtAttr( aTmp );
}
@@ -130,7 +130,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
nRet = GetFrmFmt()->GetTblBoxValue().GetValue();
break;
}
- else if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
+ else if( SfxItemState::SET == pBox->GetFrmFmt()->GetItemState(
RES_BOXATR_VALUE, false, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // reset status
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index a542f43f9d67..0f77236214fa 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -652,14 +652,14 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchValid,
const_cast<SfxItemSet&>(rSet).Put( SwFmtAnchor( FLY_AT_PAGE, 1 ) );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_HORI_ORIENT, false, &pItem )
+ if( SfxItemState::SET == rSet.GetItemState( RES_HORI_ORIENT, false, &pItem )
&& text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient() )
{
bHOriChgd = true;
aOldH = *((SwFmtHoriOrient*)pItem);
((SfxItemSet&)rSet).Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT ) );
}
- if( SFX_ITEM_SET == rSet.GetItemState( RES_VERT_ORIENT, false, &pItem )
+ if( SfxItemState::SET == rSet.GetItemState( RES_VERT_ORIENT, false, &pItem )
&& text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
bVOriChgd = true;
@@ -760,7 +760,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName,
if( pFlyAttrSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pFlyAttrSet->GetItemState( RES_ANCHOR, false,
+ if( SfxItemState::SET == pFlyAttrSet->GetItemState( RES_ANCHOR, false,
&pItem ) )
{
SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem;
@@ -993,7 +993,7 @@ bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
// now examine all attributes. Remove forbidden attributes, then
// get all remaining attributes and enter them
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false, &pItem ) )
+ if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false, &pItem ) )
{
SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem;
RndStdIds eType = pAnchor->GetAnchorId();
@@ -1038,7 +1038,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
StartAllAction();
const Point aPt( pFly->Frm().Pos() );
- if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false ))
+ if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false ))
sw_ChkAndSetNewAnchor( *this, *pFly, rSet );
SwFlyFrmFmt* pFlyFmt = (SwFlyFrmFmt*)pFly->GetFmt();
@@ -1074,7 +1074,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
SwFrmFmt *pFmt = FindFrmFmt( pObj );
StartAllAction();
- if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false ))
+ if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false ))
{
RndStdIds nNew = ((SwFmtAnchor&)rSet.Get( RES_ANCHOR )).GetAnchorId();
if ( nNew != pFmt->GetAnchor().GetAnchorId() )
@@ -1176,7 +1176,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, bool bKeepOrient, Point* pDocPos )
SfxItemSet* pSet = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pNewFmt->GetItemState( RES_ANCHOR, false, &pItem ))
+ if( SfxItemState::SET == pNewFmt->GetItemState( RES_ANCHOR, false, &pItem ))
{
pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange );
pSet->Put( *pItem );
@@ -1772,10 +1772,10 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam
std::max( nWidth, long(MINFLY) ),
std::max( nHeight, long(MINFLY) )));
- if( SFX_ITEM_SET != aFrmSet.GetItemState( RES_HORI_ORIENT ))
+ if( SfxItemState::SET != aFrmSet.GetItemState( RES_HORI_ORIENT ))
aFrmSet.Put( SwFmtHoriOrient( aRelPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME ));
- if( SFX_ITEM_SET != aFrmSet.GetItemState( RES_VERT_ORIENT ))
+ if( SfxItemState::SET != aFrmSet.GetItemState( RES_VERT_ORIENT ))
aFrmSet.Put( SwFmtVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME ));
}
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index d64686fd187d..6c4a84ab8ef7 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1028,7 +1028,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet()
+ if( SfxItemState::SET == pBox->GetFrmFmt()->GetAttrSet()
.GetItemState( RES_BOX, false, &pItem ))
{
SvxBoxItem aBox( *(SvxBoxItem*)pItem );
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index a79b7a0bf29d..7b06f096c689 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -61,7 +61,7 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
const SwFmtAnchor *pAnch = 0;
- if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
+ if( RES_ATTRSET_CHG == nWhich && SfxItemState::SET ==
((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false,
(const SfxPoolItem**)&pAnch ))
; // The anchor pointer is set at GetItemState!
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 14e0ad9698c8..ebd6a6963f3b 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -87,9 +87,9 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if (RES_ATTRSET_CHG == nWhich && pNew)
{
if(pOld &&
- (SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
+ (SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
GetItemState(RES_SURROUND, false) ||
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
GetItemState(RES_FRMMACRO, false)) )
{
SwAttrSetChg aOld( *(SwAttrSetChg*)pOld );
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 0119113cc566..4ece4e32bdc8 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -470,7 +470,7 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
SwFmtAnchor *pAnch = 0;
- if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
+ if( RES_ATTRSET_CHG == nWhich && SfxItemState::SET ==
((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false,
(const SfxPoolItem**)&pAnch ))
; // GetItemState sets the anchor pointer!
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index c031e55d0aef..4196995663a0 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -7562,7 +7562,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
pGlobalShell = pSh;
bool bNoteURL = pMap &&
- SFX_ITEM_SET != GetAttrSet().GetItemState( RES_URL, true );
+ SfxItemState::SET != GetAttrSet().GetItemState( RES_URL, true );
if( bNoteURL )
{
OSL_ENSURE( !pNoteURL, "MakeGraphic: pNoteURL already used? " );
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 612525d8227c..06f38c7f6605 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4923,7 +4923,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
if ( ( bAttrSetChg && pNew &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) ||
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) ||
( pNew && RES_PROTECT == pNew->Which()) )
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
@@ -4932,7 +4932,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
if ( bAttrSetChg && pNew &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, false, &pItem ) )
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, false, &pItem ) )
{
SetDerivedVert( false );
CheckDirChange();
@@ -4940,7 +4940,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
// #i29550#
if ( bAttrSetChg && pNew &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) )
+ SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) )
{
SwFrm* pTmpUpper = GetUpper();
while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrm() )
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 84faf97c682c..fed406ad330b 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -212,7 +212,7 @@ void SwCellFrm::CheckDirection( bool bVert )
// Check if the item is set, before actually
// using it. Otherwise the dynamic pool default is used, which may be set
// to LTR in case of OOo 1.0 documents.
- if( pFmt && SFX_ITEM_SET == pFmt->GetItemState( RES_FRAMEDIR, true, &pItem ) )
+ if( pFmt && SfxItemState::SET == pFmt->GetItemState( RES_FRAMEDIR, true, &pItem ) )
{
const SvxFrameDirectionItem* pFrmDirItem = static_cast<const SvxFrameDirectionItem*>(pItem);
const SwViewShell *pSh = getRootFrm()->GetCurrShell();
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 2237de6e5fd0..d45402cbe1c2 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -386,7 +386,7 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if( RES_ATTRSET_CHG == nWhich )
{
- if (pOld && pNew && SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
+ if (pOld && pNew && SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
RES_FRM_SIZE, false, (const SfxPoolItem**)&pNewSize))
{
pOldSize = &((SwAttrSetChg*)pOld)->GetChgSet()->GetFrmSize();
@@ -1718,8 +1718,8 @@ SwTableBoxFmt* SwTableBox::CheckBoxFmt( SwTableBoxFmt* pFmt )
{
// We might need to create a new format here, because the box must be
// added to the format solely if pFmt has a value or formular.
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) ||
- SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false ) )
+ if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) ||
+ SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false ) )
{
SwTableBox* pOther = SwIterator<SwTableBox,SwFmt>::FirstElement( *pFmt );
if( pOther )
@@ -1985,7 +1985,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rTxt, const Color* pCol,
}
// assign color or save "user color"
- if( !pTNd->GetpSwAttrSet() || SFX_ITEM_SET != pTNd->GetpSwAttrSet()->
+ if( !pTNd->GetpSwAttrSet() || SfxItemState::SET != pTNd->GetpSwAttrSet()->
GetItemState( RES_CHRATR_COLOR, false, &pItem ))
pItem = 0;
@@ -2062,7 +2062,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rTxt, const Color* pCol,
// assign vertical orientation
if( bChgAlign &&
- ( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(
+ ( SfxItemState::SET != rBox.GetFrmFmt()->GetItemState(
RES_VERT_ORIENT, true, &pItem ) ||
text::VertOrientation::TOP == ((SwFmtVertOrient*)pItem)->GetVertOrient() ))
{
@@ -2105,7 +2105,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
const SfxItemSet* pAttrSet = pTNd->GetpSwAttrSet();
// assign adjustment
- if( bChgAlign && pAttrSet && SFX_ITEM_SET == pAttrSet->GetItemState(
+ if( bChgAlign && pAttrSet && SfxItemState::SET == pAttrSet->GetItemState(
RES_PARATR_ADJUST, false, &pItem ) &&
SVX_ADJUST_RIGHT == ((SvxAdjustItem*)pItem)->GetAdjust() )
{
@@ -2113,7 +2113,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
}
// assign color or save "user color"
- if( !pAttrSet || SFX_ITEM_SET != pAttrSet->
+ if( !pAttrSet || SfxItemState::SET != pAttrSet->
GetItemState( RES_CHRATR_COLOR, false, &pItem ))
pItem = 0;
@@ -2151,7 +2151,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
// assign vertical orientation
if( bChgAlign &&
- SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState(
+ SfxItemState::SET == rBox.GetFrmFmt()->GetItemState(
RES_VERT_ORIENT, false, &pItem ) &&
text::VertOrientation::BOTTOM == ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
@@ -2175,7 +2175,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
case RES_ATTRSET_CHG:
{
const SfxItemSet& rSet = *((SwAttrSetChg*)pNew)->GetChgSet();
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT,
+ if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT,
false, (const SfxPoolItem**)&pNewFmt ) )
nOldFmt = ((SwTblBoxNumFormat&)((SwAttrSetChg*)pOld)->
GetChgSet()->Get( RES_BOXATR_FORMAT )).GetValue();
@@ -2203,9 +2203,9 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty(true, NULL, 0);
- if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMAT, false ) ||
- SFX_ITEM_SET == GetItemState( RES_BOXATR_VALUE, false ) ||
- SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, false ) )
+ if( SfxItemState::SET == GetItemState( RES_BOXATR_FORMAT, false ) ||
+ SfxItemState::SET == GetItemState( RES_BOXATR_VALUE, false ) ||
+ SfxItemState::SET == GetItemState( RES_BOXATR_FORMULA, false ) )
{
// fetch the box
SwIterator<SwTableBox,SwFmt> aIter( *this );
@@ -2220,7 +2220,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
nNewFmt = pNewFmt->GetValue();
// new formatting
// is it newer or has the current been removed?
- if( SFX_ITEM_SET != GetItemState( RES_BOXATR_VALUE, false ))
+ if( SfxItemState::SET != GetItemState( RES_BOXATR_VALUE, false ))
pNewFmt = 0;
}
else
@@ -2237,7 +2237,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
if( NUMBERFORMAT_TEXT != nNewFmt )
{
- if( SFX_ITEM_SET == GetItemState(
+ if( SfxItemState::SET == GetItemState(
RES_BOXATR_VALUE, false ))
nOldFmt = NUMBERFORMAT_TEXT;
else
@@ -2265,7 +2265,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
bool bChgTxt = true;
double fVal = 0;
- if( !pNewVal && SFX_ITEM_SET != GetItemState(
+ if( !pNewVal && SfxItemState::SET != GetItemState(
RES_BOXATR_VALUE, false, (const SfxPoolItem**)&pNewVal ))
{
// so far, no value has been set, so try to evaluate the content
@@ -2368,7 +2368,7 @@ bool SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
SvNumberFormatter* pNumFmtr = GetFrmFmt()->GetDoc()->GetNumberFormatter();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
+ if( SfxItemState::SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
false, &pItem ))
{
rFmtIndex = ((SwTblBoxNumFormat*)pItem)->GetValue();
@@ -2396,15 +2396,15 @@ bool SwTableBox::IsNumberChanged() const
{
bool bRet = true;
- if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, false ))
+ if( SfxItemState::SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, false ))
{
const SwTblBoxNumFormat *pNumFmt;
const SwTblBoxValue *pValue;
- if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false,
+ if( SfxItemState::SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false,
(const SfxPoolItem**)&pValue ))
pValue = 0;
- if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, false,
+ if( SfxItemState::SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, false,
(const SfxPoolItem**)&pNumFmt ))
pNumFmt = 0;
@@ -2512,9 +2512,9 @@ sal_uInt16 SwTableBox::IsFormulaOrValueBox() const
sal_uInt16 nWhich = 0;
const SwTxtNode* pTNd;
SwFrmFmt* pFmt = GetFrmFmt();
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false ))
+ if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false ))
nWhich = RES_BOXATR_FORMULA;
- else if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) &&
+ else if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) &&
!pFmt->GetDoc()->GetNumberFormatter()->IsTextFormat(
pFmt->GetTblBoxNumFmt().GetValue() ))
nWhich = RES_BOXATR_VALUE;
@@ -2530,8 +2530,8 @@ void SwTableBox::ActualiseValueBox()
{
const SfxPoolItem *pFmtItem, *pValItem;
SwFrmFmt* pFmt = GetFrmFmt();
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT, true, &pFmtItem )
- && SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, true, &pValItem ))
+ if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMAT, true, &pFmtItem )
+ && SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE, true, &pValItem ))
{
const sal_uLong nFmtId = ((SwTblBoxNumFormat*)pFmtItem)->GetValue();
sal_uLong nNdPos = ULONG_MAX;
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 83767a709d70..68b8d4c3c866 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1745,7 +1745,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const SwFrmFmt* pFrmFmt = (*pTbl)[n];
const SfxPoolItem* pItem;
if ( RES_DRAWFRMFMT != pFrmFmt->Which() &&
- SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, true, &pItem ) )
+ SfxItemState::SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, true, &pItem ) )
{
const SwPageFrm* pCurrPage =
static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() );
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 14e671798046..8590ecfd93cb 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -167,7 +167,7 @@ const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich )
bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which();
const SfxPoolItem* pItem;
- bool bRet = SFX_ITEM_SET == pSet->GetItemState( nWhich, bInParent, &pItem );
+ bool bRet = SfxItemState::SET == pSet->GetItemState( nWhich, bInParent, &pItem );
return bRet ? pItem : 0;
}
@@ -182,7 +182,7 @@ bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr )
const SfxItemSet* pItemSet = CharFmt::GetItemSet( pAttr->GetAttr() );
if ( pItemSet )
- bRet = SFX_ITEM_SET == pItemSet->GetItemState( nWhich, true );
+ bRet = SfxItemState::SET == pItemSet->GetItemState( nWhich, true );
return bRet;
}
@@ -427,7 +427,7 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
{
const SfxPoolItem* pItem;
- bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem );
+ bool bRet = SfxItemState::SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem );
if ( bRet )
{
@@ -503,7 +503,7 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
{
const SfxPoolItem* pItem;
- bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem );
+ bool bRet = SfxItemState::SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem );
if ( bRet )
{
// we remove rAttr from the appropriate stack
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 94156d55a581..6866cada566d 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1411,7 +1411,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
const SfxPoolItem* pItem;
sal_uInt16 nDir = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ROTATE,
+ if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE,
true, &pItem ))
nDir = ((SvxCharRotateItem*)pItem)->GetValue();
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index f861a0b810fa..8870f5810d1f 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2057,7 +2057,7 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTxtNode& rNode, MultiSelecti
|| (rNode.GetTxt().getLength() == rHiddenMulti.GetTotalRange().Len()));
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) &&
+ if( SfxItemState::SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) &&
((SvxCharHiddenItem*)pItem)->GetValue() )
{
rHiddenMulti.SelectAll();
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 8aa72f74f382..eb569db84723 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -833,7 +833,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
const SvxCharRotateItem* pRotate = NULL;
const SfxPoolItem* pRotItem;
- if( SFX_ITEM_SET == m_pFrm->GetTxtNode()->GetSwAttrSet().
+ if( SfxItemState::SET == m_pFrm->GetTxtNode()->GetSwAttrSet().
GetItemState( RES_CHRATR_ROTATE, true, &pRotItem ) &&
((SvxCharRotateItem*)pRotItem)->GetValue() )
pRotate = (SvxCharRotateItem*)pRotItem;
@@ -844,7 +844,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
if( !pLclTxtNode )
return NULL;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pLclTxtNode->GetSwAttrSet().
+ if( SfxItemState::SET == pLclTxtNode->GetSwAttrSet().
GetItemState( RES_CHRATR_TWO_LINES, true, &pItem ) &&
((SvxTwoLinesItem*)pItem)->GetValue() )
p2Lines = (SvxTwoLinesItem*)pItem;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 8427364d38e7..3a3155424bac 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -253,7 +253,7 @@ short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
{
const SfxPoolItem* pItem;
if( ( nWhich < RES_CHRATR_END ) &&
- ( SFX_ITEM_SET == pSet->GetItemState( nWhich, true, &pItem ) ) )
+ ( SfxItemState::SET == pSet->GetItemState( nWhich, true, &pItem ) ) )
{
SwTxtAttr* pAttr = MakeRedlineTxtAttr(
const_cast<SwDoc&>(rDoc),
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 0c0e311a8aaf..fc7aeb00bece 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1085,7 +1085,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
int nClear = 0;
sal_uInt16 nCount = rNewSet.Count();
- if( SFX_ITEM_SET == rNewSet.GetItemState( RES_TXTATR_FTN, false, &pItem ))
+ if( SfxItemState::SET == rNewSet.GetItemState( RES_TXTATR_FTN, false, &pItem ))
{
nPos = ((SwFmtFtn*)pItem)->GetTxtFtn()->GetStart();
if( IsIdxInside( nPos, 1 ) )
@@ -1094,7 +1094,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
--nCount;
}
- if( SFX_ITEM_SET == rNewSet.GetItemState( RES_TXTATR_FIELD, false, &pItem ))
+ if( SfxItemState::SET == rNewSet.GetItemState( RES_TXTATR_FIELD, false, &pItem ))
{
nPos = ((SwFmtFld*)pItem)->GetTxtFld()->GetStart();
if( IsIdxInside( nPos, 1 ) )
@@ -1112,9 +1112,9 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
nClear |= 0x02;
--nCount;
}
- bool bLineSpace = SFX_ITEM_SET == rNewSet.GetItemState(
+ bool bLineSpace = SfxItemState::SET == rNewSet.GetItemState(
RES_PARATR_LINESPACING, false ),
- bRegister = SFX_ITEM_SET == rNewSet.GetItemState(
+ bRegister = SfxItemState::SET == rNewSet.GetItemState(
RES_PARATR_REGISTER, false );
if ( bLineSpace || bRegister )
{
@@ -1144,7 +1144,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if ( bRegister )
--nCount;
}
- if ( SFX_ITEM_SET == rNewSet.GetItemState( RES_PARATR_SPLIT,
+ if ( SfxItemState::SET == rNewSet.GetItemState( RES_PARATR_SPLIT,
false ))
{
if ( GetPrev() )
@@ -1155,7 +1155,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
--nCount;
}
- if( SFX_ITEM_SET == rNewSet.GetItemState( RES_BACKGROUND, false)
+ if( SfxItemState::SET == rNewSet.GetItemState( RES_BACKGROUND, false)
&& !IsFollow() && GetDrawObjs() )
{
SwSortedObjs *pObjs = GetDrawObjs();
@@ -1188,27 +1188,27 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
}
- if ( SFX_ITEM_SET ==
+ if ( SfxItemState::SET ==
rNewSet.GetItemState( RES_TXTATR_CHARFMT, false ) )
{
lcl_SetWrong( *this, 0, COMPLETE_STRING, false );
lcl_SetScriptInval( *this, 0 );
}
- else if ( SFX_ITEM_SET ==
+ else if ( SfxItemState::SET ==
rNewSet.GetItemState( RES_CHRATR_LANGUAGE, false ) ||
- SFX_ITEM_SET ==
+ SfxItemState::SET ==
rNewSet.GetItemState( RES_CHRATR_CJK_LANGUAGE, false ) ||
- SFX_ITEM_SET ==
+ SfxItemState::SET ==
rNewSet.GetItemState( RES_CHRATR_CTL_LANGUAGE, false ) )
lcl_SetWrong( *this, 0, COMPLETE_STRING, false );
- else if ( SFX_ITEM_SET ==
+ else if ( SfxItemState::SET ==
rNewSet.GetItemState( RES_CHRATR_FONT, false ) ||
- SFX_ITEM_SET ==
+ SfxItemState::SET ==
rNewSet.GetItemState( RES_CHRATR_CJK_FONT, false ) ||
- SFX_ITEM_SET ==
+ SfxItemState::SET ==
rNewSet.GetItemState( RES_CHRATR_CTL_FONT, false ) )
lcl_SetScriptInval( *this, 0 );
- else if ( SFX_ITEM_SET ==
+ else if ( SfxItemState::SET ==
rNewSet.GetItemState( RES_FRAMEDIR, false ) )
{
SetDerivedR2L( false );
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index d9cf3dcc6784..e9ae8e28b4bd 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1279,14 +1279,14 @@ SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
// set the correct rotation at the footnote font
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ROTATE,
+ if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE,
true, &pItem ))
pFnt->SetVertical( ((SvxCharRotateItem*)pItem)->GetValue(),
rInf.GetTxtFrm()->IsVertical() );
pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() );
- if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
+ if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
pFnt->SetBackColor( new Color( ((SvxBrushItem*)pItem)->GetColor() ) );
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index c05bc4e908ff..83f6c9864927 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -591,7 +591,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
//zu weiteren Folgefehlern, die mit Laufzeitkosten geloest werden
//muesten. #56977# #55001# #56135#
const SfxPoolItem *pItem;
- if( GetDepends() && SFX_ITEM_SET == pNode->GetSwAttrSet().
+ if( GetDepends() && SfxItemState::SET == pNode->GetSwAttrSet().
GetItemState( RES_PAGEDESC, true, &pItem ) )
{
pNode->ModifyNotification( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
@@ -2488,7 +2488,7 @@ SwNumRule* SwTxtNode::_GetNumRule(bool bInParent) const
{
if ( pRet && pRet == GetDoc()->GetOutlineNumRule() &&
( !HasSwAttrSet() ||
- SFX_ITEM_SET !=
+ SfxItemState::SET !=
GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, false ) ) )
{
SwTxtFmtColl* pColl = GetTxtColl();
@@ -2585,7 +2585,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext,
else
aClearWhichIds.push_back( RES_PAGEDESC );
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_BREAK, false ) )
+ if( SfxItemState::SET == pTmpSet->GetItemState( RES_BREAK, false ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_BREAK );
@@ -2593,7 +2593,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext,
aClearWhichIds.push_back( RES_BREAK );
bRemoveFromCache = true;
}
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_KEEP, false ) )
+ if( SfxItemState::SET == pTmpSet->GetItemState( RES_KEEP, false ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_KEEP );
@@ -2601,7 +2601,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext,
aClearWhichIds.push_back( RES_KEEP );
bRemoveFromCache = true;
}
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, false ) )
+ if( SfxItemState::SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, false ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_PARATR_SPLIT );
@@ -2609,7 +2609,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext,
aClearWhichIds.push_back( RES_PARATR_SPLIT );
bRemoveFromCache = true;
}
- if(SFX_ITEM_SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, false))
+ if(SfxItemState::SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, false))
{
SwNumRule * pRule = GetNumRule();
@@ -3508,7 +3508,7 @@ namespace {
const SwAttrSetChg* pSet = dynamic_cast<const SwAttrSetChg*>(pNewValue);
if ( pSet && pSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, false, &pItem ) ==
- SFX_ITEM_SET )
+ SfxItemState::SET )
{
// #i70748#
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
@@ -3810,7 +3810,7 @@ void SwTxtNode::SetAttrListLevel( int nLevel )
bool SwTxtNode::HasAttrListLevel() const
{
return GetpSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, false ) == SFX_ITEM_SET;
+ GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, false ) == SfxItemState::SET;
}
int SwTxtNode::GetAttrListLevel() const
@@ -3897,7 +3897,7 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber
bool SwTxtNode::HasAttrListRestartValue() const
{
return GetpSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, false ) == SFX_ITEM_SET;
+ GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, false ) == SfxItemState::SET;
}
SwNumberTree::tSwNumTreeNumber SwTxtNode::GetAttrListRestartValue() const
{
@@ -4096,13 +4096,13 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
bAreListLevelIndentsApplicable = false;
}
else if ( HasSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET )
+ GetpSwAttrSet()->GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET )
{
// paragraph has hard-set indent attributes
bAreListLevelIndentsApplicable = false;
}
else if ( HasSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET )
+ GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET )
{
// list style is directly applied to paragraph and paragraph has no
// hard-set indent attributes
@@ -4117,14 +4117,14 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
const SwTxtFmtColl* pColl = GetTxtColl();
while ( pColl )
{
- if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET )
{
// indent attributes found in the paragraph style hierarchy.
bAreListLevelIndentsApplicable = false;
break;
}
- if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET )
{
// paragraph style with the list style found and until now no
// indent attributes are found in the paragraph style hierarchy.
@@ -4414,7 +4414,7 @@ namespace {
{
const SfxPoolItem* pItem = 0;
// handle RES_PARATR_NUMRULE
- if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, false, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, false, &pItem ) == SfxItemState::SET )
{
mrTxtNode.RemoveFromList();
@@ -4429,7 +4429,7 @@ namespace {
}
// handle RES_PARATR_LIST_ID
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SfxItemState::SET )
{
const SfxStringItem* pListIdItem =
dynamic_cast<const SfxStringItem*>(pItem);
@@ -4446,7 +4446,7 @@ namespace {
}
// handle RES_PARATR_LIST_LEVEL
- if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, false, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, false, &pItem ) == SfxItemState::SET )
{
const SfxInt16Item* pListLevelItem =
dynamic_cast<const SfxInt16Item*>(pItem);
@@ -4457,7 +4457,7 @@ namespace {
}
// handle RES_PARATR_LIST_ISRESTART
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, false, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, false, &pItem ) == SfxItemState::SET )
{
const SfxBoolItem* pListIsRestartItem =
dynamic_cast<const SfxBoolItem*>(pItem);
@@ -4468,7 +4468,7 @@ namespace {
}
// handle RES_PARATR_LIST_RESTARTVALUE
- if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, false, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, false, &pItem ) == SfxItemState::SET )
{
const SfxInt16Item* pListRestartValueItem =
dynamic_cast<const SfxInt16Item*>(pItem);
@@ -4480,7 +4480,7 @@ namespace {
}
// handle RES_PARATR_LIST_ISCOUNTED
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, false, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, false, &pItem ) == SfxItemState::SET )
{
const SfxBoolItem* pIsCountedInListItem =
dynamic_cast<const SfxBoolItem*>(pItem);
@@ -4493,7 +4493,7 @@ namespace {
// #i70748#
// handle RES_PARATR_OUTLINELEVEL
- if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, false, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, false, &pItem ) == SfxItemState::SET )
{
const SfxUInt16Item* pOutlineLevelItem =
dynamic_cast<const SfxUInt16Item*>(pItem);
@@ -4549,7 +4549,7 @@ namespace {
const SfxPoolItem* pItem = 0;
if ( mrTxtNode.GetSwAttrSet().GetItemState( RES_PARATR_NUMRULE,
true, &pItem )
- != SFX_ITEM_SET )
+ != SfxItemState::SET )
{
mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
}
@@ -4645,7 +4645,7 @@ namespace {
else if ( nWhich1 <= RES_PARATR_LIST_ID && RES_PARATR_LIST_ID <= nWhich2 )
{
bRemoveFromList = mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SFX_ITEM_SET;
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET;
// #i92898#
mbListStyleOrIdReset = true;
}
@@ -4688,7 +4688,7 @@ namespace {
else if ( nWhich1 == RES_PARATR_LIST_ID )
{
bRemoveFromList = mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SFX_ITEM_SET;
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET;
// #i92898#
mbListStyleOrIdReset = true;
}
@@ -4747,7 +4747,7 @@ namespace {
{
bRemoveFromList = bRemoveFromList ||
( mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SFX_ITEM_SET );
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET );
// #i92898#
mbListStyleOrIdReset = true;
}
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index d7c57b72db2f..e38abb92a43c 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -487,7 +487,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
if( pAttrSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONT,
true, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
@@ -497,7 +497,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_LATIN].Font::SetPitch( pFont->GetPitch() );
aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE,
true, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
@@ -507,17 +507,17 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aTmpSize.Height() = pHeight->GetHeight();
aSub[SW_LATIN].SetSize( aTmpSize );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
true, &pItem ))
aSub[SW_LATIN].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT,
true, &pItem ))
aSub[SW_LATIN].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE,
true, &pItem ))
aSub[SW_LATIN].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT,
true, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
@@ -527,7 +527,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CJK].Font::SetPitch( pFont->GetPitch() );
aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE,
true, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
@@ -537,13 +537,13 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aTmpSize.Height() = pHeight->GetHeight();
aSub[SW_CJK].SetSize( aTmpSize );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
true, &pItem ))
aSub[SW_CJK].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT,
true, &pItem ))
aSub[SW_CJK].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE,
true, &pItem ))
{
LanguageType eNewLang = ((SvxLanguageItem*)pItem)->GetLanguage();
@@ -553,7 +553,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT,
true, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
@@ -563,7 +563,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CTL].Font::SetPitch( pFont->GetPitch() );
aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE,
true, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
@@ -573,53 +573,53 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aTmpSize.Height() = pHeight->GetHeight();
aSub[SW_CTL].SetSize( aTmpSize );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
true, &pItem ))
aSub[SW_CTL].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT,
true, &pItem ))
aSub[SW_CTL].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE,
true, &pItem ))
aSub[SW_CTL].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE,
true, &pItem ))
{
SetUnderline( ((SvxUnderlineItem*)pItem)->GetLineStyle() );
SetUnderColor( ((SvxUnderlineItem*)pItem)->GetColor() );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE,
true, &pItem ))
{
SetOverline( ((SvxOverlineItem*)pItem)->GetLineStyle() );
SetOverColor( ((SvxOverlineItem*)pItem)->GetColor() );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT,
true, &pItem ))
SetStrikeout( ((SvxCrossedOutItem*)pItem)->GetStrikeout() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_COLOR,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_COLOR,
true, &pItem ))
SetColor( ((SvxColorItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK,
true, &pItem ))
SetEmphasisMark( ((SvxEmphasisMarkItem*)pItem)->GetEmphasisMark() );
SetTransparent( true );
SetAlign( ALIGN_BASELINE );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR,
true, &pItem ))
SetOutline( ((SvxContourItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
true, &pItem ))
SetShadow( ((SvxShadowedItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF,
true, &pItem ))
SetRelief( (FontRelief)((SvxCharReliefItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
true, &pItem ))
SetPropWidth(((SvxShadowedItem*)pItem)->GetValue() ? 50 : 100 );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN,
true, &pItem ))
{
if( ((SvxAutoKernItem*)pItem)->GetValue() )
@@ -632,11 +632,11 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
else
SetAutoKern( 0 );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE,
true, &pItem ))
SetWordLineMode( ((SvxWordLineModeItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT,
true, &pItem ))
{
const SvxEscapementItem *pEsc = (const SvxEscapementItem *)pItem;
@@ -644,28 +644,28 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
if( aSub[SW_LATIN].IsEsc() )
SetProportion( pEsc->GetProp() );
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
true, &pItem ))
SetCaseMap( ((SvxCaseMapItem*)pItem)->GetCaseMap() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_KERNING,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_KERNING,
true, &pItem ))
SetFixKerning( ((SvxKerningItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN,
true, &pItem ))
SetNoHyph( ((SvxNoHyphenItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BLINK,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BLINK,
true, &pItem ))
SetBlink( ((SvxBlinkItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE,
true, &pItem ))
SetVertical( ((SvxCharRotateItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
true, &pItem ))
SetHighlightColor(((SvxBrushItem*)pItem)->GetColor());
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
true, &pItem ))
{
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
@@ -678,7 +678,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetRightBorderDist(pBoxItem->GetDistance(BOX_LINE_RIGHT));
SetLeftBorderDist(pBoxItem->GetDistance(BOX_LINE_LEFT));
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
true, &pItem ))
{
const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem);
@@ -687,7 +687,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetShadowLocation(pShadowItem->GetLocation());
}
const SfxPoolItem* pTwoLinesItem = 0;
- if( SFX_ITEM_SET ==
+ if( SfxItemState::SET ==
pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, true, &pTwoLinesItem ))
if ( ((SvxTwoLinesItem*)pTwoLinesItem)->GetValue() )
SetVertical( 0 );
@@ -839,17 +839,17 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetCaseMap( pAttrSet->GetCaseMap().GetCaseMap() );
SetFixKerning( pAttrSet->GetKerning().GetValue() );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
else
pBackColor = NULL;
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
true, &pItem ))
SetHighlightColor(((SvxBrushItem*)pItem)->GetColor());
else
SetHighlightColor(COL_TRANSPARENT);
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
true, &pItem ))
{
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
@@ -874,7 +874,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetLeftBorderDist(0);
}
- if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
+ if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
true, &pItem ))
{
const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem);
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 54546f2e8c8d..12d93c369ab7 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -844,7 +844,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
do
{
const SfxPoolItem* pTmpItem = 0;
- if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) &&
+ if ( SfxItemState::SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
@@ -881,7 +881,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
do
{
const SfxPoolItem* pTmpItem = 0;
- if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) &&
+ if ( SfxItemState::SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
@@ -1699,7 +1699,7 @@ void SwTxtNode::DeleteAttributes(
// Check if character format contains hidden attribute:
const SwCharFmt* pFmt = pTxtHt->GetCharFmt().GetCharFmt();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) )
+ if ( SfxItemState::SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) )
SetCalcHiddenCharFlags();
}
// #i75430# Recalc hidden flags if necessary
@@ -1820,7 +1820,7 @@ bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet)
return bRet;
SwCharFmt* pCurrCharFmt =pCurrNumFmt->GetCharFmt();
- if (pCurrCharFmt && pCurrCharFmt->GetItemState(nWhich,false) != SFX_ITEM_SET)
+ if (pCurrCharFmt && pCurrCharFmt->GetItemState(nWhich,false) != SfxItemState::SET)
{
pCurrCharFmt->SetFmtAttr(*pItem);
SwNumFmt aNewNumFmt(*pCurrNumFmt);
@@ -1882,7 +1882,7 @@ bool SwTxtNode::SetAttr(
// check for auto style:
const SfxPoolItem* pItem;
- const bool bAutoStyle = SFX_ITEM_SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, false, &pItem );
+ const bool bAutoStyle = SfxItemState::SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, false, &pItem );
if ( bAutoStyle )
{
boost::shared_ptr<SfxItemSet> pAutoStyleSet = static_cast<const SwFmtAutoFmt*>(pItem)->GetStyleHandle();
@@ -1981,7 +1981,7 @@ static void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr )
{
if( ( nWhich < RES_CHRATR_END ||
RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) &&
- ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, true ) ) )
+ ( SfxItemState::SET == pCFSet->GetItemState( nWhich, true ) ) )
rSet.Put( pCFSet->Get( nWhich ) );
nWhich = aIter.NextWhich();
}
@@ -2006,7 +2006,7 @@ static void lcl_MergeAttr_ExpandChrFmt( SfxItemSet& rSet, const SfxPoolItem& rAt
{
if( ( nWhich < RES_CHRATR_END ||
( RES_TXTATR_AUTOFMT == rAttr.Which() && RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) ) &&
- ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, true ) ) )
+ ( SfxItemState::SET == pCFSet->GetItemState( nWhich, true ) ) )
rSet.Put( pCFSet->Get( nWhich ) );
nWhich = aIter.NextWhich();
}
@@ -2511,7 +2511,7 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
while( true )
{
- if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), false, &pNdItem ) )
+ if( SfxItemState::SET == aNdSet.GetItemState( pItem->Which(), false, &pNdItem ) )
{
if (*pItem == *pNdItem) // 4
{
@@ -2965,7 +2965,7 @@ bool SwpHints::TryInsertHint(
// Check if character format contains hidden attribute:
const SwCharFmt* pFmt = pHint->GetCharFmt().GetCharFmt();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) )
+ if ( SfxItemState::SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) )
rNode.SetCalcHiddenCharFlags();
((SwTxtCharFmt*)pHint)->ChgTxtNode( &rNode );
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 188639476e7f..4788055aa38e 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -311,7 +311,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
if ( !pSet1 )
{
OSL_ENSURE( nWhichId, "lcl_HaveCommonAttributes not used correctly" );
- if ( SFX_ITEM_SET == rSet2.GetItemState( nWhichId, false ) )
+ if ( SfxItemState::SET == rSet2.GetItemState( nWhichId, false ) )
{
pNewSet = rSet2.Clone( true );
pNewSet->ClearItem( nWhichId );
@@ -323,7 +323,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
const SfxPoolItem* pItem = aIter.GetCurItem();
while( true )
{
- if ( SFX_ITEM_SET == rSet2.GetItemState( pItem->Which(), false ) )
+ if ( SfxItemState::SET == rSet2.GetItemState( pItem->Which(), false ) )
{
if ( !pNewSet )
pNewSet = rSet2.Clone( true );
@@ -455,7 +455,7 @@ void SwTxtNode::RstTxtAttr(
// 1. case: We want to reset only the attributes listed in pSet:
if ( pSet )
{
- bSkipAttr = SFX_ITEM_SET != pSet->GetItemState( pHt->Which(), false );
+ bSkipAttr = SfxItemState::SET != pSet->GetItemState( pHt->Which(), false );
if ( bSkipAttr && RES_TXTATR_AUTOFMT == pHt->Which() )
{
// if the current attribute is an autostyle, we have to check if the autostyle
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index d5c38bca2721..a8f0f3a57f7c 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1092,7 +1092,7 @@ void SwHistory::Add( SwFlyFrmFmt& rFmt, sal_uInt16& rSetPos )
m_SwpHstry.push_back( pHint );
const SwFmtChain* pChainItem;
- if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, false,
+ if( SfxItemState::SET == rFmt.GetItemState( RES_CHAIN, false,
(const SfxPoolItem**)&pChainItem ))
{
if( pChainItem->GetNext() || pChainItem->GetPrev() )
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 23ac2228f692..6621c69a09fb 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -140,7 +140,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt,
void SwUndoFmtAttr::Init()
{
// treat change of anchor specially
- if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, false ))
+ if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false ))
{
SaveFlyAnchor( m_bSaveDrawPt );
}
@@ -188,7 +188,7 @@ void SwUndoFmtAttr::UndoImpl(::sw::UndoRedoContext & rContext)
// restored, all other attributes are also restored.
// Thus, keep track of its restoration
bool bAnchorAttrRestored( false );
- if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, false ))
+ if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false ))
{
bAnchorAttrRestored = RestoreFlyAnchor(rContext);
if ( bAnchorAttrRestored )
@@ -359,7 +359,7 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext)
if( pFly )
{
// Bug 43672: do not set all attributes!
- if (SFX_ITEM_SET ==
+ if (SfxItemState::SET ==
m_pFmt->GetAttrSet().GetItemState( RES_CNTNT ))
{
SfxItemSet aTmpSet( m_pFmt->GetAttrSet() );
@@ -592,7 +592,7 @@ SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat,
, m_pOldItem( 0 )
{
const SfxPoolItem* pItem = 0;
- if (rChangedFormat.GetItemState( nWhichId, false, &pItem ) == SFX_ITEM_SET)
+ if (rChangedFormat.GetItemState( nWhichId, false, &pItem ) == SfxItemState::SET)
{
m_pOldItem.reset( pItem->Clone() );
}
@@ -842,7 +842,7 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext)
void SwUndoAttr::RepeatImpl(::sw::RepeatContext & rContext)
{
// RefMarks are not repeat capable
- if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, false ) )
+ if ( SfxItemState::SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, false ) )
{
rContext.GetDoc().getIDocumentContentOperations().InsertItemSet( rContext.GetRepeatPaM(),
m_AttrSet, m_nInsertFlags );
@@ -894,7 +894,7 @@ void SwUndoAttr::RedoImpl(::sw::UndoRedoContext & rContext)
void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
{
- if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, false ))
+ if ( SfxItemState::SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, false ))
return ;
SwHistoryHint* pHstHnt;
@@ -967,7 +967,7 @@ SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet )
, m_pTabStop( 0 )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) )
+ if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) )
{
// store separately, because it may change!
m_pTabStop.reset( static_cast<SvxTabStopItem*>(pItem->Clone()) );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 272cf9fc2fc4..f39361e35723 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -190,11 +190,11 @@ SwUndoDelete::SwUndoDelete(
if( pEndTxtNd->HasSwAttrSet() )
{
SwRegHistory aRegHist( *pEndTxtNd, pHistory );
- if( SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
+ if( SfxItemState::SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
RES_BREAK, false ) )
pEndTxtNd->ResetAttr( RES_BREAK );
if( pEndTxtNd->HasSwAttrSet() &&
- SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
+ SfxItemState::SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
RES_PAGEDESC, false ) )
pEndTxtNd->ResetAttr( RES_PAGEDESC );
}
@@ -1031,11 +1031,11 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
}
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 402094a318d8..7d7c8f350558 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -345,8 +345,8 @@ void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext)
SwSectionNode* pInsertedSectNd = rDoc.GetNodes().InsertTextSection(
aStt, *pFmt, *m_pSectionData, 0, & aEnd);
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_FTN_AT_TXTEND ) ||
- SFX_ITEM_SET == pFmt->GetItemState( RES_END_AT_TXTEND ))
+ if( SfxItemState::SET == pFmt->GetItemState( RES_FTN_AT_TXTEND ) ||
+ SfxItemState::SET == pFmt->GetItemState( RES_END_AT_TXTEND ))
{
rDoc.GetFtnIdxs().UpdateFtn( aStt );
}
@@ -444,7 +444,7 @@ void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext)
// The Content and Protect items must persist
const SfxPoolItem* pItem;
m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT ));
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, true, &pItem ))
+ if( SfxItemState::SET == pFmt->GetItemState( RES_PROTECT, true, &pItem ))
{
m_pAttrSet->Put( *pItem );
}
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index 7aada6f5d2e9..e02e87a9d697 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -89,11 +89,11 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
if( pNdSet )
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, false,
+ if( SfxItemState::SET == pNdSet->GetItemState( RES_PAGEDESC, false,
&pItem ) )
pTableFmt->SetFmtAttr( *pItem );
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, false,
+ if( SfxItemState::SET == pNdSet->GetItemState( RES_BREAK, false,
&pItem ) )
pTableFmt->SetFmtAttr( *pItem );
}
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index e583f07c9449..5172236397cf 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -276,11 +276,11 @@ void SwUndoInsTbl::UndoImpl(::sw::UndoRedoContext & rContext)
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
}
@@ -903,7 +903,7 @@ sal_uInt16 _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
// recalculated.
// Save formulas always in plain text.
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, true, &pItem ))
+ if( SfxItemState::SET == pSet->GetItemState( RES_BOXATR_FORMULA, true, &pItem ))
{
pSet->ClearItem( RES_BOXATR_VALUE );
if( pSwTable && bSaveFormula )
@@ -2188,19 +2188,19 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox,
if( pNewSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMAT,
+ if( SfxItemState::SET == pNewSet->GetItemState( RES_BOXATR_FORMAT,
false, &pItem ))
{
bNewFmt = true;
nNewFmtIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
}
- if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMULA,
+ if( SfxItemState::SET == pNewSet->GetItemState( RES_BOXATR_FORMULA,
false, &pItem ))
{
bNewFml = true;
aNewFml = ((SwTblBoxFormula*)pItem)->GetFormula();
}
- if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_VALUE,
+ if( SfxItemState::SET == pNewSet->GetItemState( RES_BOXATR_VALUE,
false, &pItem ))
{
bNewValue = true;
@@ -2838,11 +2838,11 @@ void SwUndoCpyTbl::UndoImpl(::sw::UndoRedoContext & rContext)
SwFrmFmt* pTableFmt = pTNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
- if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
+ if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
}
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 891bc28b5b1e..366c5a2d0f20 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1825,9 +1825,9 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
const SwAttrSet& rSet = pFmt->GetAttrSet();
SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, false);
- if(SFX_ITEM_SET == eItemState)
+ if(SfxItemState::SET == eItemState)
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
- else if(SFX_ITEM_DEFAULT == eItemState)
+ else if(SfxItemState::DEFAULT == eItemState)
pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
else
pRet[nProperty] = beans::PropertyState_AMBIGUOUS_VALUE;
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 4560afba8d80..d3e0fbe1ec87 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1524,7 +1524,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if ( pFly )
{
const :: SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_ANCHOR, false, &pItem ))
+ if( SfxItemState::SET == pFrmFmt->GetItemState( RES_ANCHOR, false, &pItem ))
{
pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrmFmtSetRange );
pSet->Put( *pItem );
@@ -1911,7 +1911,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if (pFly)
{
const :: SfxPoolItem* pItem;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, false, &pItem ))
+ if( SfxItemState::SET == aSet.GetItemState( RES_ANCHOR, false, &pItem ))
{
aSet.Put( *pItem );
if ( pFmt->GetDoc()->GetEditShell() != NULL )
@@ -2407,8 +2407,8 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
else if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
{
//UUUU
- if(SFX_ITEM_SET == rFmtSet.GetItemState(XATTR_FILLBMP_STRETCH, false)
- || SFX_ITEM_SET == rFmtSet.GetItemState(XATTR_FILLBMP_TILE, false))
+ if(SfxItemState::SET == rFmtSet.GetItemState(XATTR_FILLBMP_STRETCH, false)
+ || SfxItemState::SET == rFmtSet.GetItemState(XATTR_FILLBMP_TILE, false))
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
@@ -2437,13 +2437,13 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
SfxItemSet aSet(pNoTxt->GetSwAttrSet());
aSet.GetItemState(pEntry->nWID);
- if(SFX_ITEM_SET == aSet.GetItemState( pEntry->nWID, false ))
+ if(SfxItemState::SET == aSet.GetItemState( pEntry->nWID, false ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
}
else
{
- if(SFX_ITEM_SET == rFmtSet.GetItemState( pEntry->nWID, false ))
+ if(SfxItemState::SET == rFmtSet.GetItemState( pEntry->nWID, false ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
else
pStates[i] = beans::PropertyState_DEFAULT_VALUE;
@@ -2739,7 +2739,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
const SfxPoolItem* pItem;
RndStdIds eAnchorId = FLY_AT_PARA;
- if(SFX_ITEM_SET == aFrmSet.GetItemState(RES_ANCHOR, false, &pItem) )
+ if(SfxItemState::SET == aFrmSet.GetItemState(RES_ANCHOR, false, &pItem) )
{
eAnchorId = ((const SwFmtAnchor*)pItem)->GetAnchorId();
if( FLY_AT_FLY == eAnchorId &&
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 595237813705..892d430474b8 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -302,7 +302,7 @@ SwUnoCursorHelper::SetPageDesc(
::std::auto_ptr<SwFmtPageDesc> pNewDesc;
SAL_WNODEPRECATED_DECLARATIONS_POP
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
+ if(SfxItemState::SET == rSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
{
pNewDesc.reset(new SwFmtPageDesc(
*static_cast<const SwFmtPageDesc*>(pItem)));
@@ -425,7 +425,7 @@ lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet,
::std::auto_ptr<SwFmtDrop> pDrop;
SAL_WNODEPRECATED_DECLARATIONS_POP
SfxPoolItem const* pItem(0);
- if (SFX_ITEM_SET ==
+ if (SfxItemState::SET ==
rItemSet.GetItemState(RES_PARATR_DROP, true, &pItem))
{
pDrop.reset(new SwFmtDrop(*static_cast<const SwFmtDrop*>(pItem)));
@@ -452,7 +452,7 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue)
::std::auto_ptr<SwFmtRuby> pRuby;
SAL_WNODEPRECATED_DECLARATIONS_POP
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET ==
+ if (SfxItemState::SET ==
rItemSet.GetItemState(RES_TXTATR_CJK_RUBY, true, &pItem))
{
pRuby.reset(new SwFmtRuby(*static_cast<const SwFmtRuby*>(pItem)));
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index e2bad0b9a95b..baf1ee9bbd94 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -330,7 +330,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
pDoc->getIDocumentContentOperations().InsertItemSet( rPam, rSet, nFlags );
}
- if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SFX_ITEM_DEFAULT )
+ if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SfxItemState::DEFAULT )
{
SwTxtNode * pTmpNode = rPam.GetNode().GetTxtNode();
if ( pTmpNode )
@@ -1108,7 +1108,7 @@ lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode *const pSttNode,
bool bRet = false;
const SfxItemSet& rSet = pFrmFmt->GetAttrSet();
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == rSet.GetItemState(
+ if (SfxItemState::SET == rSet.GetItemState(
static_cast<sal_uInt16>(bHeader ? RES_HEADER : RES_FOOTER),
true, &pItem))
{
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index d83a19a3a159..cb2e42ed70de 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -1013,8 +1013,8 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState(
{
if(*ppSet)
{
- if(SFX_ITEM_SET == (*ppSet)->GetItemState(XATTR_FILLBMP_STRETCH, false)
- || SFX_ITEM_SET == (*ppSet)->GetItemState(XATTR_FILLBMP_TILE, false))
+ if(SfxItemState::SET == (*ppSet)->GetItemState(XATTR_FILLBMP_STRETCH, false)
+ || SfxItemState::SET == (*ppSet)->GetItemState(XATTR_FILLBMP_TILE, false))
{
eRet = beans::PropertyState_DIRECT_VALUE;
}
@@ -1043,7 +1043,7 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState(
if(!bDone)
{
- if((*ppSet) && SFX_ITEM_SET == (*ppSet)->GetItemState(rEntry.nWID, false))
+ if((*ppSet) && SfxItemState::SET == (*ppSet)->GetItemState(rEntry.nWID, false))
{
eRet = beans::PropertyState_DIRECT_VALUE;
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index f9d7fb4773b1..705911d53b05 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1930,7 +1930,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwFmtPageDesc* pNewDesc = 0;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rStyleSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
+ if(SfxItemState::SET == rStyleSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
{
pNewDesc = new SwFmtPageDesc(*((SwFmtPageDesc*)pItem));
}
@@ -2093,7 +2093,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SfxItemSet& rStyleSet = rBase.GetItemSet();
SwFmtRuby* pRuby = 0;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rStyleSet.GetItemState( RES_TXTATR_CJK_RUBY, true, &pItem ) )
+ if(SfxItemState::SET == rStyleSet.GetItemState( RES_TXTATR_CJK_RUBY, true, &pItem ) )
pRuby = new SwFmtRuby(*((SwFmtRuby*)pItem));
if(!pRuby)
pRuby = new SwFmtRuby(OUString());
@@ -2124,7 +2124,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwFmtDrop* pDrop = 0;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rStyleSet.GetItemState( RES_PARATR_DROP, true, &pItem ) )
+ if(SfxItemState::SET == rStyleSet.GetItemState( RES_PARATR_DROP, true, &pItem ) )
pDrop = new SwFmtDrop(*((SwFmtDrop*)pItem));
if(!pDrop)
pDrop = new SwFmtDrop();
@@ -2392,7 +2392,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
// special handling for RES_PAGEDESC
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem))
+ if (SfxItemState::SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem))
{
const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
if(pDesc)
@@ -2867,7 +2867,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
{
const SvxSetItem* pSetItem;
- if(SFX_ITEM_SET == rSet.GetItemState(
+ if(SfxItemState::SET == rSet.GetItemState(
bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET,
false,
(const SfxPoolItem**)&pSetItem))
@@ -2887,8 +2887,8 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
if(!bDone && OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
{
//UUUU
- if(SFX_ITEM_SET == pSourceSet->GetItemState(XATTR_FILLBMP_STRETCH, false)
- || SFX_ITEM_SET == pSourceSet->GetItemState(XATTR_FILLBMP_TILE, false))
+ if(SfxItemState::SET == pSourceSet->GetItemState(XATTR_FILLBMP_STRETCH, false)
+ || SfxItemState::SET == pSourceSet->GetItemState(XATTR_FILLBMP_TILE, false))
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
@@ -3421,7 +3421,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
// it is a Header/Footer entry, access the SvxSetItem containing it's information
const SvxSetItem* pSetItem = 0;
- if (SFX_ITEM_SET == aBaseImpl.GetItemSet().GetItemState(
+ if (SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState(
bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET,
false, (const SfxPoolItem**)&pSetItem))
{
@@ -3430,7 +3430,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
if (pEntry->nWID == SID_ATTR_PAGE_SHARED_FIRST)
{
// Need to add this to the other as well
- if (SFX_ITEM_SET == aBaseImpl.GetItemSet().GetItemState(
+ if (SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState(
bFooter ? SID_ATTR_PAGE_HEADERSET : SID_ATTR_PAGE_FOOTERSET,
false, (const SfxPoolItem**)&pSetItem))
{
@@ -3528,7 +3528,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
{
const SvxSetItem* pSetItem = 0;
- if(SFX_ITEM_SET == aBaseImpl.GetItemSet().GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem))
+ if(SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem))
{
// create a new SvxSetItem and get it's ItemSet as new target
SvxSetItem* pNewSetItem = static_cast< SvxSetItem* >(pSetItem->Clone());
@@ -3645,7 +3645,7 @@ lcl_makeHeaderFooter(
const SfxItemSet& rSet = pFrmFmt->GetAttrSet();
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == rSet.GetItemState(nRes, true, &pItem))
+ if (SfxItemState::SET == rSet.GetItemState(nRes, true, &pItem))
{
SwFrmFmt *const pHeadFootFmt = (bHeader)
? static_cast<SwFmtHeader*>(const_cast<SfxPoolItem*>(pItem))->
@@ -3728,7 +3728,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
const SfxItemSet& rSet = xStyle->GetItemSet();
const SvxSetItem* pSetItem;
- if(SFX_ITEM_SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem))
+ if(SfxItemState::SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem))
{
// get from SfxItemSet of the corresponding SfxSetItem
const SfxItemSet& rSetSet = pSetItem->GetItemSet();
@@ -3800,7 +3800,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) );
const SfxItemSet& rSet = xStyle->GetItemSet();
const SvxSetItem* pSetItem;
- if(SFX_ITEM_SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem))
+ if(SfxItemState::SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem))
{
// set at SfxItemSet of the corresponding SfxSetItem
const SfxItemSet& rSetSet = pSetItem->GetItemSet();
@@ -4841,8 +4841,8 @@ uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates(
{
case OWN_ATTR_FILLBMP_MODE:
{
- if(SFX_ITEM_SET == mpSet->GetItemState(XATTR_FILLBMP_STRETCH, false)
- || SFX_ITEM_SET == mpSet->GetItemState(XATTR_FILLBMP_TILE, false))
+ if(SfxItemState::SET == mpSet->GetItemState(XATTR_FILLBMP_STRETCH, false)
+ || SfxItemState::SET == mpSet->GetItemState(XATTR_FILLBMP_TILE, false))
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index f709c22022a0..feb975fc0c7a 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -272,7 +272,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
const SfxItemSet& rSet = pFmt->GetAttrSet();
const SfxPoolItem* pItem;
OUString sPDesc;
- if(SFX_ITEM_SET == rSet.GetItemState(RES_PAGEDESC, false, &pItem))
+ if(SfxItemState::SET == rSet.GetItemState(RES_PAGEDESC, false, &pItem))
{
const SwPageDesc* pDsc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
if(pDsc)
@@ -756,7 +756,7 @@ void sw_setValue( SwXCell &rCell, double nVal )
// - there is no current number format
// - the current number format is not a number format according to the number formatter, but rather a text format
// - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format
- if(SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
+ if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
|| pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
|| ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT)
{
@@ -938,7 +938,7 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException,
SfxItemSet aSet(pMyDoc->GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMULA);
const SfxPoolItem* pItem;
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- if(SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
+ if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
|| pMyDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue()))
{
aSet.Put(SwTblBoxNumFormat(0));
@@ -2644,7 +2644,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SFX_ITEM_SET;
+ bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET;
if(!bIsNum)
pColArray[nCol] <<= lcl_getString(*pXCell);
else
@@ -4200,7 +4200,7 @@ void SwXCellRange::GetDataSequence(
if (pAnyData)
{
// check if table box value item is set
- bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false ) == SFX_ITEM_SET;
+ bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET;
if (!bIsNum)
pAnyData[nDtaCnt++] <<= lcl_getString(*pXCell);
else
@@ -4229,7 +4229,7 @@ void SwXCellRange::GetDataSequence(
SwFrmFmt *pBoxFmt = pXCell->GetTblBox()->GetFrmFmt();
SfxItemState eState = pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem);
- if (eState == SFX_ITEM_SET)
+ if (eState == SfxItemState::SET)
{
// please note that the language of the numberformat
// is implicitly coded into the below value as well
@@ -4317,7 +4317,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SFX_ITEM_SET;
+ bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET;
if(!bIsNum)
pColArray[nCol] <<= lcl_getString(*pXCell);
else
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 721028902ebc..43ae47367356 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -209,7 +209,7 @@ sal_uLong SwASCIIParser::CallParser()
while (*pWhichIds)
{
const SfxPoolItem *pItem;
- if (SFX_ITEM_SET == pItemSet->GetItemState(*pWhichIds,
+ if (SfxItemState::SET == pItemSet->GetItemState(*pWhichIds,
false, &pItem))
{
pColl->SetFmtAttr( *pItem );
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index a1be84f8ad46..3433bdad2875 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -316,7 +316,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
SwTwips nPageWidth)
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) ||
+ if( SfxItemState::SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) ||
MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
{
SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, true));
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 4251557efde9..8d6a9caffaa9 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -443,19 +443,19 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
if( !IsCSS1Source(CSS1_OUTMODE_HINT) )
{
const SvxUnderlineItem *pUnderlineItem = 0;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_UNDERLINE, bDeep, &pItem ))
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_UNDERLINE, bDeep, &pItem ))
pUnderlineItem = (const SvxUnderlineItem *)pItem;
const SvxOverlineItem *pOverlineItem = 0;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_OVERLINE, bDeep, &pItem ))
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_OVERLINE, bDeep, &pItem ))
pOverlineItem = (const SvxOverlineItem *)pItem;
const SvxCrossedOutItem *pCrossedOutItem = 0;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, bDeep, &pItem ))
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, bDeep, &pItem ))
pCrossedOutItem = (const SvxCrossedOutItem *)pItem;
const SvxBlinkItem *pBlinkItem = 0;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_BLINK, bDeep, &pItem ))
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_BLINK, bDeep, &pItem ))
pBlinkItem = (const SvxBlinkItem *)pItem;
if( pUnderlineItem || pOverlineItem || pCrossedOutItem || pBlinkItem )
@@ -1012,7 +1012,7 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
while( nWhich )
{
const SfxPoolItem *pRefItem, *pItem;
- bool bItemSet = ( SFX_ITEM_SET ==
+ bool bItemSet = ( SfxItemState::SET ==
rItemSet.GetItemState( nWhich, false, &pItem) );
bool bRefItemSet;
@@ -1035,18 +1035,18 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
case RES_CHRATR_CTL_LANGUAGE:
case RES_CHRATR_CTL_POSTURE:
case RES_CHRATR_CTL_WEIGHT:
- bRefItemSet = ( SFX_ITEM_SET ==
+ bRefItemSet = ( SfxItemState::SET ==
pRefScriptItemSet->GetItemState( nWhich, true, &pRefItem) );
break;
default:
- bRefItemSet = ( SFX_ITEM_SET ==
+ bRefItemSet = ( SfxItemState::SET ==
aRefItemSet.GetItemState( nWhich, false, &pRefItem) );
break;
}
}
else
{
- bRefItemSet = ( SFX_ITEM_SET ==
+ bRefItemSet = ( SfxItemState::SET ==
aRefItemSet.GetItemState( nWhich, false, &pRefItem) );
}
@@ -1173,19 +1173,19 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet,
{
const SfxPoolItem *pItem = 0, *pItemCJK = 0, *pItemCTL = 0, *pTmp;
sal_uInt16 nItemCount = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,
&pTmp ) )
{
pItem = pTmp;
nItemCount++;
}
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i+1], false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i+1], false,
&pTmp ) )
{
pItemCJK = pTmp;
nItemCount++;
}
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i+2], false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i+2], false,
&pTmp ) )
{
pItemCTL = pTmp;
@@ -1221,7 +1221,7 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet,
const SfxPoolItem *pItem;
if( bCheckDropCap &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_PARATR_DROP, true,
+ SfxItemState::SET == rItemSet.GetItemState( RES_PARATR_DROP, true,
&pItem ) )
{
const SwFmtDrop *pDrop = (const SwFmtDrop *)pItem;
@@ -1618,7 +1618,7 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// export Drop-Caps
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, false, &pItem ))
+ if( SfxItemState::SET==aItemSet.GetItemState( RES_PARATR_DROP, false, &pItem ))
{
OUString sOut( aSelector );
sOut += ":" + OStringToOUString( sCSS1_first_letter, RTL_TEXTENCODING_ASCII_US );
@@ -1796,13 +1796,13 @@ Writer& OutCSS1_BodyTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet )
// considered already when exporting the paragraph template.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
OutCSS1_SvxBrush( rWrt, *pItem, CSS1_BACKGROUND_PAGE );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BOX, false,
&pItem ))
{
OutCSS1_SvxBox( rWrt, *pItem );
@@ -2077,9 +2077,9 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
const SvxLRSpaceItem *pLRItem = 0;
const SvxULSpaceItem *pULItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, true ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, true ) )
pLRItem = &aLRItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, true ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, true ) )
pULItem = &aULItem;
if( pLRItem || pULItem )
OutCSS1_SvxULSpace_SvxLRSpace( *this, pULItem, pLRItem );
@@ -2091,7 +2091,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
const SfxPoolItem* pItem;
if( nFrmOpts & HTML_FRMOPT_S_NOBORDER )
OutCSS1_SvxBox( *this, rFrmFmt.GetBox() );
- else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) )
+ else if( SfxItemState::SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) )
OutCSS1_SvxBox( *this, *pItem );
}
@@ -2114,13 +2114,13 @@ void SwHTMLWriter::OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt )
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_TABLE );
if( IsHTMLMode( HTMLMODE_PRINT_EXT ) )
OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, false );
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, false, &pItem ) )
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, false, &pItem ) )
OutCSS1_SwFmtLayoutSplit( *this, *pItem );
if( !bFirstCSS1Property )
@@ -2146,7 +2146,7 @@ void SwHTMLWriter::OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt, const SwF
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_SECTION );
if (pCol)
@@ -3030,10 +3030,10 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SvxULSpaceItem *pULSpace = 0;
const SvxLRSpaceItem *pLRSpace = 0;
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, bDeep, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, bDeep, &pItem ) )
pLRSpace = (const SvxLRSpaceItem *)pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, bDeep, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, bDeep, &pItem ) )
pULSpace = (const SvxULSpaceItem *)pItem;
if( pLRSpace || pULSpace )
@@ -3116,7 +3116,7 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SfxPoolItem *pItem;
const SvxFmtBreakItem *pBreakItem = 0;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BREAK, bDeep, &pItem ))
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_BREAK, bDeep, &pItem ))
pBreakItem = (const SvxFmtBreakItem *)pItem;
const SwFmtPageDesc *pPDescItem = 0;
@@ -3124,11 +3124,11 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
!rHTMLWrt.bCSS1IgnoreFirstPageDesc ||
rHTMLWrt.pStartNdIdx->GetIndex() !=
rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() ) &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_PAGEDESC, bDeep, &pItem ))
+ SfxItemState::SET==rItemSet.GetItemState( RES_PAGEDESC, bDeep, &pItem ))
pPDescItem = (const SwFmtPageDesc*)pItem;
const SvxFmtKeepItem *pKeepItem = 0;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_KEEP, bDeep, &pItem ))
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_KEEP, bDeep, &pItem ))
pKeepItem = (const SvxFmtKeepItem *)pItem;
if( pBreakItem || pPDescItem || pKeepItem )
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 3bf58a5c4b22..a6f507a4e921 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -377,7 +377,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
if( bOutStyles && bHardDrop && nDeep != 0 )
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==pFmt->GetAttrSet().GetItemState(
+ if( SfxItemState::SET==pFmt->GetAttrSet().GetItemState(
RES_PARATR_DROP, true, &pItem ) )
{
bool bPut = true;
@@ -386,7 +386,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() );
const SfxPoolItem *pRefItem;
bool bRefItemSet =
- SFX_ITEM_SET==pReferenceFmt->GetAttrSet().GetItemState(
+ SfxItemState::SET==pReferenceFmt->GetAttrSet().GetItemState(
RES_PARATR_DROP, true, &pRefItem );
bPut = !bRefItemSet || *pItem!=*pRefItem;
}
@@ -653,7 +653,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
const SfxPoolItem* pItem;
if( rInfo.pItemSet &&
- SFX_ITEM_SET == rInfo.pItemSet->GetItemState( RES_PARATR_ADJUST,
+ SfxItemState::SET == rInfo.pItemSet->GetItemState( RES_PARATR_ADJUST,
false, &pItem ) )
{
pAdjItem = pItem;
@@ -856,7 +856,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
// export language if it differs from the default language only.
const SfxPoolItem *pTmpItem;
- if( SFX_ITEM_SET == rInfo.pItemSet->GetItemState( aWhichIds[i],
+ if( SfxItemState::SET == rInfo.pItemSet->GetItemState( aWhichIds[i],
true, &pTmpItem ) &&
((const SvxLanguageItem *)pTmpItem)->GetLanguage() == eLang )
rInfo.pItemSet->ClearItem( aWhichIds[i] );
@@ -1878,7 +1878,7 @@ void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet,
while( nWhich )
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( nWhich, bDeep, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( nWhich, bDeep, &pItem ) )
{
Insert( *pItem, nStart, nEnd, rFmtInfos, bParaAttrs );
}
@@ -2085,7 +2085,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
return rHTMLWrt;
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, false, &pItem ))
+ if( SfxItemState::SET == pItemSet->GetItemState( RES_LR_SPACE, false, &pItem ))
{
sal_Int32 nLeft = ((SvxLRSpaceItem*)pItem)->GetLeft();
sal_Int32 nRight = ((SvxLRSpaceItem*)pItem)->GetRight();
@@ -2124,7 +2124,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
}
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, false, &pItem ))
+ if( SfxItemState::SET == pItemSet->GetItemState( RES_BOX, false, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
const editeng::SvxBorderLine* pBorderLine = pBoxItem->GetBottom();
@@ -2162,7 +2162,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
const SfxPoolItem* pItem;
const SfxItemSet* pItemSet = pNd->GetpSwAttrSet();
if( pItemSet && pItemSet->Count() &&
- SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) &&
+ SfxItemState::SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) &&
40 == ((const SvxFontHeightItem *)pItem)->GetHeight() )
{
// ... ausserdem ist die 2pt Schrift eingestellt ...
@@ -2201,12 +2201,12 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( pItemSet )
{
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_PAGEDESC, true, &pItem ) &&
+ if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, true, &pItem ) &&
((SwFmtPageDesc *)pItem)->GetPageDesc() )
{
bPageBreakBefore = true;
}
- else if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BREAK, true, &pItem ) )
+ else if( SfxItemState::SET == pItemSet->GetItemState( RES_BREAK, true, &pItem ) )
{
switch( ((SvxFmtBreakItem *)pItem)->GetBreak() )
{
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 7a1c0fe9bac1..d333b6df580d 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -196,7 +196,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
RES_CHRATR_CTL_FONTSIZE };
for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -207,7 +207,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
pCharFmt->SetFmtAttr( rItemSet );
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
{
// Ein Brush-Item mit RES_BACKGROUND muss noch in eines mit
// RES_CHRATR_BACKGROUND gewandelt werden
@@ -217,7 +217,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
pCharFmt->SetFmtAttr( aBrushItem );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) )
{
SvxBoxItem aBoxItem( *(const SvxBoxItem *)pItem );
aBoxItem.SetWhich( RES_CHRATR_BOX );
@@ -235,7 +235,7 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
false));
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
SetCharFmtAttrs( pUnvisited, rItemSet );
@@ -252,7 +252,7 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
false));
if( !pUnvisited )
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
@@ -266,7 +266,7 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
false));
if( !pVisited )
pVisited = GetCharFmtFromPool( RES_POOLCHR_INET_VISIT );
@@ -289,8 +289,8 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
rPropInfo.bTextIndent) &&
(!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin ||
!rPropInfo.bTextIndent) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,true,&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) )
+ SfxItemState::SET == rCollItemSet.GetItemState(RES_LR_SPACE,true,&pCollItem) &&
+ SfxItemState::SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -308,9 +308,9 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
(!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,true,
+ SfxItemState::SET == rCollItemSet.GetItemState(RES_UL_SPACE,true,
&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) )
+ SfxItemState::SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -327,7 +327,7 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
RES_CHRATR_CTL_FONTSIZE };
for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -401,7 +401,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
if( pItemSet2 )
{
const SfxPoolItem *pItem = 0;
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == pItemSet2->GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
// ein Hintergrund wird gesetzt
@@ -410,7 +410,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
bSetBrush = true;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, false, &pItem ) )
+ if( SfxItemState::SET == pItemSet2->GetItemState( RES_BOX, false, &pItem ) )
{
// eine Umrandung wird gesetzt
aBoxItem = *((const SvxBoxItem *)pItem);
@@ -418,7 +418,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
bSetBox = true;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, false, &pItem ) )
+ if( SfxItemState::SET == pItemSet2->GetItemState( RES_FRAMEDIR, false, &pItem ) )
{
// eine Umrandung wird gesetzt
aFrmDirItem = *static_cast< const SvxFrameDirectionItem *>( pItem );
@@ -467,10 +467,10 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
// linker, rechter Rand und Erstzeilen-Einzug
if( (rPropInfo.bLeftMargin || rPropInfo.bRightMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) )
+ SfxItemState::SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) )
{
if( (!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin) &&
- SFX_ITEM_SET == rPageItemSet.GetItemState(RES_LR_SPACE,
+ SfxItemState::SET == rPageItemSet.GetItemState(RES_LR_SPACE,
true,&pPageItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -492,10 +492,10 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) )
+ SfxItemState::SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) )
{
if( (!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rPageItemSet.GetItemState(RES_UL_SPACE,
+ SfxItemState::SET == rPageItemSet.GetItemState(RES_UL_SPACE,
true,&pPageItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -548,7 +548,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
}
// Geht das wirklich?
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
{
// eine Umrandung wird gesetzt
rMaster.SetFmtAttr( *pItem );
@@ -688,7 +688,7 @@ static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
const SfxPoolItem *pItem;
if( aClearItems[j] ||
(pParentItemSet &&
- SFX_ITEM_SET == rItemSet.GetItemState( nWhich, false, &pItem ) &&
+ SfxItemState::SET == rItemSet.GetItemState( nWhich, false, &pItem ) &&
(0==i ? swhtml_css1atr_equalFontItems( *pItem, pParentItemSet->Get(nWhich, true ) )
: *pItem == pParentItemSet->Get(nWhich, true ) ) ) )
{
@@ -817,7 +817,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// Den Hintergrund muessen wir vor dem Setzen abfragen,
// denn in SetPageDescAttrs wird er geloescht.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,false,&pItem) )
+ if( SfxItemState::SET==rItemSet.GetItemState(RES_BACKGROUND,false,&pItem) )
{
const SvxBrushItem *pBrushItem =
(const SvxBrushItem *)pItem;
@@ -838,7 +838,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// alle noch uebrigen Optionen koennen an der Standard-Vorlage
// gesetzt werden und gelten dann automatisch als defaults
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,false) )
+ if( SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR,false) )
bBodyTextSet = true;
SetTxtCollAttrs(
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ),
@@ -1011,7 +1011,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// nur die Attribute an der Vorlage setzen
const SfxPoolItem *pItem;
const SvxBoxItem *pBoxItem = 0;
- if( SFX_ITEM_SET ==
+ if( SfxItemState::SET ==
pColl->GetAttrSet().GetItemState(RES_BOX,true,&pItem) )
pBoxItem = (const SvxBoxItem *)pItem;
rPropInfo.SetBoxItem( rItemSet, MIN_BORDER_DIST, pBoxItem );
@@ -1481,7 +1481,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
// fuer die Hoehe (was passiert mit absoluten Hoehen???)
sal_uInt8 nLines = rDrop.GetLines();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) )
{
sal_uInt16 nProp = ((const SvxFontHeightItem *)pItem)->GetProp();
nLines = (sal_uInt8)((nProp + 50) / 100);
@@ -1508,7 +1508,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
rDrop.GetLines() = nLines;
// ein rechter Rand wird der Abstand zum Text!
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, false, &pItem ) )
{
rDrop.GetDistance() = static_cast< sal_uInt16 >(
((const SvxLRSpaceItem *)pItem)->GetRight() );
@@ -2104,7 +2104,7 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
{
const SfxPoolItem *pItem;
if( (nFlags & HTML_FF_BOX) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) )
+ SfxItemState::SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) )
{
if( (nFlags & HTML_FF_PADDING) == 0 )
{
@@ -2121,14 +2121,14 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
}
if( (nFlags & HTML_FF_BACKGROUND) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, true, &pItem ) )
+ SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, true, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
}
if( (nFlags & HTML_FF_DIRECTION) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, true, &pItem ) )
+ SfxItemState::SET==rItemSet.GetItemState( RES_FRAMEDIR, true, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_FRAMEDIR );
@@ -2316,7 +2316,7 @@ static void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc )
const SfxPoolItem *pItem;
for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false,&pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,&pItem ) )
{
const SvxFontItem& rFont = *(const SvxFontItem *)pItem;
if( RTL_TEXTENCODING_SYMBOL != rFont.GetCharSet() )
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 3aa6a05a6e0e..b680b5e94f05 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -101,7 +101,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
// linken/rechten Rand setzen
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -128,7 +128,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
}
// oberen/unteren Rand setzen
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) )
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -426,7 +426,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
const SfxPoolItem *pItem;
for( sal_uInt16 i=0; nWhichIds[i]; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( nWhichIds[i], true, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( nWhichIds[i], true, &pItem ) )
PutEEPoolItem( aItemSet, *pItem );
}
}
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index 79e1e96b000f..db80f953c5f4 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -83,7 +83,7 @@ void SwHTMLWriter::GetEEAttrsFromDrwObj( SfxItemSet& rItemSet,
while( nEEWhich )
{
const SfxPoolItem *pEEItem;
- bool bSet = SFX_ITEM_SET == rObjItemSet.GetItemState( nEEWhich, false,
+ bool bSet = SfxItemState::SET == rObjItemSet.GetItemState( nEEWhich, false,
&pEEItem );
if( bSet || bSetDefaults )
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 5568aec6bd92..725ba97b80bd 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -211,7 +211,7 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_COL,
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_COL,
true, &pItem ) &&
((const SwFmtCol *)pItem)->GetNumCols() > 1 )
{
@@ -580,7 +580,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr &&
( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 ||
(FLY_AS_CHAR == eAnchorId) ) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, true, &pItem ))
+ SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, true, &pItem ))
{
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
@@ -605,7 +605,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// HSPACE und VSPACE
Size aTwipSpc( 0, 0 );
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, true, &pItem ))
+ SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, true, &pItem ))
{
aTwipSpc.Width() =
( ((SvxLRSpaceItem*)pItem)->GetLeft() +
@@ -613,7 +613,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
nDfltLeftMargin = nDfltRightMargin = aTwipSpc.Width();
}
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, true, &pItem ))
+ SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, true, &pItem ))
{
aTwipSpc.Height() =
( ((SvxULSpaceItem*)pItem)->GetUpper() +
@@ -660,7 +660,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
}
if( !(nFrmOpts & HTML_FRMOPT_ABSSIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, true, &pItem ))
+ SfxItemState::SET == rItemSet.GetItemState( RES_BOX, true, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -673,7 +673,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// WIDTH und/oder HEIGHT
// ATT_VAR_SIZE/ATT_MIN_SIZE nur ausgeben, wenn ANYSIZE gesezut ist
if( (nFrmOpts & HTML_FRMOPT_SIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) &&
+ SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) &&
( (nFrmOpts & HTML_FRMOPT_ANYSIZE) ||
ATT_FIX_SIZE == ((const SwFmtFrmSize *)pItem)->GetHeightSizeType()) )
{
@@ -740,7 +740,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) &&
((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) ||
(FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem ))
+ SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem ))
{
const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem;
sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient();
@@ -829,7 +829,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// das URL-Attribut nur beruecksichtigen, wenn keine Image-Map
// uebergeben wurde
if( !pAltImgMap &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, true, &pItem ))
+ SfxItemState::SET == rItemSet.GetItemState( RES_URL, true, &pItem ))
{
pURLItem = (const SwFmtURL *)pItem;
}
@@ -966,7 +966,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// URL -> <A>...<IMG ... >...</A>
const SvxMacroItem *pMacItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem ))
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem ))
pMacItem = (const SvxMacroItem *)pItem;
if( pURLItem || pMacItem )
@@ -1041,7 +1041,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// Umrandung -> <FONT COLOR = ...>...<IMG ... >...</FONT>
sal_uInt16 nBorderWidth = 0;
if( (nFrmOpts & HTML_FRMOPT_BORDER) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, true, &pItem ))
+ SfxItemState::SET == rItemSet.GetItemState( RES_BOX, true, &pItem ))
{
Size aTwipBorder( 0, 0 );
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -1127,7 +1127,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
HTMLOutFuncs::Out_String( rWrt.Strm(), aGraphicInBase64, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ).WriteChar( '\"' );
// Events
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem ))
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem ))
{
const SvxMacroTableDtor& rMacTable =
((const SvxMacroItem *)pItem)->GetMacroTable();
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index a6555ccb8a68..24b17f0298d5 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -909,7 +909,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
// linken/rechten Rand setzen
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true,
&pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
@@ -939,7 +939,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
// oberen/unteren Rand setzen
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true,
&pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
@@ -970,7 +970,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
uno::Reference< beans::XPropertySetInfo > xPropSetInfo =
rFCompPropSet->getPropertySetInfo();
OUString sPropName = "BackgroundColor";
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_BACKGROUND, true,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_BACKGROUND, true,
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
@@ -986,7 +986,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
sPropName = "TextColor";
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_COLOR, true,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_COLOR, true,
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
@@ -996,7 +996,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
sPropName = "FontHeight";
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONTSIZE,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONTSIZE,
true, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
@@ -1006,7 +1006,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONT, true,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONT, true,
&pItem ) )
{
const SvxFontItem *pFontItem = (SvxFontItem *)pItem;
@@ -1043,7 +1043,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
sPropName = "FontWeight";
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_WEIGHT,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_WEIGHT,
true, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
@@ -1054,7 +1054,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
sPropName = "FontSlant";
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_POSTURE,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_POSTURE,
true, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
@@ -1063,7 +1063,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
sPropName = "FontUnderline";
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_UNDERLINE,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_UNDERLINE,
true, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
@@ -1072,7 +1072,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
sPropName = "FontStrikeout";
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_CROSSEDOUT,
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_CROSSEDOUT,
true, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index e4f76c4bd9f4..19d11dae7804 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -974,7 +974,7 @@ void SwHTMLParser::InsertBodyOptions()
RES_CHRATR_CTL_FONTSIZE };
for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], false,
+ if( SfxItemState::SET == aItemSet.GetItemState( aWhichIds[i], false,
&pItem ) &&
static_cast <const SvxFontHeightItem * >(pItem)->GetProp() != 100)
{
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index e4cf7d9a6bb1..a33737b5171b 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -221,7 +221,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
// linken/rechten Rand setzen
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -259,7 +259,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
}
// oberen/unteren Rand setzen
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) )
+ if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 99760e29b5e6..65c924abc2fc 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -318,13 +318,13 @@ void SwHTMLParser::NewDivision( int nToken )
Reader::ResetFrmFmtAttrs(aFrmItemSet );
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == aItemSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
aFrmItemSet.Put( *pItem );
aItemSet.ClearItem( RES_BACKGROUND );
}
- if( SFX_ITEM_SET == aItemSet.GetItemState( RES_FRAMEDIR, false,
+ if( SfxItemState::SET == aItemSet.GetItemState( RES_FRAMEDIR, false,
&pItem ) )
{
aFrmItemSet.Put( *pItem );
@@ -708,13 +708,13 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
aFrmItemSet.Put( aFmtCol );
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == aItemSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
aFrmItemSet.Put( *pItem );
aItemSet.ClearItem( RES_BACKGROUND );
}
- if( SFX_ITEM_SET == aItemSet.GetItemState( RES_FRAMEDIR, false,
+ if( SfxItemState::SET == aItemSet.GetItemState( RES_FRAMEDIR, false,
&pItem ) )
{
aFrmItemSet.Put( *pItem );
@@ -802,14 +802,14 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
SwCntntNode* pSrcCntntNd = pSrcNd->GetCntntNode();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSrcCntntNd->GetSwAttrSet()
+ if( SfxItemState::SET == pSrcCntntNd->GetSwAttrSet()
.GetItemState( RES_PAGEDESC, false, &pItem ) &&
((SwFmtPageDesc *)pItem)->GetPageDesc() )
{
pDestCntntNd->SetAttr( *pItem );
pSrcCntntNd->ResetAttr( RES_PAGEDESC );
}
- if( SFX_ITEM_SET == pSrcCntntNd->GetSwAttrSet()
+ if( SfxItemState::SET == pSrcCntntNd->GetSwAttrSet()
.GetItemState( RES_BREAK, false, &pItem ) )
{
switch( ((SvxFmtBreakItem *)pItem)->GetBreak() )
@@ -830,7 +830,7 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
SwFrmFmt *pFrmFmt = pSrcNd->GetTableNode()->GetTable().GetFrmFmt();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pFrmFmt->GetAttrSet().
+ if( SfxItemState::SET == pFrmFmt->GetAttrSet().
GetItemState( RES_PAGEDESC, false, &pItem ) )
{
pDestCntntNd->SetAttr( *pItem );
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 928fb3d41b88..4b352c7e1852 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1505,7 +1505,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
->GetCntntNode();
const SfxPoolItem *pItem;
if( pCNd && pCNd->HasSwAttrSet() &&
- SFX_ITEM_SET==pCNd->GetpSwAttrSet()->GetItemState(
+ SfxItemState::SET==pCNd->GetpSwAttrSet()->GetItemState(
RES_PARATR_ADJUST, false, &pItem ) )
{
eAdjust = ((const SvxAdjustItem *)pItem)
@@ -1552,7 +1552,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
else
{
OSL_ENSURE( pBox->GetSttNd() ||
- SFX_ITEM_SET!=pFrmFmt->GetAttrSet().GetItemState(
+ SfxItemState::SET!=pFrmFmt->GetAttrSet().GetItemState(
RES_VERT_ORIENT, false ),
"Box ohne Inhalt hat vertikale Ausrichtung" );
pBox->ChgFrmFmt( (SwTableBoxFmt*)pFrmFmt );
@@ -1617,7 +1617,7 @@ static void ResetLineFrmFmtAttrs( SwFrmFmt *pFrmFmt )
{
pFrmFmt->ResetFmtAttr( RES_FRM_SIZE );
pFrmFmt->ResetFmtAttr( RES_BACKGROUND );
- OSL_ENSURE( SFX_ITEM_SET!=pFrmFmt->GetAttrSet().GetItemState(
+ OSL_ENSURE( SfxItemState::SET!=pFrmFmt->GetAttrSet().GetItemState(
RES_VERT_ORIENT, false ),
"Zeile hat vertikale Ausrichtung" );
}
@@ -2958,7 +2958,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor,
pCSS1Parser->ParseStyleOption( rStyle, aItemSet, aPropInfo );
const SfxPoolItem *pItem = 0;
- if( SFX_ITEM_SET == aItemSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
pBrushItem = new SvxBrushItem( *((const SvxBrushItem *)pItem) );
@@ -3251,7 +3251,7 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable,
aPropInfo, &aLang, &aDir ) )
{
SfxPoolItem const* pItem;
- if (SFX_ITEM_SET == aItemSet.GetItemState(RES_BOX, false, &pItem))
+ if (SfxItemState::SET == aItemSet.GetItemState(RES_BOX, false, &pItem))
{ // fdo#41796: steal box item to set it in FixFrameFmt later!
m_pBoxItem.reset(dynamic_cast<SvxBoxItem *>(pItem->Clone()));
aItemSet.ClearItem(RES_BOX);
@@ -3494,13 +3494,13 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
const SfxPoolItem *pItem = 0;
if( bStyleParsed )
{
- if( SFX_ITEM_SET == aItemSet.GetItemState(
+ if( SfxItemState::SET == aItemSet.GetItemState(
RES_BACKGROUND, false, &pItem ) )
{
pCurTable->SetBGBrush( *(const SvxBrushItem *)pItem );
aItemSet.ClearItem( RES_BACKGROUND );
}
- if( SFX_ITEM_SET == aItemSet.GetItemState(
+ if( SfxItemState::SET == aItemSet.GetItemState(
RES_PARATR_SPLIT, false, &pItem ) )
{
aItemSet.Put(
@@ -3753,14 +3753,14 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt();
const SfxPoolItem* pItem2;
- if( SFX_ITEM_SET == pOldTxtNd->GetSwAttrSet()
+ if( SfxItemState::SET == pOldTxtNd->GetSwAttrSet()
.GetItemState( RES_PAGEDESC, false, &pItem2 ) &&
((SwFmtPageDesc *)pItem2)->GetPageDesc() )
{
pFrmFmt->SetFmtAttr( *pItem2 );
pOldTxtNd->ResetAttr( RES_PAGEDESC );
}
- if( SFX_ITEM_SET == pOldTxtNd->GetSwAttrSet()
+ if( SfxItemState::SET == pOldTxtNd->GetSwAttrSet()
.GetItemState( RES_BREAK, true, &pItem2 ) )
{
switch( ((SvxFmtBreakItem *)pItem2)->GetBreak() )
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index c7357e11ee38..e40d612a6f26 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -415,7 +415,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
rWrt.bTxtAttr = false;
rWrt.bOutOpts = true;
const SvxBrushItem *pBrushItem = 0;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
{
pBrushItem = (const SvxBrushItem *)pItem;
}
@@ -436,12 +436,12 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
sal_uInt32 nNumFmt = 0;
double nValue = 0.0;
bool bNumFmt = false, bValue = false;
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) )
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) )
{
nNumFmt = ((const SwTblBoxNumFormat *)pItem)->GetValue();
bNumFmt = true;
}
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOXATR_VALUE, false, &pItem ) )
+ if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_VALUE, false, &pItem ) )
{
nValue = ((const SwTblBoxValue *)pItem)->GetValue();
bValue = true;
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 1c1e04091189..efd63865d8e0 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -1998,7 +1998,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
@@ -2053,7 +2053,7 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
if( nLeft < 0 )
nLeft = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
@@ -2108,7 +2108,7 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
if( nRight < 0 )
nRight = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
@@ -2166,7 +2166,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2224,7 +2224,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2327,7 +2327,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
@@ -2356,7 +2356,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
nMargins[2] = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 2fb5df48cb07..ead053964fbe 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4663,7 +4663,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pCSS1Parser->GetTxtFmtColl( nTopColl, rTopClass );
const SfxItemSet& rItemSet = pTopColl->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,true, &pItem) )
+ if( SfxItemState::SET == rItemSet.GetItemState(RES_LR_SPACE,true, &pItem) )
{
const SvxLRSpaceItem *pLRItem =
(const SvxLRSpaceItem *)pItem;
@@ -4695,7 +4695,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pContext->SetMargins( nLeftMargin, nRightMargin,
nFirstLineIndent );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,true, &pItem) )
+ if( SfxItemState::SET == rItemSet.GetItemState(RES_UL_SPACE,true, &pItem) )
{
const SvxULSpaceItem *pULItem =
(const SvxULSpaceItem *)pItem;
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index e7c94be70009..a6f138ba33a0 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -169,7 +169,7 @@ void SwHTMLWriter::SetupFilterOptions(SfxMedium& rMedium)
return;
const SfxPoolItem* pItem;
- if (pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) != SFX_ITEM_SET)
+ if (pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) != SfxItemState::SET)
return;
@@ -393,7 +393,7 @@ sal_uLong SwHTMLWriter::WriteStream()
if( !bWriteClipboardDoc && pDoc->GetDocShell() &&
(!pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) &&
!pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::BROWSE_MODE)) &&
- SFX_ITEM_SET == rPageItemSet.GetItemState( RES_HEADER, true, &pItem) )
+ SfxItemState::SET == rPageItemSet.GetItemState( RES_HEADER, true, &pItem) )
{
const SwFrmFmt *pHeaderFmt =
((const SwFmtHeader *)pItem)->GetHeaderFmt();
@@ -413,7 +413,7 @@ sal_uLong SwHTMLWriter::WriteStream()
if( !bWriteClipboardDoc && pDoc->GetDocShell() &&
(!pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) && !pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::BROWSE_MODE)) &&
- SFX_ITEM_SET == rPageItemSet.GetItemState( RES_FOOTER, true, &pItem) )
+ SfxItemState::SET == rPageItemSet.GetItemState( RES_FOOTER, true, &pItem) )
{
const SwFrmFmt *pFooterFmt =
((const SwFmtFooter *)pItem)->GetFooterFmt();
@@ -521,7 +521,7 @@ static const SwFmtCol *lcl_html_GetFmtCol( const SwSection& rSection,
const SfxPoolItem* pItem;
if( FILE_LINK_SECTION != rSection.GetType() &&
- SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState(RES_COL,false,&pItem) &&
+ SfxItemState::SET == rFmt.GetAttrSet().GetItemState(RES_COL,false,&pItem) &&
((const SwFmtCol *)pItem)->GetNumCols() > 1 )
{
pCol = (const SwFmtCol *)pItem;
@@ -838,10 +838,10 @@ static void OutBodyColor( const sal_Char* pTag, const SwFmt *pFmt,
const SfxItemSet& rItemSet = pFmt->GetAttrSet();
const SfxPoolItem *pRefItem = 0, *pItem = 0;
- bool bItemSet = SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_COLOR,
+ bool bItemSet = SfxItemState::SET == rItemSet.GetItemState( RES_CHRATR_COLOR,
true, &pItem);
bool bRefItemSet = pRefFmt &&
- SFX_ITEM_SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR,
+ SfxItemState::SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR,
true, &pRefItem);
if( bItemSet )
{
@@ -1233,7 +1233,7 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem, bool bGraphic
void SwHTMLWriter::OutBackground( const SfxItemSet& rItemSet, bool bGraphic )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ))
{
OutBackground( ((const SvxBrushItem*)pItem), bGraphic );
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index 07dca7fbe282..979a3cc1bfb9 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -71,7 +71,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- if( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
+ if( SfxItemState::SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
( !bTstForDefault || (
*pItem != rPool.GetDefaultItem( nWhich )
|| ( pSet->GetParent() &&
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 7416dc1d0677..cfa1781afff8 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -39,7 +39,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
{
const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) )
{
sal_Int16 eBoxVertOri =
((const SwFmtVertOrient *)pItem)->GetVertOrient();
@@ -153,7 +153,7 @@ long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) const
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ))
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
return nHeight;
@@ -170,7 +170,7 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
if( !pLine->GetUpper() )
@@ -589,11 +589,11 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ))
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
const SvxBrushItem *pBrushItem, *pLineBrush = pParentBrush;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
pLineBrush = (const SvxBrushItem *)pItem;
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index b59f30915253..6e97e7c19911 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -609,13 +609,13 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if( pSet )
{
if( !pTOXAttr->HadBreakItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pItem ) )
+ && SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_BREAK );
}
if( !pTOXAttr->HadPageDescItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) )
+ && SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_PAGEDESC );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index dd242027ecf6..eaa85bef3d61 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -911,7 +911,7 @@ void DocxAttributeOutput::EndParagraphProperties( const SfxItemSet* pParagraphMa
const SfxPoolItem* pItem = 0;
while( nWhichId )
{
- if( SFX_ITEM_SET == pParagraphMarkerProperties->GetItemState( nWhichId, true, &pItem ))
+ if( SfxItemState::SET == pParagraphMarkerProperties->GetItemState( nWhichId, true, &pItem ))
{
SAL_INFO( "sw.ww8", "nWhichId " << nWhichId);
if (isCHRATR( nWhichId ))
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 065368dd01ec..d15e4d274a7c 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -214,7 +214,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt )
{
bool bRet( false );
- if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false))
+ if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false))
{
if (const SwFmt *pParent = rFmt.DerivedFrom())
{
@@ -1287,7 +1287,7 @@ boost::optional<SvxBrushItem> DocxExport::getBackground()
SvxBrushItem aBrush(RES_BACKGROUND);
SfxItemState eState = rFmt.GetBackgroundState(aBrush);
- if (SFX_ITEM_SET == eState)
+ if (SfxItemState::SET == eState)
{
// The 'color' is set for the first page style - take it and use it as the background color of the entire DOCX
if (aBrush.GetColor().GetColor() != COL_AUTO)
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 8e855e0575ba..bf677269283e 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1659,7 +1659,7 @@ bool DocxSdrExport::checkFrameBtlr(SwNode* pStartNode, sax_fastparser::FastAttri
if (pTxtNode->HasSwAttrSet())
{
const SwAttrSet& rAttrSet = pTxtNode->GetSwAttrSet();
- bItemSet = rAttrSet.GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SFX_ITEM_SET;
+ bItemSet = rAttrSet.GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SfxItemState::SET;
}
if (!bItemSet)
@@ -1673,7 +1673,7 @@ bool DocxSdrExport::checkFrameBtlr(SwNode* pStartNode, sax_fastparser::FastAttri
return false;
boost::shared_ptr<SfxItemSet> pItemSet = pTxtAttr->GetAutoFmt().GetStyleHandle();
- bItemSet = pItemSet->GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SFX_ITEM_SET;
+ bItemSet = pItemSet->GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SfxItemState::SET;
}
if (bItemSet)
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 4de7cca2f684..aa47fed5baaa 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -762,7 +762,7 @@ bool RtfExport::DisallowInheritingOutlineNumbering(const SwFmt& rFmt)
{
bool bRet(false);
- if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false))
+ if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false))
{
if (const SwFmt* pParent = rFmt.DerivedFrom())
{
@@ -1112,10 +1112,10 @@ void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bWriteReset, b
// normal header / footer (without a style)
const SfxPoolItem* pItem;
if (pAktPageDesc->GetLeft().GetAttrSet().GetItemState(RES_HEADER, false,
- &pItem) == SFX_ITEM_SET)
+ &pItem) == SfxItemState::SET)
WriteHeaderFooter(*pItem, true);
if (pAktPageDesc->GetLeft().GetAttrSet().GetItemState(RES_FOOTER, false,
- &pItem) == SFX_ITEM_SET)
+ &pItem) == SfxItemState::SET)
WriteHeaderFooter(*pItem, false);
// title page
@@ -1124,10 +1124,10 @@ void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bWriteReset, b
Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_TITLEPG);
pAktPageDesc = &rPgDsc;
if (pAktPageDesc->GetMaster().GetAttrSet().GetItemState(RES_HEADER,
- false, &pItem) == SFX_ITEM_SET)
+ false, &pItem) == SfxItemState::SET)
WriteHeaderFooter(*pItem, true);
if (pAktPageDesc->GetMaster().GetAttrSet().GetItemState(RES_FOOTER,
- false, &pItem) == SFX_ITEM_SET)
+ false, &pItem) == SfxItemState::SET)
WriteHeaderFooter(*pItem, false);
}
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 2122e14d56d1..40519c663a26 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -423,7 +423,7 @@ namespace sw
for( sal_uInt16 nItem =0; nItem < nTotal; ++nItem )
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) )
+ if( SfxItemState::SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) )
{
rItems[pItem->Which()] = pItem;
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index ad8cd7af6c36..79a32b00b58a 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -286,7 +286,7 @@ void SwBasicEscherEx::PreWriteHyperlinkWithinFly(const SwFrmFmt& rFmt,EscherProp
{
const SfxPoolItem* pItem;
const SwAttrSet& rAttrSet = rFmt.GetAttrSet();
- if (SFX_ITEM_SET == rAttrSet.GetItemState(RES_URL, true, &pItem))
+ if (SfxItemState::SET == rAttrSet.GetItemState(RES_URL, true, &pItem))
{
const SwFmtURL *pINetFmt = dynamic_cast<const SwFmtURL*>(pItem);
if (pINetFmt && !pINetFmt->GetURL().isEmpty())
@@ -1436,7 +1436,7 @@ void WW8Export::CreateEscher()
{
SfxItemState eBackSet = pDoc->GetPageDesc(0).GetMaster().
GetItemState(RES_BACKGROUND);
- if (pHFSdrObjs->size() || pSdrObjs->size() || SFX_ITEM_SET == eBackSet)
+ if (pHFSdrObjs->size() || pSdrObjs->size() || SfxItemState::SET == eBackSet)
{
OSL_ENSURE( !pEscher, "wer hat den Pointer nicht geloescht?" );
SvMemoryStream* pEscherStrm = new SvMemoryStream;
@@ -1685,19 +1685,19 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
sal_Int32 nContrast = 0;
sal_Int16 nBrightness = 0;
- if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CONTRAST,
+ if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CONTRAST,
true, &pItem))
{
nContrast = ((SfxInt16Item*)pItem)->GetValue();
}
- if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_LUMINANCE,
+ if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_LUMINANCE,
true, &pItem))
{
nBrightness = ((SfxInt16Item*)pItem)->GetValue();
}
- if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_DRAWMODE,
+ if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_DRAWMODE,
true, &pItem))
{
nMode = ((SfxEnumItem*)pItem)->GetValue();
@@ -1748,7 +1748,7 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
if (nBrightness != 0)
rPropOpt.AddOpt( ESCHER_Prop_pictureBrightness, nBrightness * 327 );
- if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CROPGRF,
+ if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CROPGRF,
true, &pItem))
{
const Size aSz( rNd.GetTwipSize() );
@@ -1901,7 +1901,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
sal_Int32 nLineWidth=0;
const SfxPoolItem* pItem;
bool bFirstLine = true;
- if (SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem))
+ if (SfxItemState::SET == rFmt.GetItemState(RES_BOX, true, &pItem))
{
static const sal_uInt16 aExhperProp[4] =
{
@@ -1981,13 +1981,13 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
rPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 );
}
const SwAttrSet& rAttrSet = rFmt.GetAttrSet();
- if (SFX_ITEM_SET == rAttrSet.GetItemState(RES_BOX, false, &pItem))
+ if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem))
{
const SvxBoxItem* pBox = (const SvxBoxItem*)pItem;
if( pBox )
{
const SfxPoolItem* pShadItem;
- if (SFX_ITEM_SET
+ if (SfxItemState::SET
== rAttrSet.GetItemState(RES_SHADOW, true, &pShadItem))
{
const SvxShadowItem* pSI = (const SvxShadowItem*)pShadItem;
@@ -2078,7 +2078,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType
are exporting!
*/
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == rFmt.GetItemState(RES_LR_SPACE, true, &pItem))
+ if (SfxItemState::SET == rFmt.GetItemState(RES_LR_SPACE, true, &pItem))
{
rPropOpt.AddOpt( ESCHER_Prop_dxWrapDistLeft,
DrawModelToEmu( ((SvxLRSpaceItem*)pItem)->GetLeft() ) );
@@ -2091,7 +2091,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType
rPropOpt.AddOpt( ESCHER_Prop_dxWrapDistRight, 0 );
}
- if (SFX_ITEM_SET == rFmt.GetItemState(RES_UL_SPACE, true, &pItem))
+ if (SfxItemState::SET == rFmt.GetItemState(RES_UL_SPACE, true, &pItem))
{
rPropOpt.AddOpt( ESCHER_Prop_dyWrapDistTop,
DrawModelToEmu( ((SvxULSpaceItem*)pItem)->GetUpper() ) );
@@ -2318,7 +2318,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
const SfxPoolItem* pItem = 0;
SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true,
&pItem);
- if (SFX_ITEM_SET == eState && pItem)
+ if (SfxItemState::SET == eState && pItem)
{
const SvxBrushItem* pBrush = (const SvxBrushItem*)pItem;
WriteBrushAttr(*pBrush, aPropOpt);
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 8889d0f04401..5bb95bcc27dc 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -435,7 +435,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby )
sal_uInt16 nWhichId = aIter.FirstWhich();
while( nWhichId )
{
- if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, false, &pItem ))
+ if( SfxItemState::SET == pSet->GetItemState( nWhichId, false, &pItem ))
{
if (nWhichId == nFontId)
pFont = &(item_cast<SvxFontItem>(*pItem));
@@ -690,7 +690,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
const SfxItemSet* pSet = CharFmt::GetItemSet( pHt->GetAttr() );
const SfxPoolItem* pCharItem;
if ( pSet &&
- SFX_ITEM_SET == pSet->GetItemState( nWhich, pHt->Which() != RES_TXTATR_AUTOFMT, &pCharItem ) )
+ SfxItemState::SET == pSet->GetItemState( nWhich, pHt->Which() != RES_TXTATR_AUTOFMT, &pCharItem ) )
{
pRet = pCharItem; // found it
break;
@@ -1470,7 +1470,7 @@ const SvxBrushItem* WW8Export::GetCurrentPageBgBrush() const
SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true, &pItem);
const SvxBrushItem* pRet = (const SvxBrushItem*)pItem;
- if (SFX_ITEM_SET != eState || (!pRet->GetGraphic() &&
+ if (SfxItemState::SET != eState || (!pRet->GetGraphic() &&
pRet->GetColor() == COL_TRANSPARENT))
{
pRet = &(DefaultItemGet<SvxBrushItem>(*pDoc,RES_BACKGROUND));
@@ -1490,7 +1490,7 @@ SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const
SfxItemState eState =
pFlyFmt->GetItemState(RES_BACKGROUND, true, &pItem);
pRet = (const SvxBrushItem*)pItem;
- if (SFX_ITEM_SET != eState || (!pRet->GetGraphic() &&
+ if (SfxItemState::SET != eState || (!pRet->GetGraphic() &&
pRet->GetColor() == COL_TRANSPARENT))
{
pRet = 0;
@@ -2379,7 +2379,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if( (ND_HAS_PREV_LAYNODE|ND_HAS_NEXT_LAYNODE ) != nPrvNxtNd )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState(
+ if( SfxItemState::SET == rNode.GetSwAttrSet().GetItemState(
RES_UL_SPACE, true, &pItem ) &&
( ( !( ND_HAS_PREV_LAYNODE & nPrvNxtNd ) &&
((SvxULSpaceItem*)pItem)->GetUpper()) ||
@@ -2441,7 +2441,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
// correct fix for issue i94187
- if (SFX_ITEM_SET !=
+ if (SfxItemState::SET !=
pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) )
{
// List style set via paragraph style - then put it into the itemset.
@@ -2551,7 +2551,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
// assure that numbering rule is in <pTmpSet>
- if (SFX_ITEM_SET != pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) )
+ if (SfxItemState::SET != pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) )
{
pTmpSet->Put( SwNumRuleItem( pRule->GetName() ));
}
@@ -2562,7 +2562,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// If page break attribute at the text node exist, an existing page
// break after at the paragraph style hasn't got to be considered.
if ( !rNode.GetpSwAttrSet() ||
- SFX_ITEM_SET != rNode.GetpSwAttrSet()->GetItemState(RES_BREAK, false) )
+ SfxItemState::SET != rNode.GetpSwAttrSet()->GetItemState(RES_BREAK, false) )
{
const SvxFmtBreakItem* pBreakAtParaStyle =
&(ItemGet<SvxFmtBreakItem>(rNode.GetSwAttrSet(), RES_BREAK));
@@ -2740,7 +2740,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet )
if( pSet)
{
bool bNoPageBreak = false;
- if ( SFX_ITEM_SET != pSet->GetItemState(RES_PAGEDESC, true, &pI)
+ if ( SfxItemState::SET != pSet->GetItemState(RES_PAGEDESC, true, &pI)
|| 0 == ((SwFmtPageDesc*)pI)->GetPageDesc() )
{
bNoPageBreak = true;
@@ -2748,7 +2748,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet )
if (bNoPageBreak)
{
- if (SFX_ITEM_SET != pSet->GetItemState(RES_BREAK, true, &pI))
+ if (SfxItemState::SET != pSet->GetItemState(RES_BREAK, true, &pI))
bNoPageBreak = true;
else
{
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 307463885aea..41407d2afd9b 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -471,7 +471,7 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
for ( n = nStt; n < nEnd; ++n, ++pFlags )
{
if ( *pFlags && !m_rExport.ignoreAttributeForStyles( n )
- && SFX_ITEM_SET != rFmt.GetItemState(n, false))
+ && SfxItemState::SET != rFmt.GetItemState(n, false))
{
//If we are a character property then see if it is one of the
//western/asian ones that must be collapsed together for export to
@@ -1071,7 +1071,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
// Hole evtl. Pagedesc des 1. Nodes
if ( pSet &&
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, true, &pI ) &&
+ SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, true, &pI ) &&
( (SwFmtPageDesc*)pI )->GetPageDesc() )
{
AppendSection( *(SwFmtPageDesc*)pI, *pNd, pFmt, nRstLnNum );
@@ -1272,7 +1272,7 @@ void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt
sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rFmt.GetItemState(RES_HEADER, true, &pItem)
+ if( SfxItemState::SET == rFmt.GetItemState(RES_HEADER, true, &pItem)
&& ((SwFmtHeader*)pItem)->IsActive() &&
((SwFmtHeader*)pItem)->GetHeaderFmt() )
rHeadFootFlags |= nFlag;
@@ -1282,7 +1282,7 @@ void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt
sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rFmt.GetItemState(RES_FOOTER, true, &pItem)
+ if( SfxItemState::SET == rFmt.GetItemState(RES_FOOTER, true, &pItem)
&& ((SwFmtFooter*)pItem)->IsActive() &&
((SwFmtFooter*)pItem)->GetFooterFmt() )
rHeadFootFlags |= nFlag;
@@ -1390,7 +1390,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const
bool MSWordSections::HasBorderItem( const SwFmt& rFmt )
{
const SfxPoolItem* pItem;
- return SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem) &&
+ return SfxItemState::SET == rFmt.GetItemState(RES_BOX, true, &pItem) &&
( ((SvxBoxItem*)pItem)->GetTop() ||
((SvxBoxItem*)pItem)->GetBottom() ||
((SvxBoxItem*)pItem)->GetLeft() ||
@@ -1756,7 +1756,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
const SfxItemSet* pOldI = pISet;
const SfxPoolItem* pItem;
- if ( titlePage && SFX_ITEM_SET ==
+ if ( titlePage && SfxItemState::SET ==
pPdFirstPgFmt->GetItemState( RES_PAPER_BIN, true, &pItem ) )
{
pISet = &pPdFirstPgFmt->GetAttrSet();
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 65ba9570e32b..fa6100237ea2 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -647,7 +647,7 @@ const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
// ourer own Ids. So the Id have to translate from our into the
// EditEngine Range
nWhich = sw::hack::GetSetWhichFromSwDocWhich(*pISet, *pDoc, nWhich);
- if (nWhich && SFX_ITEM_SET != pISet->GetItemState(nWhich, true, &pItem))
+ if (nWhich && SfxItemState::SET != pISet->GetItemState(nWhich, true, &pItem))
pItem = 0;
}
else if( pChpIter )
@@ -1994,7 +1994,7 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR
((SwTxtNode*)pCNd)->GetAttr( aCoreSet, 0, ((SwTxtNode*)pCNd)->GetTxt().getLength());
const SvxCharRotateItem * pRotate = NULL;
const SfxPoolItem * pRotItem;
- if ( SFX_ITEM_SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem))
+ if ( SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem))
{
pRotate = (SvxCharRotateItem*)pRotItem;
if(pRotate && pRotate->GetValue() == 900)
@@ -2473,7 +2473,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
const SfxPoolItem * pI = NULL;
Color aColor;
- if ( SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) )
+ if ( SfxItemState::SET == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) )
{
aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor();
}
@@ -2505,7 +2505,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
const SfxPoolItem * pI = NULL;
Color aColor;
- if ( SFX_ITEM_SET ==
+ if ( SfxItemState::SET ==
pFrmFmt->GetAttrSet().
GetItemState( RES_BACKGROUND, false, &pI ) )
{
@@ -2592,7 +2592,7 @@ void MSWordExportBase::WriteText()
if ( pTempNext )
{
const SfxPoolItem * pTempItem = NULL;
- if (pTempNext->GetpSwAttrSet() && SFX_ITEM_SET == pTempNext->GetpSwAttrSet()->GetItemState(RES_PAGEDESC, false, &pTempItem)
+ if (pTempNext->GetpSwAttrSet() && SfxItemState::SET == pTempNext->GetpSwAttrSet()->GetItemState(RES_PAGEDESC, false, &pTempItem)
&& pTempItem && ((SwFmtPageDesc*)pTempItem)->GetRegisteredIn())
{
//Next node has a new page style which means this node is a section end. Do not insert another page/section break here
@@ -3219,7 +3219,7 @@ void WW8Export::ExportDocument_Impl()
const SfxPoolItem* pItem;
SwTxtFmtColl* pStdTxtFmtColl =
pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false);
- if (pStdTxtFmtColl && SFX_ITEM_SET == pStdTxtFmtColl->GetItemState(
+ if (pStdTxtFmtColl && SfxItemState::SET == pStdTxtFmtColl->GetItemState(
RES_PARATR_HYPHENZONE, false, &pItem))
{
pDop->fAutoHyphen = ((const SvxHyphenZoneItem*)pItem)->IsHyphen();
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 1baf2e94bde9..9d47d5daa638 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -539,7 +539,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
// write Crop-Attribut content in Header ( if available )
const SfxPoolItem* pItem;
- if (pAttrSet && (SFX_ITEM_SET
+ if (pAttrSet && (SfxItemState::SET
== pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
{
const SwCropGrf& rCr = *(SwCropGrf*)pItem;
@@ -560,7 +560,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
sal_uInt8* pArr = aArr + 0x2E; // Do borders first
const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet();
- if (SFX_ITEM_SET == rAttrSet.GetItemState(RES_BOX, false, &pItem))
+ if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem))
{
const SvxBoxItem* pBox = (const SvxBoxItem*)pItem;
if( pBox )
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 82f8ea053b91..684e00e1be86 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -261,10 +261,10 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
pISet = &rSet; // fuer Doppel-Attribute
// If frame dir is set, but not adjust, then force adjust as well
- if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, bExportParentItemSet ) )
+ if ( bPapFmt && SfxItemState::SET == rSet.GetItemState( RES_FRAMEDIR, bExportParentItemSet ) )
{
// No explicit adjust set ?
- if ( SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_ADJUST, bExportParentItemSet ) )
+ if ( SfxItemState::SET != rSet.GetItemState( RES_PARATR_ADJUST, bExportParentItemSet ) )
{
if ( 0 != ( pItem = rSet.GetItem( RES_PARATR_ADJUST, bExportParentItemSet ) ) )
{
@@ -274,14 +274,14 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
}
}
- if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, bExportParentItemSet, &pItem ) )
+ if ( bPapFmt && SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, bExportParentItemSet, &pItem ) )
{
AttrOutput().OutputItem( *pItem );
// switch off the numerbering?
if ( ( (SwNumRuleItem*)pItem )->GetValue().isEmpty() &&
- SFX_ITEM_SET != rSet.GetItemState( RES_LR_SPACE, false) &&
- SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
+ SfxItemState::SET != rSet.GetItemState( RES_LR_SPACE, false) &&
+ SfxItemState::SET == rSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
{
// the set the LR-Space of the parentformat!
AttrOutput().OutputItem( *pItem );
@@ -455,7 +455,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
if ( pSet && pSet->Count() )
{
- if ( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) &&
+ if ( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) &&
static_cast<const SwFmtPageDesc*>(pItem)->GetRegisteredIn() != NULL)
{
bBreakSet = true;
@@ -463,7 +463,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
pPgDesc = static_cast<const SwFmtPageDesc*>(pItem);
pAktPageDesc = pPgDesc->GetPageDesc();
}
- else if ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pItem ) )
+ else if ( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) )
{
// Word does not like hard break attributes in some table cells
bool bRemoveHardBreakInsideTable = false;
@@ -732,7 +732,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
//numbered, then in writer this is no inheritied, but in word it would
//be, so we must export "no numbering" and "body level" to make word
//behave like writer (see #i25755)
- if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false))
+ if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false))
{
if (const SwFmt *pParent = rFmt.DerivedFrom())
{
@@ -847,7 +847,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
aSet.Put(aAnchor);
}
- if (SFX_ITEM_SET != aSet.GetItemState(RES_SURROUND))
+ if (SfxItemState::SET != aSet.GetItemState(RES_SURROUND))
aSet.Put(SwFmtSurround(SURROUND_NONE));
const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rFrmFmt.GetAttrSet().GetItem(XATTR_FILLSTYLE)));
@@ -3708,7 +3708,7 @@ void AttributeOutputBase::FormatPageDescription( const SwFmtPageDesc& rPageDesc
if ( GetExport().bStyDef && GetExport().pOutFmtNode && GetExport().pOutFmtNode->ISA( SwTxtFmtColl ) )
{
const SwTxtFmtColl* pC = (SwTxtFmtColl*)GetExport().pOutFmtNode;
- if ( (SFX_ITEM_SET != pC->GetItemState( RES_BREAK, false ) ) && rPageDesc.KnowsPageDesc() )
+ if ( (SfxItemState::SET != pC->GetItemState( RES_BREAK, false ) ) && rPageDesc.KnowsPageDesc() )
FormatBreak( SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) );
}
}
@@ -5520,7 +5520,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, bool bDeep
sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- if ( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
+ if ( SfxItemState::SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
( !bTestForDefault ||
*pItem != rPool.GetDefaultItem( nWhich ) ||
( pSet->GetParent() && *pItem != pSet->GetParent()->Get( nWhich ) ) ) )
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index a810e7143965..1283d9a2caee 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -502,7 +502,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl )
{
// If we are set in the source and not set in the destination
// then add it in.
- if ( SFX_ITEM_SET == pStyInf->pFmt->GetItemState(
+ if ( SfxItemState::SET == pStyInf->pFmt->GetItemState(
i, true, &pItem ) )
{
SfxItemPool *pEditPool = rS.GetPool();
@@ -512,7 +512,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl )
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
nWhich != nSlotId &&
- ( SFX_ITEM_SET != rS.GetItemState(nWhich, false) )
+ ( SfxItemState::SET != rS.GetItemState(nWhich, false) )
)
{
SfxPoolItem* pCopy = pItem->Clone();
@@ -1583,7 +1583,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
};
const SfxPoolItem* pPoolItem;
for(sal_uInt16 nItem = 0; nItem < nDirectMatch; ++nItem)
- if( SFX_ITEM_SET == rOldSet.GetItemState(
+ if( SfxItemState::SET == rOldSet.GetItemState(
static_cast< sal_uInt16 >(aDirectMatch[ nItem ]), false, &pPoolItem) )
{
rFlySet.Put( *pPoolItem );
@@ -1600,7 +1600,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const SfxPoolItem* pItem;
SfxItemState eState = rOldSet.GetItemState(XATTR_LINESTYLE,true,&pItem);
- if( eState == SFX_ITEM_SET )
+ if( eState == SfxItemState::SET )
{
// Now, that we know there is a line style we will make use the
// parameter given to us when calling the method... :-)
@@ -1655,7 +1655,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
SdrOnOffItem));
// Size: SwFmtFrmSize
- if( SFX_ITEM_SET != rFlySet.GetItemState(RES_FRM_SIZE, false) )
+ if( SfxItemState::SET != rFlySet.GetItemState(RES_FRM_SIZE, false) )
{
const Rectangle& rSnapRect = pSdrObj->GetSnapRect();
// if necessary adapt width and position of the framework: The
@@ -1736,7 +1736,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// Separate transparency
eState = rOldSet.GetItemState(XATTR_FILLTRANSPARENCE, true, &pItem);
- if (eState == SFX_ITEM_SET)
+ if (eState == SfxItemState::SET)
{
sal_uInt16 nRes = WW8ITEMVALUE(rOldSet, XATTR_FILLTRANSPARENCE,
XFillTransparenceItem);
@@ -1747,7 +1747,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// Hintergrund: SvxBrushItem
eState = rOldSet.GetItemState(XATTR_FILLSTYLE, true, &pItem);
- if (eState == SFX_ITEM_SET)
+ if (eState == SfxItemState::SET)
{
const drawing::FillStyle eFill = ((const XFillStyleItem*)pItem)->GetValue();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 07627fbef13a..552104f2c5d1 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1007,7 +1007,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
false, &pPoolItem );
- if( SFX_ITEM_DEFAULT == eState )
+ if( SfxItemState::DEFAULT == eState )
aSet.Put( XFillColorItem( OUString(),
Color( mnDefaultColor ) ) );
pObj->SetMergedItemSet(aSet);
@@ -1513,10 +1513,10 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
*/
if (nWhich == RES_LR_SPACE)
{
- SfxItemState eState = SFX_ITEM_DEFAULT;
+ SfxItemState eState = SfxItemState::DEFAULT;
if (const SfxItemSet *pSet = pNd->GetpSwAttrSet())
eState = pSet->GetItemState(RES_LR_SPACE, false);
- if (eState != SFX_ITEM_SET && rReader.nAktColl < rReader.vColl.size())
+ if (eState != SfxItemState::SET && rReader.nAktColl < rReader.vColl.size())
pItem = &(rReader.vColl[rReader.nAktColl].maWordLR);
}
@@ -1714,7 +1714,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
const SfxPoolItem* pTabs;
bFound = pSty->GetAttrSet().GetItemState(RES_PARATR_TABSTOP, false,
- &pTabs) == SFX_ITEM_SET;
+ &pTabs) == SfxItemState::SET;
if( bFound )
aAttr = *((const SvxTabStopItem*)pTabs);
else
@@ -5496,7 +5496,7 @@ namespace
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPasswordItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, true, &pPasswordItem))
+ if(pSet && SfxItemState::SET == pSet->GetItemState(SID_PASSWORD, true, &pPasswordItem))
aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue();
else
{
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 8ba8fb3f4e23..90d7add71af3 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2356,7 +2356,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem)
{
SfxPoolItem *pSetAttr = 0;
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == pSet->GetItemState(RES_BREAK, false, &pItem))
+ if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false, &pItem))
{
pSetAttr = new SvxFmtBreakItem( *(SvxFmtBreakItem*)pItem );
pNd->ResetAttr( RES_BREAK );
@@ -4413,7 +4413,7 @@ void WW8RStyle::Import()
if (pIo->mbNewDoc && pIo->pStandardFmtColl)
{
if (pIo->pWDop->fAutoHyphen
- && SFX_ITEM_SET != pIo->pStandardFmtColl->GetItemState(
+ && SfxItemState::SET != pIo->pStandardFmtColl->GetItemState(
RES_PARATR_HYPHENZONE, false) )
{
SvxHyphenZoneItem aAttr(true, RES_PARATR_HYPHENZONE);
@@ -4429,7 +4429,7 @@ void WW8RStyle::Import()
the page/sections rtl setting the standard style lack of rtl still
means ltr
*/
- if (SFX_ITEM_SET != pIo->pStandardFmtColl->GetItemState(RES_FRAMEDIR,
+ if (SfxItemState::SET != pIo->pStandardFmtColl->GetItemState(RES_FRAMEDIR,
false))
{
pIo->pStandardFmtColl->SetFmtAttr(
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 9c4a9a0b958a..c81eb9c57cb1 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -976,7 +976,7 @@ void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule,
while (true)
{
if( // ggfs. passenden pItem im pLowerLevelItemSet finden
- (SFX_ITEM_SET != pLowerLevelItemSet->GetItemState(
+ (SfxItemState::SET != pLowerLevelItemSet->GetItemState(
nWhich, false, &pItem ) )
|| // virtuellen "!=" Operator anwenden
(*pItem != *aIter.GetCurItem() ) )
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index a7fd92c33839..40c6fee0cfa3 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -3266,9 +3266,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
const SfxItemSet* pSet = pNd->GetpSwAttrSet();
if( pSet )
{
- if (SFX_ITEM_SET == pSet->GetItemState(RES_BREAK, false))
+ if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false))
aFltTOX.SetHadBreakItem(true);
- if (SFX_ITEM_SET == pSet->GetItemState(RES_PAGEDESC, false))
+ if (SfxItemState::SET == pSet->GetItemState(RES_PAGEDESC, false))
aFltTOX.SetHadPageDescItem(true);
}
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index d25b5a24ad69..3f3fd8f27ea5 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3354,7 +3354,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
{
if ( pAktColl ) //importing style
{
- if( SFX_ITEM_SET == pAktColl->GetItemState( RES_CHRATR_UNDERLINE, false ) )
+ if( SfxItemState::SET == pAktColl->GetItemState( RES_CHRATR_UNDERLINE, false ) )
{
const SwAttrSet& aSet = pAktColl->GetAttrSet();
SvxUnderlineItem *pUnderline
@@ -3368,7 +3368,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
}
else if ( pAktItemSet )
{
- if ( SFX_ITEM_SET == pAktItemSet->GetItemState( RES_CHRATR_UNDERLINE, false ) )
+ if ( SfxItemState::SET == pAktItemSet->GetItemState( RES_CHRATR_UNDERLINE, false ) )
{
SvxUnderlineItem *pUnderline
= (SvxUnderlineItem *)(pAktItemSet->Get( RES_CHRATR_UNDERLINE, false ) .Clone());
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 0ce5f74e1f0f..cdd9cd0d0f19 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -262,7 +262,7 @@ const SfxPoolItem* SvXMLExportItemMapper::GetItem( const SfxItemSet& rSet,
( nFlags & XML_EXPORT_FLAG_DEEP ) != 0,
&pItem );
- if( SFX_ITEM_SET == eState )
+ if( SfxItemState::SET == eState )
{
return pItem;
}
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 06f27fae5038..a23576148b86 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -654,7 +654,7 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc()
const SfxPoolItem *pItem;
SwFmtPageDesc *pFmtPageDesc = 0;
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_PAGEDESC, false,
+ if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, false,
&pItem ) )
{
if( ((SwFmtPageDesc *)pItem)->GetPageDesc() != pPageDesc )
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index 5f7118640a73..d13df377e6e9 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -82,7 +82,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
if( RES_FRMFMT == rFmt.Which() && XML_TABLE == eFamily )
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState( RES_PAGEDESC,
+ if( SfxItemState::SET == rFmt.GetAttrSet().GetItemState( RES_PAGEDESC,
false, &pItem ) )
{
OUString sName;
@@ -104,7 +104,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
OSL_ENSURE(RES_FRMFMT == rFmt.Which(), "only frame format");
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET ==
+ if( SfxItemState::SET ==
rFmt.GetAttrSet().GetItemState( RES_BOXATR_FORMAT,
false, &pItem ) )
{
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 5a6a947e0152..5dde34b5e661 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -110,11 +110,11 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
&pItem );
// if its not set, try the pool
- if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > pEntry->nWhichId )
+ if(SfxItemState::SET != eState && SFX_WHICH_MAX > pEntry->nWhichId )
pItem = &rSet.GetPool()->GetDefaultItem(pEntry->nWhichId);
// do we have an item?
- if(eState >= SFX_ITEM_DEFAULT && pItem)
+ if(eState >= SfxItemState::DEFAULT && pItem)
{
SfxPoolItem *pNewItem = pItem->Clone();
bool bPut = false;
@@ -154,7 +154,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if( !pUnknownItem )
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, true,
+ if( SfxItemState::SET == rSet.GetItemState( nUnknownWhich, true,
&pItem ) )
{
SfxPoolItem *pNew = pItem->Clone();
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index c2d13b9ef330..254129b4a8d5 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -126,7 +126,7 @@ void SwXMLTableItemMapper_Impl::handleSpecialItem(
{
const SfxPoolItem *pItem;
if( pSet &&
- SFX_ITEM_SET == pSet->GetItemState( RES_HORI_ORIENT, true,
+ SfxItemState::SET == pSet->GetItemState( RES_HORI_ORIENT, true,
&pItem ) )
{
sal_Int16 eHoriOrient =
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index d3a425fe6fe6..6554cc496256 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -163,7 +163,7 @@ bool SwXMLImportTableItemMapper_Impl::handleSpecialItem(
case MID_FRMSIZE_COL_WIDTH:
// If the item is existing already, a relative value has been set
// already that must be preserved.
- if( SFX_ITEM_SET != rItemSet.GetItemState( RES_FRM_SIZE,
+ if( SfxItemState::SET != rItemSet.GetItemState( RES_FRM_SIZE,
false ) )
bRet = SvXMLImportItemMapper::PutXMLValue(
rItem, rValue, nMemberId, rUnitConv );
@@ -217,13 +217,13 @@ void SwXMLImportTableItemMapper_Impl::finished(
rSet.GetItemState(Ids[i][0], true, &pItem);
// if not set, try the pool
- if ((SFX_ITEM_SET != eState) && (SFX_WHICH_MAX > Ids[i][0]))
+ if ((SfxItemState::SET != eState) && (SFX_WHICH_MAX > Ids[i][0]))
{
pItem = &rSet.GetPool()->GetDefaultItem(Ids[i][0]);
}
// do we have an item?
- if (eState >= SFX_ITEM_DEFAULT && pItem)
+ if (eState >= SfxItemState::DEFAULT && pItem)
{
SfxPoolItem *const pNewItem = pItem->Clone();
bool const bPut = PutXMLValue(
@@ -301,7 +301,7 @@ SvXMLImportContext *SwXMLItemSetContext_Impl::CreateChildContext(
case RES_BACKGROUND:
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == _rItemSet.GetItemState( RES_BACKGROUND,
+ if( SfxItemState::SET == _rItemSet.GetItemState( RES_BACKGROUND,
false, &pItem ) )
{
pContext = new SwXMLBrushItemImportContext(
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 2065d98cefa5..6e4b8006a76b 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -197,13 +197,13 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, false, &pItem ) )
pFrmSize = (const SwFmtFrmSize *)pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_ROW_SPLIT, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_ROW_SPLIT, false, &pItem ) )
pRowSplit = (const SwFmtRowSplit *)pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
pBrush = (const SvxBrushItem *)pItem;
// empty styles have not to be exported
@@ -220,7 +220,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
const SvxBrushItem *pTestBrush = 0;
const SwFrmFmt *pTestFmt = *i;
const SfxItemSet& rTestSet = pTestFmt->GetAttrSet();
- if( SFX_ITEM_SET == rTestSet.GetItemState( RES_FRM_SIZE, false,
+ if( SfxItemState::SET == rTestSet.GetItemState( RES_FRM_SIZE, false,
&pItem ) )
{
if( !pFrmSize )
@@ -234,7 +234,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
continue;
}
- if( SFX_ITEM_SET == rTestSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == rTestSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
if( !pBrush )
@@ -248,7 +248,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
continue;
}
- if( SFX_ITEM_SET == rTestSet.GetItemState( RES_ROW_SPLIT, false,
+ if( SfxItemState::SET == rTestSet.GetItemState( RES_ROW_SPLIT, false,
&pItem ) )
{
if( !pRowSplit )
@@ -315,20 +315,20 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, false,
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, false,
&pItem ) )
pVertOrient = (const SwFmtVertOrient *)pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) )
pBrush = (const SvxBrushItem *)pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) )
+ if( SfxItemState::SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) )
pBox = (const SvxBoxItem *)pItem;
- if ( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOXATR_FORMAT,
+ if ( SfxItemState::SET == rItemSet.GetItemState( RES_BOXATR_FORMAT,
false, &pItem ) )
pNumFmt = (const SwTblBoxNumFormat *)pItem;
- if ( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRAMEDIR,
+ if ( SfxItemState::SET == rItemSet.GetItemState( RES_FRAMEDIR,
false, &pItem ) )
pFrameDir = (const SvxFrameDirectionItem *)pItem;
@@ -353,7 +353,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
const SvxFrameDirectionItem *pTestFrameDir = 0;
const SwFrmFmt* pTestFmt = *i;
const SfxItemSet& rTestSet = pTestFmt->GetAttrSet();
- if( SFX_ITEM_SET == rTestSet.GetItemState( RES_VERT_ORIENT, false,
+ if( SfxItemState::SET == rTestSet.GetItemState( RES_VERT_ORIENT, false,
&pItem ) )
{
if( !pVertOrient )
@@ -367,7 +367,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
continue;
}
- if( SFX_ITEM_SET == rTestSet.GetItemState( RES_BACKGROUND, false,
+ if( SfxItemState::SET == rTestSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
if( !pBrush )
@@ -381,7 +381,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
continue;
}
- if( SFX_ITEM_SET == rTestSet.GetItemState( RES_BOX, false, &pItem ) )
+ if( SfxItemState::SET == rTestSet.GetItemState( RES_BOX, false, &pItem ) )
{
if( !pBox )
break;
@@ -394,7 +394,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
continue;
}
- if ( SFX_ITEM_SET == rTestSet.GetItemState( RES_BOXATR_FORMAT,
+ if ( SfxItemState::SET == rTestSet.GetItemState( RES_BOXATR_FORMAT,
false, &pItem ) )
{
if( !pNumFmt )
@@ -409,7 +409,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
}
- if ( SFX_ITEM_SET == rTestSet.GetItemState( RES_FRAMEDIR,
+ if ( SfxItemState::SET == rTestSet.GetItemState( RES_FRAMEDIR,
false, &pItem ) )
{
if( !pFrameDir )
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index a05ca718a053..0b0bd94126f9 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -795,7 +795,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
XML_STYLE_FAMILY_TABLE_COLUMN,
aStyleName, &pAutoItemSet ) &&
pAutoItemSet &&
- SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false,
+ SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false,
&pItem ) )
{
const SwFmtFrmSize *pSize = ((const SwFmtFrmSize *)pItem);
@@ -2080,7 +2080,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// default num format?
const SfxPoolItem* pItem = NULL;
if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, false, &pItem )
- == SFX_ITEM_SET )
+ == SfxItemState::SET )
{
const SwTblBoxNumFormat* pNumFormat =
static_cast<const SwTblBoxNumFormat*>( pItem );
@@ -2135,7 +2135,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// the cell gets the default text format.
const SfxPoolItem* pItem = NULL;
if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, false, &pItem )
- == SFX_ITEM_SET )
+ == SfxItemState::SET )
{
const SwDoc* pDoc = pBoxFmt->GetDoc();
const SvNumberFormatter* pNumberFormatter = pDoc ?
@@ -2670,11 +2670,11 @@ void SwXMLTableContext::MakeTable()
{
const SfxPoolItem *pItem;
const SvxLRSpaceItem *pLRSpace = 0;
- if( SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_LR_SPACE, false,
+ if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_LR_SPACE, false,
&pItem ) )
pLRSpace = (const SvxLRSpaceItem *)pItem;
- if( SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_HORI_ORIENT, false,
+ if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_HORI_ORIENT, false,
&pItem ) )
{
eHoriOrient = ((const SwFmtHoriOrient *)pItem)->GetHoriOrient();
@@ -2704,7 +2704,7 @@ void SwXMLTableContext::MakeTable()
}
const SwFmtFrmSize *pSize = 0;
- if( SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false,
+ if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false,
&pItem ) )
pSize = (const SwFmtFrmSize *)pItem;
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;
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;