diff options
Diffstat (limited to 'cui/source/tabpages')
-rw-r--r-- | cui/source/tabpages/align.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 34 | ||||
-rw-r--r-- | cui/source/tabpages/border.cxx | 12 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 246 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 14 | ||||
-rw-r--r-- | cui/source/tabpages/macroass.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/measure.cxx | 16 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 16 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 86 | ||||
-rw-r--r-- | cui/source/tabpages/page.cxx | 42 | ||||
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 64 | ||||
-rw-r--r-- | cui/source/tabpages/tabstpge.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/textattr.cxx | 22 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 70 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 46 | ||||
-rw-r--r-- | cui/source/tabpages/tplnedef.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 30 | ||||
-rw-r--r-- | cui/source/tabpages/transfrm.cxx | 6 |
22 files changed, 373 insertions, 373 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index d2787378aa86..c2f07521ab3f 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -115,7 +115,7 @@ void lcl_MaybeResetAlignToDistro( ListBox& rLB, sal_uInt16 nListPos, const SfxItemSet& rCoreAttrs, sal_uInt16 nWhichAlign, sal_uInt16 nWhichJM, _JustEnumType eBlock) { const SfxPoolItem* pItem; - if (rCoreAttrs.GetItemState(nWhichAlign, true, &pItem) != SFX_ITEM_SET) + if (rCoreAttrs.GetItemState(nWhichAlign, true, &pItem) != SfxItemState::SET) // alignment not set. return; @@ -125,7 +125,7 @@ void lcl_MaybeResetAlignToDistro( // alignment is not 'justify'. No need to go further. return; - if (rCoreAttrs.GetItemState(nWhichJM, true, &pItem) != SFX_ITEM_SET) + if (rCoreAttrs.GetItemState(nWhichJM, true, &pItem) != SfxItemState::SET) // justification method is not set. return; @@ -389,13 +389,13 @@ bool AlignmentTabPage::HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 n const SfxPoolItem* pItem; SvxCellJustifyMethod eMethodOld = SVX_JUSTIFY_METHOD_AUTO; SvxCellJustifyMethod eMethodNew = SVX_JUSTIFY_METHOD_AUTO; - if (rOld.GetItemState(nWhich, true, &pItem) == SFX_ITEM_SET) + if (rOld.GetItemState(nWhich, true, &pItem) == SfxItemState::SET) { const SfxEnumItem* p = static_cast<const SfxEnumItem*>(pItem); eMethodOld = static_cast<SvxCellJustifyMethod>(p->GetEnumValue()); } - if (rNew.GetItemState(nWhich, true, &pItem) == SFX_ITEM_SET) + if (rNew.GetItemState(nWhich, true, &pItem) == SfxItemState::SET) { const SfxEnumItem* p = static_cast<const SfxEnumItem*>(pItem); eMethodNew = static_cast<SvxCellJustifyMethod>(p->GetEnumValue()); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 2885744305da..3f48db5ccea3 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -403,7 +403,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(Window* pParent, const SfxItemSet& rC 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 ) ) ) ) { @@ -476,7 +476,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) // but it must be existing in the rSet! // const SfxPoolItem* pX = GetOldItem( rSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_DEFAULT <= rSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) + if(SfxItemState::DEFAULT <= rSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) { ResetFromWallpaperItem( *rSet ); return; @@ -496,7 +496,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem; sal_uInt16 nDestValue = USHRT_MAX; - if ( SFX_ITEM_SET == rSet->GetItemState( SID_BACKGRND_DESTINATION, + if ( SfxItemState::SET == rSet->GetItemState( SID_BACKGRND_DESTINATION, false, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); @@ -515,7 +515,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) break; } } - else if( SFX_ITEM_SET == rSet->GetItemState( + else if( SfxItemState::SET == rSet->GetItemState( SID_PARA_BACKGRND_DESTINATION, false, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); @@ -543,7 +543,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) nDestValue = 0; sal_uInt16 nWhich = GetWhich( nSlot ); - if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT ) pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); m_pBtnTile->Check(); @@ -584,21 +584,21 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) pTableBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); pTableBck_Impl->pCellBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nCellWhich = nWhich; - if ( rSet->GetItemState( SID_ATTR_BRUSH_ROW, false ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( SID_ATTR_BRUSH_ROW, false ) >= SfxItemState::DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( SID_ATTR_BRUSH_ROW ) ); pTableBck_Impl->pRowBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW; - if ( rSet->GetItemState( SID_ATTR_BRUSH_TABLE, false ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( SID_ATTR_BRUSH_TABLE, false ) >= SfxItemState::DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( SID_ATTR_BRUSH_TABLE ) ); pTableBck_Impl->pTableBrush = new SvxBrushItem(*pBgdAttr); @@ -623,7 +623,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) pParaBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet->GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); pParaBck_Impl->pParaBrush = new SvxBrushItem(*pBgdAttr); @@ -632,7 +632,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_BRUSH_CHAR ); rSet->GetItemState( nWhich, true ); rSet->GetItemState( nWhich, false ); - if ( rSet->GetItemState( nWhich, true ) > SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich, true ) > SfxItemState::DEFAULT ) { pBgdAttr = (const SvxBrushItem*)&( rSet->Get( nWhich ) ); pParaBck_Impl->pCharBrush = new SvxBrushItem(*pBgdAttr); @@ -660,7 +660,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) sal_uInt16 nWhich = GetWhich( nSlot ); boost::scoped_ptr<SvxBrushItem> pTemp; - if ( rSet.GetItemState( nWhich, false ) >= SFX_ITEM_DEFAULT ) + if ( rSet.GetItemState( nWhich, false ) >= SfxItemState::DEFAULT ) { const CntWallpaperItem* pItem = (const CntWallpaperItem*)&rSet.Get( nWhich ); pTemp.reset(new SvxBrushItem( *pItem, nWhich )); @@ -729,7 +729,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) // const SfxPoolItem* pX = GetOldItem( rCoreSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_DEFAULT <= rCoreSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) + if(SfxItemState::DEFAULT <= rCoreSet->GetItemState(GetWhich(SID_VIEW_FLD_PIC), false)) return FillItemSetWithWallpaperItem( *rCoreSet, SID_VIEW_FLD_PIC ); bool bModified = false; @@ -790,12 +790,12 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) { // Brush-treatment: if ( rOldItem.GetColor() != aBgdColor || - (SFX_ITEM_DEFAULT >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection())) + (SfxItemState::DEFAULT >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection())) { bModified = true; rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rCoreSet->ClearItem( nWhich ); } else @@ -837,7 +837,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) rCoreSet->Put(aTmpBrush); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rCoreSet->ClearItem( nWhich ); } } @@ -998,7 +998,7 @@ bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, s aItem.SetColor( aBgdColor ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rCoreSet.ClearItem( nWhich ); } else @@ -1020,7 +1020,7 @@ bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, s aItem.SetBitmapURL( aBgdGraphicPath ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rCoreSet.ClearItem( nWhich ); } } diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 4ddeea586354..6ccba2efba01 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -156,7 +156,7 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs /* Use SvxMarginItem instead of margins from SvxBoxItem, if present. -> Remember this state in mbUseMarginItem, because other special handling is needed across various functions... */ - mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),true) != SFX_ITEM_UNKNOWN; + mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),true) != SfxItemState::UNKNOWN; const SfxPoolItem* pItem = NULL; if (rCoreAttrs.HasItem(SID_ATTR_BORDER_STYLES, &pItem)) @@ -217,7 +217,7 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs sal_uInt16 nWhich = GetWhich( SID_ATTR_BORDER_INNER, false ); bool bIsDontCare = true; - if ( rCoreAttrs.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) + if ( rCoreAttrs.GetItemState( nWhich, true ) >= SfxItemState::DEFAULT ) { // paragraph or table const SvxBoxInfoItem* pBoxInfo = @@ -427,7 +427,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet ) if ( pBoxInfoItem->IsDist() ) { - if( rSet->GetItemState( nWhichBox, true ) >= SFX_ITEM_DEFAULT ) + if( rSet->GetItemState( nWhichBox, true ) >= SfxItemState::DEFAULT ) { bool bIsAnyBorderVisible = m_pFrameSel->IsAnyBorderVisible(); if( !bIsAnyBorderVisible || !pBoxInfoItem->IsMinDist() ) @@ -552,7 +552,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem) || + if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { @@ -706,11 +706,11 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) bPut = true; - if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, false )) + if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nBoxWhich, false )) { bPut = aBoxItem != (const SvxBoxItem&)(rOldSet.Get(nBoxWhich)); } - if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, false ) ) + if( SfxItemState::DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, false ) ) { const SvxBoxInfoItem& rOldBoxInfo = (const SvxBoxInfoItem&) rOldSet.Get(nBoxInfoWhich); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 71e22ee27b39..05781ce7a99a 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -76,7 +76,7 @@ using namespace ::com::sun::star; // define ---------------------------------------------------------------- -#define ISITEMSET rSet.GetItemState(nWhich)>=SFX_ITEM_DEFAULT +#define ISITEMSET rSet.GetItemState(nWhich)>=SfxItemState::DEFAULT #define CLEARTITEM rSet.InvalidateItem(nWhich) @@ -457,7 +457,7 @@ namespace { //get the font from itemset SfxItemState eState = _pPage->GetItemSet().GetItemState( _nFontWhich ); - if ( eState >= SFX_ITEM_DEFAULT ) + if ( eState >= SfxItemState::DEFAULT ) { const SvxFontItem* pFontItem = (const SvxFontItem*)&( _pPage->GetItemSet().Get( _nFontWhich ) ); aFontInfo.SetName(pFontItem->GetFamilyName()); @@ -669,7 +669,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp const SvxFontItem* pFontItem = NULL; SfxItemState eState = rSet.GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DEFAULT ) + if ( eState >= SfxItemState::DEFAULT ) { pFontItem = (const SvxFontItem*)&( rSet.Get( nWhich ) ); pNameBox->SetText( pFontItem->GetFamilyName() ); @@ -693,13 +693,13 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } eState = rSet.GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DEFAULT ) + if ( eState >= SfxItemState::DEFAULT ) { const SvxPostureItem& rItem = (SvxPostureItem&)rSet.Get( nWhich ); eItalic = (FontItalic)rItem.GetValue(); bStyle = true; } - bStyleAvailable = bStyleAvailable && (eState >= SFX_ITEM_DONTCARE); + bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::DONTCARE); switch ( eLangGrp ) { @@ -709,14 +709,14 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } eState = rSet.GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DEFAULT ) + if ( eState >= SfxItemState::DEFAULT ) { SvxWeightItem& rItem = (SvxWeightItem&)rSet.Get( nWhich ); eWeight = (FontWeight)rItem.GetValue(); } else bStyle = false; - bStyleAvailable = bStyleAvailable && (eState >= SFX_ITEM_DONTCARE); + bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::DONTCARE); // currently chosen font if ( bStyle && pFontItem ) @@ -765,7 +765,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp pSizeBox->SetValue( (long)CalcToPoint( rItem.GetHeight(), eUnit, 10 ) ); } } - else if ( eState >= SFX_ITEM_DEFAULT ) + else if ( eState >= SfxItemState::DEFAULT ) { SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich ); const SvxFontHeightItem& rItem = (SvxFontHeightItem&)rSet.Get( nWhich ); @@ -774,7 +774,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp else { pSizeBox->SetText( OUString() ); - if ( eState <= SFX_ITEM_READONLY ) + if ( eState <= SfxItemState::READONLY ) { pSizeBox->Disable( ); pSizeLabel->Disable( ); @@ -792,19 +792,19 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: pLangFT->Hide(); pLangBox->HideLBB(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: pLangFT->Disable(); pLangBox->DisableLBB(); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxLanguageItem& rItem = (SvxLanguageItem&)rSet.Get( nWhich ); LanguageType eLangType = (LanguageType)rItem.GetValue(); @@ -813,7 +813,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp pLangBox->SelectLanguage( eLangType ); break; } - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: break; } @@ -911,7 +911,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = pNameBox->GetSavedValue().isEmpty(); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && ( (SvxFontItem*)pItem )->GetFamilyName() != aFontItem.GetFamilyName() ) bChanged = true; @@ -920,7 +920,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp rSet.Put( aFontItem ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet.ClearItem( nWhich ); @@ -956,7 +956,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && ( (SvxWeightItem*)pItem )->GetValue() != aWeightItem.GetValue() ) bChanged = true; @@ -970,7 +970,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp rSet.Put( aWeightItem ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) CLEARTITEM; bChanged = true; @@ -1005,7 +1005,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && ( (SvxPostureItem*)pItem )->GetValue() != aPostureItem.GetValue() ) bChanged = true; @@ -1017,7 +1017,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp rSet.Put( aPostureItem ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) CLEARTITEM; // FontSize @@ -1045,7 +1045,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = ( nSize != nSavedSize ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET ) + pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET ) { float fSize = (float)nSize / 10; long nVal = CalcToUnit( fSize, rSet.GetPool()->GetMetric( nWhich ) ); @@ -1077,7 +1077,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp } bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) CLEARTITEM; bChanged = true; @@ -1132,7 +1132,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp rSet.Put( SvxLanguageItem( eLangType, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) CLEARTITEM; return bModified; @@ -1354,7 +1354,7 @@ void SvxCharEffectsPage::Initialize() // HTML-Mode const SfxPoolItem* pItem; SfxObjectShell* pShell; - if ( SFX_ITEM_SET == GetItemSet().GetItemState( SID_HTML_MODE, false, &pItem ) || + if ( SfxItemState::SET == GetItemSet().GetItemState( SID_HTML_MODE, false, &pItem ) || ( NULL != ( pShell = SfxObjectShell::Current() ) && NULL != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -1388,7 +1388,7 @@ void SvxCharEffectsPage::Initialize() SfxPoolItem* pDummy = NULL; SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh ); if ( !pFrame || - SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) ) + SfxItemState::DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) ) { m_pUnderlineColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) ); m_pOverlineColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) ); @@ -1543,23 +1543,23 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pFontColorFT->Hide(); m_pFontColorLB->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pFontColorFT->Disable(); m_pFontColorLB->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pFontColorLB->SetNoSelection(); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); @@ -1616,7 +1616,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) bChanged = ( m_pFontColorLB->GetSavedValue() == LISTBOX_ENTRY_NOTFOUND ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, false, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, false, (const SfxPoolItem**)&pItem ) == SfxItemState::SET && ( (SvxColorItem*)pItem )->GetValue() != aSelectedColor ) bChanged = true; @@ -1627,7 +1627,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) rSet.Put( SvxColorItem( aSelectedColor, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) CLEARTITEM; return bModified; @@ -1758,9 +1758,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_pUnderlineLB->SelectEntryPos( 0 ); SfxItemState eState = rSet->GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DONTCARE ) + if ( eState >= SfxItemState::DONTCARE ) { - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) m_pUnderlineLB->SetNoSelection(); else { @@ -1815,9 +1815,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_pOverlineLB->SelectEntryPos( 0 ); eState = rSet->GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DONTCARE ) + if ( eState >= SfxItemState::DONTCARE ) { - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) m_pOverlineLB->SetNoSelection(); else { @@ -1872,9 +1872,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) m_pStrikeoutLB->SelectEntryPos( 0 ); eState = rSet->GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DONTCARE ) + if ( eState >= SfxItemState::DONTCARE ) { - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) m_pStrikeoutLB->SetNoSelection(); else { @@ -1903,21 +1903,21 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE ); switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pIndividualWordsBtn->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pIndividualWordsBtn->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pIndividualWordsBtn->SetState( TRISTATE_INDET ); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxWordLineModeItem& rItem = (SvxWordLineModeItem&)rSet->Get( nWhich ); rFont.SetWordLineMode( rItem.GetValue() ); @@ -1934,7 +1934,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_CHAR_EMPHASISMARK ); eState = rSet->GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DEFAULT ) + if ( eState >= SfxItemState::DEFAULT ) { const SvxEmphasisMarkItem& rItem = (SvxEmphasisMarkItem&)rSet->Get( nWhich ); FontEmphasisMark eMark = rItem.GetEmphasisMark(); @@ -1957,14 +1957,14 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) } } } - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) m_pEmphasisLB->SetNoSelection( ); - else if ( eState == SFX_ITEM_UNKNOWN ) + else if ( eState == SfxItemState::UNKNOWN ) { m_pEmphasisFT->Hide(); m_pEmphasisLB->Hide(); } - else // SFX_ITEM_DISABLED or SFX_ITEM_READONLY + else // SfxItemState::DISABLED or SfxItemState::READONLY { m_pEmphasisFT->Disable(); m_pEmphasisLB->Disable(); @@ -1993,23 +1993,23 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( nWhich ); switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pEffectsFT->Hide(); m_pEffectsLB->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pEffectsFT->Disable(); m_pEffectsLB->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pEffectsLB->SetNoSelection(); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxCaseMapItem& rItem = (const SvxCaseMapItem&)rSet->Get( nWhich ); eCaseMap = (SvxCaseMap)rItem.GetValue(); @@ -2023,23 +2023,23 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( nWhich ); switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pReliefFT->Hide(); m_pReliefLB->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pReliefFT->Disable(); m_pReliefLB->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pReliefLB->SetNoSelection(); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxCharReliefItem& rItem = (const SvxCharReliefItem&)rSet->Get( nWhich ); m_pReliefLB->SelectEntryPos(rItem.GetValue()); @@ -2053,21 +2053,21 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( nWhich ); switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pOutlineBtn->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pOutlineBtn->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pOutlineBtn->SetState( TRISTATE_INDET ); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxContourItem& rItem = (SvxContourItem&)rSet->Get( nWhich ); m_pOutlineBtn->SetState( (TriState)rItem.GetValue() ); @@ -2082,21 +2082,21 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pShadowBtn->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pShadowBtn->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pShadowBtn->SetState( TRISTATE_INDET ); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxShadowedItem& rItem = (SvxShadowedItem&)rSet->Get( nWhich ); m_pShadowBtn->SetState( (TriState)rItem.GetValue() ); @@ -2111,21 +2111,21 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pBlinkingBtn->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pBlinkingBtn->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pBlinkingBtn->SetState( TRISTATE_INDET ); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxBlinkItem& rItem = (SvxBlinkItem&)rSet->Get( nWhich ); m_pBlinkingBtn->SetState( (TriState)rItem.GetValue() ); @@ -2139,21 +2139,21 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) switch ( eState ) { - case SFX_ITEM_UNKNOWN: + case SfxItemState::UNKNOWN: m_pHiddenBtn->Hide(); break; - case SFX_ITEM_DISABLED: - case SFX_ITEM_READONLY: + case SfxItemState::DISABLED: + case SfxItemState::READONLY: m_pHiddenBtn->Disable(); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: m_pHiddenBtn->SetState( TRISTATE_INDET ); break; - case SFX_ITEM_DEFAULT: - case SFX_ITEM_SET: + case SfxItemState::DEFAULT: + case SfxItemState::SET: { const SvxCharHiddenItem& rItem = (SvxCharHiddenItem&)rSet->Get( nWhich ); m_pHiddenBtn->SetState( (TriState)rItem.GetValue() ); @@ -2208,7 +2208,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) //! changing the underline style will be allowed if a style is //! selected in the listbox. bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, true ); + SfxItemState::DEFAULT > rOldSet.GetItemState( nWhich, true ); const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eUnder && @@ -2224,7 +2224,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( aNewItem ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2242,7 +2242,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) //! changing the underline style will be allowed if a style is //! selected in the listbox. bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, true ); + SfxItemState::DEFAULT > rOldSet.GetItemState( nWhich, true ); const SvxOverlineItem& rItem = *( (const SvxOverlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eOver && @@ -2258,7 +2258,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( aNewItem ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2276,7 +2276,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) //! changing the strikeout style will be allowed if a style is //! selected in the listbox. bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, true ); + SfxItemState::DEFAULT > rOldSet.GetItemState( nWhich, true ); const SvxCrossedOutItem& rItem = *( (const SvxCrossedOutItem*)pOld ); if ( !m_pStrikeoutLB->IsEnabled() @@ -2289,7 +2289,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxCrossedOutItem( eStrike, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2305,7 +2305,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) bChanged = false; } - if ( rOldSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE && + if ( rOldSet.GetItemState( nWhich ) == SfxItemState::DONTCARE && ! m_pIndividualWordsBtn->IsValueChangedFromSaved() ) bChanged = false; @@ -2314,7 +2314,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxWordLineModeItem( m_pIndividualWordsBtn->IsChecked(), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2333,7 +2333,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) if ( pOld ) { - if( rOldSet.GetItemState( nWhich ) != SFX_ITEM_DONTCARE ) + if( rOldSet.GetItemState( nWhich ) != SfxItemState::DONTCARE ) { const SvxEmphasisMarkItem& rItem = *( (const SvxEmphasisMarkItem*)pOld ); if ( rItem.GetEmphasisMark() == eMark ) @@ -2341,7 +2341,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) } } - if ( rOldSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE && + if ( rOldSet.GetItemState( nWhich ) == SfxItemState::DONTCARE && m_pEmphasisLB->GetSavedValue() == nMarkPos && m_pPositionLB->GetSavedValue() == nPosPos ) bChanged = false; @@ -2350,7 +2350,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxEmphasisMarkItem( eMark, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2374,7 +2374,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) //! changing the effect style will be allowed if a style is //! selected in the listbox. bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, true ); + SfxItemState::DEFAULT > rOldSet.GetItemState( nWhich, true ); const SvxCaseMapItem& rItem = *( (const SvxCaseMapItem*)pOld ); if ( (SvxCaseMap)rItem.GetValue() == eCaseMap && !bAllowChg ) @@ -2386,7 +2386,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxCaseMapItem( eCaseMap, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2414,7 +2414,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && !StateToAttr( eState ) && ( (SvxContourItem*)pItem )->GetValue() ) bChanged = true; @@ -2423,7 +2423,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxContourItem( StateToAttr( eState ), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2440,7 +2440,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && !StateToAttr( eState ) && ( (SvxShadowedItem*)pItem )->GetValue() ) bChanged = true; @@ -2449,7 +2449,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxShadowedItem( StateToAttr( eState ), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -2466,7 +2466,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && !StateToAttr( eState ) && ( (SvxBlinkItem*)pItem )->GetValue() ) bChanged = true; @@ -2475,7 +2475,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxBlinkItem( StateToAttr( eState ), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); // Hidden @@ -2491,7 +2491,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && !StateToAttr( eState ) && ( (SvxCharHiddenItem*)pItem )->GetValue() ) bChanged = true; @@ -2500,7 +2500,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxCharHiddenItem( StateToAttr( eState ), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bModified |= FillItemSetColor_Impl( *rSet ); @@ -2960,7 +2960,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) SvxFont& rCTLFont = GetPreviewCTLFont(); sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); - if ( rSet->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SvxEscapementItem& rItem = (SvxEscapementItem&)rSet->Get( nWhich ); nEsc = rItem.GetEsc(); @@ -3031,7 +3031,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) // Kerning nWhich = GetWhich( SID_ATTR_CHAR_KERNING ); - if ( rSet->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SvxKerningItem& rItem = (SvxKerningItem&)rSet->Get( nWhich ); SfxMapUnit eUnit = rSet->GetPool()->GetMetric( nWhich ); @@ -3074,7 +3074,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) // Pair kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); - if ( rSet->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SvxAutoKernItem& rItem = (SvxAutoKernItem&)rSet->Get( nWhich ); m_pPairKerningBtn->Check( rItem.GetValue() ); @@ -3084,7 +3084,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); - if ( rSet->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SvxCharScaleWidthItem& rItem = ( SvxCharScaleWidthItem& ) rSet->Get( nWhich ); m_nScaleWidthInitialVal = rItem.GetValue(); @@ -3094,13 +3094,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) m_pScaleWidthMF->SetValue( 100 ); nWhich = GetWhich( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ); - if ( rSet->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) m_nScaleWidthItemSetVal = ((SfxUInt16Item&) rSet->Get( nWhich )).GetValue(); // Rotation nWhich = GetWhich( SID_ATTR_CHAR_ROTATED ); SfxItemState eState = rSet->GetItemState( nWhich ); - if( SFX_ITEM_UNKNOWN == eState ) + if( SfxItemState::UNKNOWN == eState ) { m_pRotationContainer->Hide(); m_pScalingAndRotationFT->Hide(); @@ -3114,7 +3114,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) Link aOldLink( m_pFitToLineCB->GetClickHdl() ); m_pFitToLineCB->SetClickHdl( Link() ); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { const SvxCharRotateItem& rItem = (SvxCharRotateItem&) rSet->Get( nWhich ); @@ -3131,7 +3131,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) } else { - if( eState == SFX_ITEM_DONTCARE ) + if( eState == SfxItemState::DONTCARE ) { m_p0degRB->Check( false ); m_p90degRB->Check( false ); @@ -3146,7 +3146,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) m_pFitToLineCB->Enable( !m_p0degRB->IsChecked() ); // is this value set? - if( SFX_ITEM_UNKNOWN == rSet->GetItemState( GetWhich( + if( SfxItemState::UNKNOWN == rSet->GetItemState( GetWhich( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ) )) m_pFitToLineCB->Hide(); } @@ -3211,7 +3211,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxEscapementItem( nEsc, nEscProp, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -3250,7 +3250,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxKerningItem( nKerning, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); bChanged = true; @@ -3263,7 +3263,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxAutoKernItem( m_pPairKerningBtn->IsChecked(), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); // Scale Width @@ -3273,7 +3273,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxCharScaleWidthItem( (sal_uInt16)m_pScaleWidthMF->GetValue(), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); // Rotation @@ -3291,7 +3291,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( aItem ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); return bModified; @@ -3493,7 +3493,7 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet* rSet ) sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); SfxItemState eState = rSet->GetItemState( nWhich ); - if ( eState >= SFX_ITEM_DONTCARE ) + if ( eState >= SfxItemState::DONTCARE ) { const SvxTwoLinesItem& rItem = (SvxTwoLinesItem&)rSet->Get( nWhich ); m_pTwoLinesBtn->Check( rItem.GetValue() ); @@ -3536,7 +3536,7 @@ bool SvxCharTwoLinesPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxTwoLinesItem( bOn, cStart, cEnd, nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); return bModified; diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 9bda93fff3f6..dad147e7d54b 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -139,7 +139,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet ) const SfxPoolItem* pItem; const SfxItemPool& rPool = *rSet->GetPool(); - if(SFX_ITEM_SET == rSet->GetItemState( rPool.GetWhich( + if(SfxItemState::SET == rSet->GetItemState( rPool.GetWhich( SID_ATTR_GRAF_KEEP_ZOOM ), true, &pItem )) { if( ((const SfxBoolItem*)pItem)->GetValue() ) @@ -150,7 +150,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet ) } sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); - if( SFX_ITEM_SET == rSet->GetItemState( nW, true, &pItem)) + if( SfxItemState::SET == rSet->GetItemState( nW, true, &pItem)) { FieldUnit eUnit = MapToFieldUnit( rSet->GetPool()->GetMetric( nW )); @@ -175,7 +175,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet ) } nW = rPool.GetWhich( SID_ATTR_PAGE_SIZE ); - if ( SFX_ITEM_SET == rSet->GetItemState( nW, false, &pItem ) ) + if ( SfxItemState::SET == rSet->GetItemState( nW, false, &pItem ) ) { // orientation and size from the PageItem FieldUnit eUnit = MapToFieldUnit( rSet->GetPool()->GetMetric( nW )); @@ -199,7 +199,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet ) } bool bFound = false; - if( SFX_ITEM_SET == rSet->GetItemState( SID_ATTR_GRAF_GRAPHIC, false, &pItem ) ) + if( SfxItemState::SET == rSet->GetItemState( SID_ATTR_GRAF_GRAPHIC, false, &pItem ) ) { OUString referer; SfxStringItem const * it = static_cast<SfxStringItem const *>( @@ -252,7 +252,7 @@ bool SvxGrfCropPage::FillItemSet(SfxItemSet *rSet) // #44204# const SfxItemSet* pExSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; const SfxPoolItem* pItem = 0; - if( pExSet && SFX_ITEM_SET == + if( pExSet && SfxItemState::SET == pExSet->GetItemState( nW, false, &pItem ) ) aSz = *(const SvxSizeItem*)pItem; else @@ -312,7 +312,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) // Size Size aSize; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, false, &pItem ) ) aSize = ((const SvxSizeItem*)pItem)->GetSize(); nOldWidth = aSize.Width(); @@ -348,7 +348,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) m_pHeightMF->SaveValue(); bInitialized = true; - 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() && diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 84088afecf1e..52788fb317e2 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -178,7 +178,7 @@ bool _SfxMacroTabPage::FillItemSet( SfxItemSet* rSet ) ((SvxMacroTableDtor&)aItem.GetMacroTable()) = aTbl; const SfxPoolItem* pItem; - if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), true, &pItem ) + if( SfxItemState::SET != GetItemSet().GetItemState( aItem.Which(), true, &pItem ) || aItem != *(SvxMacroItem*)pItem ) { rSet->Put( aItem ); @@ -212,7 +212,7 @@ void _SfxMacroTabPage::ActivatePage( const SfxItemSet& ) void _SfxMacroTabPage::PageCreated(const SfxAllItemSet& aSet) { const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, true, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SfxItemState::SET == aSet.GetItemState( SID_EVENTCONFIG, true, &pEventsItem ) ) { mpImpl->bGotEvents = true; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); @@ -227,11 +227,11 @@ void _SfxMacroTabPage::PageCreated(const SfxAllItemSet& aSet) void _SfxMacroTabPage::Reset( const SfxItemSet* rSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet->GetItemState( GetWhich( aPageRg[0] ), true, &pItem )) + if( SfxItemState::SET == rSet->GetItemState( GetWhich( aPageRg[0] ), true, &pItem )) aTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet->GetItemState( SID_EVENTCONFIG, true, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SfxItemState::SET == rSet->GetItemState( SID_EVENTCONFIG, true, &pEventsItem ) ) { mpImpl->bGotEvents = true; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 8483b877e0da..6104a2a5fdf3 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -247,7 +247,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_pMtrFldHelpline2Len->SaveValue(); // SdrMeasureBelowRefEdgeItem - if( rAttrs->GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != SfxItemState::DONTCARE ) { m_pTsbBelowRefEdge->SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs->Get( SDRATTR_MEASUREBELOWREFEDGE ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -276,7 +276,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) // SdrMeasureTextRota90Item // Attention: negate ! - if( rAttrs->GetItemState( SDRATTR_MEASURETEXTROTA90 ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASURETEXTROTA90 ) != SfxItemState::DONTCARE ) { m_pTsbParallel->SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs->Get( SDRATTR_MEASURETEXTROTA90 ) ). GetValue() ? TRISTATE_FALSE : TRISTATE_TRUE ); @@ -289,7 +289,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_pTsbParallel->SaveValue(); // SdrMeasureShowUnitItem - if( rAttrs->GetItemState( SDRATTR_MEASURESHOWUNIT ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASURESHOWUNIT ) != SfxItemState::DONTCARE ) { m_pTsbShowUnit->SetState( ( ( const SdrYesNoItem& )rAttrs->Get( SDRATTR_MEASURESHOWUNIT ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -302,7 +302,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_pTsbShowUnit->SaveValue(); // SdrMeasureUnitItem - if( rAttrs->GetItemState( SDRATTR_MEASUREUNIT ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_MEASUREUNIT ) != SfxItemState::DONTCARE ) { long nFieldUnit = (long) ( ( const SdrMeasureUnitItem& )rAttrs-> Get( SDRATTR_MEASUREUNIT ) ).GetValue(); @@ -323,12 +323,12 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_pLbUnit->SaveValue(); // Position - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::DONTCARE ) { SdrMeasureTextVPos eVPos = (SdrMeasureTextVPos) ( ( const SdrMeasureTextVPosItem& )rAttrs->Get( SDRATTR_MEASURETEXTVPOS ) ).GetValue(); { - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::DONTCARE ) { m_pTsbAutoPosV->EnableTriState( false ); m_pTsbAutoPosH->EnableTriState( false ); @@ -536,7 +536,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) if( m_pTsbAutoPosV->GetState() == TRISTATE_TRUE ) eVPos = SDRMEASURE_TEXTVAUTO; - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::DONTCARE ) { eOldVPos = (SdrMeasureTextVPos) ( ( const SdrMeasureTextVPosItem& )rOutAttrs.Get( SDRATTR_MEASURETEXTVPOS ) ).GetValue(); @@ -552,7 +552,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) bModified = true; } - if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::DONTCARE ) { eOldHPos = (SdrMeasureTextHPos) ( ( const SdrMeasureTextHPosItem& )rOutAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 1577c2a8c1e8..ebf1a03f6f6d 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -410,7 +410,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) SfxItemState eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),true,&pItem); - if(eState==SFX_ITEM_SET) + if(eState==SfxItemState::SET) { const SfxBoolItem* pBoolLangItem = (const SfxBoolItem*) GetItem( *rSet, SID_ATTR_NUMBERFORMAT_NOLANGUAGE); @@ -428,7 +428,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),true,&pItem); - if(eState==SFX_ITEM_SET) + if(eState==SfxItemState::SET) { if(pNumItem==NULL) { @@ -448,7 +448,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_ONE_AREA )); - if(eState==SFX_ITEM_SET) + if(eState==SfxItemState::SET) { const SfxBoolItem* pBoolItem = (const SfxBoolItem*) GetItem( *rSet, SID_ATTR_NUMBERFORMAT_ONE_AREA); @@ -461,7 +461,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ) ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SfxBoolItem* pBoolItem = (const SfxBoolItem*) GetItem( *rSet, SID_ATTR_NUMBERFORMAT_SOURCE ); @@ -485,7 +485,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ) ); - if ( SFX_ITEM_DONTCARE != eState ) + if ( SfxItemState::DONTCARE != eState ) pValFmtAttr = (const SfxUInt32Item*) GetItem( *rSet, SID_ATTR_NUMBERFORMAT_VALUE ); @@ -570,7 +570,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet ) SetCategory(nCatLbSelPos ); } eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_ADD_AUTO ) ); - if(SFX_ITEM_SET == eState) + if(SfxItemState::SET == eState) pAutoEntryAttr = (const SfxBoolItem*) GetItem( *rSet, SID_ATTR_NUMBERFORMAT_ADD_AUTO ); // no_NO is an alias for nb_NO and normally isn't listed, we need it for @@ -748,7 +748,7 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) { rCoreAttrs->Put( SfxUInt32Item( nWhich, nCurKey ) ); } - else if(SFX_ITEM_DEFAULT == eItemState) + else if(SfxItemState::DEFAULT == eItemState) { rCoreAttrs->ClearItem( nWhich ); } @@ -795,7 +795,7 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) rCoreAttrs->Put( SfxBoolItem( _nWhich, m_pCbSourceFormat->IsChecked() ) ); if ( !bDataChanged ) bDataChanged = (bOld != m_pCbSourceFormat->IsChecked() || - _eItemState != SFX_ITEM_SET); + _eItemState != SfxItemState::SET); } // FillItemSet is only called on OK, here we can notify the diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 7f60b7a5ea96..ca9fe1f38706 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -249,12 +249,12 @@ void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet) const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -289,18 +289,18 @@ void SvxSingleNumPickTabPage::Reset( const SfxItemSet* rSet ) // in Draw the item exists as WhichId, in Writer only as SlotId SfxItemState eState = rSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); - if(eState != SFX_ITEM_SET) + if(eState != SfxItemState::SET) { nNumItemId = rSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); eState = rSet->GetItemState(nNumItemId, false, &pItem); - if( eState != SFX_ITEM_SET ) + if( eState != SfxItemState::SET ) { pItem = &static_cast< const SvxNumBulletItem& >( rSet->Get( nNumItemId, true ) ); - eState = SFX_ITEM_SET; + eState = SfxItemState::SET; } } - DBG_ASSERT(eState == SFX_ITEM_SET, "no item found!"); + DBG_ASSERT(eState == SfxItemState::SET, "no item found!"); delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -409,12 +409,12 @@ void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet) const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -447,19 +447,19 @@ void SvxBulletPickTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem; // in Draw the item exists as WhichId, in Writer only as SlotId SfxItemState eState = rSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); - if(eState != SFX_ITEM_SET) + if(eState != SfxItemState::SET) { nNumItemId = rSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); eState = rSet->GetItemState(nNumItemId, false, &pItem); - if( eState != SFX_ITEM_SET ) + if( eState != SfxItemState::SET ) { pItem = &static_cast< const SvxNumBulletItem& >( rSet->Get( nNumItemId, true ) ); - eState = SFX_ITEM_SET; + eState = SfxItemState::SET; } } - DBG_ASSERT(eState == SFX_ITEM_SET, "no item found!"); + DBG_ASSERT(eState == SfxItemState::SET, "no item found!"); delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -606,12 +606,12 @@ void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet) const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -644,19 +644,19 @@ void SvxNumPickTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem; // in Draw the item exists as WhichId, in Writer only as SlotId SfxItemState eState = rSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); - if(eState != SFX_ITEM_SET) + if(eState != SfxItemState::SET) { nNumItemId = rSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); eState = rSet->GetItemState(nNumItemId, false, &pItem); - if( eState != SFX_ITEM_SET ) + if( eState != SfxItemState::SET ) { pItem = &static_cast< const SvxNumBulletItem& >( rSet->Get( nNumItemId, true ) ); - eState = SFX_ITEM_SET; + eState = SfxItemState::SET; } } - DBG_ASSERT(eState == SFX_ITEM_SET, "no item found!"); + DBG_ASSERT(eState == SfxItemState::SET, "no item found!"); delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -836,12 +836,12 @@ void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet) const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -891,19 +891,19 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem; // in Draw the item exists as WhichId, in Writer only as SlotId SfxItemState eState = rSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); - if(eState != SFX_ITEM_SET) + if(eState != SfxItemState::SET) { nNumItemId = rSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); eState = rSet->GetItemState(nNumItemId, false, &pItem); - if( eState != SFX_ITEM_SET ) + if( eState != SfxItemState::SET ) { pItem = &static_cast< const SvxNumBulletItem& >( rSet->Get( nNumItemId, true ) ); - eState = SFX_ITEM_SET; + eState = SfxItemState::SET; } } - DBG_ASSERT(eState == SFX_ITEM_SET, "no item found!"); + DBG_ASSERT(eState == SfxItemState::SET, "no item found!"); delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -1154,12 +1154,12 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) sal_uInt16 nTmpNumLvl = SAL_MAX_UINT16; if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) bPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -1212,19 +1212,19 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem; // in Draw the item exists as WhichId, in Writer only as SlotId SfxItemState eState = rSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); - if(eState != SFX_ITEM_SET) + if(eState != SfxItemState::SET) { nNumItemId = rSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); eState = rSet->GetItemState(nNumItemId, false, &pItem); - if( eState != SFX_ITEM_SET ) + if( eState != SfxItemState::SET ) { pItem = &static_cast< const SvxNumBulletItem& >( rSet->Get( nNumItemId, true ) ); - eState = SFX_ITEM_SET; + eState = SfxItemState::SET; } } - DBG_ASSERT(eState == SFX_ITEM_SET, "no item found!"); + DBG_ASSERT(eState == SfxItemState::SET, "no item found!"); delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -1295,7 +1295,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet ) } SfxObjectShell* pShell; - if ( SFX_ITEM_SET == rSet->GetItemState( SID_HTML_MODE, false, &pItem ) + if ( SfxItemState::SET == rSet->GetItemState( SID_HTML_MODE, false, &pItem ) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -2904,12 +2904,12 @@ void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet) const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem)) bPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) + if(SfxItemState::SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pItem)) nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -2973,19 +2973,19 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem; // in Draw the item exists as WhichId, in Writer only as SlotId SfxItemState eState = rSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); - if(eState != SFX_ITEM_SET) + if(eState != SfxItemState::SET) { nNumItemId = rSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); eState = rSet->GetItemState(nNumItemId, false, &pItem); - if( eState != SFX_ITEM_SET ) + if( eState != SfxItemState::SET ) { pItem = &static_cast< const SvxNumBulletItem& >( rSet->Get( nNumItemId, true ) ); - eState = SFX_ITEM_SET; + eState = SfxItemState::SET; } } - DBG_ASSERT(eState == SFX_ITEM_SET, "no item found!"); + DBG_ASSERT(eState == SfxItemState::SET, "no item found!"); delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 9f93183d6afa..56877bf9dba8 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -249,7 +249,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) || + if(SfxItemState::SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) bWeb = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); @@ -275,7 +275,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : // #109989# show the text direction box in Writer/Web too if( (bCJK || bCTL) && - SFX_ITEM_UNKNOWN < rAttr.GetItemState(GetWhich( SID_ATTR_FRAMEDIRECTION ))) + SfxItemState::UNKNOWN < rAttr.GetItemState(GetWhich( SID_ATTR_FRAMEDIRECTION ))) { m_pTextFlowLbl->Show(); m_pTextFlowBox->Show(); @@ -637,14 +637,14 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) CheckMarginEdits( true ); - if(SFX_ITEM_SET == rSet->GetItemState(SID_SWREGISTER_MODE)) + if(SfxItemState::SET == rSet->GetItemState(SID_SWREGISTER_MODE)) { m_pRegisterCB->Check(((const SfxBoolItem&)rSet->Get( SID_SWREGISTER_MODE)).GetValue()); m_pRegisterCB->SaveValue(); RegisterModify(m_pRegisterCB); } - if(SFX_ITEM_SET == rSet->GetItemState(SID_SWREGISTER_COLLECTION)) + if(SfxItemState::SET == rSet->GetItemState(SID_SWREGISTER_COLLECTION)) { m_pRegisterLB->SelectEntry( ((const SfxStringItem&)rSet->Get(SID_SWREGISTER_COLLECTION)).GetValue()); @@ -653,9 +653,9 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) SfxItemState eState = rSet->GetItemState( GetWhich( SID_ATTR_FRAMEDIRECTION ), true, &pItem ); - if( SFX_ITEM_UNKNOWN != eState ) + if( SfxItemState::UNKNOWN != eState ) { - sal_uInt32 nVal = SFX_ITEM_SET == eState + sal_uInt32 nVal = SfxItemState::SET == eState ? ((SvxFrameDirectionItem*)pItem)->GetValue() : 0; m_pTextFlowBox->SelectEntryValue( static_cast< SvxFrameDirection >( nVal ) ); @@ -830,7 +830,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet ) bModified = true; } } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich ) ) + else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich ) ) rSet->ClearItem( nWhich ); else rSet->Put( rOldSet.Get( nWhich ) ); @@ -1194,7 +1194,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) { sal_uInt16 nWhich(GetWhich(SID_ATTR_PAGE_HEADERSET)); - if (SFX_ITEM_SET == rSet.GetItemState(nWhich, false)) + if (SfxItemState::SET == rSet.GetItemState(nWhich, false)) { const SvxSetItem& rSetItem = static_cast< const SvxSetItem& >(rSet.Get(nWhich, false)); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); @@ -1213,7 +1213,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) { nWhich = GetWhich(SID_ATTR_BRUSH); - if(SFX_ITEM_SET == rTmpSet.GetItemState(nWhich)) + if(SfxItemState::SET == rTmpSet.GetItemState(nWhich)) { //UUUU create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich)); @@ -1227,7 +1227,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) m_pBspWin->setHeaderFillAttributes(aHeaderFillAttributes); nWhich = GetWhich(SID_ATTR_BORDER_OUTER); - if(rTmpSet.GetItemState(nWhich) == SFX_ITEM_SET) + if(rTmpSet.GetItemState(nWhich) == SfxItemState::SET) { const SvxBoxItem& rItem = (const SvxBoxItem&)rTmpSet.Get( nWhich ); @@ -1238,7 +1238,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) nWhich = GetWhich(SID_ATTR_PAGE_FOOTERSET); - if (SFX_ITEM_SET == rSet.GetItemState(nWhich, false)) + if (SfxItemState::SET == rSet.GetItemState(nWhich, false)) { const SvxSetItem& rSetItem = static_cast< const SvxSetItem& >(rSet.Get(nWhich,false)); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); @@ -1257,7 +1257,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) { nWhich = GetWhich(SID_ATTR_BRUSH); - if(SFX_ITEM_SET == rTmpSet.GetItemState(nWhich)) + if(SfxItemState::SET == rTmpSet.GetItemState(nWhich)) { //UUUU create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich)); @@ -1271,7 +1271,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) m_pBspWin->setFooterFillAttributes(aFooterFillAttributes); nWhich = GetWhich(SID_ATTR_BORDER_OUTER); - if(rTmpSet.GetItemState(nWhich) == SFX_ITEM_SET) + if(rTmpSet.GetItemState(nWhich) == SfxItemState::SET) { const SvxBoxItem& rItem = static_cast< const SvxBoxItem& >(rTmpSet.Get(nWhich)); m_pBspWin->SetFtBorder(rItem); @@ -1323,7 +1323,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) // evaluate header attributes - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), false, (const SfxPoolItem**)&pSetItem ) ) { @@ -1361,7 +1361,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) { const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH)); - if(rHeaderSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) + if(rHeaderSet.GetItemState(nWhich) >= SfxItemState::DEFAULT) { //UUUU aBspWin.SetHdColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(nWhich)); @@ -1375,7 +1375,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) m_pBspWin->setHeaderFillAttributes(aHeaderFillAttributes); const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER)); - if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rHeaderSet.GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rHeaderSet.Get( nWhich ); @@ -1385,7 +1385,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) // evaluate footer attributes - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), false, (const SfxPoolItem**)&pSetItem ) ) { @@ -1423,7 +1423,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) { const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH)); - if(rFooterSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) + if(rFooterSet.GetItemState(nWhich) >= SfxItemState::DEFAULT) { //UUUU aBspWin.SetFtColor(rItem.GetColor()); const SvxBrushItem& rItem = (const SvxBrushItem&)rFooterSet.Get(nWhich); @@ -1437,7 +1437,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) m_pBspWin->setFooterFillAttributes(aFooterFillAttributes); const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER)); - if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rFooterSet.GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rFooterSet.Get( nWhich ); @@ -1535,9 +1535,9 @@ IMPL_LINK_NOARG(SvxPageDescPage, RangeHdl_Impl) Size aBorder; if ( _pSet->GetItemState( GetWhich(SID_ATTR_BORDER_SHADOW) ) >= - SFX_ITEM_DEFAULT && + SfxItemState::DEFAULT && _pSet->GetItemState( GetWhich(SID_ATTR_BORDER_OUTER) ) >= - SFX_ITEM_DEFAULT ) + SfxItemState::DEFAULT ) { aBorder = ( GetMinBorderSpace_Impl( (const SvxShadowItem&)_pSet->Get(GetWhich(SID_ATTR_BORDER_SHADOW)), diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 9f17b543c7ca..a205605d183a 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -146,7 +146,7 @@ sal_uInt16 GetHtmlMode_Impl(const SfxItemSet& rSet) sal_uInt16 nHtmlMode = 0; const SfxPoolItem* pItem = 0; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem) || + if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { @@ -201,7 +201,7 @@ SfxTabPage* SvxStdParagraphTabPage::Create( Window* pParent, const SfxItemSet* r bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) { - SfxItemState eState = SFX_ITEM_UNKNOWN; + SfxItemState eState = SfxItemState::UNKNOWN; const SfxPoolItem* pOld = 0; SfxItemPool* pPool = rOutSet->GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); @@ -249,7 +249,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) pOld = GetOldItem( *rOutSet, SID_ATTR_PARA_LINESPACE ); if ( !pOld || !( *(const SvxLineSpacingItem*)pOld == aSpacing ) || - SFX_ITEM_DONTCARE == eState ) + SfxItemState::DONTCARE == eState ) { rOutSet->Put( aSpacing ); bModified = true; @@ -293,7 +293,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) eState = GetItemSet().GetItemState( nWhich ); if ( !pOld || !( *(const SvxULSpaceItem*)pOld == aMargin ) || - SFX_ITEM_DONTCARE == eState ) + SfxItemState::DONTCARE == eState ) { rOutSet->Put( aMargin ); bModified = true; @@ -350,7 +350,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) eState = GetItemSet().GetItemState( nWhich ); if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) || - SFX_ITEM_DONTCARE == eState ) + SfxItemState::DONTCARE == eState ) { rOutSet->Put( aMargin ); bModified = true; @@ -367,7 +367,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) sal_uInt16 _nWhich = GetWhich( SID_ATTR_TABSTOP ); const SfxItemSet& rInSet = GetItemSet(); - if ( rInSet.GetItemState( _nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rInSet.GetItemState( _nWhich ) >= SfxItemState::DEFAULT ) { const SvxTabStopItem& rTabItem = (const SvxTabStopItem&)rInSet.Get( _nWhich ); @@ -394,7 +394,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) rOutSet->Put(*pRegItem); bModified = true; } - else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, false ) ) + else if ( SfxItemState::DEFAULT == GetItemSet().GetItemState( _nWhich, false ) ) rOutSet->ClearItem(_nWhich); } @@ -434,7 +434,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 _nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxItemState eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { SfxMapUnit eUnit = pPool->GetMetric( _nWhich ); @@ -504,7 +504,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_ULSPACE ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { SfxMapUnit eUnit = pPool->GetMetric( _nWhich ); @@ -559,7 +559,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_LINESPACE ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) SetLineSpacing_Impl( (const SvxLineSpacingItem &)rSet->Get( _nWhich ) ); else m_pLineDist->SetNoSelection(); @@ -567,7 +567,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) m_pRegisterCB->Check( ((const SfxBoolItem &)rSet->Get( _nWhich )).GetValue()); m_pRegisterCB->SaveValue(); sal_uInt16 nHtmlMode = GetHtmlMode_Impl(*rSet); @@ -1153,7 +1153,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) SfxItemState eItemState = rSet->GetItemState( _nWhich ); sal_Int32 nLBSelect = 0; - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { const SvxAdjustItem& rAdj = (const SvxAdjustItem&)rSet->Get( _nWhich ); @@ -1205,7 +1205,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) } _nWhich = GetWhich(SID_ATTR_PARA_SNAPTOGRID); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { const SvxParaGridItem& rSnap = (const SvxParaGridItem&)rSet->Get( _nWhich ); m_pSnapToGridCB->Check(rSnap.GetValue()); @@ -1214,7 +1214,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_PARA_VERTALIGN ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { m_pVertAlignFL->Show(); @@ -1225,7 +1225,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_FRAMEDIRECTION ); //text direction - if( SFX_ITEM_DEFAULT <= rSet->GetItemState( _nWhich ) ) + if( SfxItemState::DEFAULT <= rSet->GetItemState( _nWhich ) ) { const SvxFrameDirectionItem& rFrameDirItem = ( const SvxFrameDirectionItem& ) rSet->Get( _nWhich ); m_pTextDirectionLB->SelectEntryValue( (SvxFrameDirection)rFrameDirItem.GetValue() ); @@ -1417,7 +1417,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) eState = m_pPageBreakBox->GetState(); SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, false); - if ( (eModelState == SFX_ITEM_SET && TRISTATE_TRUE == m_pPageBreakBox->GetState()) || + if ( (eModelState == SfxItemState::SET && TRISTATE_TRUE == m_pPageBreakBox->GetState()) || m_pPageBreakBox->IsValueChangedFromSaved() || m_pBreakTypeLB->IsValueChangedFromSaved() || m_pBreakPositionLB->IsValueChangedFromSaved() ) @@ -1537,7 +1537,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); SfxItemState eItemState = rSet->GetItemState( _nWhich ); - bool bItemAvailable = eItemState >= SFX_ITEM_DEFAULT; + bool bItemAvailable = eItemState >= SfxItemState::DEFAULT; bool bIsHyphen = false; if( !bHtmlMode && bItemAvailable ) { @@ -1566,7 +1566,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_PAGENUM ); - if ( rSet->GetItemState(_nWhich) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState(_nWhich) >= SfxItemState::DEFAULT ) { const sal_uInt16 nPageNum = ( (const SfxUInt16Item&)rSet->Get( _nWhich ) ).GetValue(); @@ -1580,7 +1580,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) bool bIsPageModel = false; eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_SET ) + if ( eItemState >= SfxItemState::SET ) { m_pApplyCollBtn->EnableTriState( false ); @@ -1615,7 +1615,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_pApplyCollBtn->SetState( TRISTATE_FALSE ); } } - else if ( SFX_ITEM_DONTCARE == eItemState ) + else if ( SfxItemState::DONTCARE == eItemState ) { m_pApplyCollBtn->EnableTriState( true ); m_pApplyCollBtn->SetState( TRISTATE_INDET ); @@ -1634,7 +1634,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_PAGEBREAK ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { const SvxFmtBreakItem& rPageBreak = (const SvxFmtBreakItem&)rSet->Get( _nWhich ); @@ -1686,7 +1686,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_pBreakTypeLB->SelectEntryPos(nType); m_pBreakPositionLB->SelectEntryPos(nPosition); } - else if ( SFX_ITEM_DONTCARE == eItemState ) + else if ( SfxItemState::DONTCARE == eItemState ) m_pPageBreakBox->SetState( TRISTATE_INDET ); else { @@ -1705,7 +1705,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_KEEP ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { m_pKeepParaBox->EnableTriState( false ); const SvxFmtKeepItem& rKeep = @@ -1716,7 +1716,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) else m_pKeepParaBox->SetState( TRISTATE_FALSE ); } - else if ( SFX_ITEM_DONTCARE == eItemState ) + else if ( SfxItemState::DONTCARE == eItemState ) m_pKeepParaBox->SetState( TRISTATE_INDET ); else m_pKeepParaBox->Enable(false); @@ -1724,7 +1724,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_SPLIT ); eItemState = rSet->GetItemState( _nWhich ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { const SvxFmtSplitItem& rSplit = (const SvxFmtSplitItem&)rSet->Get( _nWhich ); @@ -1741,7 +1741,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_WIDOWS ); SfxItemState eTmpState = rSet->GetItemState( _nWhich ); - if ( eTmpState >= SFX_ITEM_DEFAULT ) + if ( eTmpState >= SfxItemState::DEFAULT ) { const SvxWidowsItem& rWidow = (const SvxWidowsItem&)rSet->Get( _nWhich ); @@ -1755,7 +1755,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) //m_pWidowRowLabel->Enable(_bEnable); } - else if ( SFX_ITEM_DONTCARE == eTmpState ) + else if ( SfxItemState::DONTCARE == eTmpState ) m_pWidowBox->SetState( TRISTATE_INDET ); else m_pWidowBox->Enable(false); @@ -1764,7 +1764,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_ORPHANS ); eTmpState = rSet->GetItemState( _nWhich ); - if ( eTmpState >= SFX_ITEM_DEFAULT ) + if ( eTmpState >= SfxItemState::DEFAULT ) { const SvxOrphansItem& rOrphan = (const SvxOrphansItem&)rSet->Get( _nWhich ); @@ -1778,13 +1778,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_pOrphanRowLabel->Enable(_bEnable); } - else if ( SFX_ITEM_DONTCARE == eTmpState ) + else if ( SfxItemState::DONTCARE == eTmpState ) m_pOrphanBox->SetState( TRISTATE_INDET ); else m_pOrphanBox->Enable(false); } } - else if ( SFX_ITEM_DONTCARE == eItemState ) + else if ( SfxItemState::DONTCARE == eItemState ) m_pKeepTogetherBox->SetState( TRISTATE_INDET ); else m_pKeepTogetherBox->Enable(false); @@ -2188,9 +2188,9 @@ static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, CheckBox& rBo { sal_uInt16 _nWhich = rSet.GetPool()->GetWhich(nSlotId); SfxItemState eState = rSet.GetItemState(_nWhich, true); - if( eState == SFX_ITEM_UNKNOWN || eState == SFX_ITEM_DISABLED ) + if( eState == SfxItemState::UNKNOWN || eState == SfxItemState::DISABLED ) rBox.Enable(false); - else if(eState >= SFX_ITEM_DEFAULT) + else if(eState >= SfxItemState::DEFAULT) { rBox.EnableTriState( false ); rBox.Check(((const SfxBoolItem&)rSet.Get(_nWhich)).GetValue()); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 4f0ac3cd6ecd..0f528e4e8a17 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -223,7 +223,7 @@ bool SvxTabulatorTabPage::FillItemSet( SfxItemSet* rSet ) // the TabStopItem needs to have a DefTab at position 0. const SfxPoolItem* pLRSpace; // If not in the new set, then maybe in the old one - if ( SFX_ITEM_SET != rSet->GetItemState( GetWhich( SID_ATTR_LRSPACE ), true, &pLRSpace ) ) + if ( SfxItemState::SET != rSet->GetItemState( GetWhich( SID_ATTR_LRSPACE ), true, &pLRSpace ) ) pLRSpace = GetOldItem( *rSet, SID_ATTR_LRSPACE ); if ( pLRSpace && ( (SvxLRSpaceItem*)pLRSpace )->GetTxtFirstLineOfst() < 0 ) @@ -376,7 +376,7 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) long nOffset = 0; const SfxPoolItem* pItem = 0; if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, true, &pItem ) - == SFX_ITEM_SET ) + == SfxItemState::SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); @@ -486,7 +486,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) const SfxPoolItem* pItem = 0; if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, true, &pItem ) == - SFX_ITEM_SET ) + SfxItemState::SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 2b6e5313c5a0..d97cca54836a 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -167,7 +167,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_pMtrFldBottom->SaveValue(); // adjust to height - if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE ) { m_pTsbAutoGrowHeight->SetState( ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -178,7 +178,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_pTsbAutoGrowHeight->SaveValue(); // adjust to width - if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SfxItemState::DONTCARE ) { m_pTsbAutoGrowWidth->SetState( ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -189,7 +189,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_pTsbAutoGrowWidth->SaveValue(); // autogrowsize - if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWSIZE ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWSIZE ) != SfxItemState::DONTCARE ) { m_pTsbAutoGrowSize->SetState( ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -200,7 +200,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_pTsbAutoGrowSize->SaveValue(); // wordwrap text - if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SfxItemState::DONTCARE ) { m_pTsbWordWrapText->SetState( ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_WORDWRAP ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -216,7 +216,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) SfxItemState eVState = rAttrs->GetItemState( SDRATTR_TEXT_VERTADJUST ); SfxItemState eHState = rAttrs->GetItemState( SDRATTR_TEXT_HORZADJUST ); - if(SFX_ITEM_DONTCARE != eVState && SFX_ITEM_DONTCARE != eHState) + if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) { // VertAdjust and HorAdjust are unequivocal, thus SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)rAttrs->Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); @@ -291,7 +291,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) } // adjust to border - if ( rAttrs->GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SfxItemState::DONTCARE ) { SdrFitToSizeType eFTS = (SdrFitToSizeType) ( ( const SdrTextFitToSizeTypeItem& )rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); @@ -302,7 +302,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) m_pTsbFitToSize->SetState( TRISTATE_INDET ); m_pTsbFitToSize->SaveValue(); - if( rAttrs->GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SfxItemState::DONTCARE ) { bool bContour = ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); m_pTsbContour->SetState( bContour ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -440,7 +440,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) eTVA = SDRTEXTVERTADJUST_BLOCK; } - if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SFX_ITEM_DONTCARE ) + if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE ) { eOldTVA = (SdrTextVertAdjust) ( ( const SdrTextVertAdjustItem& )rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ) ).GetValue(); @@ -450,7 +450,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) else rAttrs->Put( SdrTextVertAdjustItem( eTVA ) ); - if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SFX_ITEM_DONTCARE ) + if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE ) { eOldTHA = (SdrTextHorzAdjust) ( ( const SdrTextHorzAdjustItem& )rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ) ).GetValue(); @@ -673,7 +673,7 @@ IMPL_LINK_NOARG(SvxTextAttrPage, ClickHdl_Impl) // #103516# Do the setup based on states of hor/ver adjust SfxItemState eVState = rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ); SfxItemState eHState = rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - bool bHorAndVer(SFX_ITEM_DONTCARE == eVState || SFX_ITEM_DONTCARE == eHState); + bool bHorAndVer(SfxItemState::DONTCARE == eVState || SfxItemState::DONTCARE == eHState); // #83698# enable/disable text anchoring dependent of contour m_pFlPosition->Enable(!bContour && !bHorAndVer); @@ -688,7 +688,7 @@ bool SvxTextAttrPage::IsTextDirectionLeftToRight (void) const bool bLeftToRightDirection = true; SfxItemState eState = rOutAttrs.GetItemState(SDRATTR_TEXTDIRECTION); - if(SFX_ITEM_DONTCARE != eState) + if(SfxItemState::DONTCARE != eState) { const SvxWritingModeItem& rItem = static_cast<const SvxWritingModeItem&> ( rOutAttrs.Get (SDRATTR_TEXTDIRECTION)); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 21779035a8e2..698d0a5de0ab 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -305,12 +305,12 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs) const SfxPoolItem* pLinearItem = NULL; SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem)); SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, true, &pLinearItem)); - bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); - bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + bool bGradActive = (eStateGradient == SfxItemState::SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + bool bLinearActive = (eStateLinear == SfxItemState::SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // #103765# - bool bGradUsed = (eStateGradient == SFX_ITEM_DONTCARE); - bool bLinearUsed = (eStateLinear == SFX_ITEM_DONTCARE); + bool bGradUsed = (eStateGradient == SfxItemState::DONTCARE); + bool bLinearUsed = (eStateLinear == SfxItemState::DONTCARE); bool bModified(false); bool bSwitchOffLinear(false); @@ -408,13 +408,13 @@ void SvxTransparenceTabPage::Reset(const SfxItemSet* rAttrs) SfxItemState eStateGradient(rAttrs->GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem)); if(!pGradientItem) pGradientItem = &rAttrs->Get(XATTR_FILLFLOATTRANSPARENCE); - bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + bool bGradActive = (eStateGradient == SfxItemState::SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); const SfxPoolItem* pLinearItem = NULL; SfxItemState eStateLinear(rAttrs->GetItemState(XATTR_FILLTRANSPARENCE, true, &pLinearItem)); if(!pLinearItem) pLinearItem = &rAttrs->Get(XATTR_FILLTRANSPARENCE); - bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + bool bLinearActive = (eStateLinear == SfxItemState::SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // transparence gradient const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue(); @@ -1036,7 +1036,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) // NEW if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true ) ) ) + SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true ) ) ) { XFillStyleItem aStyleItem( drawing::FillStyle_SOLID ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); @@ -1067,7 +1067,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) // NEW if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true ) ) ) + SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true ) ) ) { XFillStyleItem aStyleItem( drawing::FillStyle_GRADIENT ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); @@ -1113,7 +1113,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) // NEW if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true ) ) ) + SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true ) ) ) { XFillStyleItem aStyleItem( drawing::FillStyle_HATCH ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); @@ -1154,7 +1154,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) // NEW if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true ) ) ) + SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true ) ) ) { XFillStyleItem aStyleItem( drawing::FillStyle_BITMAP ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); @@ -1375,7 +1375,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) bool bPut = false; RECT_POINT _eRP = m_pCtlPosition->GetActualRP(); - if( SFX_ITEM_DONTCARE == rOutAttrs.GetItemState( XATTR_FILLBMP_POS ) ) + if( SfxItemState::DONTCARE == rOutAttrs.GetItemState( XATTR_FILLBMP_POS ) ) bPut = true; else { @@ -1443,13 +1443,13 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) bool isMissingGradient(false); bool isMissingBitmap(false); drawing::FillStyle eXFS; - if( rAttrs->GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE ) { eXFS = (drawing::FillStyle) ( ( ( const XFillStyleItem& ) rAttrs-> Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); m_pTypeLB->SelectEntryPos( sal::static_int_cast< sal_Int32 >( eXFS ) ); - if (SFX_ITEM_DONTCARE != rAttrs->GetItemState(XATTR_FILLCOLOR)) + if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLCOLOR)) { XFillColorItem const& rColorItem(static_cast<const XFillColorItem&>( rAttrs->Get(XATTR_FILLCOLOR)) ); @@ -1457,7 +1457,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) m_pLbHatchBckgrdColor->SelectEntry( rColorItem.GetColorValue() ); } - if (SFX_ITEM_DONTCARE != rAttrs->GetItemState(XATTR_FILLGRADIENT)) + if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLGRADIENT)) { XFillGradientItem const& rGradientItem( static_cast<const XFillGradientItem&>( @@ -1473,7 +1473,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) isMissingGradient = true; } - if (SFX_ITEM_DONTCARE != rAttrs->GetItemState(XATTR_FILLHATCH)) + if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLHATCH)) { m_pLbHatching->SelectEntry( static_cast<const XFillHatchItem&>( rAttrs->Get(XATTR_FILLHATCH)).GetName() ); @@ -1483,13 +1483,13 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) m_pLbHatching->SelectEntryPos(0); // anything better than nothing isMissingHatching = true; } - if (SFX_ITEM_DONTCARE != rAttrs->GetItemState(XATTR_FILLBACKGROUND)) + if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLBACKGROUND)) { m_pCbxHatchBckgrd->Check( static_cast<const XFillBackgroundItem&>( rAttrs->Get(XATTR_FILLBACKGROUND)).GetValue() ); } - if (SFX_ITEM_DONTCARE != rAttrs->GetItemState(XATTR_FILLBITMAP)) + if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLBITMAP)) { XFillBitmapItem const& rBitmapItem( static_cast<const XFillBitmapItem&>( @@ -1546,8 +1546,8 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) } // step size - if( ( rAttrs->GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SFX_ITEM_DONTCARE ) || - ( rAttrs->GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) ) + if( ( rAttrs->GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SfxItemState::DONTCARE ) || + ( rAttrs->GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE ) ) { m_pTsbStepCount->EnableTriState( false ); sal_uInt16 nValue = ( ( const XGradientStepCountItem& ) rAttrs->Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); @@ -1571,7 +1571,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) // attributes for the bitmap filling - if( rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE ) { m_pTsbTile->EnableTriState( false ); @@ -1583,7 +1583,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) else m_pTsbTile->SetState( TRISTATE_INDET ); - if( rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::DONTCARE ) { m_pTsbStretch->EnableTriState( false ); @@ -1597,7 +1597,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) //aTsbScale - if( rAttrs->GetItemState( XATTR_FILLBMP_SIZELOG ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_SIZELOG ) != SfxItemState::DONTCARE ) { m_pTsbScale->EnableTriState( false ); @@ -1616,7 +1616,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) TriState eOriginal = TRISTATE_FALSE; //aMtrFldXSize - if( rAttrs->GetItemState( XATTR_FILLBMP_SIZEX ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_SIZEX ) != SfxItemState::DONTCARE ) { sal_Int32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs->Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); if( m_pTsbScale->GetState() == TRISTATE_TRUE ) @@ -1644,7 +1644,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) } //aMtrFldYSize - if( rAttrs->GetItemState( XATTR_FILLBMP_SIZEY ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_SIZEY ) != SfxItemState::DONTCARE ) { sal_Int32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs->Get( XATTR_FILLBMP_SIZEY ) ).GetValue(); if( m_pTsbScale->GetState() == TRISTATE_TRUE ) @@ -1678,7 +1678,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) //aRbtRow //aRbtColumn //aMtrFldOffset - if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs->Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue(); if( nValue > 0 ) @@ -1686,7 +1686,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) m_pMtrFldOffset->SetValue( nValue ); m_pRbtRow->Check(); } - else if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETY ) != SFX_ITEM_DONTCARE ) + else if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETY ) != SfxItemState::DONTCARE ) { nValue = ( ( const XFillBmpTileOffsetYItem& ) rAttrs->Get( XATTR_FILLBMP_TILEOFFSETY ) ).GetValue(); if( nValue > 0 ) @@ -1703,7 +1703,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) //aCtlPosition - if( rAttrs->GetItemState( XATTR_FILLBMP_POS ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_POS ) != SfxItemState::DONTCARE ) { RECT_POINT eValue = ( ( const XFillBmpPosItem& ) rAttrs->Get( XATTR_FILLBMP_POS ) ).GetValue(); m_pCtlPosition->SetActualRP( eValue ); @@ -1712,7 +1712,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) m_pCtlPosition->Reset(); //aMtrFldXOffset - if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SfxItemState::DONTCARE ) { sal_Int32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs->Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue(); m_pMtrFldXOffset->SetValue( nValue ); @@ -1721,7 +1721,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) m_pMtrFldXOffset->SetText( "" ); //aMtrFldYOffset - if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SfxItemState::DONTCARE ) { sal_Int32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs->Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue(); m_pMtrFldYOffset->SetValue( nValue ); @@ -1844,7 +1844,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyColorHdl_Impl) rXFSet.Put( XFillColorItem( OUString(), m_pLbColor->GetSelectEntryColor() ) ); } // NEW - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) + else if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); @@ -1901,7 +1901,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyGradientHdl_Impl) rXFSet.Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); rXFSet.Put( XFillGradientItem( OUString(), pEntry->GetGradient() ) ); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true, &pPoolItem ) ) + else if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); rXFSet.Put( XFillGradientItem( OUString(), ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ) ); @@ -1957,7 +1957,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchingHdl_Impl) rXFSet.Put( XFillStyleItem( drawing::FillStyle_HATCH ) ); rXFSet.Put( XFillHatchItem( OUString(), pEntry->GetHatch() ) ); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true, &pPoolItem ) ) + else if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( drawing::FillStyle_HATCH ) ); rXFSet.Put( XFillHatchItem( OUString(), ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ) ); @@ -1982,7 +1982,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl) { rXFSet.Put( XFillColorItem( OUString(), m_pLbHatchBckgrdColor->GetSelectEntryColor() ) ); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) + else if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) { Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); rXFSet.Put( XFillColorItem( OUString(), aColor ) ); @@ -2011,7 +2011,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl) if( m_pLbHatchBckgrdColor->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ) { - if ( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )//>= SFX_ITEM_DEFAULT ) + if ( SfxItemState::SET == rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )//>= SfxItemState::DEFAULT ) { XFillColorItem aColorItem( (const XFillColorItem&)rOutAttrs.Get( XATTR_FILLCOLOR ) ); m_pLbHatchBckgrdColor->SelectEntry( aColorItem.GetColorValue() ); @@ -2087,7 +2087,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyBitmapHdl_Impl) rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); rXFSet.Put(XFillBitmapItem(OUString(), pEntry->GetGraphicObject())); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true, &pPoolItem ) ) + else if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true, &pPoolItem ) ) { rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); rXFSet.Put(XFillBitmapItem(OUString(), ((const XFillBitmapItem*)pPoolItem)->GetGraphicObject())); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 9383d51b984e..42915cd6e848 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -312,11 +312,11 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl) { const SfxPoolItem* pPoolItem = 0; - if(SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLSTYLE), true, &pPoolItem)) + if(SfxItemState::SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLSTYLE), true, &pPoolItem)) { const drawing::FillStyle eXFS((drawing::FillStyle)((const XFillStyleItem*)pPoolItem)->GetValue()); - if((drawing::FillStyle_BITMAP == eXFS) && (SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem))) + if((drawing::FillStyle_BITMAP == eXFS) && (SfxItemState::SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem))) { pGraphicObject.reset(new GraphicObject(((const XFillBitmapItem*)pPoolItem)->GetGraphicObject())); } @@ -537,7 +537,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl) { const SfxPoolItem* pPoolItem = 0; - if(SFX_ITEM_SET == rOutAttrs.GetItemState(XATTR_FILLBITMAP, true, &pPoolItem)) + if(SfxItemState::SET == rOutAttrs.GetItemState(XATTR_FILLBITMAP, true, &pPoolItem)) { pEntry = new XBitmapEntry(dynamic_cast< const XFillBitmapItem* >(pPoolItem)->GetGraphicObject(), aName); } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 02d400512832..7d2def85d888 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -444,7 +444,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) else if( *pPageType == PT_COLOR && *pPos == LISTBOX_ENTRY_NOTFOUND ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) + if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) { m_pLbColorModel->SelectEntryPos( CM_RGB ); @@ -597,7 +597,7 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet ) Color aNewColor; - if ( nState >= SFX_ITEM_DEFAULT ) + if ( nState >= SfxItemState::DEFAULT ) { XFillColorItem aColorItem( (const XFillColorItem&)rSet->Get( XATTR_FILLCOLOR ) ); aNewColor = aColorItem.GetColorValue(); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 571b4c43ad53..bc1050e54a37 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -776,10 +776,10 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) + if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) { if( ( drawing::FillStyle_GRADIENT == (drawing::FillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true, &pPoolItem ) ) ) + ( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true, &pPoolItem ) ) ) { pGradient.reset(new XGradient( ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() )); } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index e73b3c8409b8..85768a5cb066 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -390,10 +390,10 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ChangeHatchHdl_Impl) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) + if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) { if( ( drawing::FillStyle_HATCH == (drawing::FillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true, &pPoolItem ) ) ) + ( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true, &pPoolItem ) ) ) { pHatch.reset(new XHatch( ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() )); } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index eb9e86e00df3..20efb0e3b754 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1090,7 +1090,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) bool bEnable=true; bool bIgnoreGraphic=false; bool bIgnoreSize=false; - if(rAttrs->GetItemState(rAttrs->GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),true,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs->GetItemState(rAttrs->GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),true,&pPoolItem) == SfxItemState::SET) { nSymType=((const SfxInt32Item *)pPoolItem)->GetValue(); } @@ -1172,7 +1172,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } } } - if(rAttrs->GetItemState(rAttrs->GetPool()->GetWhich(SID_ATTR_BRUSH),true,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs->GetItemState(rAttrs->GetPool()->GetWhich(SID_ATTR_BRUSH),true,&pPoolItem) == SfxItemState::SET) { const Graphic* pGraphic = ((const SvxBrushItem *)pPoolItem)->GetGraphic(); if( pGraphic ) @@ -1191,7 +1191,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } } - if(rAttrs->GetItemState(rAttrs->GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),true,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs->GetItemState(rAttrs->GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),true,&pPoolItem) == SfxItemState::SET) { aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize(); } @@ -1206,7 +1206,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) aSymbolLastSize=aSymbolSize; } - if( rAttrs->GetItemState( XATTR_LINESTYLE ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE ) { eXLS = (XLineStyle) ( ( const XLineStyleItem& ) rAttrs->Get( XATTR_LINESTYLE ) ).GetValue(); @@ -1234,7 +1234,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Line strength - if( rAttrs->GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) { SetMetricValue( *m_pMtrLineWidth, ( ( const XLineWidthItem& ) rAttrs->Get( XATTR_LINEWIDTH ) ).GetValue(), ePoolUnit ); } @@ -1244,7 +1244,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) // Line color m_pLbColor->SetNoSelection(); - if ( rAttrs->GetItemState( XATTR_LINECOLOR ) != SFX_ITEM_DONTCARE ) + if ( rAttrs->GetItemState( XATTR_LINECOLOR ) != SfxItemState::DONTCARE ) { Color aCol = ( ( const XLineColorItem& ) rAttrs->Get( XATTR_LINECOLOR ) ).GetColorValue(); m_pLbColor->SelectEntry( aCol ); @@ -1256,11 +1256,11 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Line start - if( bObjSelected && rAttrs->GetItemState( XATTR_LINESTART ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs->GetItemState( XATTR_LINESTART ) == SfxItemState::DEFAULT ) { m_pLbStartStyle->Disable(); } - else if( rAttrs->GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINESTART ) != SfxItemState::DONTCARE ) { // #86265# select entry using list and polygon, not string bool bSelected(false); @@ -1288,11 +1288,11 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Line end - if( bObjSelected && rAttrs->GetItemState( XATTR_LINEEND ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs->GetItemState( XATTR_LINEEND ) == SfxItemState::DEFAULT ) { m_pLbEndStyle->Disable(); } - else if( rAttrs->GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINEEND ) != SfxItemState::DONTCARE ) { // #86265# select entry using list and polygon, not string bool bSelected(false); @@ -1320,11 +1320,11 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Line start strength - if( bObjSelected && rAttrs->GetItemState( XATTR_LINESTARTWIDTH ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs->GetItemState( XATTR_LINESTARTWIDTH ) == SfxItemState::DEFAULT ) { m_pMtrStartWidth->Disable(); } - else if( rAttrs->GetItemState( XATTR_LINESTARTWIDTH ) != SFX_ITEM_DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINESTARTWIDTH ) != SfxItemState::DONTCARE ) { SetMetricValue( *m_pMtrStartWidth, ( ( const XLineStartWidthItem& ) rAttrs->Get( XATTR_LINESTARTWIDTH ) ).GetValue(), @@ -1334,11 +1334,11 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) m_pMtrStartWidth->SetText( "" ); // Line end strength - if( bObjSelected && rAttrs->GetItemState( XATTR_LINEENDWIDTH ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs->GetItemState( XATTR_LINEENDWIDTH ) == SfxItemState::DEFAULT ) { m_pMtrEndWidth->Disable(); } - else if( rAttrs->GetItemState( XATTR_LINEENDWIDTH ) != SFX_ITEM_DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINEENDWIDTH ) != SfxItemState::DONTCARE ) { SetMetricValue( *m_pMtrEndWidth, ( ( const XLineEndWidthItem& ) rAttrs->Get( XATTR_LINEENDWIDTH ) ).GetValue(), @@ -1348,11 +1348,11 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) m_pMtrEndWidth->SetText( "" ); // Centered line end (start) - if( bObjSelected && rAttrs->GetItemState( XATTR_LINESTARTCENTER ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs->GetItemState( XATTR_LINESTARTCENTER ) == SfxItemState::DEFAULT ) { m_pTsbCenterStart->Disable(); } - else if( rAttrs->GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINESTARTCENTER ) != SfxItemState::DONTCARE ) { m_pTsbCenterStart->EnableTriState( false ); @@ -1367,11 +1367,11 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Centered line end (end) - if( bObjSelected && rAttrs->GetItemState( XATTR_LINEENDCENTER ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs->GetItemState( XATTR_LINEENDCENTER ) == SfxItemState::DEFAULT ) { m_pTsbCenterEnd->Disable(); } - else if( rAttrs->GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE ) + else if( rAttrs->GetItemState( XATTR_LINEENDCENTER ) != SfxItemState::DONTCARE ) { m_pTsbCenterEnd->EnableTriState( false ); @@ -1386,7 +1386,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // Transparency - if( rAttrs->GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( XATTR_LINETRANSPARENCE ) != SfxItemState::DONTCARE ) { sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs->Get( XATTR_LINETRANSPARENCE ) ).GetValue(); m_pMtrTransparent->SetValue( nTransp ); @@ -1412,12 +1412,12 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) m_pCbxSynchronize->Check( aStr.toInt32() != 0 ); // #116827# - if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs->GetItemState(XATTR_LINEJOINT)) + if(bObjSelected && SfxItemState::DEFAULT == rAttrs->GetItemState(XATTR_LINEJOINT)) { // maFTEdgeStyle.Disable(); m_pLBEdgeStyle->Disable(); } - else if(SFX_ITEM_DONTCARE != rAttrs->GetItemState(XATTR_LINEJOINT)) + else if(SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_LINEJOINT)) { const com::sun::star::drawing::LineJoint eLineJoint = ((const XLineJointItem&)(rAttrs->Get(XATTR_LINEJOINT))).GetValue(); @@ -1437,12 +1437,12 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) } // fdo#43209 - if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs->GetItemState(XATTR_LINECAP)) + if(bObjSelected && SfxItemState::DEFAULT == rAttrs->GetItemState(XATTR_LINECAP)) { // maFTCapStyle.Disable(); m_pLBCapStyle->Disable(); } - else if(SFX_ITEM_DONTCARE != rAttrs->GetItemState(XATTR_LINECAP)) + else if(SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_LINECAP)) { const com::sun::star::drawing::LineCap eLineCap(((const XLineCapItem&)(rAttrs->Get(XATTR_LINECAP))).GetValue()); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 2cddd29ac4da..8d8583eabbce 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -276,7 +276,7 @@ bool SvxLineDefTabPage::FillItemSet( SfxItemSet* rAttrs ) void SvxLineDefTabPage::Reset( const SfxItemSet* rAttrs ) { - if( rAttrs->GetItemState( GetWhich( XATTR_LINESTYLE ) ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( GetWhich( XATTR_LINESTYLE ) ) != SfxItemState::DONTCARE ) { XLineStyle eXLS = (XLineStyle) ( ( const XLineStyleItem& ) rAttrs->Get( GetWhich( XATTR_LINESTYLE ) ) ).GetValue(); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 30b7dc73230f..97ba83597c3d 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -92,14 +92,14 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs // setting the output device drawing::FillStyle eXFS = drawing::FillStyle_SOLID; - if( rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) + if( rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE ) { eXFS = (drawing::FillStyle) ( ( ( const XFillStyleItem& ) rOutAttrs. Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); switch( eXFS ) { case drawing::FillStyle_SOLID: - if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLCOLOR ) ) + if( SfxItemState::DONTCARE != rOutAttrs.GetItemState( XATTR_FILLCOLOR ) ) { XFillColorItem aColorItem( ( const XFillColorItem& ) rOutAttrs.Get( XATTR_FILLCOLOR ) ); @@ -108,7 +108,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs break; case drawing::FillStyle_GRADIENT: - if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) ) + if( SfxItemState::DONTCARE != rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) ) { XFillGradientItem aGradientItem( ( ( const XFillGradientItem& ) rOutAttrs.Get( XATTR_FILLGRADIENT ) ) ); @@ -117,7 +117,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs break; case drawing::FillStyle_HATCH: - if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLHATCH ) ) + if( SfxItemState::DONTCARE != rOutAttrs.GetItemState( XATTR_FILLHATCH ) ) { XFillHatchItem aHatchItem( ( ( const XFillHatchItem& ) rOutAttrs.Get( XATTR_FILLHATCH ) ) ); @@ -127,7 +127,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs case drawing::FillStyle_BITMAP: { - if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLBITMAP ) ) + if( SfxItemState::DONTCARE != rOutAttrs.GetItemState( XATTR_FILLBITMAP ) ) { XFillBitmapItem aBitmapItem( ( const XFillBitmapItem& ) rOutAttrs.Get( XATTR_FILLBITMAP ) ); @@ -282,18 +282,18 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) case RP_MM: break; } - // If the values of the shadow distances==SFX_ITEM_DONTCARE and the displayed + // If the values of the shadow distances==SfxItemState::DONTCARE and the displayed // string in the respective MetricField=="", then the comparison of the old // and the new distance values would return a wrong result because in such a // case the new distance values would matche the default values of the MetricField !!!! if ( !m_pMtrDistance->IsEmptyFieldValue() || - rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE || - rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) + rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE || + rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE ) { sal_Int32 nOldX = 9876543; // impossible value, so DontCare sal_Int32 nOldY = 9876543; - if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && - rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) + if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE && + rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE ) { nOldX = ( ( const SdrMetricItem& ) rOutAttrs. Get( SDRATTR_SHADOWXDIST ) ).GetValue(); @@ -361,7 +361,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) // at the moment there are only 8 possible positions where a shadow can be set // has a shadow been set? - if( rAttrs->GetItemState( SDRATTR_SHADOW ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOW ) != SfxItemState::DONTCARE ) { m_pTsbShowShadow->EnableTriState( false ); @@ -378,8 +378,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) // distance (only 8 possible positions), // so there is only one item evaluated - if( rAttrs->GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && - rAttrs->GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE && + rAttrs->GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE ) { sal_Int32 nX = ( ( const SdrMetricItem& ) rAttrs->Get( SDRATTR_SHADOWXDIST ) ).GetValue(); sal_Int32 nY = ( ( const SdrMetricItem& ) rAttrs->Get( SDRATTR_SHADOWYDIST ) ).GetValue(); @@ -424,14 +424,14 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs ) m_pCtlPosition->SetActualRP( RP_MM ); } - if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SfxItemState::DONTCARE ) { m_pLbShadowColor->SelectEntry( ( ( const XColorItem& ) rAttrs->Get( SDRATTR_SHADOWCOLOR ) ).GetColorValue() ); } else m_pLbShadowColor->SetNoSelection(); - if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SfxItemState::DONTCARE ) { sal_uInt16 nTransp = ( ( const SdrPercentItem& ) rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue(); m_pMtrTransparent->SetValue( nTransp ); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 42b441eb52d3..0245dcf1ba59 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -512,7 +512,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs) void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) { - // if the view has selected objects, items with SFX_ITEM_DEFAULT need to be disabled + // if the view has selected objects, items with SfxItemState::DEFAULT need to be disabled const SfxPoolItem* pItem; // corner radius @@ -582,7 +582,7 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, (const SfxPoolItem**) &pRectItem ) ) + if( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, (const SfxPoolItem**) &pRectItem ) ) { const Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); @@ -1021,7 +1021,7 @@ void SvxPositionSizeTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, (const SfxPoolItem**) &pRectItem ) ) + if( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, (const SfxPoolItem**) &pRectItem ) ) { { // #i75273# const Rectangle aTempRect(pRectItem->GetValue()); |