diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index 0a1499babf4b..ec44381ef29e 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -108,7 +108,7 @@ void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eSta DBG_ASSERT( pCtrl, "MediaToolBoxControl::StateChanged: media control not found" ); - if( eState == SFX_ITEM_DISABLED ) + if( eState == SfxItemState::DISABLED ) { pCtrl->Enable( false, false ); pCtrl->SetText( OUString() ); @@ -122,7 +122,7 @@ void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eSta const MediaItem* pMediaItem = PTR_CAST( MediaItem, pState ); - if( pMediaItem && ( SFX_ITEM_DEFAULT == eState ) ) + if( pMediaItem && ( SfxItemState::DEFAULT == eState ) ) pCtrl->setState( *pMediaItem ); } } diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 9b9e04584d2d..194004ba392b 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -67,7 +67,7 @@ void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPool if ( !pBox ) return; - if ( eState != SFX_ITEM_DEFAULT ) + if ( eState != SfxItemState::DEFAULT ) pBox->Disable(); else { @@ -357,7 +357,7 @@ void LanguageBoxControl::StateChanged( sal_uInt16 nID, SfxItemState eState, cons (void)nID; if (LanguageBox* pBox = static_cast<LanguageBox*>(GetToolBox().GetItemWindow(GetId()))) { - if (eState != SFX_ITEM_DEFAULT) + if (eState != SfxItemState::DEFAULT) pBox->Disable(); else { diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index b713879998e3..0057bbe99ac6 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -44,7 +44,7 @@ bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 nValueW { bool bSet = false; const SfxPoolItem *pItem1 = NULL; - if( rSet.GetItemState( nValueWhich, true, &pItem1 ) == SFX_ITEM_SET ) + if( rSet.GetItemState( nValueWhich, true, &pItem1 ) == SfxItemState::SET ) { const SfxUInt32Item * pNumItem = dynamic_cast< const SfxUInt32Item * >( pItem1 ); if( pNumItem ) @@ -56,7 +56,7 @@ bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 nValueW rbSourceFormatMixedStateOut=true; const SfxPoolItem *pItem2 = NULL; - if( rSet.GetItemState( nSourceFormatWhich, true, &pItem2 ) == SFX_ITEM_SET ) + if( rSet.GetItemState( nSourceFormatWhich, true, &pItem2 ) == SfxItemState::SET ) { const SfxBoolItem * pBoolItem = dynamic_cast< const SfxBoolItem * >( pItem2 ); if( pBoolItem ) @@ -73,7 +73,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId, rCheckbox.EnableTriState( false ); const SfxPoolItem *pPoolItem = NULL; - if( rInAttrs.GetItemState(nWhichId, true, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(nWhichId, true, &pPoolItem) == SfxItemState::SET ) rCheckbox.Check( ((const SfxBoolItem*)pPoolItem)->GetValue() ); else { @@ -134,7 +134,7 @@ DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, Window* pPa ::com::sun::star::uno::Sequence < sal_Int32 > aAvailabelPlacementList; const SfxPoolItem *pPoolItem = NULL; - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, true, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, true, &pPoolItem) == SfxItemState::SET ) aAvailabelPlacementList =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence(); m_pLB_LabelPlacement->Clear(); @@ -159,7 +159,7 @@ DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, Window* pPa m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState ); m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState); - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, true, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, true, &pPoolItem) == SfxItemState::SET ) { bool bForbidPercentValue = (static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue() ); if( bForbidPercentValue ) @@ -328,7 +328,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState); const SfxPoolItem *pPoolItem = NULL; - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, true, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, true, &pPoolItem) == SfxItemState::SET ) for(sal_Int32 i=0; i < NUMBER_SEPARATORS; ++i ) { if( m_aEntryMap[i] == ((const SfxStringItem*)pPoolItem)->GetValue()) @@ -337,7 +337,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) else m_pLB_Separator->SelectEntryPos( 0 ); - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_PLACEMENT, true, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_PLACEMENT, true, &pPoolItem) == SfxItemState::SET ) { sal_Int32 nPlacement = ((const SfxInt32Item*)pPoolItem)->GetValue(); ::std::map< sal_Int32, sal_uInt16 >::const_iterator aIt( m_aPlacementToListBoxMap.find(nPlacement) ); @@ -352,10 +352,10 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) else m_pLB_LabelPlacement->SetNoSelection(); - if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET ) m_pLB_TextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); - if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, true, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nDegrees = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); m_pDC_Dial->SetRotation( nDegrees ); diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 81573013d266..d32d63ca98c4 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -492,14 +492,14 @@ IMPL_LINK( ErrorBarResources, RangeChanged, Edit *, pEdit ) void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - SfxItemState aState = SFX_ITEM_UNKNOWN; + SfxItemState aState = SfxItemState::UNKNOWN; // category m_eErrorKind = CHERROR_NONE; aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem ); - m_bErrorKindUnique = ( aState != SFX_ITEM_DONTCARE ); + m_bErrorKindUnique = ( aState != SfxItemState::DONTCARE ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) m_eErrorKind = ((const SvxChartKindErrorItem*) pPoolItem)->GetValue(); m_pLbFunction->SelectEntryPos( lcl_getLbEntryPosByErrorKind( m_eErrorKind )); @@ -538,15 +538,15 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // parameters aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, true, &pPoolItem ); - m_bPlusUnique = ( aState != SFX_ITEM_DONTCARE ); - if( aState == SFX_ITEM_SET ) + m_bPlusUnique = ( aState != SfxItemState::DONTCARE ); + if( aState == SfxItemState::SET ) { m_fPlusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); } aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, true, &pPoolItem ); - m_bMinusUnique = ( aState != SFX_ITEM_DONTCARE ); - if( aState == SFX_ITEM_SET ) + m_bMinusUnique = ( aState != SfxItemState::DONTCARE ); + if( aState == SfxItemState::SET ) { m_fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); @@ -557,8 +557,8 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // indicator aState = rInAttrs.GetItemState( SCHATTR_STAT_INDICATE, true, &pPoolItem ); - m_bIndicatorUnique = ( aState != SFX_ITEM_DONTCARE ); - if( aState == SFX_ITEM_SET) + m_bIndicatorUnique = ( aState != SfxItemState::DONTCARE ); + if( aState == SfxItemState::SET) m_eIndicate = ((const SvxChartIndicateItem * ) pPoolItem)->GetValue(); if( m_bIndicatorUnique ) @@ -586,16 +586,16 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // ranges aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_POS, true, &pPoolItem ); - m_bRangePosUnique = ( aState != SFX_ITEM_DONTCARE ); - if( aState == SFX_ITEM_SET ) + m_bRangePosUnique = ( aState != SfxItemState::DONTCARE ); + if( aState == SfxItemState::SET ) { OUString sRangePositive = (static_cast< const SfxStringItem * >( pPoolItem ))->GetValue(); m_pEdRangePositive->SetText( sRangePositive ); } aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_NEG, true, &pPoolItem ); - m_bRangeNegUnique = ( aState != SFX_ITEM_DONTCARE ); - if( aState == SFX_ITEM_SET ) + m_bRangeNegUnique = ( aState != SfxItemState::DONTCARE ); + if( aState == SfxItemState::SET ) { OUString sRangeNegative = (static_cast< const SfxStringItem * >( pPoolItem ))->GetValue(); m_pEdRangeNegative->SetText( sRangeNegative ); diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 4b7d3ded55d1..da9e1dd72e68 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -182,7 +182,7 @@ IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl) void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) { const SfxPoolItem* pPoolItem = NULL; - if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nLegendPosition = ((const SfxInt32Item*)pPoolItem)->GetValue(); switch( nLegendPosition ) @@ -204,7 +204,7 @@ void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) } } - if( m_pCbxShow && rInAttrs.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SFX_ITEM_SET ) + if( m_pCbxShow && rInAttrs.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SfxItemState::SET ) { bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); m_pCbxShow->Check(bShow); diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index d2ac636293ac..911f3931ac01 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -114,7 +114,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) { const SfxPoolItem *pPoolItem = NULL; - if( rInAttrs.GetItemState( SCHATTR_REGRESSION_CURVE_NAME, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_REGRESSION_CURVE_NAME, true, &pPoolItem ) == SfxItemState::SET ) { OUString aName = static_cast< const SfxStringItem* >(pPoolItem)->GetValue(); m_pEE_Name->SetText(aName); @@ -125,8 +125,8 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } SfxItemState aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ); - m_bTrendLineUnique = ( aState != SFX_ITEM_DONTCARE ); - if( aState == SFX_ITEM_SET ) + m_bTrendLineUnique = ( aState != SfxItemState::DONTCARE ); + if( aState == SfxItemState::SET ) { const SvxChartRegressItem * pItem = dynamic_cast< const SvxChartRegressItem * >( pPoolItem ); if( pItem ) @@ -135,7 +135,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } } - if( rInAttrs.GetItemState( SCHATTR_REGRESSION_DEGREE, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_REGRESSION_DEGREE, true, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nDegree = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); m_pNF_Degree->SetValue( nDegree ); @@ -145,7 +145,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) m_pNF_Degree->SetValue( 2 ); } - if( rInAttrs.GetItemState( SCHATTR_REGRESSION_PERIOD, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_REGRESSION_PERIOD, true, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nPeriod = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); m_pNF_Period->SetValue( nPeriod ); @@ -156,28 +156,28 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } double nValue = 0.0; - if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, true, &pPoolItem ) == SfxItemState::SET ) { nValue = ((const SvxDoubleItem*)pPoolItem)->GetValue() ; } lcl_setValue( *m_pFmtFld_ExtrapolateForward, nValue ); nValue = 0.0; - if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, true, &pPoolItem ) == SfxItemState::SET ) { nValue = ((const SvxDoubleItem*)pPoolItem)->GetValue() ; } lcl_setValue( *m_pFmtFld_ExtrapolateBackward, nValue ); nValue = 0.0; - if( rInAttrs.GetItemState( SCHATTR_REGRESSION_INTERCEPT_VALUE, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_REGRESSION_INTERCEPT_VALUE, true, &pPoolItem ) == SfxItemState::SET ) { nValue = ((const SvxDoubleItem*)pPoolItem)->GetValue() ; } lcl_setValue( *m_pFmtFld_InterceptValue, nValue ); aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SET_INTERCEPT, true, &pPoolItem ); - if( aState == SFX_ITEM_DONTCARE ) + if( aState == SfxItemState::DONTCARE ) { m_pCB_SetIntercept->EnableTriState( true ); m_pCB_SetIntercept->SetState( TRISTATE_INDET ); @@ -185,12 +185,12 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) else { m_pCB_SetIntercept->EnableTriState( false ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) m_pCB_SetIntercept->Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_EQUATION, true, &pPoolItem ); - if( aState == SFX_ITEM_DONTCARE ) + if( aState == SfxItemState::DONTCARE ) { m_pCB_ShowEquation->EnableTriState( true ); m_pCB_ShowEquation->SetState( TRISTATE_INDET ); @@ -198,12 +198,12 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) else { m_pCB_ShowEquation->EnableTriState( false ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) m_pCB_ShowEquation->Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_COEFF, true, &pPoolItem ); - if( aState == SFX_ITEM_DONTCARE ) + if( aState == SfxItemState::DONTCARE ) { m_pCB_ShowCorrelationCoeff->EnableTriState( true ); m_pCB_ShowCorrelationCoeff->SetState( TRISTATE_INDET ); @@ -211,7 +211,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) else { m_pCB_ShowCorrelationCoeff->EnableTriState( false ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) m_pCB_ShowCorrelationCoeff->Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 5163ebb27ead..5181402a9c3c 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -140,7 +140,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) // show description SfxItemState aState = rInAttrs->GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem ); - if( aState == SFX_ITEM_DONTCARE ) + if( aState == SfxItemState::DONTCARE ) { m_pCbShowDescription->EnableTriState( true ); m_pCbShowDescription->SetState( TRISTATE_INDET ); @@ -149,11 +149,11 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) { m_pCbShowDescription->EnableTriState( false ); bool bCheck = false; - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); m_pCbShowDescription->Check( bCheck ); - if( aState != SFX_ITEM_DEFAULT && aState != SFX_ITEM_SET ) + if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET ) m_pCbShowDescription->Hide(); } @@ -162,10 +162,10 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) // check new degree item m_nInitialDegrees = 0; aState = rInAttrs->GetItemState( SCHATTR_TEXT_DEGREES, false, &pPoolItem ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) m_nInitialDegrees = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); - m_bHasInitialDegrees = aState != SFX_ITEM_DONTCARE; + m_bHasInitialDegrees = aState != SfxItemState::DONTCARE; if( m_bHasInitialDegrees ) m_pCtrlDial->SetRotation( m_nInitialDegrees ); else @@ -174,21 +174,21 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) // check stacked item m_bInitialStacking = false; aState = rInAttrs->GetItemState( SCHATTR_TEXT_STACKED, false, &pPoolItem ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) m_bInitialStacking = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); - m_bHasInitialStacking = aState != SFX_ITEM_DONTCARE; + m_bHasInitialStacking = aState != SfxItemState::DONTCARE; if( m_bHasInitialDegrees ) m_pOrientHlp->SetStackedState( m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE ); else m_pOrientHlp->SetStackedState( TRISTATE_INDET ); - if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET ) m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); // Text overlap ---------- aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem ); - if( aState == SFX_ITEM_DONTCARE ) + if( aState == SfxItemState::DONTCARE ) { m_pCbTextOverlap->EnableTriState( true ); m_pCbTextOverlap->SetState( TRISTATE_INDET ); @@ -197,17 +197,17 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) { m_pCbTextOverlap->EnableTriState( false ); bool bCheck = false; - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); m_pCbTextOverlap->Check( bCheck ); - if( aState != SFX_ITEM_DEFAULT && aState != SFX_ITEM_SET ) + if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET ) m_pCbTextOverlap->Hide(); } // text break ---------- aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_BREAK, false, &pPoolItem ); - if( aState == SFX_ITEM_DONTCARE ) + if( aState == SfxItemState::DONTCARE ) { m_pCbTextBreak->EnableTriState( true ); m_pCbTextBreak->SetState( TRISTATE_INDET ); @@ -216,11 +216,11 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) { m_pCbTextBreak->EnableTriState( false ); bool bCheck = false; - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); m_pCbTextBreak->Check( bCheck ); - if( aState != SFX_ITEM_DEFAULT && aState != SFX_ITEM_SET ) + if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET ) { m_pCbTextBreak->Hide(); if( ! m_pCbTextOverlap->IsVisible() ) @@ -232,7 +232,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) if( m_bShowStaggeringControls ) { aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_ORDER, false, &pPoolItem ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) { SvxChartTextOrder eOrder = static_cast< const SvxChartTextOrderItem * >( pPoolItem )->GetValue(); diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index e72c30d37ca3..71b5221e859d 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -159,7 +159,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) const SfxPoolItem *pPoolItem = NULL; //axis line - if(rInAttrs->GetItemState(SCHATTR_AXIS_POSITION,true, &pPoolItem)== SFX_ITEM_SET) + if(rInAttrs->GetItemState(SCHATTR_AXIS_POSITION,true, &pPoolItem)== SfxItemState::SET) { bool bZero = false; sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); @@ -176,7 +176,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) m_pLB_CrossesAt->SelectEntryPos( nPos ); CrossesAtSelectHdl( (void*)0 ); - if( rInAttrs->GetItemState(SCHATTR_AXIS_POSITION_VALUE,true, &pPoolItem)== SFX_ITEM_SET || bZero ) + if( rInAttrs->GetItemState(SCHATTR_AXIS_POSITION_VALUE,true, &pPoolItem)== SfxItemState::SET || bZero ) { double fCrossover = 0.0; if( !bZero ) @@ -199,7 +199,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) } // Labels - if( rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_POSITION, false, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_POSITION, false, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); if( nPos < m_pLB_PlaceLabels->GetEntryCount() ) @@ -211,9 +211,9 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) // Tick marks long nTicks = 0, nMinorTicks = 0; - if(rInAttrs->GetItemState(SCHATTR_AXIS_TICKS,true, &pPoolItem)== SFX_ITEM_SET) + if(rInAttrs->GetItemState(SCHATTR_AXIS_TICKS,true, &pPoolItem)== SfxItemState::SET) nTicks = ((const SfxInt32Item*)pPoolItem)->GetValue(); - if(rInAttrs->GetItemState(SCHATTR_AXIS_HELPTICKS,true, &pPoolItem)== SFX_ITEM_SET) + if(rInAttrs->GetItemState(SCHATTR_AXIS_HELPTICKS,true, &pPoolItem)== SfxItemState::SET) nMinorTicks = ((const SfxInt32Item*)pPoolItem)->GetValue(); m_pCB_TicksInner->Check(bool(nTicks&CHAXIS_MARK_INNER)); @@ -222,7 +222,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) m_pCB_MinorOuter->Check(bool(nMinorTicks&CHAXIS_MARK_OUTER)); // Tick position - if( rInAttrs->GetItemState( SCHATTR_AXIS_MARK_POSITION, false, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs->GetItemState( SCHATTR_AXIS_MARK_POSITION, false, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); if( nPos < m_pLB_PlaceTicks->GetEntryCount() ) @@ -267,7 +267,7 @@ void AxisPositionsTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) m_pED_CrossesAt->UseInputStringForFormatting(); const SfxPoolItem *pPoolItem = NULL; - if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, true, &pPoolItem ) == SFX_ITEM_SET ) + if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, true, &pPoolItem ) == SfxItemState::SET ) { sal_uLong nFmt = (sal_uLong)((const SfxInt32Item*)pPoolItem)->GetValue(); m_pED_CrossesAt->SetFormatKey( nFmt ); diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index c80dc226c21f..1381159d24e7 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -61,7 +61,7 @@ void SchLegendPosTabPage::Reset(const SfxItemSet* rInAttrs) m_aLegendPositionResources.initFromItemSet(*rInAttrs); const SfxPoolItem* pPoolItem = 0; - if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET ) m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); } diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 5456b69f9638..da008a1a964a 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -69,7 +69,7 @@ void SchLayoutTabPage::Reset(const SfxItemSet* rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - if (rInAttrs->GetItemState(SCHATTR_STYLE_SHAPE,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_STYLE_SHAPE,true, &pPoolItem) == SfxItemState::SET) { long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); if(m_pGeometryResources) diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index fe3db2a7b587..73a9d41439f2 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -74,7 +74,7 @@ void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - if (rInAttrs->GetItemState(SCHATTR_STARTING_ANGLE, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_STARTING_ANGLE, true, &pPoolItem) == SfxItemState::SET) { long nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); m_pAngleDial->SetRotation( nTmp*100 ); @@ -83,7 +83,7 @@ void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs) { m_pFL_StartingAngle->Show(false); } - if (rInAttrs->GetItemState(SCHATTR_CLOCKWISE, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_CLOCKWISE, true, &pPoolItem) == SfxItemState::SET) { bool bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); m_pCB_Clockwise->Check(bCheck); @@ -92,7 +92,7 @@ void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs) { m_pCB_Clockwise->Show(false); } - if (rInAttrs->GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, true, &pPoolItem) == SfxItemState::SET) { bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue(); m_pCB_IncludeHiddenCells->Check(bVal); diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 8970e9d60631..e0cefa06cf01 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -283,17 +283,17 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs) return; const SfxPoolItem *pPoolItem = NULL; - if (rInAttrs->GetItemState(SCHATTR_AXIS_ALLOW_DATEAXIS, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_ALLOW_DATEAXIS, true, &pPoolItem) == SfxItemState::SET) m_bAllowDateAxis = (bool) ((const SfxBoolItem*)pPoolItem)->GetValue(); m_nAxisType=chart2::AxisType::REALNUMBER; - if (rInAttrs->GetItemState(SCHATTR_AXISTYPE, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXISTYPE, true, &pPoolItem) == SfxItemState::SET) m_nAxisType = (int) ((const SfxInt32Item*)pPoolItem)->GetValue(); if( m_nAxisType==chart2::AxisType::DATE && !m_bAllowDateAxis ) m_nAxisType=chart2::AxisType::CATEGORY; if( m_bAllowDateAxis ) { bool bAutoDateAxis = false; - if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_DATEAXIS, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_DATEAXIS, true, &pPoolItem) == SfxItemState::SET) bAutoDateAxis = (bool) ((const SfxBoolItem*)pPoolItem)->GetValue(); sal_uInt16 nPos = 0; @@ -313,66 +313,66 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs) m_pCbxAutoOrigin->Check( true ); m_pCbx_AutoTimeResolution->Check( true ); - if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MIN,true,&pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MIN,true,&pPoolItem) == SfxItemState::SET) m_pCbxAutoMin->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_MIN,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_MIN,true, &pPoolItem) == SfxItemState::SET) { fMin = ((const SvxDoubleItem*)pPoolItem)->GetValue(); lcl_setValue( *m_pFmtFldMin, fMin ); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MAX,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MAX,true, &pPoolItem) == SfxItemState::SET) m_pCbxAutoMax->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_MAX,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_MAX,true, &pPoolItem) == SfxItemState::SET) { fMax = ((const SvxDoubleItem*)pPoolItem)->GetValue(); lcl_setValue( *m_pFmtFldMax, fMax ); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,true, &pPoolItem) == SfxItemState::SET) m_pCbxAutoStepMain->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_MAIN,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_MAIN,true, &pPoolItem) == SfxItemState::SET) { fStepMain = ((const SvxDoubleItem*)pPoolItem)->GetValue(); lcl_setValue( *m_pFmtFldStepMain, fStepMain ); m_pMt_MainDateStep->SetValue( static_cast<sal_Int32>(fStepMain) ); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,true, &pPoolItem) == SfxItemState::SET) m_pCbxAutoStepHelp->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_LOGARITHM,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_LOGARITHM,true, &pPoolItem) == SfxItemState::SET) m_pCbxLogarithm->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_REVERSE,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_REVERSE,true, &pPoolItem) == SfxItemState::SET) m_pCbxReverse->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_HELP,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_HELP,true, &pPoolItem) == SfxItemState::SET) { nStepHelp = ((const SfxInt32Item*)pPoolItem)->GetValue(); m_pMtStepHelp->SetValue( nStepHelp ); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,true, &pPoolItem) == SfxItemState::SET) m_pCbxAutoOrigin->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_ORIGIN,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_ORIGIN,true, &pPoolItem) == SfxItemState::SET) { fOrigin = ((const SvxDoubleItem*)pPoolItem)->GetValue(); lcl_setValue( *m_pFmtFldOrigin, fOrigin ); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,true, &pPoolItem) == SfxItemState::SET) m_pCbx_AutoTimeResolution->Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs->GetItemState(SCHATTR_AXIS_TIME_RESOLUTION,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_TIME_RESOLUTION,true, &pPoolItem) == SfxItemState::SET) { m_nTimeResolution = ((const SfxInt32Item*)pPoolItem)->GetValue(); m_pLB_TimeResolution->SelectEntryPos( m_nTimeResolution ); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_MAIN_TIME_UNIT,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_MAIN_TIME_UNIT,true, &pPoolItem) == SfxItemState::SET) { m_nMainTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue(); m_pLB_MainTimeUnit->SelectEntryPos( m_nMainTimeUnit ); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_HELP_TIME_UNIT,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_HELP_TIME_UNIT,true, &pPoolItem) == SfxItemState::SET) { m_nHelpTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue(); m_pLB_HelpTimeUnit->SelectEntryPos( m_nHelpTimeUnit ); @@ -525,7 +525,7 @@ void ScaleTabPage::SetNumFormat() { const SfxPoolItem *pPoolItem = NULL; - if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, true, &pPoolItem ) == SFX_ITEM_SET ) + if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, true, &pPoolItem ) == SfxItemState::SET ) { sal_uLong nFmt = (sal_uLong)((const SfxInt32Item*)pPoolItem)->GetValue(); diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index 76142ad074af..a04d2efb0d42 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -121,7 +121,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) m_pRbtAxis1->Check(true); m_pRbtAxis2->Check(false); - if (rInAttrs->GetItemState(SCHATTR_AXIS,true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS,true, &pPoolItem) == SfxItemState::SET) { long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); if(nVal==CHART_AXIS_SECONDARY_Y) @@ -132,30 +132,30 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) } long nTmp; - if (rInAttrs->GetItemState(SCHATTR_BAR_GAPWIDTH, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_BAR_GAPWIDTH, true, &pPoolItem) == SfxItemState::SET) { nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); m_pMTGap->SetValue(nTmp); } - if (rInAttrs->GetItemState(SCHATTR_BAR_OVERLAP, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_BAR_OVERLAP, true, &pPoolItem) == SfxItemState::SET) { nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); m_pMTOverlap->SetValue(nTmp); } - if (rInAttrs->GetItemState(SCHATTR_BAR_CONNECT, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_BAR_CONNECT, true, &pPoolItem) == SfxItemState::SET) { bool bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); m_pCBConnect->Check(bCheck); } - if (rInAttrs->GetItemState(SCHATTR_AXIS_FOR_ALL_SERIES, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_AXIS_FOR_ALL_SERIES, true, &pPoolItem) == SfxItemState::SET) { m_nAllSeriesAxisIndex = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); m_pCBAxisSideBySide->Disable(); } - if (rInAttrs->GetItemState(SCHATTR_GROUP_BARS_PER_AXIS, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_GROUP_BARS_PER_AXIS, true, &pPoolItem) == SfxItemState::SET) { // model property is "group bars per axis", UI feature is the other way // round: "show bars side by side" @@ -170,10 +170,10 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) //missing value treatment { ::com::sun::star::uno::Sequence < sal_Int32 > aMissingValueTreatments; - if( rInAttrs->GetItemState(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, true, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs->GetItemState(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, true, &pPoolItem) == SfxItemState::SET ) aMissingValueTreatments =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence(); - if ( aMissingValueTreatments.getLength()>1 && rInAttrs->GetItemState(SCHATTR_MISSING_VALUE_TREATMENT,true, &pPoolItem) == SFX_ITEM_SET) + if ( aMissingValueTreatments.getLength()>1 && rInAttrs->GetItemState(SCHATTR_MISSING_VALUE_TREATMENT,true, &pPoolItem) == SfxItemState::SET) { m_pRB_DontPaint->Enable(false); m_pRB_AssumeZero->Enable(false); @@ -205,7 +205,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) } // Include hidden cells - if (rInAttrs->GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, true, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs->GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, true, &pPoolItem) == SfxItemState::SET) { bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue(); m_pCBIncludeHiddenCells->Check(bVal); diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 9305545f1d86..89f78a95d534 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -98,7 +98,7 @@ void SchAlignmentTabPage::Reset(const SfxItemSet* rInAttrs) bool bStacked = pItem && ((const SfxBoolItem*)pItem)->GetValue(); m_pOrientHlp->SetStackedState( bStacked ? TRISTATE_TRUE : TRISTATE_FALSE ); - if( rInAttrs->GetItemState(EE_PARA_WRITINGDIR, true, &pItem) == SFX_ITEM_SET) + if( rInAttrs->GetItemState(EE_PARA_WRITINGDIR, true, &pItem) == SfxItemState::SET) m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pItem)->GetValue()) ); } diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx index c4055fbce9b7..4d3e21571f17 100644 --- a/chart2/source/controller/inc/ItemConverter.hxx +++ b/chart2/source/controller/inc/ItemConverter.hxx @@ -110,7 +110,7 @@ public: */ SfxItemSet CreateEmptyItemSet() const; - /** Invalidates all items in rDestSet, that are set (state SFX_ITEM_SET) in + /** Invalidates all items in rDestSet, that are set (state SfxItemState::SET) in both item sets (rDestSet and rSourceSet) and have differing content. */ static void InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItemSet &rSourceSet ); diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index e1c13a1335cd..e2cd620f8340 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -934,7 +934,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet if( ! bUseSourceFormat ) { SfxItemState aState = rItemSet.GetItemState( SID_ATTR_NUMBERFORMAT_VALUE ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) { sal_Int32 nFormatKey = static_cast< sal_Int32 >( static_cast< const SfxUInt32Item & >( diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 163785893dbf..ed9ea945731d 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -103,7 +103,7 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_VALUE==nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" ); sal_uInt16 nSourceWhich = (SID_ATTR_NUMBERFORMAT_VALUE==nWhichId) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE; - if( SFX_ITEM_SET != rItemSet.GetItemState( nSourceWhich ) ) + if( SfxItemState::SET != rItemSet.GetItemState( nSourceWhich ) ) return bChanged; uno::Any aValue; @@ -112,7 +112,7 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe if( !bUseSourceFormat ) { SfxItemState aState = rItemSet.GetItemState( nWhichId ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) { sal_Int32 nFmt = static_cast< sal_Int32 >( static_cast< const SfxUInt32Item & >( @@ -150,7 +150,7 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_SOURCE==nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" ); sal_uInt16 nFormatWhich = (SID_ATTR_NUMBERFORMAT_SOURCE==nWhichId) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE; - if( SFX_ITEM_SET != rItemSet.GetItemState( nWhichId ) ) + if( SfxItemState::SET != rItemSet.GetItemState( nWhichId ) ) return bChanged; uno::Any aNewValue; @@ -159,7 +159,7 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte if( !bUseSourceFormat ) { SfxItemState aState = rItemSet.GetItemState( nFormatWhich ); - if( aState == SFX_ITEM_SET ) + if( aState == SfxItemState::SET ) { sal_Int32 nFormatKey = static_cast< sal_Int32 >( static_cast< const SfxUInt32Item & >( diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index dedcdea1e9c7..1e0e5a50536d 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -175,7 +175,7 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) while( pItem ) { - if( rItemSet.GetItemState( pItem->Which(), false ) == SFX_ITEM_SET ) + if( rItemSet.GetItemState( pItem->Which(), false ) == SfxItemState::SET ) { if( GetItemProperty( pItem->Which(), aProperty )) { @@ -224,8 +224,8 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem while (nWhich) { - if ((rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SFX_ITEM_SET) && - (rDestSet.GetItemState(nWhich, true, &pPoolItem) == SFX_ITEM_SET)) + if ((rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::SET) && + (rDestSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::SET)) { if (rSourceSet.Get(nWhich) != rDestSet.Get(nWhich)) { @@ -235,7 +235,7 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem } } } - else if( rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SFX_ITEM_DONTCARE ) + else if( rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::DONTCARE ) rDestSet.InvalidateItem(nWhich); nWhich = aIter.NextWhich (); diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx index 561f2342d279..49cd67fef545 100644 --- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx @@ -106,7 +106,7 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe case SCHATTR_LEGEND_SHOW: { const SfxPoolItem* pPoolItem = NULL; - if( rInItemSet.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInItemSet.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SfxItemState::SET ) { bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); bool bWasShown = true; @@ -123,7 +123,7 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe case SCHATTR_LEGEND_POS: { const SfxPoolItem* pPoolItem = NULL; - if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET ) { chart2::LegendPosition eNewPos = static_cast<chart2::LegendPosition>(((const SfxInt32Item*)pPoolItem)->GetValue()); diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx index 64ad66653391..f7d905c440a2 100644 --- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx @@ -120,7 +120,7 @@ uno::Reference< beans::XPropertySet > lcl_getEquationProperties( { SvxChartRegress eRegress = CHREGRESS_NONE; const SfxPoolItem *pPoolItem = NULL; - if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SFX_ITEM_SET ) + if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SfxItemState::SET ) { eRegress = static_cast< const SvxChartRegressItem * >( pPoolItem )->GetValue(); bEquationExists = ( eRegress != CHREGRESS_NONE ); @@ -151,7 +151,7 @@ uno::Reference< beans::XPropertySet > lcl_getCurveProperties( { SvxChartRegress eRegress = CHREGRESS_NONE; const SfxPoolItem *pPoolItem = NULL; - if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SFX_ITEM_SET ) + if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SfxItemState::SET ) { eRegress = static_cast< const SvxChartRegressItem * >( pPoolItem )->GetValue(); bExists = ( eRegress != CHREGRESS_NONE ); diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index c18247507337..e0e5bbe31c1d 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -95,7 +95,7 @@ bool numberFormatFromItemToPropertySet( OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_VALUE == nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat"); sal_uInt16 nSourceWhich = (SID_ATTR_NUMBERFORMAT_VALUE == nWhichId) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE; - if (SFX_ITEM_SET != rItemSet.GetItemState(nSourceWhich)) + if (SfxItemState::SET != rItemSet.GetItemState(nSourceWhich)) return bChanged; uno::Any aValue; @@ -103,7 +103,7 @@ bool numberFormatFromItemToPropertySet( if (!bUseSourceFormat) { SfxItemState aState = rItemSet.GetItemState(nWhichId); - if (aState == SFX_ITEM_SET) + if (aState == SfxItemState::SET) { sal_Int32 nFmt = static_cast<sal_Int32>( static_cast<const SfxUInt32Item&>( @@ -143,7 +143,7 @@ bool useSourceFormatFromItemToPropertySet( OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_SOURCE == nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat"); sal_uInt16 nFormatWhich = (SID_ATTR_NUMBERFORMAT_SOURCE == nWhichId) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE; - if (SFX_ITEM_SET != rItemSet.GetItemState(nWhichId)) + if (SfxItemState::SET != rItemSet.GetItemState(nWhichId)) return bChanged; uno::Any aNewValue; @@ -152,7 +152,7 @@ bool useSourceFormatFromItemToPropertySet( if (!bUseSourceFormat) { SfxItemState aState = rItemSet.GetItemState(nFormatWhich); - if (aState == SFX_ITEM_SET) + if (aState == SfxItemState::SET) { sal_Int32 nFormatKey = static_cast<sal_Int32>( static_cast<const SfxUInt32Item&>( diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 91d0f8e052e6..daf03c8acb57 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -58,16 +58,16 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectang const SfxPoolItem* pPoolItem=NULL; //read position - if (SFX_ITEM_SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) + if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) nPosX=((const SfxInt32Item*)pPoolItem)->GetValue(); - if (SFX_ITEM_SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)) + if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)) nPosY=((const SfxInt32Item*)pPoolItem)->GetValue(); //read size - if (SFX_ITEM_SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) + if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) nSizX=((const SfxUInt32Item*)pPoolItem)->GetValue(); - if (SFX_ITEM_SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) + if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) nSizY=((const SfxUInt32Item*)pPoolItem)->GetValue(); - if (SFX_ITEM_SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem)) + if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem)) eRP=(RECT_POINT)((const SfxAllEnumItem*)pPoolItem)->GetValue(); switch( eRP ) diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 43050bf0a9df..e5effb88d3fb 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -176,7 +176,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter() const SfxItemSet* pSet = pDlg->GetOutputItemSet(); const SfxPoolItem* pItem=0; OUString aString; - if ( pSet && pSet->GetItemState( SID_CHARMAP, true, &pItem) == SFX_ITEM_SET && + if ( pSet && pSet->GetItemState( SID_CHARMAP, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxStringItem) ) aString = dynamic_cast<const SfxStringItem*>(pItem)->GetValue(); diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index f1076626bdfd..70bf900166ce 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -211,7 +211,7 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr ) pDrawViewWrapper->GetAttributes( aSet ); long nWidth = 300; // (1/100th mm) - if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE ) + if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) { long nValue = ( ( const XLineWidthItem& ) aSet.Get( XATTR_LINEWIDTH ) ).GetValue(); if ( nValue > 0 ) diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 037abce3d564..cedfccc00331 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1465,7 +1465,7 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet* rSet ) RadioHdl(0); const SfxPoolItem* pMacroItem=0; - if( SFX_ITEM_SET == rSet->GetItemState( SID_MACROINFO, true, &pMacroItem ) ) + if( SfxItemState::SET == rSet->GetItemState( SID_MACROINFO, true, &pMacroItem ) ) { m_pMacroInfoItem = PTR_CAST( SfxMacroInfoItem, pMacroItem ); m_pGroupLBox->SelectMacro( m_pMacroInfoItem ); @@ -1473,11 +1473,11 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet* rSet ) else { const SfxPoolItem* pStringItem=0; - if( SFX_ITEM_SET == rSet->GetItemState( SID_CHARMAP, true, &pStringItem ) ) + if( SfxItemState::SET == rSet->GetItemState( SID_CHARMAP, true, &pStringItem ) ) m_pStringItem = PTR_CAST( SfxStringItem, pStringItem ); const SfxPoolItem* pFontItem=0; - if( SFX_ITEM_SET == rSet->GetItemState( SID_ATTR_SPECIALCHAR, true, &pFontItem ) ) + if( SfxItemState::SET == rSet->GetItemState( SID_ATTR_SPECIALCHAR, true, &pFontItem ) ) m_pFontItem = PTR_CAST( SfxStringItem, pFontItem ); } } diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index fcb3af8f2221..f8398a924a57 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -61,7 +61,7 @@ _SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet ) , bIDEDialogMode(false) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rAttrSet.GetItemState( SID_ATTR_MACROITEM, false, &pItem ) ) + if ( SfxItemState::SET == rAttrSet.GetItemState( SID_ATTR_MACROITEM, false, &pItem ) ) bIDEDialogMode = ((const SfxBoolItem*)pItem)->GetValue(); } diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 9b1a65f91781..ae8cf489d18d 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -45,7 +45,7 @@ SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkD void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { switch ( nSID ) { diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 3b3cd201783b..c59eda471279 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -344,7 +344,7 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl) { const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem )) + if( SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem )) { pHyperlinkItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() ); } diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index acfd02d746ed..2566f9b66e8b 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -73,7 +73,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ); OUString aAuthorStr, aDateStr; - if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) + if ( rSet.GetItemState( nWhich, true ) >= SfxItemState::DEFAULT ) { bNew = false; const SvxPostItAuthorItem& rAuthor = @@ -85,7 +85,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ); - if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) + if ( rSet.GetItemState( nWhich, true ) >= SfxItemState::DEFAULT ) { const SvxPostItDateItem& rDate = (const SvxPostItDateItem&)rSet.Get( nWhich ); @@ -100,7 +100,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ); OUString aTextStr; - if ( rSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) + if ( rSet.GetItemState( nWhich, true ) >= SfxItemState::DEFAULT ) { const SvxPostItTextItem& rText = (const SvxPostItTextItem&)rSet.Get( nWhich ); diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index d619cfa5e5ec..c25377390c7c 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -242,7 +242,7 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) } const SfxPoolItem* pViewLayoutItem = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_VIEWLAYOUT, false, &pViewLayoutItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_VIEWLAYOUT, false, &pViewLayoutItem ) ) { const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->GetValue(); const bool bBookMode = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->IsBookMode(); diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index f7d0d9fc19fb..ac3d5a2df736 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -66,7 +66,7 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage(Window* pParent, const SfxItemSet pColorList = XColorList::CreateStdColorList(); const SfxPoolItem* pItem = NULL; - if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, false, &pItem ) == SFX_ITEM_SET ) + if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, false, &pItem ) == SfxItemState::SET ) { pColorConfig = (static_cast< SvxChartColorTableItem* >(pItem->Clone()) ); } diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index b80faa3bb3cc..e6d07105012a 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -318,7 +318,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet ) m_pDocStatusCB->SaveValue(); const SfxPoolItem* pItem = NULL; - if ( SFX_ITEM_SET == rSet->GetItemState( SID_ATTR_YEAR2000, false, &pItem ) ) + if ( SfxItemState::SET == rSet->GetItemState( SID_ATTR_YEAR2000, false, &pItem ) ) { m_pYearValueField->SetValue( ((SfxUInt16Item*)pItem)->GetValue() ); TwoFigureConfigHdl(m_pYearValueField); @@ -1509,21 +1509,21 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) m_pCurrentDocCB->Enable(true); m_pCurrentDocCB->Check(bLanguageCurrentDoc_Impl); const SfxPoolItem* pLang; - if( SFX_ITEM_SET == rSet->GetItemState(SID_ATTR_LANGUAGE, false, &pLang)) + if( SfxItemState::SET == rSet->GetItemState(SID_ATTR_LANGUAGE, false, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLang, ::com::sun::star::i18n::ScriptType::LATIN) != eTempCurLang) eCurLang = eTempCurLang; } - if( SFX_ITEM_SET == rSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, false, &pLang)) + if( SfxItemState::SET == rSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, false, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCJK, ::com::sun::star::i18n::ScriptType::ASIAN) != eTempCurLang) eCurLangCJK = eTempCurLang; } - if( SFX_ITEM_SET == rSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, false, &pLang)) + if( SfxItemState::SET == rSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, false, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCTL, ::com::sun::star::i18n::ScriptType::COMPLEX) != eTempCurLang) @@ -1568,7 +1568,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) // check the box "For the current document only" // set the focus to the Western Language box const SfxPoolItem* pLang = 0; - if ( SFX_ITEM_SET == rSet->GetItemState(SID_SET_DOCUMENT_LANGUAGE, false, &pLang ) && ((const SfxBoolItem*)pLang)->GetValue() ) + if ( SfxItemState::SET == rSet->GetItemState(SID_SET_DOCUMENT_LANGUAGE, false, &pLang ) && ((const SfxBoolItem*)pLang)->GetValue() ) { m_pWesternLanguageLB->GrabFocus(); m_pCurrentDocCB->Enable(true); diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 7e3f8777bdc2..20303de88311 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -328,7 +328,7 @@ void SvxGeneralTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 const nWhich = GetWhich(SID_FIELD_GRABFOCUS); - if (rSet->GetItemState(nWhich) == SFX_ITEM_SET) + if (rSet->GetItemState(nWhich) == SfxItemState::SET) { if (sal_uInt16 const nField = ((SfxUInt16Item&)rSet->Get(nWhich)).GetValue()) { diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 3f43ee7d3496..469b1f955a0d 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1478,7 +1478,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) const SfxHyphenRegionItem *pHyp = NULL; sal_uInt16 nWhich = GetWhich( SID_ATTR_HYPHENREGION ); - if ( rSet->GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet->GetItemState( nWhich, false ) == SfxItemState::SET ) pHyp = &( (const SfxHyphenRegionItem &) rSet->Get( nWhich ) ); pEntry = CreateEntry( sNumPreBreak, CBCOL_SECOND ); diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 34f8a177498f..bae13c5c5fe6 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -240,9 +240,9 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet* rSet ) get()))); SfxItemState eState = rSet->GetItemState( SID_ATTR_QUICKLAUNCHER, false, &pItem ); - if ( SFX_ITEM_SET == eState ) + if ( SfxItemState::SET == eState ) m_pQuickLaunchCB->Check( ( (SfxBoolItem*)pItem )->GetValue() ); - else if ( SFX_ITEM_DISABLED == eState ) + else if ( SfxItemState::DISABLED == eState ) { // quickstart not installed m_pQuickStarterFrame->Hide(); diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 4ffc216c68a1..eb212b30701e 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -95,7 +95,7 @@ struct PathUserData_Impl OUString sWritablePath; PathUserData_Impl( sal_uInt16 nId ) : - nRealId( nId ), eState( SFX_ITEM_UNKNOWN ) {} + nRealId( nId ), eState( SfxItemState::UNKNOWN ) {} }; struct Handle2CfgNameMapping_Impl @@ -269,7 +269,7 @@ bool SvxPathTabPage::FillItemSet( SfxItemSet* ) { PathUserData_Impl* pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(i)->GetUserData(); sal_uInt16 nRealId = pPathImpl->nRealId; - if ( pPathImpl->eState == SFX_ITEM_SET ) + if ( pPathImpl->eState == SfxItemState::SET ) SetPathList( nRealId, pPathImpl->sUserPath, pPathImpl->sWritablePath ); } return true; @@ -452,7 +452,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl) sWritablePath = sTemp.getToken( nOldCount - 1, MULTIPATH_DELIMITER ); pPathBox->SetEntryText( Convert_Impl( sTemp ), pEntry, 1 ); - pPathImpl->eState = SFX_ITEM_SET; + pPathImpl->eState = SfxItemState::SET; pPathImpl->sUserPath = sUserPath; pPathImpl->sWritablePath = sWritablePath; } @@ -503,7 +503,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder ) pPathBox->SetEntryText( Convert_Impl( sNewPathStr ), pEntry, 1 ); nPos = (sal_uInt16)pPathBox->GetModel()->GetAbsPos( pEntry ); pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(nPos)->GetUserData(); - pPathImpl->eState = SFX_ITEM_SET; + pPathImpl->eState = SfxItemState::SET; pPathImpl->sWritablePath = sNewPathStr; if ( SvtPathOptions::PATH_WORK == pPathImpl->nRealId ) { @@ -594,7 +594,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl) pPathBox->SetEntryText( Convert_Impl( sFullPath ), pEntry, 1 ); // save modified flag PathUserData_Impl* pPathImpl = (PathUserData_Impl*)pEntry->GetUserData(); - pPathImpl->eState = SFX_ITEM_SET; + pPathImpl->eState = SfxItemState::SET; pPathImpl->sUserPath = sUser; pPathImpl->sWritablePath = sWritable; } diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d5cf0e386101..ab9356619845 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1198,7 +1198,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); // miscellaneous - Year2000 - if( SFX_ITEM_DEFAULT <= pDispatch->QueryState( SID_ATTR_YEAR2000, pItem ) ) + if( SfxItemState::DEFAULT <= pDispatch->QueryState( SID_ATTR_YEAR2000, pItem ) ) pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, ((const SfxUInt16Item*)pItem)->GetValue() ) ); else pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (sal_uInt16)aMisc.GetYear2000() ) ); @@ -1247,15 +1247,15 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) if ( pViewFrame ) { SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); - if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_ATTR_LANGUAGE, pItem)) + if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_ATTR_LANGUAGE, pItem)) pRet->Put(SfxUInt16Item(SID_ATTR_LANGUAGE, ((const SvxLanguageItem*)pItem)->GetLanguage())); - if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CJK_LANGUAGE, pItem)) + if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CJK_LANGUAGE, pItem)) pRet->Put(SfxUInt16Item(SID_ATTR_CHAR_CJK_LANGUAGE, ((const SvxLanguageItem*)pItem)->GetLanguage())); - if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CTL_LANGUAGE, pItem)) + if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CTL_LANGUAGE, pItem)) pRet->Put(SfxUInt16Item(SID_ATTR_CHAR_CTL_LANGUAGE, ((const SvxLanguageItem*)pItem)->GetLanguage())); pRet->Put(aHyphen); - if(SFX_ITEM_DEFAULT <= pDispatch->QueryState(SID_AUTOSPELL_CHECK, pItem)) + if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_AUTOSPELL_CHECK, pItem)) { pClone = pItem->Clone(); pRet->Put(*pClone); @@ -1335,7 +1335,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet // evaluate Year2000 sal_uInt16 nY2K = USHRT_MAX; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_YEAR2000, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_YEAR2000, false, &pItem ) ) nY2K = ((const SfxUInt16Item*)pItem)->GetValue(); if( USHRT_MAX != nY2K ) { @@ -1350,10 +1350,10 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet // evaluate print - if(SFX_ITEM_SET == rSet.GetItemState(SID_PRINTER_NOTFOUND_WARN, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_PRINTER_NOTFOUND_WARN, false, &pItem)) aMisc.SetNotFoundWarning(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rSet.GetItemState(SID_PRINTER_CHANGESTODOC, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_PRINTER_CHANGESTODOC, false, &pItem)) { const SfxFlagItem* pFlag = (const SfxFlagItem*)pItem; aMisc.SetPaperSizeWarning(0 != (pFlag->GetValue() & SFX_PRINTER_CHG_SIZE )); @@ -1400,13 +1400,13 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) bool bSaveSpellCheck = false; const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_SPELL_MODIFIED, false, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( SID_SPELL_MODIFIED, false, &pItem ) ) { bSaveSpellCheck = ( (const SfxBoolItem*)pItem )->GetValue(); } Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< XLinguProperties > xProp = LinguProperties::create( xContext ); - if ( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_HYPHENREGION, false, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState(SID_ATTR_HYPHENREGION, false, &pItem ) ) { const SfxHyphenRegionItem* pHyphenItem = (const SfxHyphenRegionItem*)pItem; @@ -1420,23 +1420,23 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) { SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); pItem = 0; - if(SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_LANGUAGE, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_LANGUAGE, false, &pItem )) { pDispatch->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); bSaveSpellCheck = true; } - if(SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem )) { pDispatch->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); bSaveSpellCheck = true; } - if(SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem )) { pDispatch->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); bSaveSpellCheck = true; } - if( SFX_ITEM_SET == rSet.GetItemState(SID_AUTOSPELL_CHECK, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState(SID_AUTOSPELL_CHECK, false, &pItem )) { bool bOnlineSpelling = ((const SfxBoolItem*)pItem)->GetValue(); pDispatch->Execute(SID_AUTOSPELL_CHECK, @@ -1453,7 +1453,7 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) } } - if( SFX_ITEM_SET == rSet.GetItemState(SID_OPT_LOCALE_CHANGED, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState(SID_OPT_LOCALE_CHANGED, false, &pItem )) { SfxViewFrame* _pViewFrame = SfxViewFrame::GetFirst(); while ( _pViewFrame ) 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()); diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 3313d03292b5..126704867aa8 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -329,7 +329,7 @@ bool shouldLaunchQuickstart() SfxItemSet aQLSet(SfxGetpApp()->GetPool(), SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER); SfxGetpApp()->GetOptions(aQLSet); SfxItemState eState = aQLSet.GetItemState(SID_ATTR_QUICKLAUNCHER, false, &pItem); - if (SFX_ITEM_SET == eState) + if (SfxItemState::SET == eState) bQuickstart = ((SfxBoolItem*)pItem)->GetValue(); } return bQuickstart; diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 8b8a705b74b9..ba3d852dcf00 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -300,14 +300,14 @@ void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, bool bSearchInParent, bool for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { fprintf( fp, "\nWhich: %i\t", nWhich ); - if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_DEFAULT ) + if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::DEFAULT ) fprintf( fp, "ITEM_OFF " ); - else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_DONTCARE ) + else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::DONTCARE ) fprintf( fp, "ITEM_DC " ); - else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_SET ) + else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::SET ) fprintf( fp, "ITEM_ON *" ); - if ( !bShowALL && ( rSet.GetItemState( nWhich, bSearchInParent ) != SFX_ITEM_SET ) ) + if ( !bShowALL && ( rSet.GetItemState( nWhich, bSearchInParent ) != SfxItemState::SET ) ) continue; const SfxPoolItem& rItem = rSet.Get( nWhich, bSearchInParent ); diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 623e5e7c50ea..dc31300532f8 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -947,7 +947,7 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map nSourceWhich = nW; } - if ( rSource.GetItemState( nSourceWhich, false ) == SFX_ITEM_SET ) + if ( rSource.GetItemState( nSourceWhich, false ) == SfxItemState::SET ) { MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich ); MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich ); @@ -1882,7 +1882,7 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS ) for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { // Don't change bullet on/off - if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_SET ) ) + if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SfxItemState::SET ) ) aAttribSet.ClearItem( nWhich ); } } @@ -1892,7 +1892,7 @@ const SfxPoolItem& ContentAttribs::GetItem( sal_uInt16 nWhich ) const { // Hard paragraph attributes take precedence! const SfxItemSet* pTakeFrom = &aAttribSet; - if ( pStyle && ( aAttribSet.GetItemState( nWhich, false ) != SFX_ITEM_SET ) ) + if ( pStyle && ( aAttribSet.GetItemState( nWhich, false ) != SfxItemState::SET ) ) pTakeFrom = &pStyle->GetItemSet(); return pTakeFrom->Get( nWhich ); @@ -1901,9 +1901,9 @@ const SfxPoolItem& ContentAttribs::GetItem( sal_uInt16 nWhich ) const bool ContentAttribs::HasItem( sal_uInt16 nWhich ) const { bool bHasItem = false; - if ( aAttribSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( aAttribSet.GetItemState( nWhich, false ) == SfxItemState::SET ) bHasItem = true; - else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_SET ) + else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SfxItemState::SET ) bHasItem = true; return bHasItem; @@ -2006,7 +2006,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s sal_uInt16 nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ); sal_uInt16 nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType ); - if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SfxItemState::SET ) ) { const SvxFontItem& rFontItem = (const SvxFontItem&)rSet.Get( nWhich_FontInfo ); rFont.SetName( rFontItem.GetFamilyName() ); @@ -2014,31 +2014,31 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s rFont.SetPitch( rFontItem.GetPitch() ); rFont.SetCharSet( rFontItem.GetCharSet() ); } - if ( bSearchInParent || ( rSet.GetItemState( nWhich_Language ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( nWhich_Language ) == SfxItemState::SET ) ) rFont.SetLanguage( ((const SvxLanguageItem&)rSet.Get( nWhich_Language )).GetLanguage() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_COLOR ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_COLOR ) == SfxItemState::SET ) ) rFont.SetColor( ((const SvxColorItem&)rSet.Get( EE_CHAR_COLOR )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_BKGCOLOR ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_BKGCOLOR ) == SfxItemState::SET ) ) rFont.SetFillColor( ((const SvxBackgroundColorItem&)rSet.Get( EE_CHAR_BKGCOLOR )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontHeight ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontHeight ) == SfxItemState::SET ) ) rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem&)rSet.Get( nWhich_FontHeight ) ).GetHeight() ) ); - if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SfxItemState::SET ) ) rFont.SetWeight( ((const SvxWeightItem&)rSet.Get( nWhich_Weight )).GetWeight() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) ) rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OVERLINE ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OVERLINE ) == SfxItemState::SET ) ) rFont.SetOverline( ((const SvxOverlineItem&)rSet.Get( EE_CHAR_OVERLINE )).GetLineStyle() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SfxItemState::SET ) ) rFont.SetStrikeout( ((const SvxCrossedOutItem&)rSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_CASEMAP ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_CASEMAP ) == SfxItemState::SET ) ) rFont.SetCaseMap( ((const SvxCaseMapItem&)rSet.Get( EE_CHAR_CASEMAP )).GetCaseMap() ); - if ( bSearchInParent || ( rSet.GetItemState( nWhich_Italic ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( nWhich_Italic ) == SfxItemState::SET ) ) rFont.SetItalic( ((const SvxPostureItem&)rSet.Get( nWhich_Italic )).GetPosture() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OUTLINE ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OUTLINE ) == SfxItemState::SET ) ) rFont.SetOutline( ((const SvxContourItem&)rSet.Get( EE_CHAR_OUTLINE )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_SHADOW ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_SHADOW ) == SfxItemState::SET ) ) rFont.SetShadow( ((const SvxShadowedItem&)rSet.Get( EE_CHAR_SHADOW )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_ESCAPEMENT ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_ESCAPEMENT ) == SfxItemState::SET ) ) { const SvxEscapementItem& rEsc = (const SvxEscapementItem&) rSet.Get( EE_CHAR_ESCAPEMENT ); @@ -2052,15 +2052,15 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s nEsc = sal::static_int_cast< short >( -( 100 - nProp ) ); rFont.SetEscapement( nEsc ); } - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SfxItemState::SET ) ) rFont.SetKerning( ((const SvxAutoKernItem&)rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_KERNING ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_KERNING ) == SfxItemState::SET ) ) rFont.SetFixKerning( ((const SvxKerningItem&)rSet.Get( EE_CHAR_KERNING )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_WLM ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_WLM ) == SfxItemState::SET ) ) rFont.SetWordLineMode( ((const SvxWordLineModeItem&)rSet.Get( EE_CHAR_WLM )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_EMPHASISMARK ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_EMPHASISMARK ) == SfxItemState::SET ) ) rFont.SetEmphasisMark( ((const SvxEmphasisMarkItem&)rSet.Get( EE_CHAR_EMPHASISMARK )).GetValue() ); - if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_RELIEF ) == SFX_ITEM_SET ) ) + if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_RELIEF ) == SfxItemState::SET ) ) rFont.SetRelief( (FontRelief)((const SvxCharReliefItem&)rSet.Get( EE_CHAR_RELIEF )).GetValue() ); // If comparing the entire font, or if checking before each alteration @@ -2621,11 +2621,11 @@ void EditDoc::FindAttribs( ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nE if ( pItem ) { sal_uInt16 nWhich = pItem->Which(); - if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT ) + if ( rCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT ) { rCurSet.Put( *pItem ); } - else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + else if ( rCurSet.GetItemState( nWhich ) == SfxItemState::SET ) { const SfxPoolItem& rItem = rCurSet.Get( nWhich ); if ( rItem != *pItem ) @@ -2671,11 +2671,11 @@ void EditDoc::FindAttribs( ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nE if ( pItem ) { sal_uInt16 nWhich = pItem->Which(); - if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT ) + if ( rCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT ) { rCurSet.Put( *pItem ); } - else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + else if ( rCurSet.GetItemState( nWhich ) == SfxItemState::SET ) { const SfxPoolItem& rItem = rCurSet.Get( nWhich ); if ( rItem != *pItem ) diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 76553149976f..ed2be30b1fc8 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1099,7 +1099,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const // Symbols? bool bSymbolPara = false; - if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET) + if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET) { const SvxFontItem& rFontItem = (const SvxFontItem&)rC.GetParaAttribs().Get(EE_CHAR_FONTINFO); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) @@ -1148,7 +1148,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const // StarSymbol as paragraph attribute or in StyleSheet? FontToSubsFontConverter hConv = NULL; - if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET) + if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET) { hConv = CreateFontToSubsFontConverter( ((const SvxFontItem&)rC.GetParaAttribs().Get( EE_CHAR_FONTINFO )).GetFamilyName(), FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ); } @@ -1334,7 +1334,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream ) // FinishLoad will not be called in OpenOffice Calc, no StyleSheets... bool bSymbolPara = false; - if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET ) + if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET ) { const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) @@ -1390,7 +1390,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream ) // Convert StarMath and StarBats to StarSymbol // Maybe old symbol font as paragraph attribute? - if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET ) + if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET ) { const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); FontToSubsFontConverter hConv = CreateFontToSubsFontConverter( rFontItem.GetFamilyName(), FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ); @@ -1493,7 +1493,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream ) { ContentInfo& rC = aContents[i]; const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(rC.GetParaAttribs().Get(EE_PARA_LRSPACE)); - if ( rLRSpace.GetTxtLeft() && ( rC.GetParaAttribs().GetItemState( EE_PARA_TABS ) == SFX_ITEM_SET ) ) + if ( rLRSpace.GetTxtLeft() && ( rC.GetParaAttribs().GetItemState( EE_PARA_TABS ) == SfxItemState::SET ) ) { const SvxTabStopItem& rTabs = static_cast<const SvxTabStopItem&>(rC.GetParaAttribs().Get(EE_PARA_TABS)); SvxTabStopItem aNewTabs( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS ); diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 006131ce6ce3..765c73085c5f 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -309,7 +309,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) sal_uInt16 aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL }; for (size_t i = 0; i < SAL_N_ELEMENTS(aFntHeightIems); ++i) { - if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], false, &pItem )) + if (SfxItemState::SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], false, &pItem )) { sal_uInt32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight(); long nNewHeight; @@ -321,7 +321,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) } } - if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, false, &pItem )) + if( SfxItemState::SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, false, &pItem )) { // die richtige long nEsc = ((SvxEscapementItem*)pItem)->GetEsc(); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index eed20d559b37..db404f03340e 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -487,7 +487,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) // Attribute, alos from Parent! for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ ) { - if ( pStyle->GetItemSet().GetItemState( nParAttr ) == SFX_ITEM_SET ) + if ( pStyle->GetItemSet().GetItemState( nParAttr ) == SfxItemState::SET ) { const SfxPoolItem& rItem = pStyle->GetItemSet().Get( nParAttr ); WriteItemAsRTF( rItem, rOutput, 0, 0, aFontTable, aColorList ); @@ -565,7 +565,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) // Attribute, also from Parent! for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ ) { - if ( pNode->GetStyleSheet()->GetItemSet().GetItemState( nParAttr ) == SFX_ITEM_SET ) + if ( pNode->GetStyleSheet()->GetItemSet().GetItemState( nParAttr ) == SfxItemState::SET ) { const SfxPoolItem& rItem = pNode->GetStyleSheet()->GetItemSet().Get( nParAttr ); WriteItemAsRTF( rItem, rOutput, nNode, 0, aFontTable, aColorList ); @@ -577,7 +577,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ ) { // Now where stylesheet processing, only hard paragraph attributes! - if ( pNode->GetContentAttribs().GetItems().GetItemState( nParAttr ) == SFX_ITEM_SET ) + if ( pNode->GetContentAttribs().GetItems().GetItemState( nParAttr ) == SfxItemState::SET ) { const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItems().Get( nParAttr ); WriteItemAsRTF( rItem, rOutput, nNode, 0, aFontTable, aColorList ); diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index f9ef3d0c0cc1..ec24083d0204 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -335,27 +335,27 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl // and then paragraph formatting and template... for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { - if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT ) + if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT ) { if ( nOnlyHardAttrib == EditEngineAttribs_All ) { const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich ); aCurSet.Put( rItem ); } - else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_SET ) + else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SfxItemState::SET ) { const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItems().Get( nWhich ); aCurSet.Put( rItem ); } } - else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + else if ( aCurSet.GetItemState( nWhich ) == SfxItemState::SET ) { const SfxPoolItem* pItem = NULL; if ( nOnlyHardAttrib == EditEngineAttribs_All ) { pItem = &pNode->GetContentAttribs().GetItem( nWhich ); } - else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_SET ) + else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SfxItemState::SET ) { pItem = &pNode->GetContentAttribs().GetItems().Get( nWhich ); } @@ -381,7 +381,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl { for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ ) { - if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT ) + if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT ) { aCurSet.Put( aEditDoc.GetItemPool().GetDefaultItem( nWhich ) ); } @@ -504,9 +504,9 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_ bool bCheckLanguage = false; if ( GetStatus().DoOnlineSpelling() ) { - bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SFX_ITEM_SET ) || - ( rSet.GetItemState( EE_CHAR_LANGUAGE_CJK ) == SFX_ITEM_SET ) || - ( rSet.GetItemState( EE_CHAR_LANGUAGE_CTL ) == SFX_ITEM_SET ); + bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SfxItemState::SET ) || + ( rSet.GetItemState( EE_CHAR_LANGUAGE_CJK ) == SfxItemState::SET ) || + ( rSet.GetItemState( EE_CHAR_LANGUAGE_CTL ) == SfxItemState::SET ); } // iterate over the paragraphs ... @@ -527,7 +527,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_ // Iterate over the Items... for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { - if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich ) == SfxItemState::SET ) { const SfxPoolItem& rItem = rSet.Get( nWhich ); if ( nWhich <= EE_PARA_END ) diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 3d9a744a4ba1..ebb8153064a0 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -3302,8 +3302,8 @@ const SfxPoolItem* SvxScriptSetItem::GetItemOfScriptSet( { const SfxPoolItem* pI; SfxItemState eSt = rSet.GetItemState( nId, false, &pI ); - if( SFX_ITEM_SET != eSt ) - pI = SFX_ITEM_DEFAULT == eSt ? &rSet.Get( nId ) : 0; + if( SfxItemState::SET != eSt ) + pI = SfxItemState::DEFAULT == eSt ? &rSet.Get( nId ) : 0; return pI; } diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 9791dcbf81ba..74aba0240aef 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -737,7 +737,7 @@ void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* { SfxItemSet aOldAttrs( GetParaAttribs( nPara ) ); SetStyleSheet( nPara, pNewStyle ); - if ( aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET ) + if ( aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET ) { SfxItemSet aAttrs( GetParaAttribs( nPara ) ); aAttrs.Put( aOldAttrs.Get( EE_PARA_NUMBULLET ) ); @@ -1235,7 +1235,7 @@ void Outliner::ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount ) { sal_Int16 nDepth = -1; const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( nStartPara ); - if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SFX_ITEM_SET ) + if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SfxItemState::SET ) { const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL ); nDepth = rLevel.GetValue(); diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 5f80f00b4425..3c3c0db7cf43 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -860,7 +860,7 @@ void OutlinerView::ToggleBullets() if( nNewDepth == -1 ) { const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara ); - if ( rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SFX_ITEM_SET ) + if ( rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SfxItemState::SET ) { SfxItemSet aAttrs(rAttrs); aAttrs.ClearItem( EE_PARA_BULLETSTATE ); @@ -1058,7 +1058,7 @@ void OutlinerView::ApplyBulletsNumbering( { const SfxPoolItem* pPoolItem=NULL; SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, false, &pPoolItem); - if (eState != SFX_ITEM_SET) + if (eState != SfxItemState::SET) { // Use default value when has not contain bullet item. ESelection aSelection(nPara, 0); @@ -1137,7 +1137,7 @@ void OutlinerView::SwitchOffBulletsNumbering( pOwner->SetDepth( pPara, -1 ); const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara ); - if (rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SFX_ITEM_SET) + if (rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SfxItemState::SET) { SfxItemSet aAttrs(rAttrs); aAttrs.ClearItem( EE_PARA_BULLETSTATE ); diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index aca69abe84e9..eefc873a6f0f 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -804,7 +804,7 @@ ATTR_SETUNDERLINE: { SvxUnderlineItem aUL( UNDERLINE_SINGLE, PLAINID->nUnderline ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( PLAINID->nUnderline, false, &pItem ) ) { // is switched off ? @@ -899,7 +899,7 @@ ATTR_SETOVERLINE: { SvxOverlineItem aOL( UNDERLINE_SINGLE, PLAINID->nOverline ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( PLAINID->nOverline, false, &pItem ) ) { // is switched off ? @@ -1398,7 +1398,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet, // then read the border attribute SvxBoxItem aAttr( PARDID->nBox ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( PARDID->nBox, false, &pItem ) ) aAttr = *(SvxBoxItem*)pItem; SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0 ); // Simple plain line @@ -1772,19 +1772,19 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) pAkt->aAttrSet.Put( pDfltSet->Get( *pPtr ) ); else if( !pAkt->aAttrSet.GetParent() ) { - if( SFX_ITEM_SET == + if( SfxItemState::SET == pDfltSet->GetItemState( *pPtr, false, &pDef )) pAkt->aAttrSet.Put( *pDef ); else pAkt->aAttrSet.ClearItem( *pPtr ); } - else if( SFX_ITEM_SET == pAkt->aAttrSet.GetParent()-> + else if( SfxItemState::SET == pAkt->aAttrSet.GetParent()-> GetItemState( *pPtr, true, &pItem ) && *( pDef = &pDfltSet->Get( *pPtr )) != *pItem ) pAkt->aAttrSet.Put( *pDef ); else { - if( SFX_ITEM_SET == + if( SfxItemState::SET == pDfltSet->GetItemState( *pPtr, false, &pDef )) pAkt->aAttrSet.Put( *pDef ); else diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 19ae8a8c451d..625028e0c721 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -865,7 +865,7 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) && + SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // delete } @@ -879,14 +879,14 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) const SfxPoolItem* pSItem; for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { - if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, true, &pSItem )) + if( SfxItemState::SET == rStyleSet.GetItemState( nWhich, true, &pSItem )) { - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) + if( SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) && *pItem == *pSItem ) rSet.ClearItem( nWhich ); // delete } else if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) && + SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // delete } @@ -916,7 +916,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack const SfxPoolItem* pItem = aIter.GetCurItem(), *pGet; while( true ) { - if( SFX_ITEM_SET == pAkt->aAttrSet.GetItemState( + if( SfxItemState::SET == pAkt->aAttrSet.GetItemState( pItem->Which(), false, &pGet ) && *pItem == *pGet ) pOld->aAttrSet.ClearItem( pItem->Which() ); @@ -1290,7 +1290,7 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser ) const SfxPoolItem* pItem; do { sal_uInt16 nWhich = aIter.GetCurItem()->Which(); - if( SFX_ITEM_SET != pTmp->aAttrSet.GetItemState( nWhich, + if( SfxItemState::SET != pTmp->aAttrSet.GetItemState( nWhich, false, &pItem ) || *pItem != *aIter.GetCurItem() ) aMrgSet.ClearItem( nWhich ); @@ -1337,7 +1337,7 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults ) SfxItemIter aIter( rDefaults ); do { sal_uInt16 nWhich = aIter.GetCurItem()->Which(); - if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, false )) + if( SfxItemState::SET != aAttrSet.GetItemState( nWhich, false )) aAttrSet.Put( *aIter.GetCurItem() ); if( aIter.IsAtEnd() ) diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 88cda6625658..6b39f0a3095c 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -97,7 +97,7 @@ SfxItemSet SvxEditEngineForwarder::GetParaAttribs( sal_Int32 nPara ) const sal_uInt16 nWhich = EE_PARA_START; while( nWhich <= EE_PARA_END ) { - if( aSet.GetItemState( nWhich, true ) != SFX_ITEM_SET ) + if( aSet.GetItemState( nWhich, true ) != SfxItemState::SET ) { if( rEditEngine.HasParaAttrib( nPara, nWhich ) ) aSet.Put( rEditEngine.GetParaAttrib( nPara, nWhich ) ); @@ -171,12 +171,12 @@ SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelectio const SfxPoolItem* pLastItem = NULL; - SfxItemState eState = SFX_ITEM_DEFAULT; + SfxItemState eState = SfxItemState::DEFAULT; // check all paragraphs inside the selection for( sal_Int32 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ ) { - SfxItemState eParaState = SFX_ITEM_DEFAULT; + SfxItemState eParaState = SfxItemState::DEFAULT; // calculate start and endpos for this paragraph sal_Int32 nPos = 0; @@ -218,7 +218,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelectio { // ... and its different to this one than the state is dont care if(*pParaItem != *(i->pAttr)) - return SFX_ITEM_DONTCARE; + return SfxItemState::DONTCARE; } else pParaItem = i->pAttr; @@ -236,17 +236,17 @@ SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelectio bGaps = true; if( bEmpty ) - eParaState = SFX_ITEM_DEFAULT; + eParaState = SfxItemState::DEFAULT; else if( bGaps ) - eParaState = SFX_ITEM_DONTCARE; + eParaState = SfxItemState::DONTCARE; else - eParaState = SFX_ITEM_SET; + eParaState = SfxItemState::SET; // if we already found an item check if we found the same if( pLastItem ) { if( (pParaItem == NULL) || (*pLastItem != *pParaItem) ) - return SFX_ITEM_DONTCARE; + return SfxItemState::DONTCARE; } else { diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index c8c66b8127b3..b6fc8efc522f 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -153,7 +153,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa SfxItemPool* pPool = rSet.GetPool(); // Put UnoAny in the item value - if(eState < SFX_ITEM_DEFAULT || pItem == NULL) + if(eState < SfxItemState::DEFAULT || pItem == NULL) { if( pPool == NULL ) { @@ -220,7 +220,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* { const SfxPoolItem* pItem = NULL; SfxItemState eState = aSet.GetItemState( pMap->nWID, true, &pItem ); - if(eState >= SFX_ITEM_DEFAULT && pItem) + if(eState >= SfxItemState::DEFAULT && pItem) { pItem->QueryValue( aVal, nMemberId ); ((SvxItemPropertySet*)this)->AddUsrAnyForID(aVal, pMap->nWID); diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 135448b46906..77b9267a7180 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -644,7 +644,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM switch( pMap->nWID ) { case EE_FEATURE_FIELD: - if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET ) { SvxFieldItem* pItem = (SvxFieldItem*)rSet.GetItem( EE_FEATURE_FIELD ); const SvxFieldData* pData = pItem->GetField(); @@ -666,7 +666,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM break; case WID_PORTIONTYPE: - if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET ) { OUString aType("TextField"); rAny <<= aType; @@ -700,7 +700,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxIt case EE_PARA_NUMBULLET: { SfxItemState eState = rSet.GetItemState( EE_PARA_NUMBULLET, true ); - if( eState != SFX_ITEM_SET && eState != SFX_ITEM_DEFAULT) + if( eState != SfxItemState::SET && eState != SfxItemState::DEFAULT) throw uno::RuntimeException(); SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)rSet.GetItem( EE_PARA_NUMBULLET, true ); @@ -742,7 +742,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxIt { bool bState = false; SfxItemState eState = rSet.GetItemState( EE_PARA_BULLETSTATE, true ); - if( eState == SFX_ITEM_SET || eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::SET || eState == SfxItemState::DEFAULT ) { SfxBoolItem* pItem = (SfxBoolItem*)rSet.GetItem( EE_PARA_BULLETSTATE, true ); bState = pItem->GetValue() ? sal_True : sal_False; @@ -823,7 +823,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt if( pMap->nWID >= EE_ITEMS_START && pMap->nWID <= EE_ITEMS_END ) { const SfxPoolItem* pItem; - if( pNewAttrSet->GetItemState( pMap->nWID, true, &pItem ) == SFX_ITEM_SET ) + if( pNewAttrSet->GetItemState( pMap->nWID, true, &pItem ) == SfxItemState::SET ) { pOldAttrSet->Put( *pItem ); } @@ -843,7 +843,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt if( pMap->nWID >= EE_ITEMS_START && pMap->nWID <= EE_ITEMS_END ) { const SfxPoolItem* pItem; - if( pNewParaSet->GetItemState( pMap->nWID, true, &pItem ) == SFX_ITEM_SET ) + if( pNewParaSet->GetItemState( pMap->nWID, true, &pItem ) == SfxItemState::SET ) { pOldParaSet->Put( *pItem ); } @@ -965,7 +965,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) { - SfxItemState eItemState = SFX_ITEM_UNKNOWN; + SfxItemState eItemState = SfxItemState::UNKNOWN; sal_uInt16 nWID = 0; switch( pMap->nWID ) @@ -973,7 +973,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt case WID_FONTDESC: { const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap; - SfxItemState eTempItemState = SFX_ITEM_UNKNOWN; + SfxItemState eTempItemState = SfxItemState::UNKNOWN; while( *pWhichId ) { if(nPara != -1) @@ -983,25 +983,25 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt switch( eTempItemState ) { - case SFX_ITEM_DISABLED: - case SFX_ITEM_DONTCARE: - eItemState = SFX_ITEM_DONTCARE; + case SfxItemState::DISABLED: + case SfxItemState::DONTCARE: + eItemState = SfxItemState::DONTCARE; break; - case SFX_ITEM_DEFAULT: - if( eItemState != SFX_ITEM_DEFAULT ) + case SfxItemState::DEFAULT: + if( eItemState != SfxItemState::DEFAULT ) { - if( eItemState == SFX_ITEM_UNKNOWN ) - eItemState = SFX_ITEM_DEFAULT; + if( eItemState == SfxItemState::UNKNOWN ) + eItemState = SfxItemState::DEFAULT; } break; - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: - if( eItemState != SFX_ITEM_SET ) + case SfxItemState::READONLY: + case SfxItemState::SET: + if( eItemState != SfxItemState::SET ) { - if( eItemState == SFX_ITEM_UNKNOWN ) - eItemState = SFX_ITEM_SET; + if( eItemState == SfxItemState::UNKNOWN ) + eItemState = SfxItemState::SET; } break; default: @@ -1016,7 +1016,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt case WID_NUMLEVEL: case WID_NUMBERINGSTARTVALUE: case WID_PARAISNUMBERINGRESTART: - eItemState = SFX_ITEM_SET; + eItemState = SfxItemState::SET; break; default: @@ -1033,16 +1033,16 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt switch( eItemState ) { - case SFX_ITEM_DONTCARE: - case SFX_ITEM_DISABLED: + case SfxItemState::DONTCARE: + case SfxItemState::DISABLED: return beans::PropertyState_AMBIGUOUS_VALUE; - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: + case SfxItemState::READONLY: + case SfxItemState::SET: return beans::PropertyState_DIRECT_VALUE; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: return beans::PropertyState_DEFAULT_VALUE; default: break; -// case SFX_ITEM_UNKNOWN: +// case SfxItemState::UNKNOWN: } } } @@ -1113,7 +1113,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf bool bUnknownPropertyFound = false; if(pSet && pMap) { - SfxItemState eItemState = SFX_ITEM_UNKNOWN; + SfxItemState eItemState = SfxItemState::UNKNOWN; sal_uInt16 nWID = 0; switch( pMap->nWID ) @@ -1121,32 +1121,32 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf case WID_FONTDESC: { const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap; - SfxItemState eTempItemState = SFX_ITEM_UNKNOWN; + SfxItemState eTempItemState = SfxItemState::UNKNOWN; while( *pWhichId ) { eTempItemState = pSet->GetItemState( *pWhichId ); switch( eTempItemState ) { - case SFX_ITEM_DISABLED: - case SFX_ITEM_DONTCARE: - eItemState = SFX_ITEM_DONTCARE; + case SfxItemState::DISABLED: + case SfxItemState::DONTCARE: + eItemState = SfxItemState::DONTCARE; break; - case SFX_ITEM_DEFAULT: - if( eItemState != SFX_ITEM_DEFAULT ) + case SfxItemState::DEFAULT: + if( eItemState != SfxItemState::DEFAULT ) { - if( eItemState == SFX_ITEM_UNKNOWN ) - eItemState = SFX_ITEM_DEFAULT; + if( eItemState == SfxItemState::UNKNOWN ) + eItemState = SfxItemState::DEFAULT; } break; - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: - if( eItemState != SFX_ITEM_SET ) + case SfxItemState::READONLY: + case SfxItemState::SET: + if( eItemState != SfxItemState::SET ) { - if( eItemState == SFX_ITEM_UNKNOWN ) - eItemState = SFX_ITEM_SET; + if( eItemState == SfxItemState::UNKNOWN ) + eItemState = SfxItemState::SET; } break; default: @@ -1162,7 +1162,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf case WID_NUMLEVEL: case WID_NUMBERINGSTARTVALUE: case WID_PARAISNUMBERINGRESTART: - eItemState = SFX_ITEM_SET; + eItemState = SfxItemState::SET; break; default: @@ -1177,16 +1177,16 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf switch( eItemState ) { - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: + case SfxItemState::READONLY: + case SfxItemState::SET: rState = beans::PropertyState_DIRECT_VALUE; break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: rState = beans::PropertyState_DEFAULT_VALUE; break; -// case SFX_ITEM_UNKNOWN: -// case SFX_ITEM_DONTCARE: -// case SFX_ITEM_DISABLED: +// case SfxItemState::UNKNOWN: +// case SfxItemState::DONTCARE: +// case SfxItemState::DISABLED: default: rState = beans::PropertyState_AMBIGUOUS_VALUE; } @@ -2430,12 +2430,12 @@ void SvxDummyTextSource::GetPortions( sal_Int32, std::vector<sal_Int32>& ) const SfxItemState SvxDummyTextSource::GetItemState( const ESelection&, sal_uInt16 ) const { - return SFX_ITEM_UNKNOWN; + return SfxItemState::UNKNOWN; } SfxItemState SvxDummyTextSource::GetItemState( sal_Int32, sal_uInt16 ) const { - return SFX_ITEM_UNKNOWN; + return SfxItemState::UNKNOWN; } SfxItemPool* SvxDummyTextSource::GetPool() const diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index e760437708ba..02ab6ca16cfd 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -309,7 +309,7 @@ namespace pcr // font name SfxItemState eState = _rSet.GetItemState(CFID_FONT); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(_rSet.Get(CFID_FONT)); @@ -324,7 +324,7 @@ namespace pcr // font height eState = _rSet.GetItemState(CFID_HEIGHT); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxFontHeightItem& rSvxFontHeightItem = static_cast<const SvxFontHeightItem&>(_rSet.Get(CFID_HEIGHT)); @@ -338,7 +338,7 @@ namespace pcr // font weight eState = _rSet.GetItemState(CFID_WEIGHT); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxWeightItem& rWeightItem = static_cast<const SvxWeightItem&>(_rSet.Get(CFID_WEIGHT)); @@ -351,7 +351,7 @@ namespace pcr // font slant eState = _rSet.GetItemState(CFID_POSTURE); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxPostureItem& rPostureItem = static_cast<const SvxPostureItem&>(_rSet.Get(CFID_POSTURE)); @@ -364,7 +364,7 @@ namespace pcr // font underline eState = _rSet.GetItemState(CFID_UNDERLINE); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxUnderlineItem& rUnderlineItem = static_cast<const SvxUnderlineItem&>(_rSet.Get(CFID_UNDERLINE)); @@ -386,7 +386,7 @@ namespace pcr // font strikeout eState = _rSet.GetItemState(CFID_STRIKEOUT); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxCrossedOutItem& rCrossedOutItem = static_cast<const SvxCrossedOutItem&>(_rSet.Get(CFID_STRIKEOUT)); @@ -400,7 +400,7 @@ namespace pcr // font wordline mode eState = _rSet.GetItemState(CFID_WORDLINEMODE); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxWordLineModeItem& rWordLineModeItem = static_cast<const SvxWordLineModeItem&>(_rSet.Get(CFID_WORDLINEMODE)); @@ -413,7 +413,7 @@ namespace pcr // text color eState = _rSet.GetItemState(CFID_CHARCOLOR); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxColorItem& rColorItem = static_cast<const SvxColorItem&>(_rSet.Get(CFID_CHARCOLOR)); @@ -431,7 +431,7 @@ namespace pcr // font relief eState = _rSet.GetItemState(CFID_RELIEF); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxCharReliefItem& rReliefItem = static_cast<const SvxCharReliefItem&>(_rSet.Get(CFID_RELIEF)); @@ -443,7 +443,7 @@ namespace pcr // font emphasis mark eState = _rSet.GetItemState(CFID_EMPHASIS); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxEmphasisMarkItem& rEmphMarkItem = static_cast<const SvxEmphasisMarkItem&>(_rSet.Get(CFID_EMPHASIS)); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 6c44f12ec9fd..796686f30eb6 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2747,7 +2747,7 @@ namespace pcr } pItem = NULL; - if ( SFX_ITEM_SET == pResult->GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, false, &pItem ) ) + if ( SfxItemState::SET == pResult->GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, false, &pItem ) ) { _out_rNewValue <<= (sal_Int32)( static_cast< const SfxUInt32Item* >( pItem )->GetValue() ); bChanged = true; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 8394eb633578..fa5da9535c33 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -569,7 +569,7 @@ void EscherPropertyContainer::CreateFillProperties( { SfxItemSet aAttr( pObj->GetMergedItemSet() ); // tranparency with gradient. Means the third setting in transparency page is set - bool bTransparentGradient = ( aAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SFX_ITEM_SET ) && + bool bTransparentGradient = ( aAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) && ( (const XFillFloatTransparenceItem&) aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ) ).IsEnabled(); CreateFillProperties( rXPropSet, bEdge, bTransparentGradient ); } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index bf13fe7f7410..d7b3c290e59e 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5277,7 +5277,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, const SfxPoolItem* pPoolItem=NULL; SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR, false, &pPoolItem ); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) aSet.Put( XFillColorItem( OUString(), Color( mnDefaultColor ) ) ); pObj->SetMergedItemSet(aSet); diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 6a82016d0df2..c9b90c0e5e33 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -411,7 +411,7 @@ namespace frm // then we toggle the adjustment, too SvxAdjust eCurrentAdjustment = SVX_ADJUST_LEFT; const SfxPoolItem* pCurrentAdjustment = NULL; - if ( SFX_ITEM_SET == _rCurrentAttribs.GetItemState( EE_PARA_JUST, true, &pCurrentAdjustment ) ) + if ( SfxItemState::SET == _rCurrentAttribs.GetItemState( EE_PARA_JUST, true, &pCurrentAdjustment ) ) eCurrentAdjustment = static_cast< const SvxAdjustItem* >( pCurrentAdjustment )->GetAdjust(); if ( eCurrentAdjustment == m_eOppositeDefaultAdjustment ) diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index 44c8d8c46321..d0a13ddfba55 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -237,7 +237,7 @@ public: void SubViewShell::PrintState( SfxItemSet &rState ) { - if ( rState.GetItemState( SID_PRINTDOCDIRECT ) != SFX_ITEM_UNKNOWN ) + if ( rState.GetItemState( SID_PRINTDOCDIRECT ) != SfxItemState::UNKNOWN ) GetSlotState( SID_PRINTDOCDIRECT, SfxViewShell::GetInterface(), &rState ); ... diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index 2228c436f9c9..f2598ef842c5 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -113,8 +113,8 @@ public: bool Put( const SfxItemSet&, bool bInvalidAsDefault = true ); void PutExtended( const SfxItemSet&, - SfxItemState eDontCareAs = SFX_ITEM_UNKNOWN, - SfxItemState eDefaultAs = SFX_ITEM_UNKNOWN ); + SfxItemState eDontCareAs = SfxItemState::UNKNOWN, + SfxItemState eDefaultAs = SfxItemState::UNKNOWN ); virtual bool Set( const SfxItemSet&, bool bDeep = true ); diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index ee1a88b88eaf..3c5db8f7af53 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -125,14 +125,14 @@ enum SfxItemPresentation -enum SfxItemState { +enum class SfxItemState { // These values have to match the values in the com::sun::star::frame::status::ItemState IDL - SFX_ITEM_UNKNOWN = 0, - SFX_ITEM_DISABLED = 0x0001, - SFX_ITEM_READONLY = 0x0002, - SFX_ITEM_DONTCARE = 0x0010, - SFX_ITEM_DEFAULT = 0x0020, - SFX_ITEM_SET = 0x0030 + UNKNOWN = 0, + DISABLED = 0x0001, + READONLY = 0x0002, + DONTCARE = 0x0010, + DEFAULT = 0x0020, + SET = 0x0030 }; class SvXMLUnitConverter; diff --git a/include/svx/sdr/properties/e3dcompoundproperties.hxx b/include/svx/sdr/properties/e3dcompoundproperties.hxx index aac77ad6a970..8a17ab1554f2 100644 --- a/include/svx/sdr/properties/e3dcompoundproperties.hxx +++ b/include/svx/sdr/properties/e3dcompoundproperties.hxx @@ -54,7 +54,7 @@ namespace sdr // Get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may // be overloaded e.g for group objects to return a merged ItemSet of the object. // When using this method the returned ItemSet may contain items in the state - // SFX_ITEM_DONTCARE which means there were several such items with different + // SfxItemState::DONTCARE which means there were several such items with different // values. virtual const SfxItemSet& GetMergedItemSet() const SAL_OVERRIDE; diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx index ef88aacd9727..6229e45e388e 100644 --- a/include/svx/sdr/properties/properties.hxx +++ b/include/svx/sdr/properties/properties.hxx @@ -101,11 +101,11 @@ namespace sdr // get merged ItemSet. Normappl, this maps directly to GetObjectItemSet(), but may // be overloaded e.g for group objects to return a merged ItemSet of the object. // When using this method the returned ItemSet may contain items in the state - // SFX_ITEM_DONTCARE which means there were several such items with different + // SfxItemState::DONTCARE which means there were several such items with different // values. virtual const SfxItemSet& GetMergedItemSet() const; - // Sets all items which are on state SFX_ITEM_SET in rSet at the local ItemSet. + // Sets all items which are on state SfxItemState::SET in rSet at the local ItemSet. // Uses AllowItemChange(), ItemChange(), PostItemChange() and ItemSetChanged() calls. virtual void SetObjectItemSet(const SfxItemSet& rSet) = 0; diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 5e6c5888c56c..eed64f647867 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -296,7 +296,7 @@ namespace PropertyEntryVector_t::const_iterator aIt = aPropVector.begin(); while( aIt != aPropVector.end() ) { - if ( SFX_ITEM_SET == _rItemSet.GetItemState(aIt->nWID) && xInfo->hasPropertyByName(aIt->sName) ) + if ( SfxItemState::SET == _rItemSet.GetItemState(aIt->nWID) && xInfo->hasPropertyByName(aIt->sName) ) { const beans::Property aProp = xInfo->getPropertyByName( aIt->sName ); if ( ( aIt->nFlags & beans::PropertyAttribute::READONLY ) != beans::PropertyAttribute::READONLY ) @@ -381,7 +381,7 @@ namespace { Font aNewFont( _rOriginalFont ); const SfxPoolItem* pItem( NULL ); - if ( SFX_ITEM_SET == _rItemSet.GetItemState( _nFont,true,&pItem) && pItem->ISA(SvxFontItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( _nFont,true,&pItem) && pItem->ISA(SvxFontItem)) { const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(pItem); aNewFont.SetName( pFontItem->GetFamilyName()); @@ -390,48 +390,48 @@ namespace aNewFont.SetPitch(pFontItem->GetPitch()); aNewFont.SetCharSet(pFontItem->GetCharSet()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( _nFontHeight,true,&pItem) && pItem->ISA(SvxFontHeightItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( _nFontHeight,true,&pItem) && pItem->ISA(SvxFontHeightItem)) { const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem); aNewFont.SetHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MAP_TWIP, MAP_POINT).Height()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( _nPosture,true,&pItem) && pItem->ISA(SvxPostureItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( _nPosture,true,&pItem) && pItem->ISA(SvxPostureItem)) { const SvxPostureItem* pFontItem = static_cast<const SvxPostureItem*>(pItem); aNewFont.SetItalic(pFontItem->GetPosture()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( _nWeight,true,&pItem) && pItem->ISA(SvxWeightItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( _nWeight,true,&pItem) && pItem->ISA(SvxWeightItem)) { const SvxWeightItem* pFontItem = static_cast<const SvxWeightItem*>(pItem); aNewFont.SetWeight(pFontItem->GetWeight()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_WORDLINEMODE,true,&pItem) && pItem->ISA(SvxWordLineModeItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_WORDLINEMODE,true,&pItem) && pItem->ISA(SvxWordLineModeItem)) { const SvxWordLineModeItem* pFontItem = static_cast<const SvxWordLineModeItem*>(pItem); aNewFont.SetWordLineMode(pFontItem->GetValue()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CROSSEDOUT,true,&pItem) && pItem->ISA(SvxCrossedOutItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CROSSEDOUT,true,&pItem) && pItem->ISA(SvxCrossedOutItem)) { const SvxCrossedOutItem* pFontItem = static_cast<const SvxCrossedOutItem*>(pItem); aNewFont.SetStrikeout(pFontItem->GetStrikeout()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CHARROTATE,true,&pItem) && pItem->ISA(SvxCharRotateItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARROTATE,true,&pItem) && pItem->ISA(SvxCharRotateItem)) { const SvxCharRotateItem* pRotateItem = static_cast<const SvxCharRotateItem*>(pItem); aNewFont.SetOrientation(pRotateItem->GetValue()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CHARSCALE_W,true,&pItem) && pItem->ISA(SvxCharScaleWidthItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARSCALE_W,true,&pItem) && pItem->ISA(SvxCharScaleWidthItem)) { const SvxCharScaleWidthItem* pCharItem = static_cast<const SvxCharScaleWidthItem*>(pItem); aNewFont.SetWidthType(VCLUnoHelper::ConvertFontWidth(pCharItem->GetValue())); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && pItem->ISA(SvxUnderlineItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && pItem->ISA(SvxUnderlineItem)) { const SvxUnderlineItem* pFontItem = static_cast<const SvxUnderlineItem*>(pItem); aNewFont.SetUnderline(pFontItem->GetLineStyle()); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && pItem->ISA(SvxColorItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && pItem->ISA(SvxColorItem)) { const SvxColorItem* pFontItem = static_cast<const SvxColorItem*>(pItem); aNewFont.SetColor(pFontItem->GetValue().GetColor()); @@ -455,83 +455,83 @@ namespace lcl_pushBack( _out_rProperties, OUString("FontComplex"), uno::makeAny( aAwtFont ) ); // properties which cannot be represented in an AWT font need to be preserved directly - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_SHADOWED,true,&pItem) && pItem->ISA(SvxShadowedItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_SHADOWED,true,&pItem) && pItem->ISA(SvxShadowedItem)) { const SvxShadowedItem* pFontItem = static_cast<const SvxShadowedItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARSHADOWED, uno::makeAny( pFontItem->GetValue() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CONTOUR,true,&pItem) && pItem->ISA(SvxContourItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CONTOUR,true,&pItem) && pItem->ISA(SvxContourItem)) { const SvxContourItem* pFontItem = static_cast<const SvxContourItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARCONTOURED, uno::makeAny( pFontItem->GetValue() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && pItem->ISA(SvxUnderlineItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && pItem->ISA(SvxUnderlineItem)) { const SvxUnderlineItem* pFontItem = static_cast<const SvxUnderlineItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARUNDERLINECOLOR, uno::makeAny( pFontItem->GetColor().GetColor() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_HORJUSTIFY,true,&pItem) && pItem->ISA(SvxHorJustifyItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_HORJUSTIFY,true,&pItem) && pItem->ISA(SvxHorJustifyItem)) { const SvxHorJustifyItem* pJustifyItem = static_cast<const SvxHorJustifyItem*>(pItem); uno::Any aValue; pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST); lcl_pushBack( _out_rProperties, PROPERTY_PARAADJUST, aValue ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_VERJUSTIFY,true,&pItem) && pItem->ISA(SvxVerJustifyItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_VERJUSTIFY,true,&pItem) && pItem->ISA(SvxVerJustifyItem)) { const SvxVerJustifyItem* pJustifyItem = static_cast<const SvxVerJustifyItem*>(pItem); uno::Any aValue; pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST); lcl_pushBack( _out_rProperties, PROPERTY_VERTICALALIGN, aValue ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CHARRELIEF,true,&pItem) && pItem->ISA(SvxCharReliefItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARRELIEF,true,&pItem) && pItem->ISA(SvxCharReliefItem)) { const SvxCharReliefItem* pFontItem = static_cast<const SvxCharReliefItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARRELIEF, uno::makeAny( static_cast< sal_Int16 >( pFontItem->GetEnumValue() ) ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CHARHIDDEN,true,&pItem) && pItem->ISA(SvxCharHiddenItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARHIDDEN,true,&pItem) && pItem->ISA(SvxCharHiddenItem)) { const SvxCharHiddenItem* pFontItem = static_cast<const SvxCharHiddenItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARHIDDEN, uno::makeAny( pFontItem->GetValue() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_AUTOKERN,true,&pItem) && pItem->ISA(SvxAutoKernItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_AUTOKERN,true,&pItem) && pItem->ISA(SvxAutoKernItem)) { const SvxAutoKernItem* pFontItem = static_cast<const SvxAutoKernItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARAUTOKERNING, uno::makeAny( pFontItem->GetValue() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_BRUSH,true,&pItem) && pItem->ISA(SvxBrushItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_BRUSH,true,&pItem) && pItem->ISA(SvxBrushItem)) { const SvxBrushItem* pFontItem = static_cast<const SvxBrushItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CONTROLBACKGROUND, uno::makeAny( pFontItem->GetColor().GetColor() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_BLINK,true,&pItem) && pItem->ISA(SvxBlinkItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_BLINK,true,&pItem) && pItem->ISA(SvxBlinkItem)) { const SvxBlinkItem* pFontItem = static_cast<const SvxBlinkItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARFLASH, uno::makeAny( pFontItem->GetValue() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_EMPHASISMARK,true,&pItem) && pItem->ISA(SvxEmphasisMarkItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_EMPHASISMARK,true,&pItem) && pItem->ISA(SvxEmphasisMarkItem)) { const SvxEmphasisMarkItem* pFontItem = static_cast<const SvxEmphasisMarkItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHAREMPHASIS, uno::makeAny( static_cast< sal_Int16 >( pFontItem->GetEmphasisMark() ) ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_TWOLINES,true,&pItem) && pItem->ISA(SvxTwoLinesItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_TWOLINES,true,&pItem) && pItem->ISA(SvxTwoLinesItem)) { const SvxTwoLinesItem* pFontItem = static_cast<const SvxTwoLinesItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINEISON, uno::makeAny( pFontItem->GetValue() ) ); lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINEPREFIX, uno::makeAny( OUString( pFontItem->GetStartBracket() ) ) ); lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINESUFFIX, uno::makeAny( OUString( pFontItem->GetEndBracket() ) ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && pItem->ISA(SvxColorItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && pItem->ISA(SvxColorItem)) { const SvxColorItem* pFontItem = static_cast<const SvxColorItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARCOLOR, uno::makeAny( pFontItem->GetValue().GetColor() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_KERNING,true,&pItem) && pItem->ISA(SvxKerningItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_KERNING,true,&pItem) && pItem->ISA(SvxKerningItem)) { const SvxKerningItem* pFontItem = static_cast<const SvxKerningItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARKERNING, uno::makeAny( pFontItem->GetValue() ) ); } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CASEMAP,true,&pItem) && pItem->ISA(SvxCaseMapItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CASEMAP,true,&pItem) && pItem->ISA(SvxCaseMapItem)) { const SvxCaseMapItem* pFontItem = static_cast<const SvxCaseMapItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetValue() ) ); @@ -546,14 +546,14 @@ namespace }; for(size_t k = 0; k < sizeof(pItems)/sizeof(pItems[0]);++k) { - if ( SFX_ITEM_SET == _rItemSet.GetItemState( pItems[k].nWhich,true,&pItem) && pItem->ISA(SvxLanguageItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( pItems[k].nWhich,true,&pItem) && pItem->ISA(SvxLanguageItem)) { const SvxLanguageItem* pFontItem = static_cast<const SvxLanguageItem*>(pItem); lang::Locale aCharLocale( LanguageTag( pFontItem->GetLanguage()).getLocale()); lcl_pushBack( _out_rProperties, pItems[k].sPropertyName, uno::makeAny( aCharLocale ) ); } } - if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_ESCAPEMENT,true,&pItem) && pItem->ISA(SvxEscapementItem)) + if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_ESCAPEMENT,true,&pItem) && pItem->ISA(SvxEscapementItem)) { const SvxEscapementItem* pFontItem = static_cast<const SvxEscapementItem*>(pItem); lcl_pushBack( _out_rProperties, PROPERTY_CHARESCAPEMENT, uno::makeAny( pFontItem->GetEsc() ) ); diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx index 6f9d1abb80eb..cbc9afad1501 100644 --- a/reportdesign/source/ui/misc/statusbarcontroller.cxx +++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx @@ -139,7 +139,7 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv { SvxZoomSliderItem aZoomSlider(100,20,400); aZoomSlider.PutValue(_aEvent.State); - static_cast<SvxZoomSliderControl*>(m_rController.get())->StateChanged(m_nSlotId,SFX_ITEM_DEFAULT,&aZoomSlider); + static_cast<SvxZoomSliderControl*>(m_rController.get())->StateChanged(m_nSlotId,SfxItemState::DEFAULT,&aZoomSlider); } } else if ( m_aCommandURL == ".uno:Zoom" ) @@ -149,7 +149,7 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv { SvxZoomItem aZoom; aZoom.PutValue(_aEvent.State); - static_cast<SvxZoomStatusBarControl*>(m_rController.get())->StateChanged(m_nSlotId,SFX_ITEM_DEFAULT,&aZoom); + static_cast<SvxZoomStatusBarControl*>(m_rController.get())->StateChanged(m_nSlotId,SfxItemState::DEFAULT,&aZoom); } } } diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index 5146903025c1..12171558bf8b 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -248,14 +248,14 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event util::Color nColor(COL_TRANSPARENT); Event.State >>= nColor; SvxColorItem aColorItem(::Color(nColor), 1); - static_cast<SvxColorToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_SET : SFX_ITEM_DISABLED,&aColorItem); + static_cast<SvxColorToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SfxItemState::SET : SfxItemState::DISABLED,&aColorItem); } break; case SID_ATTR_CHAR_FONT: { SvxFontItem aItem(ITEMID_FONT); aItem.PutValue(Event.State); - static_cast<SvxFontNameToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_DEFAULT : SFX_ITEM_DISABLED,&aItem); + static_cast<SvxFontNameToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SfxItemState::DEFAULT : SfxItemState::DISABLED,&aItem); } break; } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 028a826c6885..0a55d3963a93 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2453,7 +2453,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ if ( _xSection.is() ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_BRUSH,true,&pItem)) + if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_BRUSH,true,&pItem)) _xSection->setBackColor(static_cast<const SvxBrushItem*>(pItem)->GetColor().GetColor()); } else @@ -2462,7 +2462,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ const OUString sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); const SfxPoolItem* pItem = NULL; - if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_SIZE,true,&pItem)) + if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_SIZE,true,&pItem)) { uno::Any aValue; static_cast<const SvxSizeItem*>(pItem)->QueryValue(aValue,MID_SIZE_SIZE); @@ -2470,7 +2470,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ resetZoomType(); } - if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_LRSPACE,true,&pItem)) + if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_LRSPACE,true,&pItem)) { Any aValue; static_cast<const SvxLRSpaceItem*>(pItem)->QueryValue(aValue,MID_L_MARGIN); @@ -2478,12 +2478,12 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ static_cast<const SvxLRSpaceItem*>(pItem)->QueryValue(aValue,MID_R_MARGIN); xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,aValue); } - if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_ULSPACE,true,&pItem)) + if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_ULSPACE,true,&pItem)) { xProp->setPropertyValue(PROPERTY_TOPMARGIN,uno::makeAny(static_cast<const SvxULSpaceItem*>(pItem)->GetUpper())); xProp->setPropertyValue(PROPERTY_BOTTOMMARGIN,uno::makeAny(static_cast<const SvxULSpaceItem*>(pItem)->GetLower())); } - if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_PAGE,true,&pItem)) + if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_PAGE,true,&pItem)) { const SvxPageItem* pPageItem = static_cast<const SvxPageItem*>(pItem); xProp->setPropertyValue(PROPERTY_ISLANDSCAPE,uno::makeAny(pPageItem->IsLandscape())); @@ -2493,7 +2493,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ xProp->setPropertyValue(PROPERTY_PAGESTYLELAYOUT,aValue); resetZoomType(); } - if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_BRUSH,true,&pItem)) + if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_BRUSH,true,&pItem)) { ::Color aBackColor = static_cast<const SvxBrushItem*>(pItem)->GetColor(); xProp->setPropertyValue(PROPERTY_BACKTRANSPARENT,uno::makeAny(aBackColor == COL_TRANSPARENT)); diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index fb8a9f47dfa0..875fb931c1ae 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -678,7 +678,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow, const SfxPoolItem* pBLTRItem = 0; SfxItemState eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, true, &pBLTRItem ); - if ( (SFX_ITEM_SET == eState) || (SFX_ITEM_SET == eTLBRState) || (SFX_ITEM_SET == eBLTRState) ) + if ( (SfxItemState::SET == eState) || (SfxItemState::SET == eTLBRState) || (SfxItemState::SET == eBLTRState) ) { boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pOldPattern)); SfxItemSet& rNewSet = pNewPattern->GetItemSet(); @@ -880,19 +880,19 @@ static void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource ) // pMergeSet has no parent SfxItemState eOldState = rMergeSet.GetItemState( nId, false, &pOldItem ); - if ( eOldState == SFX_ITEM_DEFAULT ) + if ( eOldState == SfxItemState::DEFAULT ) { SfxItemState eNewState = rSource.GetItemState( nId, true, &pNewItem ); - if ( eNewState == SFX_ITEM_SET ) + if ( eNewState == SfxItemState::SET ) { if ( *pNewItem != rMergeSet.GetPool()->GetDefaultItem(nId) ) rMergeSet.InvalidateItem( nId ); } } - else if ( eOldState == SFX_ITEM_SET ) // Item set + else if ( eOldState == SfxItemState::SET ) // Item set { SfxItemState eNewState = rSource.GetItemState( nId, true, &pNewItem ); - if ( eNewState == SFX_ITEM_SET ) + if ( eNewState == SfxItemState::SET ) { if ( pNewItem != pOldItem ) // Both pulled rMergeSet.InvalidateItem( nId ); @@ -1266,7 +1266,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const const SfxItemSet* pSet = pDocument->GetCondResult( nCol, nRowCond, nTab ); const SfxPoolItem* pItem; - if( pSet && pSet->GetItemState( ATTR_PROTECTION, true, &pItem ) == SFX_ITEM_SET ) + if( pSet && pSet->GetItemState( ATTR_PROTECTION, true, &pItem ) == SfxItemState::SET ) { const ScProtectionAttr* pCondProtect = static_cast<const ScProtectionAttr*>(pItem); if( pCondProtect->GetProtection() || pCondProtect->GetHideCell() ) @@ -1648,7 +1648,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement const SfxItemSet& rOldSet = pOldPattern->GetItemSet(); const SfxPoolItem* pItem; - bool bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem ) != SFX_ITEM_SET + bool bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem ) != SfxItemState::SET || (((const SvxHorJustifyItem*)pItem)->GetValue() != SVX_HOR_JUSTIFY_LEFT && ((const SvxHorJustifyItem*)pItem)->GetValue() != SVX_HOR_JUSTIFY_RIGHT )); sal_uInt16 nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue(); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 0284f0b00097..7ee5bb1ef921 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -130,7 +130,7 @@ long ScColumn::GetNeededSize( const SfxPoolItem* pCondItem; SvxCellHorJustify eHorJust; if (pCondSet && - pCondSet->GetItemState(ATTR_HOR_JUSTIFY, true, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_HOR_JUSTIFY, true, &pCondItem) == SfxItemState::SET) eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem*)pCondItem)->GetValue(); else eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&) @@ -139,7 +139,7 @@ long ScColumn::GetNeededSize( if ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) bBreak = true; else if ( pCondSet && - pCondSet->GetItemState(ATTR_LINEBREAK, true, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_LINEBREAK, true, &pCondItem) == SfxItemState::SET) bBreak = ((const SfxBoolItem*)pCondItem)->GetValue(); else bBreak = ((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue(); @@ -191,14 +191,14 @@ long ScColumn::GetNeededSize( if ( eOrient == SVX_ORIENTATION_STANDARD ) { if (pCondSet && - pCondSet->GetItemState(ATTR_ROTATE_VALUE, true, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_ROTATE_VALUE, true, &pCondItem) == SfxItemState::SET) nRotate = ((const SfxInt32Item*)pCondItem)->GetValue(); else nRotate = ((const SfxInt32Item&)pPattern->GetItem(ATTR_ROTATE_VALUE)).GetValue(); if ( nRotate ) { if (pCondSet && - pCondSet->GetItemState(ATTR_ROTATE_MODE, true, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_ROTATE_MODE, true, &pCondItem) == SfxItemState::SET) eRotMode = (SvxRotateMode)((const SvxRotateModeItem*)pCondItem)->GetValue(); else eRotMode = (SvxRotateMode)((const SvxRotateModeItem&) @@ -219,7 +219,7 @@ long ScColumn::GetNeededSize( const SvxMarginItem* pMargin; if (pCondSet && - pCondSet->GetItemState(ATTR_MARGIN, true, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_MARGIN, true, &pCondItem) == SfxItemState::SET) pMargin = (const SvxMarginItem*) pCondItem; else pMargin = (const SvxMarginItem*) &pPattern->GetItem(ATTR_MARGIN); @@ -227,7 +227,7 @@ long ScColumn::GetNeededSize( if ( eHorJust == SVX_HOR_JUSTIFY_LEFT ) { if (pCondSet && - pCondSet->GetItemState(ATTR_INDENT, true, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_INDENT, true, &pCondItem) == SfxItemState::SET) nIndent = ((const SfxUInt16Item*)pCondItem)->GetValue(); else nIndent = ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue(); diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index f3fa1d807edd..d257f60ca7ed 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -702,7 +702,7 @@ static bool lcl_HFPresentation const SfxItemSet& rSet = ((const SfxSetItem&)rItem).GetItemSet(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rSet.GetItemState(ATTR_PAGE_ON,false,&pItem) ) + if ( SfxItemState::SET == rSet.GetItemState(ATTR_PAGE_ON,false,&pItem) ) { if( false == ((const SfxBoolItem*)pItem)->GetValue() ) return false; diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index 5b294189c5ae..ba3c19e27255 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -739,7 +739,7 @@ const SfxPoolItem* ScDocument::GetEffItem( { const SfxItemSet& rSet = pPattern->GetItemSet(); const SfxPoolItem* pItem; - if ( rSet.GetItemState( ATTR_CONDITIONAL, true, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( ATTR_CONDITIONAL, true, &pItem ) == SfxItemState::SET ) { const std::vector<sal_uInt32>& rIndex = static_cast<const ScCondFormatItem&>(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData(); ScConditionalFormatList* pCondFormList = GetCondFormList( nTab ); @@ -760,7 +760,7 @@ const SfxPoolItem* ScDocument::GetEffItem( SfxStyleSheetBase* pStyleSheet = xPoolHelper->GetStylePool()->Find( aStyle, SFX_STYLE_FAMILY_PARA ); if ( pStyleSheet && pStyleSheet->GetItemSet().GetItemState( - nWhich, true, &pItem ) == SFX_ITEM_SET ) + nWhich, true, &pItem ) == SfxItemState::SET ) return pItem; } } diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 721ae43838ba..705d886ad28e 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -238,7 +238,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet, if( SvtLanguageOptions().IsCTLFontEnabled() ) { const SfxPoolItem *pItem = NULL; - if( rChanges.GetItemState(ATTR_WRITINGDIR, true, &pItem ) == SFX_ITEM_SET ) + if( rChanges.GetItemState(ATTR_WRITINGDIR, true, &pItem ) == SfxItemState::SET ) ScChartHelper::DoUpdateAllCharts( this ); } } @@ -279,9 +279,9 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet, { const SfxPoolItem* pItem; SfxItemState eState = rChanges.GetItemState( nWhich, false, &pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) rSet.Put( *pItem ); - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) rSet.ClearItem( nWhich ); // bei Default nichts } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 201415371a77..a582db4bbcab 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -5418,7 +5418,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark bool bSet = false; sal_uInt16 i; for (i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END && !bSet; i++) - if (pSet->GetItemState(i) == SFX_ITEM_SET) + if (pSet->GetItemState(i) == SfxItemState::SET) bSet = true; if (bSet) diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index a6b7b90f62a0..3688412da328 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -561,7 +561,7 @@ void ScDocument::FillInfo( // we need to check already here for protected cells const SfxPoolItem* pItem; - if ( bTabProtect && pInfo->pConditionSet->GetItemState( ATTR_PROTECTION, true, &pItem ) == SFX_ITEM_SET ) + if ( bTabProtect && pInfo->pConditionSet->GetItemState( ATTR_PROTECTION, true, &pItem ) == SfxItemState::SET ) { const ScProtectionAttr* pProtAttr = static_cast<const ScProtectionAttr*>(pItem); bHidden = pProtAttr->GetHideCell(); @@ -705,23 +705,23 @@ void ScDocument::FillInfo( const SfxPoolItem* pItem; // Hintergrund - if ( pCondSet->GetItemState( ATTR_BACKGROUND, true, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BACKGROUND, true, &pItem ) == SfxItemState::SET ) { pInfo->pBackground = (const SvxBrushItem*) pItem; pRowInfo[nArrRow].bEmptyBack = false; } // Umrandung - if ( pCondSet->GetItemState( ATTR_BORDER, true, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BORDER, true, &pItem ) == SfxItemState::SET ) pInfo->pLinesAttr = (const SvxBoxItem*) pItem; - if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, true, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, true, &pItem ) == SfxItemState::SET ) pInfo->mpTLBRLine = static_cast< const SvxLineItem* >( pItem ); - if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, true, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, true, &pItem ) == SfxItemState::SET ) pInfo->mpBLTRLine = static_cast< const SvxLineItem* >( pItem ); // Schatten - if ( pCondSet->GetItemState( ATTR_SHADOW, true, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_SHADOW, true, &pItem ) == SfxItemState::SET ) { pInfo->pShadowAttr = (const SvxShadowItem*) pItem; bAnyShadow = true; @@ -767,7 +767,7 @@ void ScDocument::FillInfo( // Hintergrund kopieren (oder in output.cxx) if ( !pStartCond || pStartCond-> - GetItemState(ATTR_BACKGROUND,true,&pItem) != SFX_ITEM_SET ) + GetItemState(ATTR_BACKGROUND,true,&pItem) != SfxItemState::SET ) pItem = &pStartPattern->GetItem(ATTR_BACKGROUND); pInfo->pBackground = (const SvxBrushItem*) pItem; pRowInfo[nArrRow].bEmptyBack = false; @@ -775,7 +775,7 @@ void ScDocument::FillInfo( // Schatten if ( !pStartCond || pStartCond-> - GetItemState(ATTR_SHADOW,true,&pItem) != SFX_ITEM_SET ) + GetItemState(ATTR_SHADOW,true,&pItem) != SfxItemState::SET ) pItem = &pStartPattern->GetItem(ATTR_SHADOW); pInfo->pShadowAttr = (const SvxShadowItem*) pItem; if (pInfo->pShadowAttr != pDefShadow) diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index f5cf913ab7ce..c25829902c9b 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -146,18 +146,18 @@ bool ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs, { // Both Items set // PoolItems, meaning comparing pointers is valid - if ( SFX_ITEM_SET == eOldState ) + if ( SfxItemState::SET == eOldState ) bInvalidate = (&rNewAttrs.Get( nWhich ) != &rOldAttrs.Get( nWhich )); } else { // Contains a Default Item // PoolItems, meaning Item comparison necessary - const SfxPoolItem& rOldItem = ( SFX_ITEM_SET == eOldState ) + const SfxPoolItem& rOldItem = ( SfxItemState::SET == eOldState ) ? rOldAttrs.Get( nWhich ) : rOldAttrs.GetPool()->GetDefaultItem( nWhich ); - const SfxPoolItem& rNewItem = ( SFX_ITEM_SET == eNewState ) + const SfxPoolItem& rNewItem = ( SfxItemState::SET == eNewState ) ? rNewAttrs.Get( nWhich ) : rNewAttrs.GetPool()->GetDefaultItem( nWhich ); @@ -1027,11 +1027,11 @@ sal_uInt16 ScGlobal::GetScriptedWhichID( sal_uInt8 nScriptType, sal_uInt16 nWhic void ScGlobal::AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter ) { - OSL_ENSURE( rSet.GetItemState( ATTR_LANGUAGE_FORMAT, false ) == SFX_ITEM_DEFAULT, + OSL_ENSURE( rSet.GetItemState( ATTR_LANGUAGE_FORMAT, false ) == SfxItemState::DEFAULT, "ScGlobal::AddLanguage - language already added"); const SfxPoolItem* pHardItem; - if ( rSet.GetItemState( ATTR_VALUE_FORMAT, false, &pHardItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( ATTR_VALUE_FORMAT, false, &pHardItem ) == SfxItemState::SET ) { const SvNumberformat* pHardFormat = rFormatter.GetEntry( ((const SfxUInt32Item*)pHardItem)->GetValue() ); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 9003e443f96b..c6fb907b23bc 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -267,59 +267,59 @@ void ScPatternAttr::GetFont( { const SfxPoolItem* pItem; - if ( pCondSet->GetItemState( nFontId, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( nFontId, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( nFontId ); pFontAttr = (const SvxFontItem*) pItem; - if ( pCondSet->GetItemState( nHeightId, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( nHeightId, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( nHeightId ); nFontHeight = ((const SvxFontHeightItem*)pItem)->GetHeight(); - if ( pCondSet->GetItemState( nWeightId, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( nWeightId, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( nWeightId ); eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( nPostureId, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( nPostureId, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( nPostureId ); eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE ); eUnder = (FontUnderline)((const SvxUnderlineItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_OVERLINE ); eOver = (FontUnderline)((const SvxOverlineItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_WORDLINE ); bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_CROSSEDOUT ); eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_CONTOUR ); bOutline = ((const SvxContourItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_SHADOWED ); bShadow = ((const SvxShadowedItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_EMPHASISMARK ); eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark(); - if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_RELIEF ); eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_COLOR, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_COLOR, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_COLOR ); aColor = ((const SvxColorItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( nLangId, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( nLangId, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( nLangId ); eLang = ((const SvxLanguageItem*)pItem)->GetLanguage(); } @@ -412,7 +412,7 @@ void ScPatternAttr::GetFont( if ( pCondSet ) { const SfxPoolItem* pItem; - if ( pCondSet->GetItemState( ATTR_BACKGROUND, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BACKGROUND, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_BACKGROUND ); aBackColor = ((const SvxBrushItem*)pItem)->GetColor(); } @@ -519,100 +519,100 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r { const SfxPoolItem* pItem; - if ( pCondSet->GetItemState( ATTR_FONT_COLOR, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_COLOR, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_COLOR ); aColorItem = *(const SvxColorItem*)pItem; - if ( pCondSet->GetItemState( ATTR_FONT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT ); aFontItem = *(const SvxFontItem*)pItem; - if ( pCondSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CJK_FONT ); aCjkFontItem = *(const SvxFontItem*)pItem; - if ( pCondSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CTL_FONT ); aCtlFontItem = *(const SvxFontItem*)pItem; - if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_HEIGHT ); nTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight(); - if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CJK_FONT_HEIGHT ); nCjkTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight(); - if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CTL_FONT_HEIGHT ); nCtlTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight(); - if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_WEIGHT ); eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CJK_FONT_WEIGHT ); eCjkWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CTL_FONT_WEIGHT ); eCtlWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_POSTURE ); eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CJK_FONT_POSTURE ); eCjkItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CTL_FONT_POSTURE ); eCtlItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_UNDERLINE ); aUnderlineItem = *(const SvxUnderlineItem*)pItem; - if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_OVERLINE ); aOverlineItem = *(const SvxOverlineItem*)pItem; - if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_WORDLINE ); bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_CROSSEDOUT ); eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_CONTOUR ); bOutline = ((const SvxContourItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_SHADOWED ); bShadow = ((const SvxShadowedItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FORBIDDEN_RULES ); bForbidden = ((const SvxForbiddenRuleItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_EMPHASISMARK ); eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark(); - if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_RELIEF ); eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_FONT_LANGUAGE ); eLang = ((const SvxLanguageItem*)pItem)->GetLanguage(); - if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CJK_FONT_LANGUAGE ); eCjkLang = ((const SvxLanguageItem*)pItem)->GetLanguage(); - if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_CTL_FONT_LANGUAGE ); eCtlLang = ((const SvxLanguageItem*)pItem)->GetLanguage(); - if ( pCondSet->GetItemState( ATTR_HYPHENATE, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_HYPHENATE, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_HYPHENATE ); bHyphenate = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pCondSet->GetItemState( ATTR_WRITINGDIR, true, &pItem ) != SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_WRITINGDIR, true, &pItem ) != SfxItemState::SET ) pItem = &rSrcSet.Get( ATTR_WRITINGDIR ); eDirection = (SvxFrameDirection)((const SvxFrameDirectionItem*)pItem)->GetValue(); } @@ -732,80 +732,80 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet& { const SfxPoolItem* pItem; - if (rEditSet.GetItemState(EE_CHAR_COLOR,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_COLOR,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxColorItem(ATTR_FONT_COLOR) = *(const SvxColorItem*)pItem ); - if (rEditSet.GetItemState(EE_CHAR_FONTINFO,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_FONTINFO,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxFontItem(ATTR_FONT) = *(const SvxFontItem*)pItem ); - if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxFontItem(ATTR_CJK_FONT) = *(const SvxFontItem*)pItem ); - if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxFontItem(ATTR_CTL_FONT) = *(const SvxFontItem*)pItem ); - if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ), 100, ATTR_FONT_HEIGHT ) ); - if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ), 100, ATTR_CJK_FONT_HEIGHT ) ); - if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ), 100, ATTR_CTL_FONT_HEIGHT ) ); - if (rEditSet.GetItemState(EE_CHAR_WEIGHT,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_WEIGHT,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(), ATTR_FONT_WEIGHT) ); - if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(), ATTR_CJK_FONT_WEIGHT) ); - if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(), ATTR_CTL_FONT_WEIGHT) ); // SvxTextLineItem contains enum and color - if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxUnderlineItem(UNDERLINE_NONE,ATTR_FONT_UNDERLINE) = *(const SvxUnderlineItem*)pItem ); - if (rEditSet.GetItemState(EE_CHAR_OVERLINE,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_OVERLINE,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxOverlineItem(UNDERLINE_NONE,ATTR_FONT_OVERLINE) = *(const SvxOverlineItem*)pItem ); - if (rEditSet.GetItemState(EE_CHAR_WLM,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_WLM,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxWordLineModeItem( ((const SvxWordLineModeItem*)pItem)->GetValue(), ATTR_FONT_WORDLINE) ); - if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxCrossedOutItem( (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue(), ATTR_FONT_CROSSEDOUT) ); - if (rEditSet.GetItemState(EE_CHAR_ITALIC,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_ITALIC,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(), ATTR_FONT_POSTURE) ); - if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(), ATTR_CJK_FONT_POSTURE) ); - if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(), ATTR_CTL_FONT_POSTURE) ); - if (rEditSet.GetItemState(EE_CHAR_OUTLINE,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_OUTLINE,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxContourItem( ((const SvxContourItem*)pItem)->GetValue(), ATTR_FONT_CONTOUR) ); - if (rEditSet.GetItemState(EE_CHAR_SHADOW,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_SHADOW,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxShadowedItem( ((const SvxShadowedItem*)pItem)->GetValue(), ATTR_FONT_SHADOWED) ); - if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxEmphasisMarkItem( ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark(), ATTR_FONT_EMPHASISMARK) ); - if (rEditSet.GetItemState(EE_CHAR_RELIEF,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_RELIEF,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxCharReliefItem( (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue(), ATTR_FONT_RELIEF) ); - if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_FONT_LANGUAGE) ); - if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CJK_FONT_LANGUAGE) ); - if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CTL_FONT_LANGUAGE) ); - if (rEditSet.GetItemState(EE_PARA_JUST,true,&pItem) == SFX_ITEM_SET) + if (rEditSet.GetItemState(EE_PARA_JUST,true,&pItem) == SfxItemState::SET) { SvxCellHorJustify eVal; switch ( ((const SvxAdjustItem*)pItem)->GetAdjust() ) @@ -877,16 +877,16 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs ) for ( sal_uInt16 nSubWhich=ATTR_PATTERN_START; nSubWhich<=ATTR_PATTERN_END; nSubWhich++ ) { // only items that are set are interesting - if ( rThisSet.GetItemState( nSubWhich, false, &pThisItem ) == SFX_ITEM_SET ) + if ( rThisSet.GetItemState( nSubWhich, false, &pThisItem ) == SfxItemState::SET ) { SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, true, &pOldItem ); - if ( eOldState == SFX_ITEM_SET ) + if ( eOldState == SfxItemState::SET ) { // item is set in OldAttrs (or its parent) -> compare pointers if ( pThisItem == pOldItem ) rThisSet.ClearItem( nSubWhich ); } - else if ( eOldState != SFX_ITEM_DONTCARE ) + else if ( eOldState != SfxItemState::DONTCARE ) { // not set in OldAttrs -> compare item value to default item if ( *pThisItem == rThisSet.GetPool()->GetDefaultItem( nSubWhich ) ) @@ -900,7 +900,7 @@ bool ScPatternAttr::HasItemsSet( const sal_uInt16* pWhich ) const { const SfxItemSet& rSet = GetItemSet(); for (sal_uInt16 i=0; pWhich[i]; i++) - if ( rSet.GetItemState( pWhich[i], false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( pWhich[i], false ) == SfxItemState::SET ) return true; return false; } @@ -944,7 +944,7 @@ static SfxStyleSheetBase* lcl_CopyStyleToPool const SfxPoolItem* pSrcItem; if ( pFormatExchangeList && - rSrcSet.GetItemState( ATTR_VALUE_FORMAT, false, &pSrcItem ) == SFX_ITEM_SET ) + rSrcSet.GetItemState( ATTR_VALUE_FORMAT, false, &pSrcItem ) == SfxItemState::SET ) { sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pSrcItem)->GetValue(); SvNumberFormatterIndexTable::const_iterator it = pFormatExchangeList->find(nOldFormat); @@ -999,7 +999,7 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD { const SfxPoolItem* pSrcItem; SfxItemState eItemState = pSrcSet->GetItemState( nAttrId, false, &pSrcItem ); - if (eItemState==SFX_ITEM_SET) + if (eItemState==SfxItemState::SET) { SfxPoolItem* pNewItem = NULL; @@ -1055,12 +1055,12 @@ bool ScPatternAttr::IsVisible() const SfxItemState eState; eState = rSet.GetItemState( ATTR_BACKGROUND, true, &pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) if ( ((const SvxBrushItem*)pItem)->GetColor().GetColor() != COL_TRANSPARENT ) return true; eState = rSet.GetItemState( ATTR_BORDER, true, &pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { const SvxBoxItem* pBoxItem = (SvxBoxItem*) pItem; if ( pBoxItem->GetTop() || pBoxItem->GetBottom() || @@ -1069,17 +1069,17 @@ bool ScPatternAttr::IsVisible() const } eState = rSet.GetItemState( ATTR_BORDER_TLBR, true, &pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) if( static_cast< const SvxLineItem* >( pItem )->GetLine() ) return true; eState = rSet.GetItemState( ATTR_BORDER_BLTR, true, &pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) if( static_cast< const SvxLineItem* >( pItem )->GetLine() ) return true; eState = rSet.GetItemState( ATTR_SHADOW, true, &pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) if ( ((const SvxShadowItem*)pItem)->GetLocation() != SVX_SHADOW_NONE ) return true; @@ -1123,7 +1123,7 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle, bool bClearDirectFor { for (sal_uInt16 i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END; i++) { - if (rStyleSet.GetItemState(i, true) == SFX_ITEM_SET) + if (rStyleSet.GetItemState(i, true) == SfxItemState::SET) rPatternSet.ClearItem(i); } } @@ -1183,7 +1183,7 @@ void ScPatternAttr::StyleToName() bool ScPatternAttr::IsSymbolFont() const { const SfxPoolItem* pItem; - if( GetItemSet().GetItemState( ATTR_FONT, true, &pItem ) == SFX_ITEM_SET ) + if( GetItemSet().GetItemState( ATTR_FONT, true, &pItem ) == SfxItemState::SET ) return ((const SvxFontItem*) pItem)->GetCharSet() == RTL_TEXTENCODING_SYMBOL; else return false; @@ -1210,11 +1210,11 @@ sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter, OSL_ENSURE(pFormatter,"GetNumberFormat without Formatter"); const SfxPoolItem* pFormItem; - if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != SFX_ITEM_SET ) + if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != SfxItemState::SET ) pFormItem = &GetItemSet().Get(ATTR_VALUE_FORMAT); const SfxPoolItem* pLangItem; - if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != SFX_ITEM_SET ) + if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != SfxItemState::SET ) pLangItem = &GetItemSet().Get(ATTR_LANGUAGE_FORMAT); return pFormatter->GetFormatForLanguageIfBuiltIn( @@ -1225,7 +1225,7 @@ sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter, const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet ) { const SfxPoolItem* pCondItem; - if ( pCondSet && pCondSet->GetItemState( nWhich, true, &pCondItem ) == SFX_ITEM_SET ) + if ( pCondSet && pCondSet->GetItemState( nWhich, true, &pCondItem ) == SfxItemState::SET ) return *pCondItem; return rItemSet.Get(nWhich); } diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index c21d613b5f72..acdcc5527157 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -139,25 +139,25 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool, if (!pDestSheet) pDestSheet = &Make( rName, eFamily ); SfxItemSet& rDestSet = pDestSheet->GetItemSet(); - rDestSet.PutExtended( rSourceSet, SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT ); + rDestSet.PutExtended( rSourceSet, SfxItemState::DONTCARE, SfxItemState::DEFAULT ); const SfxPoolItem* pItem; if ( eFamily == SFX_STYLE_FAMILY_PAGE ) { // Set-Items - if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SFX_ITEM_SET ) + if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET ) { const SfxItemSet& rSrcSub = ((const SvxSetItem*) pItem)->GetItemSet(); SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() ); - aDestSub.PutExtended( rSrcSub, SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT ); + aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT ); rDestSet.Put( SvxSetItem( ATTR_PAGE_HEADERSET, aDestSub ) ); } - if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SFX_ITEM_SET ) + if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET ) { const SfxItemSet& rSrcSub = ((const SvxSetItem*) pItem)->GetItemSet(); SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() ); - aDestSub.PutExtended( rSrcSub, SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT ); + aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT ); rDestSet.Put( SvxSetItem( ATTR_PAGE_FOOTERSET, aDestSub ) ); } } @@ -166,7 +166,7 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool, // number format exchange list has to be handled here, too if ( pDoc && pDoc->GetFormatExchangeList() && - rSourceSet.GetItemState( ATTR_VALUE_FORMAT, false, &pItem ) == SFX_ITEM_SET ) + rSourceSet.GetItemState( ATTR_VALUE_FORMAT, false, &pItem ) == SfxItemState::SET ) { sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue(); SvNumberFormatterIndexTable::const_iterator it = pDoc->GetFormatExchangeList()->find(nOldFormat); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 22aef02ea95e..401a148d8c1c 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -859,9 +859,9 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if ( !IsDefaultItem( pPattern ) ) { const SfxItemSet& rSet = pPattern->GetItemSet(); - if ( rSet.GetItemState( ATTR_MERGE, false ) == SFX_ITEM_DEFAULT && - rSet.GetItemState( ATTR_MERGE_FLAG, false ) == SFX_ITEM_DEFAULT && - rSet.GetItemState( ATTR_BORDER, false ) == SFX_ITEM_DEFAULT ) + if ( rSet.GetItemState( ATTR_MERGE, false ) == SfxItemState::DEFAULT && + rSet.GetItemState( ATTR_MERGE_FLAG, false ) == SfxItemState::DEFAULT && + rSet.GetItemState( ATTR_BORDER, false ) == SfxItemState::DEFAULT ) { // no borders or merge items involved - use pattern as-is for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++) @@ -1985,7 +1985,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC { const SfxPoolItem* pCondItem; if ( pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, true, &pCondItem ) - == SFX_ITEM_SET ) + == SfxItemState::SET ) { // alle Formate durchgehen, damit die Zellen nicht einzeln // angeschaut werden muessen diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 2b3294fca52a..b901b1e31a20 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -1506,7 +1506,7 @@ static void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow ) { const ScPatternAttr* pPattern = pTab->GetPattern( nCol, nRow ); if ( pPattern->GetItemSet().GetItemState( ATTR_VALUE_FORMAT, false ) - == SFX_ITEM_SET ) + == SfxItemState::SET ) { ScPatternAttr aNewPattern( *pPattern ); SfxItemSet& rSet = aNewPattern.GetItemSet(); diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 5b96603487fc..3558eec3c88d 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -583,8 +583,8 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, pStyleSheet = pSrcPattern->GetStyleSheet(); // do not transfer ATTR_MERGE / ATTR_MERGE_FLAG const SfxItemSet& rSet = pSrcPattern->GetItemSet(); - if ( rSet.GetItemState(ATTR_MERGE, false) == SFX_ITEM_SET - || rSet.GetItemState(ATTR_MERGE_FLAG, false) == SFX_ITEM_SET ) + if ( rSet.GetItemState(ATTR_MERGE, false) == SfxItemState::SET + || rSet.GetItemState(ATTR_MERGE_FLAG, false) == SfxItemState::SET ) { pNewPattern = new ScPatternAttr( *pSrcPattern ); SfxItemSet& rNewSet = pNewPattern->GetItemSet(); diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index c02c01ebdbce..785960ec8876 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -131,13 +131,13 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) if (!mbForceBreaks) { - if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false, &pItem ) == SFX_ITEM_SET ) + if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false, &pItem ) == SfxItemState::SET ) { OSL_ENSURE( pItem->ISA(SfxUInt16Item), "invalid Item" ); bSkipColBreaks = bSkipRowBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 ); } - if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SFX_ITEM_SET ) + if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SfxItemState::SET ) { // #i54993# when fitting to width or height, ignore only manual breaks in that direction const ScPageScaleToItem* pScaleToItem = static_cast<const ScPageScaleToItem*>(pItem); diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 9ecebad81f53..3ec81f0ece1e 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -244,7 +244,7 @@ void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet ) for( sal_uInt16 nWhich = aWhichIter.FirstWhich(); nWhich > 0; nWhich = aWhichIter.NextWhich() ) { - if(rItemSet.GetItemState(nWhich, false, &pPoolItem) == SFX_ITEM_SET) + if(rItemSet.GetItemState(nWhich, false, &pPoolItem) == SfxItemState::SET) { switch(nWhich) { diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index e3aa845cffe0..081bd7e8efb2 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -154,7 +154,7 @@ void ScEditUtil::RemoveCharAttribs( EditTextObject& rEditText, const ScPatternAt const SfxPoolItem* pItem; for (sal_uInt16 i = 0; i < nMapCount; ++i) { - if ( rSet.GetItemState(AttrTypeMap[i].nAttrType, false, &pItem) == SFX_ITEM_SET ) + if ( rSet.GetItemState(AttrTypeMap[i].nAttrType, false, &pItem) == SfxItemState::SET ) rEditText.RemoveCharAttribs(AttrTypeMap[i].nCharType); } } @@ -383,9 +383,9 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++) { SfxItemState eState = pEditAttrs->GetItemState( nId, false, &pItem ); - if (eState == SFX_ITEM_DONTCARE) + if (eState == SfxItemState::DONTCARE) bNeedsObject = true; - else if (eState == SFX_ITEM_SET) + else if (eState == SfxItemState::SET) { if ( nId == EE_CHAR_ESCAPEMENT || nId == EE_CHAR_PAIRKERNING || nId == EE_CHAR_KERNING || nId == EE_CHAR_XMLATTRIBS ) @@ -409,13 +409,13 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : // Feldbefehle enthalten? SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) + if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) bNeedsObject = true; // not converted characters? SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, false ); - if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET ) + if ( eConvState == SfxItemState::DONTCARE || eConvState == SfxItemState::SET ) bNeedsObject = true; } } @@ -629,7 +629,7 @@ void ScEditEngineDefaulter::RemoveParaAttribs() for (nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich ++) { const SfxPoolItem* pParaItem; - if ( rParaAttribs.GetItemState( nWhich, false, &pParaItem ) == SFX_ITEM_SET ) + if ( rParaAttribs.GetItemState( nWhich, false, &pParaItem ) == SfxItemState::SET ) { // if defaults are set, use only items that are different from default if ( !pDefaults || *pParaItem != pDefaults->Get(nWhich) ) @@ -661,7 +661,7 @@ void ScEditEngineDefaulter::RemoveParaAttribs() // Clear those items that are different from existing character attributes. // Where no character attributes are set, GetAttribs returns the paragraph attributes. const SfxPoolItem* pItem; - if ( aNewCharAttrs.GetItemState( nWhich, false, &pItem ) == SFX_ITEM_SET && + if ( aNewCharAttrs.GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && *pItem != aOldCharAttrs.Get(nWhich) ) { aNewCharAttrs.ClearItem(nWhich); diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx index 2877a131849c..9cf8977e089f 100644 --- a/sc/source/core/tool/progress.cxx +++ b/sc/source/core/tool/progress.cxx @@ -54,7 +54,7 @@ static bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh ) { SfxItemSet* pSet = pMed->GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_HIDDEN, true, &pItem ) && + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_HIDDEN, true, &pItem ) && ((const SfxBoolItem*)pItem)->GetValue() ) return true; } diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index add62f74d175..00719de8c455 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -462,7 +462,7 @@ XclExpStringRef lclCreateFormattedString( { // test if the character is a text field const SfxPoolItem* pItem; - if( aEditSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_SET ) + if( aEditSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SfxItemState::SET ) { const SvxFieldData* pField = static_cast< const SvxFieldItem* >( pItem )->GetField(); if( const SvxURLField* pUrlField = PTR_CAST( SvxURLField, pField ) ) @@ -804,7 +804,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico const SfxPoolItem* pItem; if( (aSel.nStartPos + 1 == aSel.nEndPos) && // fields are single characters - (aEditSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_SET) ) + (aEditSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SfxItemState::SET) ) { if( const SvxFieldData* pFieldData = static_cast< const SvxFieldItem* >( pItem )->GetField() ) { diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 7d21206fbc16..94c99f700c1f 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2920,7 +2920,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) XclExpFont* pFont = NULL; // check if non default font is set and only export then - if (rSet.GetItemState(rSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT )) == SFX_ITEM_SET ) + if (rSet.GetItemState(rSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT )) == SfxItemState::SET ) { Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rSet, com::sun::star::i18n::ScriptType::WEAK ); pFont = new XclExpFont( GetRoot(), XclFontData( aFont ), EXC_COLOR_CELLTEXT ); @@ -2928,7 +2928,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) XclExpNumFmt* pNumFormat = NULL; const SfxPoolItem *pPoolItem = NULL; - if( rSet.GetItemState( ATTR_VALUE_FORMAT, true, &pPoolItem ) == SFX_ITEM_SET ) + if( rSet.GetItemState( ATTR_VALUE_FORMAT, true, &pPoolItem ) == SfxItemState::SET ) { sal_uLong nScNumFmt = static_cast< sal_uInt32 >( static_cast< const SfxInt32Item* >(pPoolItem)->GetValue()); sal_Int32 nXclNumFmt = GetRoot().GetNumFmtBuffer().Insert(nScNumFmt); diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 8e98ff3e6a45..841b2c1bbb32 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -712,7 +712,7 @@ void XclImpNumFmtBuffer::FillScFmtToItemSet( SfxItemSet& rItemSet, sal_uLong nSc { OSL_ENSURE( nScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND, "XclImpNumFmtBuffer::FillScFmtToItemSet - invalid number format" ); ScfTools::PutItem( rItemSet, SfxUInt32Item( ATTR_VALUE_FORMAT, nScNumFmt ), bSkipPoolDefs ); - if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, false ) == SFX_ITEM_SET ) + if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, false ) == SfxItemState::SET ) ScGlobal::AddLanguage( rItemSet, GetFormatter() ); } diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index e602f01d6732..6cd5236c62b7 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -202,7 +202,7 @@ SotStorageStreamRef ScfTools::OpenStorageStreamWrite( SotStorageRef xStrg, const bool ScfTools::CheckItem( const SfxItemSet& rItemSet, sal_uInt16 nWhichId, bool bDeep ) { - return rItemSet.GetItemState( nWhichId, bDeep ) == SFX_ITEM_SET; + return rItemSet.GetItemState( nWhichId, bDeep ) == SfxItemState::SET; } bool ScfTools::CheckItems( const SfxItemSet& rItemSet, const sal_uInt16* pnWhichIds, bool bDeep ) diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 1438ffc7a2e3..fdf1dfaf8f64 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -1179,7 +1179,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) ESelection aSel( 0, 0, nParas-1, rEngine.GetTextLen( nParas-1 ) ); SfxItemSet aSet( rEngine.GetAttribs( aSel ) ); SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) + if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) bFields = true; } if ( bFields ) @@ -1203,7 +1203,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) { const SfxPoolItem* pItem; SfxItemSet aSet = rEngine.GetAttribs( aSel ); - if ( aSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SfxItemState::SET ) { const SvxFieldData* pField = ((const SvxFieldItem*)pItem)->GetField(); if ( pField && pField->ISA(SvxURLField) ) diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 0f072dcebd46..04202cc9cdb1 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -1919,7 +1919,7 @@ void NumberFormat::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) con if ( maApiData.mnIndex ) nScNumFmt = maApiData.mnIndex; ScfTools::PutItem( rItemSet, SfxUInt32Item( ATTR_VALUE_FORMAT, nScNumFmt ), bSkipPoolDefs ); - if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, false ) == SFX_ITEM_SET ) + if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, false ) == SfxItemState::SET ) ScGlobal::AddLanguage( rItemSet, *(rDoc.GetFormatTable()) ); } diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 821281d90180..1989a2e9534b 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -176,9 +176,9 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu { const SfxPoolItem* pItem = 0; SfxItemState eState = aSet.GetItemState( nId, true, &pItem ); - if (eState == SFX_ITEM_DONTCARE) + if (eState == SfxItemState::DONTCARE) bSimple = false; - else if (eState == SFX_ITEM_SET) + else if (eState == SfxItemState::SET) { if ( nId == EE_CHAR_ESCAPEMENT ) // Super-/Subscript always via EE { @@ -191,7 +191,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu if ( bSimple ) { // Contains field commands? SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) + if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) bSimple = false; } @@ -222,39 +222,39 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu if ( rESet.Count() ) { const SfxPoolItem* pItem; - if ( rESet.GetItemState( ATTR_BACKGROUND, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_BACKGROUND, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_BORDER, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_BORDER, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_SHADOW, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_SHADOW, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); // HTML - if ( rESet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_VER_JUSTIFY, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_VER_JUSTIFY, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_LINEBREAK, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_LINEBREAK, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_FONT_COLOR, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_COLOR, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_FONT_UNDERLINE, false, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_UNDERLINE, false, &pItem) == SfxItemState::SET ) rSet.Put( *pItem ); // HTML LATIN/CJK/CTL script type dependent const SfxPoolItem* pFont; - if ( rESet.GetItemState( ATTR_FONT, false, &pFont) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT, false, &pFont) != SfxItemState::SET ) pFont = 0; const SfxPoolItem* pHeight; - if ( rESet.GetItemState( ATTR_FONT_HEIGHT, false, &pHeight) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_HEIGHT, false, &pHeight) != SfxItemState::SET ) pHeight = 0; const SfxPoolItem* pWeight; - if ( rESet.GetItemState( ATTR_FONT_WEIGHT, false, &pWeight) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_WEIGHT, false, &pWeight) != SfxItemState::SET ) pWeight = 0; const SfxPoolItem* pPosture; - if ( rESet.GetItemState( ATTR_FONT_POSTURE, false, &pPosture) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_POSTURE, false, &pPosture) != SfxItemState::SET ) pPosture = 0; // Number format const SfxPoolItem* pNumFmt = NULL; - if ( rESet.GetItemState(ATTR_VALUE_FORMAT, false, &pNumFmt) == SFX_ITEM_SET ) + if ( rESet.GetItemState(ATTR_VALUE_FORMAT, false, &pNumFmt) == SfxItemState::SET ) rSet.Put(*pNumFmt); if ( pFont || pHeight || pWeight || pPosture ) { @@ -343,7 +343,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu bool bTextFormat = false; const SfxPoolItem* pNumFmt = NULL; - if (rSet.GetItemState(ATTR_VALUE_FORMAT, false, &pNumFmt) == SFX_ITEM_SET) + if (rSet.GetItemState(ATTR_VALUE_FORMAT, false, &pNumFmt) == SfxItemState::SET) { sal_uInt32 nNumFmt = static_cast<const SfxUInt32Item*>(pNumFmt)->GetValue(); sal_uInt16 nType = pFormatter->GetType(nNumFmt); diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index ba20be771724..a18c514ee57c 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -799,7 +799,7 @@ XclTxo::XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObje { SfxItemSet aSet( rEditObj.GetParaAttribs( 0)); const SfxPoolItem* pItem = NULL; - if( aSet.GetItemState( EE_PARA_JUST, true, &pItem ) == SFX_ITEM_SET ) + if( aSet.GetItemState( EE_PARA_JUST, true, &pItem ) == SfxItemState::SET ) { SvxAdjust eEEAlign = static_cast< const SvxAdjustItem& >( *pItem ).GetAdjust(); pCaption->SetMergedItem( SvxAdjustItem( eEEAlign, EE_PARA_JUST ) ); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 0ee88c5cb07b..940f856f0c31 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1886,7 +1886,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn const SfxItemSet& rAttrSet = pPattern->GetItemSet(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) ) + if ( SfxItemState::SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) ) { sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT == @@ -1896,7 +1896,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn bCellHasPercentFormat = false; // Default: no percent // Validity specified? - if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, true, &pItem ) ) + if ( SfxItemState::SET == rAttrSet.GetItemState( ATTR_VALIDDATA, true, &pItem ) ) nValidation = ((const SfxUInt32Item*)pItem)->GetValue(); else nValidation = 0; @@ -2521,7 +2521,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++) { SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem ); - if ( eState == SFX_ITEM_SET && + if ( eState == SfxItemState::SET && nId != EE_CHAR_ESCAPEMENT && nId != EE_CHAR_PAIRKERNING && nId != EE_CHAR_KERNING && nId != EE_CHAR_XMLATTRIBS && *pItem != pEditDefaults->Get(nId) ) @@ -2554,9 +2554,9 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++) { SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem ); - if (eState == SFX_ITEM_DONTCARE) + if (eState == SfxItemState::DONTCARE) bAttrib = true; - else if (eState == SFX_ITEM_SET) + else if (eState == SfxItemState::SET) { // Keep same items in EditEngine as in ScEditAttrTester if ( nId == EE_CHAR_ESCAPEMENT || nId == EE_CHAR_PAIRKERNING || @@ -2570,12 +2570,12 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) // Contains fields? SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) + if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) bAttrib = true; // Not converted characters? SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, false ); - if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET ) + if ( eConvState == SfxItemState::DONTCARE || eConvState == SfxItemState::SET ) bAttrib = true; // Always recognize formulas as formulas @@ -3666,7 +3666,7 @@ bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) sal_Int32 nParCnt = pEngine->GetParagraphCount(); SfxItemSet aSet = pEngine->GetAttribs( ESelection(0,0,nParCnt,0) ); SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); - if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) + if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET ) { // Copy content EditTextObject* pObj = pEngine->CreateTextObject(); diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 213782e88d56..fde742995a1e 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -394,7 +394,7 @@ void ScModule::Execute( SfxRequest& rReq ) { bool bSet; const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); else { // Toggle @@ -415,7 +415,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_ATTR_METRIC: { const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) { FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue(); switch( eUnit ) @@ -499,7 +499,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_ATTR_CHAR_CTL_LANGUAGE: { const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), true, &pItem ) ) + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), true, &pItem ) ) { ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); if ( pDocSh ) diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx index 88814f3fdfb1..2884663d4df0 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -79,9 +79,9 @@ void ScTabPageProtection::Reset( const SfxItemSet* rCoreAttrs ) (const SfxPoolItem**)&pProtAttr ); // Is this a Default-Item? - if ( eItemState == SFX_ITEM_DEFAULT ) + if ( eItemState == SfxItemState::DEFAULT ) pProtAttr = (const ScProtectionAttr*)&(rCoreAttrs->Get(nWhich)); - // At SFX_ITEM_DONTCARE let to 0 + // At SfxItemState::DONTCARE let to 0 bTriEnabled = ( pProtAttr == NULL ); // TriState, when DontCare bDontCare = bTriEnabled; @@ -136,7 +136,7 @@ bool ScTabPageProtection::FillItemSet( SfxItemSet* rCoreAttrs ) if ( bAttrsChanged ) rCoreAttrs->Put( aProtAttr ); - else if ( eItemState == SFX_ITEM_DEFAULT ) + else if ( eItemState == SfxItemState::DEFAULT ) rCoreAttrs->ClearItem( nWhich ); return bAttrsChanged; diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx index 7f017f7e0a2e..5de5395ed8e0 100644 --- a/sc/source/ui/cctrl/tbinsert.cxx +++ b/sc/source/ui/cctrl/tbinsert.cxx @@ -51,9 +51,9 @@ ScTbxInsertCtrl::~ScTbxInsertCtrl() void ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { const SfxUInt16Item* pItem = PTR_CAST( SfxUInt16Item, pState ); diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 817cf4f5ef65..bf00d6d6d462 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -61,7 +61,7 @@ void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId )); OSL_ENSURE( pBox ,"Control not found!" ); - if ( SFX_ITEM_DEFAULT != eState || pState->ISA( SfxVoidItem ) ) + if ( SfxItemState::DEFAULT != eState || pState->ISA( SfxVoidItem ) ) { SvxZoomSliderItem aZoomSliderItem( 100 ); pBox->Disable(); diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 271af19386b3..d0ad201f6228 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -230,7 +230,7 @@ bool ScTabPageSortFields::FillItemSet( SfxItemSet* rArgSet ) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, true, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSort, true, &pItem ) == SfxItemState::SET ) { ScSortParam aTempData = static_cast<const ScSortItem*>(pItem)->GetSortData(); aTempData.maKeyState = aNewSortData.maKeyState; @@ -690,7 +690,7 @@ bool ScTabPageSortOptions::FillItemSet( SfxItemSet* rArgSet ) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, true, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSort, true, &pItem ) == SfxItemState::SET ) aNewSortData = static_cast<const ScSortItem*>(pItem)->GetSortData(); } aNewSortData.bByRow = m_pBtnTopDown->IsChecked(); diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index 264c61fe86ed..c8fd47da5408 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -186,7 +186,7 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo, { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSubTotals, true, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSubTotals, true, &pItem ) == SfxItemState::SET ) theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData(); } @@ -501,7 +501,7 @@ bool ScTpSubTotalOptions::FillItemSet( SfxItemSet* rArgSet ) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSubTotals, true, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSubTotals, true, &pItem ) == SfxItemState::SET ) theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData(); } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index ef4351ece0ea..703556626491 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -371,37 +371,37 @@ void ScTPValidationValue::Reset( const SfxItemSet* rArgSet ) const SfxPoolItem* pItem; sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY; - if( rArgSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SFX_ITEM_SET ) + if( rArgSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SfxItemState::SET ) nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >( static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) ); m_pLbAllow->SelectEntryPos( nLbPos ); nLbPos = SC_VALIDDLG_DATA_EQUAL; - if( rArgSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SFX_ITEM_SET ) + if( rArgSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SfxItemState::SET ) nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >( static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) ); m_pLbValue->SelectEntryPos( nLbPos ); // *** check boxes *** bool bCheck = true; - if( rArgSet->GetItemState( FID_VALID_BLANK, true, &pItem ) == SFX_ITEM_SET ) + if( rArgSet->GetItemState( FID_VALID_BLANK, true, &pItem ) == SfxItemState::SET ) bCheck = static_cast< const SfxBoolItem* >( pItem )->GetValue(); m_pCbAllow->Check( bCheck ); sal_Int32 nListType = ValidListType::UNSORTED; - if( rArgSet->GetItemState( FID_VALID_LISTTYPE, true, &pItem ) == SFX_ITEM_SET ) + if( rArgSet->GetItemState( FID_VALID_LISTTYPE, true, &pItem ) == SfxItemState::SET ) nListType = static_cast< const SfxInt16Item* >( pItem )->GetValue(); m_pCbShow->Check( nListType != ValidListType::INVISIBLE ); m_pCbSort->Check( nListType == ValidListType::SORTEDASCENDING ); // *** formulas *** OUString aFmlaStr; - if ( rArgSet->GetItemState( FID_VALID_VALUE1, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_VALUE1, true, &pItem ) == SfxItemState::SET ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetFirstFormula( aFmlaStr ); aFmlaStr= ""; - if ( rArgSet->GetItemState( FID_VALID_VALUE2, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_VALUE2, true, &pItem ) == SfxItemState::SET ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetSecondFormula( aFmlaStr ); @@ -661,17 +661,17 @@ void ScTPValidationHelp::Reset( const SfxItemSet* rArgSet ) { const SfxPoolItem* pItem; - if ( rArgSet->GetItemState( FID_VALID_SHOWHELP, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_SHOWHELP, true, &pItem ) == SfxItemState::SET ) pTsbHelp->SetState( ((const SfxBoolItem*)pItem)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); else pTsbHelp->SetState( TRISTATE_FALSE ); - if ( rArgSet->GetItemState( FID_VALID_HELPTITLE, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_HELPTITLE, true, &pItem ) == SfxItemState::SET ) pEdtTitle->SetText( ((const SfxStringItem*)pItem)->GetValue() ); else pEdtTitle->SetText( EMPTY_OUSTRING ); - if ( rArgSet->GetItemState( FID_VALID_HELPTEXT, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_HELPTEXT, true, &pItem ) == SfxItemState::SET ) pEdInputHelp->SetText( ((const SfxStringItem*)pItem)->GetValue() ); else pEdInputHelp->SetText( EMPTY_OUSTRING ); @@ -731,22 +731,22 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet ) { const SfxPoolItem* pItem; - if ( rArgSet->GetItemState( FID_VALID_SHOWERR, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_SHOWERR, true, &pItem ) == SfxItemState::SET ) m_pTsbShow->SetState( ((const SfxBoolItem*)pItem)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); else m_pTsbShow->SetState( TRISTATE_TRUE ); // check by default - if ( rArgSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SfxItemState::SET ) m_pLbAction->SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() ); else m_pLbAction->SelectEntryPos( 0 ); - if ( rArgSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == SfxItemState::SET ) m_pEdtTitle->SetText( ((const SfxStringItem*)pItem)->GetValue() ); else m_pEdtTitle->SetText( EMPTY_OUSTRING ); - if ( rArgSet->GetItemState( FID_VALID_ERRTEXT, true, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet->GetItemState( FID_VALID_ERRTEXT, true, &pItem ) == SfxItemState::SET ) m_pEdError->SetText( ((const SfxStringItem*)pItem)->GetValue() ); else m_pEdError->SetText( EMPTY_OUSTRING ); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 90cc95d23584..a235b332e40a 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -774,7 +774,7 @@ bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, con const SfxPoolItem* pItem; const ScPatternAttr* pPattern = rDoc.GetPattern( rPos.Col(),rPos.Row(),rPos.Tab() ); - if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState( + if ( SfxItemState::SET == pPattern->GetItemSet().GetItemState( ATTR_VALUE_FORMAT,false,&pItem) ) { aOldValue.mbHasFormat = true; diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 0d06c524622c..1287c8a8c07f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1086,7 +1086,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) OUString sItStr; SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); @@ -1159,7 +1159,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) ScAsciiOptions aOptions; bool bOptInit = false; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { aOptions.ReadFromString( ((const SfxStringItem*)pItem)->GetValue() ); @@ -1228,7 +1228,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) OUString sItStr; SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); @@ -1269,7 +1269,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) OUString sItStr; SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); @@ -1396,7 +1396,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) bool bDateConvert = false; SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { OUString aFilterOption = (static_cast<const SfxStringItem*>(pItem))->GetValue(); @@ -2225,7 +2225,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) { SfxItemSet* pItemSet = rMed.GetItemSet(); const SfxPoolItem* pItem = 0; - if( pItemSet && pItemSet->GetItemState( SID_PASSWORD, true, &pItem ) == SFX_ITEM_SET ) + if( pItemSet && pItemSet->GetItemState( SID_PASSWORD, true, &pItem ) == SfxItemState::SET ) { bDoSave = ScWarnPassword::WarningOnPassword( rMed ); // #i42858# remove password from medium (warn only one time) @@ -2268,7 +2268,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) OUString sItStr; SfxItemSet* pSet = rMed.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); @@ -2298,7 +2298,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) OUString sCharSet; SfxItemSet* pSet = rMed.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { sCharSet = ((const SfxStringItem*)pItem)->GetValue(); @@ -2365,7 +2365,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) OUString sItStr; SfxItemSet* pSet = rMed.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); @@ -2415,7 +2415,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) const SfxPoolItem* pItem; OUString sFilterOptions; - if (pSet->GetItemState(SID_FILE_FILTEROPTIONS, true, &pItem) == SFX_ITEM_SET) + if (pSet->GetItemState(SID_FILE_FILTEROPTIONS, true, &pItem) == SfxItemState::SET) sFilterOptions = ((SfxStringItem*)pItem)->GetValue(); WaitObject aWait(GetActiveDialogParent()); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 13aa479e23a0..631f61b136b6 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -176,7 +176,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem; svx::ODataAccessDescriptor aDesc; - if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) { uno::Any aAny = static_cast<const SfxUsrAnyItem*>(pItem)->GetValue(); uno::Sequence<beans::PropertyValue> aProperties; @@ -185,11 +185,11 @@ void ScDocShell::Execute( SfxRequest& rReq ) } OUString sTarget; - if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET ) sTarget = ((const SfxStringItem*)pItem)->GetValue(); bool bIsNewArea = true; // Default sal_True (keine Nachfrage) - if ( pReqArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SfxItemState::SET ) bIsNewArea = ((const SfxBoolItem*)pItem)->GetValue(); // bei Bedarf neuen Datenbankbereich anlegen @@ -385,7 +385,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { bool bNewVal; const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) bNewVal = ((const SfxBoolItem*)pItem)->GetValue(); else bNewVal = !aDocument.GetAutoCalc(); // Toggle fuer Menue @@ -564,7 +564,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // getting real parent window when called from Security-Options TP Window* pParent = NULL; const SfxPoolItem* pParentItem; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) + if( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); // desired state @@ -623,7 +623,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { Window* pParent = NULL; const SfxPoolItem* pParentItem; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) + if( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); if ( ExecuteChangeProtectionDialog( pParent ) ) { @@ -664,26 +664,26 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxPoolItem* pItem; SfxMedium* pMed = NULL; if ( pReqArgs && - pReqArgs->GetItemState( SID_FILE_NAME, true, &pItem ) == SFX_ITEM_SET && + pReqArgs->GetItemState( SID_FILE_NAME, true, &pItem ) == SfxItemState::SET && pItem->ISA(SfxStringItem) ) { OUString aFileName = static_cast<const SfxStringItem*>(pItem)->GetValue(); OUString aFilterName; - if ( pReqArgs->GetItemState( SID_FILTER_NAME, true, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_FILTER_NAME, true, &pItem ) == SfxItemState::SET && pItem->ISA(SfxStringItem) ) { aFilterName = static_cast<const SfxStringItem*>(pItem)->GetValue(); } OUString aOptions; - if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) == SfxItemState::SET && pItem->ISA(SfxStringItem) ) { aOptions = static_cast<const SfxStringItem*>(pItem)->GetValue(); } short nVersion = 0; - if ( pReqArgs->GetItemState( SID_VERSION, true, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_VERSION, true, &pItem ) == SfxItemState::SET && pItem->ISA(SfxInt16Item) ) { nVersion = static_cast<const SfxInt16Item*>(pItem)->GetValue(); @@ -803,7 +803,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pReqArgs) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) { if ( pItem->ISA(SfxStringItem) ) { @@ -831,7 +831,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_EDIT_SCENARIO: { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) { if ( pItem->ISA(SfxStringItem) ) { @@ -879,7 +879,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_ATTR_YEAR2000 : { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) { if ( pItem->ISA(SfxUInt16Item) ) { @@ -2264,7 +2264,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) const SfxPoolItem* pItem = NULL; SfxItemSet* pSet = pMed->GetItemSet(); if ( pSet && - pSet->GetItemState( SID_VERSION, true, &pItem ) == SFX_ITEM_SET && + pSet->GetItemState( SID_VERSION, true, &pItem ) == SfxItemState::SET && pItem->ISA( SfxInt16Item ) ) { pImpl->pRequest->AppendItem( *pItem ); diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index c4b25acce685..8468f47c5c04 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -232,14 +232,14 @@ static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool ) SfxItemSet& rStyleSet = pStyle->GetItemSet(); const SfxPoolItem* pItem; - if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,false,&pItem) == SFX_ITEM_SET) + if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,false,&pItem) == SfxItemState::SET) { SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet(); SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges()); pDestSet->Put(rSrcSet); rStyleSet.Put(SvxSetItem(ATTR_PAGE_HEADERSET,pDestSet)); } - if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,false,&pItem) == SFX_ITEM_SET) + if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,false,&pItem) == SfxItemState::SET) { SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet(); SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges()); @@ -320,7 +320,7 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellS for ( sal_uInt16 i = 0; i < nFound; ++i ) { pStyles[i].pDest->GetItemSet().PutExtended( - pStyles[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT); + pStyles[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT); if(pStyles[i].pSource->HasParentSupport()) pStyles[i].pDest->SetParent(pStyles[i].pSource->GetParent()); // follow is never used diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 8ece986b7a10..446530cfd96c 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -434,7 +434,7 @@ OUString ScDocumentLoader::GetOptions( SfxMedium& rMedium ) { SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) return ((const SfxStringItem*)pItem)->GetValue(); return EMPTY_OUSTRING; diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 758cf0fa0fae..4cf5ca959641 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -344,7 +344,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) { const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem )) + if( SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem )) { OUString sMacro; const SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT ); diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index eeaa2fbf5664..9c7a9bbc0437 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -262,11 +262,11 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl rSet.DisableItem( SID_ATTR_TRANSFORM ); } - if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN ) { SfxItemSet aAttrs( pView->GetModel()->GetItemPool() ); pView->GetAttributes( aAttrs ); - if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_DEFAULT ) + if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT ) { bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); @@ -349,13 +349,13 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet) ScDrawView* pDrView = pViewData->GetScDrawView(); SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false); - if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SFX_ITEM_DEFAULT ) + if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SfxItemState::DEFAULT ) { rSet.DisableItem( SID_ATTRIBUTES_LINE ); rSet.DisableItem( SID_ATTR_LINEEND_STYLE ); // Tbx-Controller } - if ( aViewSet.GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) + if ( aViewSet.GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT ) rSet.DisableItem( SID_ATTRIBUTES_AREA ); } diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index 614d49ff3cb4..206ee0c49eed 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -150,7 +150,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) if( pReqArgs ) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, true, &pItem ) == SfxItemState::SET ) { const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem; const OUString& rName = pHyper->GetName(); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index e34680efd1d4..85f1d069dceb 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx |