diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 17:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 06:08:32 +0000 |
commit | ea733ab5b632109d28bb8f1dc37116340b26229b (patch) | |
tree | 78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /sd/source/ui/func | |
parent | cc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff) |
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")
Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fubullet.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/func/fuchar.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/fuconbez.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuconrec.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fucopy.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/func/fuhhconv.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuoaprms.cxx | 32 | ||||
-rw-r--r-- | sd/source/ui/func/fuolbull.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/func/fupage.cxx | 22 | ||||
-rw-r--r-- | sd/source/ui/func/fuparagr.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fupoor.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuprlout.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 32 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 4 |
14 files changed, 87 insertions, 87 deletions
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 7409c4c0d4ab..7fdee9ce7011 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -290,14 +290,14 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* pViewShell, SfxViewFrame* pViewFrame ) { - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CHARMAP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_RLM ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_LRM ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_ZWNBSP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_ZWSP )) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CHARMAP ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_RLM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_LRM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_ZWNBSP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_ZWSP )) { ::sd::View* pView = pViewShell ? pViewShell->GetView() : 0; OutlinerView* pOLV = pView ? pView->GetTextEditOutlinerView() : 0; diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index 8b929c373df7..174391ac74da 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -115,9 +115,9 @@ void FuChar::DoExecute( SfxRequest& rReq ) if( mpDoc->GetOnlineSpell() ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, false, &pItem ) || - SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pItem ) || - SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, false, &pItem ) || + SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pItem ) || + SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pItem ) ) { mpDoc->StopOnlineSpelling(); mpDoc->StartOnlineSpelling(); diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index ad605555c805..bf74e9c2414b 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -79,7 +79,7 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq ) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) ) maTargets = ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue(); } } diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index ced9706fe4e2..3ed1773d8790 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -599,7 +599,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) long nWidth = 300; // (1/100th mm) // determine line width and calculate with it the line end width - if( aSet.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE ) + if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) { long nValue = ( ( const XLineWidthItem& ) aSet.Get( XATTR_LINEWIDTH ) ).GetValue(); if( nValue > 0 ) diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index c4bc3d791c1f..03477a588620 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -84,12 +84,12 @@ void FuCopy::DoExecute( SfxRequest& rReq ) mpView->GetAttributes( aAttr ); const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) ) + if( SfxItemState::SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) ) { drawing::FillStyle eStyle = ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); if( eStyle == drawing::FillStyle_SOLID && - SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLCOLOR, true, &pPoolItem ) ) + SfxItemState::SET == aAttr.GetItemState( XATTR_FILLCOLOR, true, &pPoolItem ) ) { const XFillColorItem* pItem = ( const XFillColorItem* ) pPoolItem; XColorItem aXColorItem( ATTR_COPY_START_COLOR, pItem->GetName(), @@ -134,30 +134,30 @@ void FuCopy::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pPoolItem = NULL; // Count - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) nNumber = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue(); // translation - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) lSizeX = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) lSizeY = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) lAngle = ( ( const SfxInt32Item* )pPoolItem )->GetValue(); // scale - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) lWidth = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) lHeight = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); // start/end color - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { aStartColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); bColor = true; } - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) { aEndColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); if( aStartColor == aEndColor ) diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index 604e04cff453..24a3f0b1212f 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -164,11 +164,11 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const Fo const bool bHasParent = !pStyle->GetParent().isEmpty(); - if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, false ) == SFX_ITEM_SET ) + if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, false ) == SfxItemState::SET ) rSet.Put( SvxLanguageItem( nTargetLanguage, EE_CHAR_LANGUAGE_CJK ) ); if( pTargetFont && - ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, false ) == SFX_ITEM_SET ) ) + ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, false ) == SfxItemState::SET ) ) { // set new font attribute SvxFontItem aFontItem( (SvxFontItem&) rSet.Get( EE_CHAR_FONTINFO_CJK ) ); diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 0f1e27d7185d..fe23ac51e4fb 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -461,7 +461,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) } // evaluation of the ItemSets - if (pArgs->GetItemState(ATTR_ANIMATION_ACTIVE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_ACTIVE) == SfxItemState::SET) { bActive = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_ACTIVE)).GetValue(); nAnimationSet = ATTR_SET; @@ -469,7 +469,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nAnimationSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SfxItemState::SET) { eEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_EFFECT)).GetValue(); @@ -478,7 +478,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SfxItemState::SET) { eTextEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_TEXTEFFECT)).GetValue(); @@ -487,7 +487,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nTextEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SfxItemState::SET) { eSpeed = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_SPEED)).GetValue(); @@ -496,7 +496,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSpeedSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_FADEOUT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_FADEOUT) == SfxItemState::SET) { bFadeOut = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_FADEOUT)).GetValue(); nFadeOutSet = ATTR_SET; @@ -504,7 +504,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nFadeOutSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_INVISIBLE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_INVISIBLE) == SfxItemState::SET) { bInvisible = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_INVISIBLE)).GetValue(); nInvisibleSet = ATTR_SET; @@ -512,7 +512,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nInvisibleSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDON) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDON) == SfxItemState::SET) { bSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_SOUNDON)).GetValue(); nSoundOnSet = ATTR_SET; @@ -520,7 +520,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSoundOnSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDFILE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDFILE) == SfxItemState::SET) { aSound = ((SfxStringItem&)pArgs->Get(ATTR_ANIMATION_SOUNDFILE)).GetValue(); nSoundFileSet = ATTR_SET; @@ -528,7 +528,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSoundFileSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_COLOR) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_COLOR) == SfxItemState::SET) { aFadeColor = ((SvxColorItem&)pArgs->Get(ATTR_ANIMATION_COLOR)).GetValue(); nFadeColorSet = ATTR_SET; @@ -536,7 +536,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nFadeColorSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_PLAYFULL) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_PLAYFULL) == SfxItemState::SET) { bPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_PLAYFULL)).GetValue(); nPlayFullSet = ATTR_SET; @@ -544,7 +544,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nPlayFullSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION) == SfxItemState::SET) { eClickAction = (presentation::ClickAction)((SfxAllEnumItem&)pArgs-> Get(ATTR_ACTION)).GetValue(); @@ -553,7 +553,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nClickActionSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_FILENAME) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_FILENAME) == SfxItemState::SET) { aBookmark = ((SfxStringItem&)pArgs-> Get(ATTR_ACTION_FILENAME)).GetValue(); @@ -562,7 +562,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nBookmarkSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SfxItemState::SET) { eSecondEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ACTION_EFFECT)).GetValue(); @@ -571,7 +571,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SfxItemState::SET) { eSecondSpeed = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs-> Get(ATTR_ACTION_EFFECTSPEED)).GetValue(); @@ -580,7 +580,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondSpeedSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_SOUNDON) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_SOUNDON) == SfxItemState::SET) { bSecondSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_SOUNDON)).GetValue(); nSecondSoundOnSet = ATTR_SET; @@ -588,7 +588,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondSoundOnSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_PLAYFULL) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_PLAYFULL) == SfxItemState::SET) { bSecondPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_PLAYFULL)).GetValue(); nSecondPlayFullSet = ATTR_SET; diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 2bc9809f53ae..c4776f558875 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -207,7 +207,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) { sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF; const SfxPoolItem* pNumLevelItem = NULL; - if(SFX_ITEM_SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pNumLevelItem)) + if(SfxItemState::SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pNumLevelItem)) nActNumLvl = ((const SfxUInt16Item*)pNumLevelItem)->GetValue(); pNumRuleMgr->SetItems(&aNewAttr); @@ -301,7 +301,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u //SvxNumBulletItem* pRetItem = NULL; const SfxPoolItem* pTmpItem = NULL; - if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SFX_ITEM_SET) + if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SfxItemState::SET) { return pTmpItem; } @@ -309,7 +309,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u { nNumItemId = aNewAttr.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); SfxItemState eState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) return pTmpItem; else { @@ -356,7 +356,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u aNewAttr.Put(*pItem, EE_PARA_NUMBULLET); - if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)aNewAttr.GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pLclRule = pBulletItem->GetNumRule(); @@ -371,11 +371,11 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u } SfxItemState eItemState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eItemState == SFX_ITEM_SET) + if (eItemState == SfxItemState::SET) return pTmpItem; } - //DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!") + //DBG_ASSERT(eState == SfxItemState::SET, "kein Item gefunden!") } return pTmpItem; } diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 53429c37f7b8..fe3e1f145a86 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -326,9 +326,9 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) bool bChanges = false; for( sal_uInt16 i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ ) { - if( aMergedAttr.GetItemState( i ) != SFX_ITEM_DEFAULT ) + if( aMergedAttr.GetItemState( i ) != SfxItemState::DEFAULT ) { - if( pTempSet->GetItemState( i ) == SFX_ITEM_DEFAULT ) + if( pTempSet->GetItemState( i ) == SfxItemState::DEFAULT ) pTempSet->Put( aMergedAttr.Get( i ) ); else if( aMergedAttr.GetItem( i ) != pTempSet->GetItem( i ) ) @@ -338,7 +338,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) // if the background for this page was set to invisible, the background-object has to be deleted, too. if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) || - ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) && + ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT ) && ( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) ) ) mbPageBckgrdDeleted = true; @@ -451,7 +451,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) } const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) ) + if( SfxItemState::SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) ) { sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); mpDoc->SetDefaultWritingMode( nVal == FRMDIR_HORI_RIGHT_TOP ? ::com::sun::star::text::WritingMode_RL_TB : ::com::sun::star::text::WritingMode_LR_TB ); @@ -495,7 +495,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) bool bFullSize = pMasterPage->IsBackgroundFullSize(); sal_uInt16 nPaperBin = mpPage->GetPaperBin(); - if( pArgs->GetItemState(SID_ATTR_PAGE, true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(SID_ATTR_PAGE, true, &pPoolItem) == SfxItemState::SET ) { mpDoc->SetPageNumType(((const SvxPageItem*) pPoolItem)->GetNumType()); @@ -508,7 +508,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) mpDrawViewShell->ResetActualPage(); } - if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, true, &pPoolItem) == SfxItemState::SET ) { aNewSize = ((const SvxSizeItem*) pPoolItem)->GetSize(); @@ -517,7 +517,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE), - true, &pPoolItem) == SFX_ITEM_SET ) + true, &pPoolItem) == SfxItemState::SET ) { nLeft = ((const SvxLRSpaceItem*) pPoolItem)->GetLeft(); nRight = ((const SvxLRSpaceItem*) pPoolItem)->GetRight(); @@ -528,7 +528,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE), - true, &pPoolItem) == SFX_ITEM_SET ) + true, &pPoolItem) == SfxItemState::SET ) { nUpper = ((const SvxULSpaceItem*) pPoolItem)->GetUpper(); nLower = ((const SvxULSpaceItem*) pPoolItem)->GetLower(); @@ -537,12 +537,12 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) bSetPageSizeAndBorder = true; } - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), true, &pPoolItem) == SfxItemState::SET ) { bScaleAll = ((const SfxBoolItem*) pPoolItem)->GetValue(); } - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), true, &pPoolItem) == SfxItemState::SET ) { bFullSize = ((const SfxBoolItem*) pPoolItem)->GetValue(); @@ -551,7 +551,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } // Paper Bin - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), true, &pPoolItem) == SfxItemState::SET ) { nPaperBin = ((const SvxPaperBinItem*) pPoolItem)->GetValue(); diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx index 08db2fb6dc3d..2b62f4013d05 100644 --- a/sd/source/ui/func/fuparagr.cxx +++ b/sd/source/ui/func/fuparagr.cxx @@ -118,13 +118,13 @@ void FuParagraph::DoExecute( SfxRequest& rReq ) ESelection eSelection = pOutlView->GetSelection(); const SfxPoolItem *pItem = 0; - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, false, &pItem ) ) { const bool bNewStart = ((SfxBoolItem*)pItem)->GetValue() ? sal_True : sal_False; pOutliner->SetParaIsNumberingRestart( eSelection.nStartPara, bNewStart ); } - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART_AT, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART_AT, false, &pItem ) ) { const sal_Int16 nStartAt = ((SfxInt16Item*)pItem)->GetValue(); pOutliner->SetNumberingStartValue( eSelection.nStartPara, nStartAt ); diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index d91aa0527915..53f901639a85 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -1048,7 +1048,7 @@ void FuPoor::ReceiveRequest(SfxRequest& rReq) if (pSet) { - if( pSet->GetItemState( nSlotId ) == SFX_ITEM_SET ) + if( pSet->GetItemState( nSlotId ) == SfxItemState::SET ) { const SfxPoolItem& rItem = pSet->Get( nSlotId ); diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index dfd71bc2a90d..283916836247 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -135,13 +135,13 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) if (pArgs) { - if (pArgs->GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET) bLoad = ((SfxBoolItem&)pArgs->Get(ATTR_PRESLAYOUT_LOAD)).GetValue(); - if( pArgs->GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET ) + if( pArgs->GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET ) bMasterPage = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue(); - if( pArgs->GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET ) + if( pArgs->GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET ) bCheckMasters = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue(); - if (pArgs->GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET) aFile = ((SfxStringItem&)pArgs->Get(ATTR_PRESLAYOUT_NAME)).GetValue(); } else @@ -156,13 +156,13 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) case RET_OK: { pDlg->GetAttr(aSet); - if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET) + if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET) bLoad = ((SfxBoolItem&)aSet.Get(ATTR_PRESLAYOUT_LOAD)).GetValue(); - if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET ) + if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET ) bMasterPage = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue(); - if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET ) + if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET ) bCheckMasters = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue(); - if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET) + if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET) aFile = ((SfxStringItem&)aSet.Get(ATTR_PRESLAYOUT_NAME)).GetValue(); } break; diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 4c730bfd7671..bdb8fe32bfbe 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -105,12 +105,12 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pItem; sal_uInt16 nFamily = USHRT_MAX; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, false, &pItem )) { nFamily = ( (const SfxUInt16Item &) pArgs->Get( SID_STYLE_FAMILY ) ).GetValue(); } - else if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, + else if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, false, &pItem )) { OUString sFamily = ( (const SfxStringItem &) pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue(); @@ -154,7 +154,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } } - if (pArgs && pArgs->GetItemState(nSId) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(nSId) == SfxItemState::SET) aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); } } @@ -171,7 +171,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } pStyleSheet = &pSSPool->Make( aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_USERDEF ); - if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SfxItemState::SET) { OUString aParentName(((const SfxStringItem&) pArgs->Get(SID_STYLE_REFERENCE)).GetValue()); pStyleSheet->SetParent(aParentName); @@ -255,7 +255,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { if( !SD_MOD()->GetWaterCan() ) { - if (pArgs && pArgs->GetItemState( nSId ) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState( nSId ) == SfxItemState::SET) { aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); SD_MOD()->SetWaterCan( true ); @@ -410,7 +410,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) // EE_PARA_NUMBULLET item is only valid in first outline template if( (ePO >= PO_OUTLINE_2) && (ePO <= PO_OUTLINE_9) ) { - if (aTempSet.GetItemState(EE_PARA_NUMBULLET) == SFX_ITEM_SET) + if (aTempSet.GetItemState(EE_PARA_NUMBULLET) == SfxItemState::SET) { SvxNumRule aRule(*((SvxNumBulletItem*)aTempSet.GetItem(EE_PARA_NUMBULLET))->GetNumRule()); @@ -437,7 +437,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) sdr::properties::CleanupFillProperties( rAttr ); // check for unique names of named items for xml - if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLBITMAP ); SfxPoolItem* pNewItem = ((XFillBitmapItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -447,7 +447,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINEDASH ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINEDASH ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEDASH ); SfxPoolItem* pNewItem = ((XLineDashItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -457,7 +457,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINESTART ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINESTART ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINESTART ); SfxPoolItem* pNewItem = ((XLineStartItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -467,7 +467,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINEEND ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINEEND ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEEND ); SfxPoolItem* pNewItem = ((XLineEndItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -477,7 +477,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLGRADIENT ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLGRADIENT ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLGRADIENT ); SfxPoolItem* pNewItem = ((XFillGradientItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -487,7 +487,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLFLOATTRANSPARENCE ); SfxPoolItem* pNewItem = ((XFillFloatTransparenceItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -497,7 +497,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLHATCH ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLHATCH ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLHATCH ); SfxPoolItem* pNewItem = ((XFillHatchItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -543,9 +543,9 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( mpDoc->GetOnlineSpell() ) { const SfxPoolItem* pTempItem; - if( SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, false, &pTempItem ) || - SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pTempItem ) || - SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pTempItem ) ) + if( SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, false, &pTempItem ) || + SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pTempItem ) || + SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pTempItem ) ) { mpDoc->StopOnlineSpelling(); mpDoc->StartOnlineSpelling(); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 2b4ca731a409..8f518dedae9b 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -235,7 +235,7 @@ void FuText::DoExecute( SfxRequest& ) // test for type before using && SID_TEXTEDIT == nSlotId - && SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT) + && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) && (sal_uInt16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) { @@ -1260,7 +1260,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq) // test for type before using && SID_TEXTEDIT == nSlotId - && SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT) + && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) && (sal_uInt16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) { |