diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 17:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 06:08:32 +0000 |
commit | ea733ab5b632109d28bb8f1dc37116340b26229b (patch) | |
tree | 78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /sw/source/core/doc/docfly.cxx | |
parent | cc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff) |
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")
Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/core/doc/docfly.cxx')
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
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() ) { |