diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 17:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 06:08:32 +0000 |
commit | ea733ab5b632109d28bb8f1dc37116340b26229b (patch) | |
tree | 78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 | |
parent | cc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff) |
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")
Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
536 files changed, 3563 insertions, 3563 deletions
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 @@ -179,7 +179,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) sal_uLong nFormat = 0; const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET && + pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -257,7 +257,7 @@ void ScDrawTextObjectBar::Execute( 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(); @@ -377,7 +377,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) else rSet.Put(SfxBoolItem(SID_FONTWORK, bHasFontWork)); - if ( rSet.GetItemState( SID_HYPERLINK_GETLINK ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_HYPERLINK_GETLINK ) != SfxItemState::UNKNOWN ) { SvxHyperlinkItem aHLinkItem; SdrView* pView = pViewData->GetScDrawView(); @@ -410,7 +410,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) rSet.Put(aHLinkItem); } - if ( rSet.GetItemState( SID_OPEN_HYPERLINK ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_OPEN_HYPERLINK ) != SfxItemState::UNKNOWN ) { SdrView* pView = pViewData->GetScDrawView(); OutlinerView* pOutView = pView->GetTextEditOutlinerView(); @@ -428,29 +428,29 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) rSet.DisableItem( SID_OPEN_HYPERLINK ); } - if( rSet.GetItemState( SID_TRANSLITERATE_HALFWIDTH ) != SFX_ITEM_UNKNOWN ) + if( rSet.GetItemState( SID_TRANSLITERATE_HALFWIDTH ) != SfxItemState::UNKNOWN ) ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_HALFWIDTH ); - if( rSet.GetItemState( SID_TRANSLITERATE_FULLWIDTH ) != SFX_ITEM_UNKNOWN ) + if( rSet.GetItemState( SID_TRANSLITERATE_FULLWIDTH ) != SfxItemState::UNKNOWN ) ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_FULLWIDTH ); - if( rSet.GetItemState( SID_TRANSLITERATE_HIRAGANA ) != SFX_ITEM_UNKNOWN ) + if( rSet.GetItemState( SID_TRANSLITERATE_HIRAGANA ) != SfxItemState::UNKNOWN ) ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_HIRAGANA ); - if( rSet.GetItemState( SID_TRANSLITERATE_KATAGANA ) != SFX_ITEM_UNKNOWN ) + if( rSet.GetItemState( SID_TRANSLITERATE_KATAGANA ) != SfxItemState::UNKNOWN ) ScViewUtil::HideDisabledSlot( rSet, pViewFrm->GetBindings(), SID_TRANSLITERATE_KATAGANA ); - if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN ) { SdrView* pView = pViewData->GetScDrawView(); 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 ) ); } } - if ( rSet.GetItemState( SID_THES ) != SFX_ITEM_UNKNOWN || - rSet.GetItemState( SID_THESAURUS ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_THES ) != SfxItemState::UNKNOWN || + rSet.GetItemState( SID_THESAURUS ) != SfxItemState::UNKNOWN ) { SdrView * pView = pViewData->GetScDrawView(); OutlinerView* pOutView = pView->GetTextEditOutlinerView(); @@ -623,7 +623,7 @@ static void lcl_RemoveFields( OutlinerView& rOutView ) { ESelection aFieldSel( nPar, nStart, nPar, nEnd ); SfxItemSet aSet = rEditEng.GetAttribs( aFieldSel ); - if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SfxItemState::SET ) { if (!bChanged) { @@ -953,13 +953,13 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) } // #i55929# according to spec, nInputScript is used for font and font height only - if ( rDestSet.GetItemState( EE_CHAR_FONTINFO ) != SFX_ITEM_UNKNOWN ) + if ( rDestSet.GetItemState( EE_CHAR_FONTINFO ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rDestSet, aAttrSet, EE_CHAR_FONTINFO, nInputScript ); - if ( rDestSet.GetItemState( EE_CHAR_FONTHEIGHT ) != SFX_ITEM_UNKNOWN ) + if ( rDestSet.GetItemState( EE_CHAR_FONTHEIGHT ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rDestSet, aAttrSet, EE_CHAR_FONTHEIGHT, nInputScript ); - if ( rDestSet.GetItemState( EE_CHAR_WEIGHT ) != SFX_ITEM_UNKNOWN ) + if ( rDestSet.GetItemState( EE_CHAR_WEIGHT ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rDestSet, aAttrSet, EE_CHAR_WEIGHT, nScript ); - if ( rDestSet.GetItemState( EE_CHAR_ITALIC ) != SFX_ITEM_UNKNOWN ) + if ( rDestSet.GetItemState( EE_CHAR_ITALIC ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rDestSet, aAttrSet, EE_CHAR_ITALIC, nScript ); // Ausrichtung @@ -1006,7 +1006,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) rDestSet.Put(aLR); Invalidate( SID_ATTR_PARA_LRSPACE ); SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) rDestSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); //xuxu for Line Space SvxLineSpacingItem aLineSP = ((const SvxLineSpacingItem&)aAttrSet. @@ -1015,7 +1015,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) rDestSet.Put(aLineSP); Invalidate(SID_ATTR_PARA_LINESPACE); eState = aAttrSet.GetItemState( EE_PARA_SBL ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) rDestSet.InvalidateItem(SID_ATTR_PARA_LINESPACE); //xuxu for UL Space SvxULSpaceItem aULSP = ((const SvxULSpaceItem&)aAttrSet. @@ -1024,7 +1024,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) rDestSet.Put(aULSP); Invalidate(SID_ATTR_PARA_ULSPACE); eState = aAttrSet.GetItemState( EE_PARA_ULSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) rDestSet.InvalidateItem(SID_ATTR_PARA_ULSPACE); // Zeilenabstand @@ -1057,7 +1057,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) // Unterstreichung eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rDestSet.InvalidateItem( SID_ULINE_VAL_NONE ); rDestSet.InvalidateItem( SID_ULINE_VAL_SINGLE ); @@ -1112,7 +1112,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) rDestSet.DisableItem( SID_ATTR_PARA_LEFT_TO_RIGHT ); rDestSet.DisableItem( SID_ATTR_PARA_RIGHT_TO_LEFT ); } - else if ( aAttrSet.GetItemState( EE_PARA_WRITINGDIR ) == SFX_ITEM_DONTCARE ) + else if ( aAttrSet.GetItemState( EE_PARA_WRITINGDIR ) == SfxItemState::DONTCARE ) { rDestSet.InvalidateItem( SID_ATTR_PARA_LEFT_TO_RIGHT ); rDestSet.InvalidateItem( SID_ATTR_PARA_RIGHT_TO_LEFT ); @@ -1176,7 +1176,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet) case SID_TABLE_VERT_BOTTOM: bool bContour = false; SfxItemState eConState = aEditAttr.GetItemState( SDRATTR_TEXT_CONTOURFRAME ); - if( eConState != SFX_ITEM_DONTCARE ) + if( eConState != SfxItemState::DONTCARE ) { bContour = ( ( const SdrOnOffItem& )aEditAttr.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); } @@ -1185,8 +1185,8 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet) SfxItemState eVState = aEditAttr.GetItemState( SDRATTR_TEXT_VERTADJUST ); //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - //if(SFX_ITEM_DONTCARE != eVState && SFX_ITEM_DONTCARE != eHState) - if(SFX_ITEM_DONTCARE != eVState) + //if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) + if(SfxItemState::DONTCARE != eVState) { SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aEditAttr.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index df225de294d3..3b96207d14ca 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -235,16 +235,16 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, const SfxItemSet* pReqArgs = rReq.GetArgs(); const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState( SID_INSERT_GRAPHIC, true, &pItem ) == SFX_ITEM_SET ) + pReqArgs->GetItemState( SID_INSERT_GRAPHIC, true, &pItem ) == SfxItemState::SET ) { OUString aFileName = ((const SfxStringItem*)pItem)->GetValue(); OUString aFilterName; - if ( pReqArgs->GetItemState( FN_PARAM_FILTER, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_FILTER, true, &pItem ) == SfxItemState::SET ) aFilterName = ((const SfxStringItem*)pItem)->GetValue(); bool bAsLink = false; - if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET ) bAsLink = ((const SfxBoolItem*)pItem)->GetValue(); Graphic aGraphic; diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx index a7c4e22546ab..ce1135188c82 100644 --- a/sc/source/ui/drawfunc/mediash.cxx +++ b/sc/source/ui/drawfunc/mediash.cxx @@ -106,7 +106,7 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) + if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) pItem = NULL; if( pItem ) diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx index 5e7c302965bd..8dd1f4219baa 100644 --- a/sc/source/ui/optdlg/tpdefaults.cxx +++ b/sc/source/ui/optdlg/tpdefaults.cxx @@ -62,7 +62,7 @@ void ScTpDefaultsOptions::Reset(const SfxItemSet* rCoreSet) ScDefaultsOptions aOpt; const SfxPoolItem* pItem = NULL; - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCDEFAULTSOPTIONS, false , &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SCDEFAULTSOPTIONS, false , &pItem)) aOpt = ((const ScTpDefaultsItem*)pItem)->GetDefaultsOptions(); m_pEdNSheets->SetValue( static_cast<sal_uInt16>( aOpt.GetInitTabCount()) ); diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index 87aa63918b35..0cedac43dcc2 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -290,7 +290,7 @@ void ScTpFormulaOptions::Reset(const SfxItemSet* rCoreSet) ScFormulaOptions aOpt; const SfxPoolItem* pItem = NULL; - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCFORMULAOPTIONS, false , &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SCFORMULAOPTIONS, false , &pItem)) aOpt = ((const ScTpFormulaItem*)pItem)->GetFormulaOptions(); // formula grammar. diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx index e7b7a8c5e4e3..9b65283d7cd1 100644 --- a/sc/source/ui/optdlg/tpprint.cxx +++ b/sc/source/ui/optdlg/tpprint.cxx @@ -61,7 +61,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet* rCoreSet ) ScPrintOptions aOptions; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCPRINTOPTIONS, false , &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SCPRINTOPTIONS, false , &pItem)) aOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions(); else { @@ -69,7 +69,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet* rCoreSet ) aOptions = SC_MOD()->GetPrintOptions(); } - if ( SFX_ITEM_SET == rCoreSet->GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) ) + if ( SfxItemState::SET == rCoreSet->GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) ) { bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue(); m_pSelectedSheetsCB->Check( bChecked ); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 2e42029b6234..0beeeb909b20 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -148,7 +148,7 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet ) void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCVIEWOPTIONS, false , &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SCVIEWOPTIONS, false , &pItem)) pLocalOptions = new ScViewOptions( ((const ScTpViewItem*)pItem)->GetViewOptions() ); else @@ -175,9 +175,9 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) pBreakCB->Check( pLocalOptions->GetOption(VOPT_PAGEBREAKS) ); pGuideLineCB->Check( pLocalOptions->GetOption(VOPT_HELPLINES) ); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_RANGEFINDER, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_RANGEFINDER, false, &pItem)) pRangeFindCB->Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_OPT_SYNCZOOM, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_OPT_SYNCZOOM, false, &pItem)) pSyncZoomCB->Check(((const SfxBoolItem*)pItem)->GetValue()); pRangeFindCB->SaveValue(); @@ -206,7 +206,7 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) void ScTpContentOptions::ActivatePage( const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_SCVIEWOPTIONS, false , &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_SCVIEWOPTIONS, false , &pItem)) *pLocalOptions = ((const ScTpViewItem*)pItem)->GetViewOptions(); } @@ -525,7 +525,7 @@ bool ScTpLayoutOptions::FillItemSet( SfxItemSet* rCoreSet ) void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet ) { m_pUnitLB->SetNoSelection(); - if ( rCoreSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) + if ( rCoreSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); @@ -543,7 +543,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet ) m_pUnitLB->SaveValue(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) m_pTabMF->SetValue(m_pTabMF->Normalize(((SfxUInt16Item*)pItem)->GetValue()), FUNIT_TWIP); m_pTabMF->SaveValue(); @@ -573,34 +573,34 @@ void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet ) // added to avoid warnings } } - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_SELECTION, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_SELECTION, false, &pItem)) m_pAlignCB->Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_SELECTIONPOS, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_SELECTIONPOS, false, &pItem)) m_pAlignLB->SelectEntryPos(((const SfxUInt16Item*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_EDITMODE, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_EDITMODE, false, &pItem)) m_pEditModeCB->Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_FMT_EXPAND, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_FMT_EXPAND, false, &pItem)) m_pFormatCB->Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_REF_EXPAND, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_REF_EXPAND, false, &pItem)) m_pExpRefCB->Check(((const SfxBoolItem*)pItem)->GetValue()); if (rCoreSet->HasItem(SID_SC_OPT_SORT_REF_UPDATE, &pItem)) m_pSortRefUpdateCB->Check(static_cast<const SfxBoolItem*>(pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_MARK_HEADER, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_MARK_HEADER, false, &pItem)) m_pMarkHdrCB->Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_TEXTWYSIWYG, false, &pItem)) + if(SfxItemState::SET == rCoreSet->GetItemState(SID_SC_INPUT_TEXTWYSIWYG, false, &pItem)) m_pTextFmtCB->Check(((const SfxBoolItem*)pItem)->GetValue()); - if( SFX_ITEM_SET == rCoreSet->GetItemState( SID_SC_INPUT_REPLCELLSWARN, false, &pItem ) ) + if( SfxItemState::SET == rCoreSet->GetItemState( SID_SC_INPUT_REPLCELLSWARN, false, &pItem ) ) m_pReplWarnCB->Check( ( (const SfxBoolItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == rCoreSet->GetItemState( SID_SC_INPUT_LEGACY_CELL_SELECTION, false, &pItem ) ) + if( SfxItemState::SET == rCoreSet->GetItemState( SID_SC_INPUT_LEGACY_CELL_SELECTION, false, &pItem ) ) m_pLegacyCellSelectionCB->Check( ( (const SfxBoolItem*)pItem)->GetValue() ); m_pAlignCB ->SaveValue(); diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index 71dd44e3182c..aa58550fd7f7 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -69,7 +69,7 @@ static bool lcl_PutBoolItem( sal_uInt16 nWhich, #define PAGEDIR_HDL LINK(this,ScTablePage,PageDirHdl) #define SCALE_HDL LINK(this,ScTablePage,ScaleHdl) -#define WAS_DEFAULT(w,s) (SFX_ITEM_DEFAULT==(s).GetItemState((w),true)) +#define WAS_DEFAULT(w,s) (SfxItemState::DEFAULT==(s).GetItemState((w),true)) #define GET_BOOL(sid,set) ((const SfxBoolItem&)((set).Get(GetWhich((sid))))).GetValue() #define GET_USHORT(sid,set) (sal_uInt16)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue() #define GET_SHOW(sid,set) ( ScVObjMode( ((const ScViewObjectModeItem&)((set).Get(GetWhich((sid))))).GetValue() ) \ @@ -164,7 +164,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet ) // scaling: nWhich = GetWhich(SID_SCATTR_PAGE_SCALE); - if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) + if ( rCoreSet->GetItemState( nWhich, true ) >= SfxItemState::DEFAULT ) { sal_uInt16 nScale = ((const SfxUInt16Item&)rCoreSet->Get(nWhich)).GetValue(); if( nScale > 0 ) @@ -173,7 +173,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet ) } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETO); - if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) + if ( rCoreSet->GetItemState( nWhich, true ) >= SfxItemState::DEFAULT ) { const ScPageScaleToItem& rItem = static_cast< const ScPageScaleToItem& >( rCoreSet->Get( nWhich ) ); sal_uInt16 nWidth = rItem.GetWidth(); @@ -189,7 +189,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet ) } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETOPAGES); - if ( rCoreSet->GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT ) + if ( rCoreSet->GetItemState( nWhich, true ) >= SfxItemState::DEFAULT ) { sal_uInt16 nPages = ((const SfxUInt16Item&)rCoreSet->Get(nWhich)).GetValue(); if( nPages > 0 ) diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index 462a69c7ea00..03432bec2530 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -236,7 +236,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( case SID_H_ALIGNCELL: { SvxCellHorJustify meHorAlignState = SVX_HOR_JUSTIFY_STANDARD; - if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxHorJustifyItem) ) + if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxHorJustifyItem) ) { const SvxHorJustifyItem* pItem = (const SvxHorJustifyItem*)pState; meHorAlignState = (SvxCellHorJustify)pItem->GetValue(); @@ -261,7 +261,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_ALIGN_INDENT: - if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SfxUInt16Item) ) + if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxUInt16Item) ) { const SfxUInt16Item* pItem = (const SfxUInt16Item*)pState; sal_uInt16 nVal = pItem->GetValue(); @@ -274,7 +274,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( } break; case FID_MERGE_TOGGLE: - if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SfxBoolItem) ) + if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxBoolItem) ) { mpCBXMergeCell->Enable(); const SfxBoolItem* pItem = (const SfxBoolItem*)pState; @@ -288,7 +288,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( break; case SID_ATTR_ALIGN_LINEBREAK: - if(eState == SFX_ITEM_DISABLED) + if(eState == SfxItemState::DISABLED) { mpCBXWrapText->EnableTriState(false); mpCBXWrapText->Check(false); @@ -297,13 +297,13 @@ void AlignmentPropertyPanel::NotifyItemUpdate( else { mpCBXWrapText->Enable(); - if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SfxBoolItem) ) + if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxBoolItem) ) { mpCBXWrapText->EnableTriState(false); const SfxBoolItem* pItem = (const SfxBoolItem*)pState; mpCBXWrapText->Check(pItem->GetValue()); } - else if(eState == SFX_ITEM_DONTCARE) + else if(eState == SfxItemState::DONTCARE) { mpCBXWrapText->EnableTriState(true); mpCBXWrapText->SetState(TRISTATE_INDET); @@ -311,7 +311,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_ALIGN_DEGREES: - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) { long nTmp = ((const SfxInt32Item*)pState)->GetValue(); mpMtrAngle->SetValue( nTmp / 100); //wj @@ -350,7 +350,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_ALIGN_STACKED: - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) { mpCbStacked->EnableTriState(false); const SfxBoolItem* aStackItem = (const SfxBoolItem*)pState; diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx index a16668c3ca40..49bfa73a0570 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx @@ -387,7 +387,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( switch(nSID) { case SID_BACKGROUND_COLOR: - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SvxColorItem* pSvxColorItem = dynamic_cast< const SvxColorItem* >(pState); @@ -405,7 +405,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( mpFillColorUpdater->Update(COL_TRANSPARENT); break; case SID_FRAME_LINECOLOR: - if( eState == SFX_ITEM_DONTCARE) + if( eState == SfxItemState::DONTCARE) { mbLineColorAvailable = true; maLineColor.SetColor( COL_TRANSPARENT ); @@ -413,7 +413,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( break; } - if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxColorItem) ) + if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxColorItem) ) { const SvxColorItem* pSvxColorItem = dynamic_cast< const SvxColorItem* >(pState); @@ -439,7 +439,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( UpdateControlState(); break; case SID_FRAME_LINESTYLE: - if( eState == SFX_ITEM_DONTCARE ) + if( eState == SfxItemState::DONTCARE ) { mbBorderStyleAvailable = true; mnIn = 0; @@ -449,7 +449,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( break; } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SvxLineItem* pSvxLineItem = dynamic_cast< const SvxLineItem* >(pState); @@ -474,7 +474,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( SetStyleIcon(); break; case SID_ATTR_BORDER_OUTER: - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SvxBoxItem* pBoxItem = dynamic_cast< const SvxBoxItem* >(pState); @@ -509,7 +509,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_BORDER_INNER: - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SvxBoxInfoItem* pBoxInfoItem = dynamic_cast< const SvxBoxInfoItem* >(pState); @@ -552,7 +552,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_BORDER_DIAG_TLBR: - if( eState == SFX_ITEM_DONTCARE ) + if( eState == SfxItemState::DONTCARE ) { mbTLBR = true; maTLBRColor.SetColor(COL_TRANSPARENT); @@ -561,7 +561,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( break; } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SvxLineItem* pItem = dynamic_cast< const SvxLineItem* >(pState); @@ -594,7 +594,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( UpdateControlState(); break; case SID_ATTR_BORDER_DIAG_BLTR: - if( eState == SFX_ITEM_DONTCARE ) + if( eState == SfxItemState::DONTCARE ) { mbBLTR = true; maBLTRColor.SetColor( COL_TRANSPARENT ); @@ -603,7 +603,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( break; } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SvxLineItem* pItem = dynamic_cast< const SvxLineItem* >(pState); @@ -636,7 +636,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate( UpdateControlState(); break; case FID_TAB_TOGGLE_GRID: - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 51bc433e63ff..a63f065182e7 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -216,7 +216,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( { case SID_NUMBER_TYPE_FORMAT: { - if( eState >= SFX_ITEM_DEFAULT) + if( eState >= SfxItemState::DEFAULT) { const SfxInt16Item* pItem = (const SfxInt16Item*)pState; sal_uInt16 nVal = pItem->GetValue(); @@ -254,7 +254,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( bool bNegRed = false; sal_uInt16 nPrecision = 0; sal_uInt16 nLeadZeroes = 0; - if( eState >= SFX_ITEM_DEFAULT) + if( eState >= SfxItemState::DEFAULT) { const SfxStringItem* pItem = (const SfxStringItem*)pState; OUString aCode = pItem->GetValue(); diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index bc37706095e5..485e89015388 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -136,9 +136,9 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share } const SfxItemSet& rApplySet = pApplyPattern->GetItemSet(); - bool bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, true ) != SFX_ITEM_DEFAULT || - rApplySet.GetItemState( ATTR_CONDITIONAL, true ) != SFX_ITEM_DEFAULT ); - bool bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, true ) != SFX_ITEM_DEFAULT ); + bool bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, true ) != SfxItemState::DEFAULT || + rApplySet.GetItemState( ATTR_CONDITIONAL, true ) != SfxItemState::DEFAULT ); + bool bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, true ) != SfxItemState::DEFAULT ); sal_uInt16 nFlags = SC_PF_TESTMERGE; if (bPaintExt) diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 1089af3ee3d5..0d19e29a72e1 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1876,14 +1876,14 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( sal_uInt16 nItemWhic { SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, false ); - if ( nItemWhich == ATTR_VALUE_FORMAT && eState == SFX_ITEM_DEFAULT ) + if ( nItemWhich == ATTR_VALUE_FORMAT && eState == SfxItemState::DEFAULT ) eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, false ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) eRet = beans::PropertyState_DIRECT_VALUE; - else if ( eState == SFX_ITEM_DEFAULT ) + else if ( eState == SfxItemState::DEFAULT ) eRet = beans::PropertyState_DEFAULT_VALUE; - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) eRet = beans::PropertyState_AMBIGUOUS_VALUE; else { diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index a79af3dbeb67..b32e23f5b32b 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -1224,14 +1224,14 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPro // // if no rotate value is set, look at orientation // //! also for a fixed value of 0 (in case orientation is ambiguous)? -// if ( nWhich == ATTR_ROTATE_VALUE && eState == SFX_ITEM_DEFAULT ) +// if ( nWhich == ATTR_ROTATE_VALUE && eState == SfxItemState::DEFAULT ) // eState = pItemSet->GetItemState( ATTR_ORIENTATION, sal_False ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) eRet = beans::PropertyState_DIRECT_VALUE; - else if ( eState == SFX_ITEM_DEFAULT ) + else if ( eState == SfxItemState::DEFAULT ) eRet = beans::PropertyState_DEFAULT_VALUE; - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) eRet = beans::PropertyState_AMBIGUOUS_VALUE; // kann eigentlich nicht sein... else { @@ -1294,7 +1294,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName // Default-Items mit falscher Slot-ID funktionieren im SfxItemPropertySet3 nicht //! Slot-IDs aendern... if ( aEmptySet.GetPool()->GetSlotId(nWhich) == nWhich && - aEmptySet.GetItemState(nWhich, false) == SFX_ITEM_DEFAULT ) + aEmptySet.GetItemState(nWhich, false) == SfxItemState::DEFAULT ) { aEmptySet.Put( aEmptySet.Get( nWhich ) ); } @@ -1761,7 +1761,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt // funktionieren im SfxItemPropertySet3 nicht //! Slot-IDs aendern... if ( rSet.GetPool()->GetSlotId(pEntry->nWID) == pEntry->nWID && - rSet.GetItemState(pEntry->nWID, false) == SFX_ITEM_DEFAULT ) + rSet.GetItemState(pEntry->nWID, false) == SfxItemState::DEFAULT ) { rSet.Put( rSet.Get(pEntry->nWID) ); } @@ -1953,7 +1953,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName ) // funktionieren im SfxItemPropertySet3 nicht //! Slot-IDs aendern... if ( pItemSet->GetPool()->GetSlotId(nWhich) == nWhich && - pItemSet->GetItemState(nWhich, false) == SFX_ITEM_DEFAULT ) + pItemSet->GetItemState(nWhich, false) == SfxItemState::DEFAULT ) { SfxItemSet aNoEmptySet( *pItemSet ); aNoEmptySet.Put( aNoEmptySet.Get( nWhich ) ); diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index db47c7f2db43..0b632d787aac 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -1244,7 +1244,7 @@ ScVbaApplication::getDisplayFormulaBar() pViewShell->GetState( reqList ); const SfxPoolItem *pItem=0; - if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, false, &pItem ) == SFX_ITEM_SET ) + if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, false, &pItem ) == SfxItemState::SET ) bRes = ((SfxBoolItem*)pItem)->GetValue(); } return bRes; diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 873650bd3642..5d92e7025939 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -220,7 +220,7 @@ uno::Any SAL_CALL ScVbaFont::getSize() throw ( uno::RuntimeException, std::exception ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return ScVbaFont_BASE::getSize(); } @@ -246,7 +246,7 @@ uno::Any SAL_CALL ScVbaFont::getColorIndex() throw ( uno::RuntimeException, std::exception ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return ScVbaFont_BASE::getColorIndex(); } @@ -337,7 +337,7 @@ uno::Any SAL_CALL ScVbaFont::getBold() throw ( uno::RuntimeException, std::exception ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return ScVbaFont_BASE::getBold(); } @@ -380,7 +380,7 @@ uno::Any SAL_CALL ScVbaFont::getUnderline() throw ( uno::RuntimeException, std::exception ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); sal_Int32 nValue = awt::FontUnderline::NONE; @@ -407,7 +407,7 @@ uno::Any SAL_CALL ScVbaFont::getStrikethrough() throw ( uno::RuntimeException, std::exception ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return ScVbaFont_BASE::getStrikethrough(); } @@ -416,7 +416,7 @@ uno::Any SAL_CALL ScVbaFont::getShadow() throw (uno::RuntimeException, std::exception) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return ScVbaFont_BASE::getShadow(); } @@ -425,7 +425,7 @@ uno::Any SAL_CALL ScVbaFont::getItalic() throw ( uno::RuntimeException, std::exception ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return ScVbaFont_BASE::getItalic(); @@ -435,7 +435,7 @@ uno::Any SAL_CALL ScVbaFont::getName() throw ( uno::RuntimeException, std::exception ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return ScVbaFont_BASE::getName(); } @@ -458,7 +458,7 @@ uno::Any SAL_CALL ScVbaFont::getOutlineFont() throw (uno::RuntimeException, std::exception) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, true, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, true, NULL) == SfxItemState::DONTCARE ) return aNULL(); return mxFont->getPropertyValue("CharContoured"); } diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index 3cab632f1c00..7edec3fd0e52 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -556,7 +556,7 @@ ScVbaFormat<Ifc1>::getLocked( ) throw (script::BasicErrorException, uno::Runtim { const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, true); SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, true, NULL); - if(eState != SFX_ITEM_DONTCARE) + if(eState != SfxItemState::DONTCARE) aCellProtection = uno::makeAny(rProtAttr.GetProtection()); } else // fallback to propertyset @@ -589,7 +589,7 @@ ScVbaFormat<Ifc1>::getFormulaHidden( ) throw (script::BasicErrorException, uno: { const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, true); SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, true, NULL); - if(eState != SFX_ITEM_DONTCARE) + if(eState != SfxItemState::DONTCARE) aBoolRet = uno::makeAny(rProtAttr.GetHideFormula()); } else diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 523db877a903..a314da25041d 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -543,7 +543,7 @@ public: SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, true, NULL); // one of the cells in the range is not like the other ;-) // so return a zero length format to indicate that - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) return OUString(); } @@ -2660,7 +2660,7 @@ ScVbaRange::getWrapText() throw (script::BasicErrorException, uno::RuntimeExcept SfxItemSet* pDataSet = getCurrentDataSet(); SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK, true, NULL); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) return aNULL(); uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW ); @@ -3947,7 +3947,7 @@ ScVbaRange::getRowHeight() sal_Int32 nEndRow = thisAddress.EndRow; sal_uInt16 nRowTwips = 0; // #TODO probably possible to use the SfxItemSet ( and see if - // SFX_ITEM_DONTCARE is set ) to improve performance + // SfxItemState::DONTCARE is set ) to improve performance // #CHECKME looks like this is general behaviour not just row Range specific // if ( mbIsRows ) ScDocShell* pShell = getScDocShell(); diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index f8723e688ccf..ac5b37f777c5 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -92,8 +92,8 @@ void ScAuditingShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pXItem; const SfxPoolItem* pYItem; - if ( pReqArgs->GetItemState( SID_RANGE_COL, true, &pXItem ) == SFX_ITEM_SET - && pReqArgs->GetItemState( SID_RANGE_ROW, true, &pYItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_RANGE_COL, true, &pXItem ) == SfxItemState::SET + && pReqArgs->GetItemState( SID_RANGE_ROW, true, &pYItem ) == SfxItemState::SET ) { OSL_ENSURE( pXItem->ISA(SfxInt16Item) && pYItem->ISA(SfxInt32Item), "wrong items" ); diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 3a9f22d07c51..4af143c894f5 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -539,7 +539,7 @@ void ScCellShell::GetClipState( SfxItemSet& rSet ) rSet.DisableItem( SID_PASTE_ONLY_FORMULA ); rSet.DisableItem( SID_CLIPBOARD_FORMAT_ITEMS ); } - else if ( rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) != SFX_ITEM_UNKNOWN ) + else if ( rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) != SfxItemState::UNKNOWN ) { SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS ); GetPossibleClipboardFormats( aFormats ); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index c5f509ba449f..04e5401b36ff 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1250,7 +1250,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) sal_uLong nFormat = 0; const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET && + pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -1504,7 +1504,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) // Clipboard-ID given as parameter? Basic "PasteSpecial(Format)" const SfxPoolItem* pItem=NULL; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET && + pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -1791,7 +1791,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_CONSOLIDATE: { const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SCITEM_CONSOLIDATEDATA, true, &pItem ) ) { const ScConsolidateParam& rParam = @@ -2150,7 +2150,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { bool bShow; const SfxPoolItem* pItem; - if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, true, &pItem ) == SFX_ITEM_SET) ) + if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, true, &pItem ) == SfxItemState::SET) ) bShow = ((const SfxBoolItem*) pItem)->GetValue(); else bShow = !pNote->IsCaptionShown(); diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index e921a1aabcd8..df91eebb1040 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -413,17 +413,17 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aSortParam.bInplace = true; // from Basic always const SfxPoolItem* pItem; - if ( pArgs->GetItemState( SID_SORT_BYROW, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_BYROW, true, &pItem ) == SfxItemState::SET ) aSortParam.bByRow = static_cast<const SfxBoolItem*>(pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_HASHEADER, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_HASHEADER, true, &pItem ) == SfxItemState::SET ) aSortParam.bHasHeader = static_cast<const SfxBoolItem*>(pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_CASESENS, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_CASESENS, true, &pItem ) == SfxItemState::SET ) aSortParam.bCaseSens = static_cast<const SfxBoolItem*>(pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_NATURALSORT, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_NATURALSORT, true, &pItem ) == SfxItemState::SET ) aSortParam.bNaturalSort = static_cast<const SfxBoolItem*>(pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_ATTRIBS, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_ATTRIBS, true, &pItem ) == SfxItemState::SET ) aSortParam.bIncludePattern = static_cast<const SfxBoolItem*>(pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_USERDEF, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_USERDEF, true, &pItem ) == SfxItemState::SET ) { sal_uInt16 nUserIndex = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); aSortParam.bUserDef = ( nUserIndex != 0 ); @@ -432,25 +432,25 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) } SCCOLROW nField0 = 0; - if ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET ) nField0 = static_cast<const SfxInt32Item*>(pItem)->GetValue(); aSortParam.maKeyState[0].bDoSort = ( nField0 != 0 ); aSortParam.maKeyState[0].nField = nField0 > 0 ? (nField0-1) : 0; - if ( pArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SfxItemState::SET ) aSortParam.maKeyState[0].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue(); SCCOLROW nField1 = 0; - if ( pArgs->GetItemState( FN_PARAM_3, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_3, true, &pItem ) == SfxItemState::SET ) nField1 = static_cast<const SfxInt32Item*>(pItem)->GetValue(); aSortParam.maKeyState[1].bDoSort = ( nField1 != 0 ); aSortParam.maKeyState[1].nField = nField1 > 0 ? (nField1-1) : 0; - if ( pArgs->GetItemState( FN_PARAM_4, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_4, true, &pItem ) == SfxItemState::SET ) aSortParam.maKeyState[1].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue(); SCCOLROW nField2 = 0; - if ( pArgs->GetItemState( FN_PARAM_5, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_5, true, &pItem ) == SfxItemState::SET ) nField2 = static_cast<const SfxInt32Item*>(pItem)->GetValue(); aSortParam.maKeyState[2].bDoSort = ( nField2 != 0 ); aSortParam.maKeyState[2].nField = nField2 > 0 ? (nField2-1) : 0; - if ( pArgs->GetItemState( FN_PARAM_6, true, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_6, true, &pItem ) == SfxItemState::SET ) aSortParam.maKeyState[2].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue(); // subtotal when needed new @@ -586,7 +586,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) case FID_FILTER_OK: { const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SCITEM_QUERYDATA, true, &pItem ) ) { const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(*pItem); @@ -641,7 +641,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) case SID_PIVOT_TABLE: { const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SCITEM_PIVOTDATA, true, &pItem ) ) { SCTAB nCurTab = GetViewData()->GetTabNo(); @@ -853,11 +853,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); - if ( pOutSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SfxItemState::SET ) eMode = (ScValidationMode) ((const SfxAllEnumItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SfxItemState::SET ) eOper = (ScConditionMode) ((const SfxAllEnumItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_VALUE1, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_VALUE1, true, &pItem ) == SfxItemState::SET ) { OUString aTemp1 = ((const SfxStringItem*)pItem)->GetValue(); if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME) @@ -874,7 +874,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) else aExpr1 = aTemp1; } - if ( pOutSet->GetItemState( FID_VALID_VALUE2, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_VALUE2, true, &pItem ) == SfxItemState::SET ) { OUString aTemp2 = ((const SfxStringItem*)pItem)->GetValue(); if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME) @@ -892,25 +892,25 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aExpr2 = aTemp2; } - if ( pOutSet->GetItemState( FID_VALID_BLANK, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_BLANK, true, &pItem ) == SfxItemState::SET ) bBlank = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, true, &pItem ) == SfxItemState::SET ) nListType = ((const SfxInt16Item*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, true, &pItem ) == SfxItemState::SET ) bShowHelp = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, true, &pItem ) == SfxItemState::SET ) aHelpTitle = ((const SfxStringItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, true, &pItem ) == SfxItemState::SET ) aHelpText = ((const SfxStringItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_SHOWERR, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_SHOWERR, true, &pItem ) == SfxItemState::SET ) bShowError = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SfxItemState::SET ) eErrStyle = (ScValidErrorStyle) ((const SfxAllEnumItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == SfxItemState::SET ) aErrTitle = ((const SfxStringItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, true, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, true, &pItem ) == SfxItemState::SET ) aErrText = ((const SfxStringItem*)pItem)->GetValue(); ScValidationData aData( eMode, eOper, aExpr1, aExpr2, pDoc, aCursorPos ); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index d1b7759a89b2..273296b95ed8 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -339,7 +339,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) sal_uInt16 nWhich = 0; for ( nWhich=ATTR_PATTERN_START; nWhich<=ATTR_PATTERN_END; nWhich++ ) - if ( pReqArgs->GetItemState( nWhich, true, &pAttr ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nWhich, true, &pAttr ) == SfxItemState::SET ) pNewSet->Put( *pAttr ); pTabViewShell->ApplyAttributes( pNewSet.get(), pEmptySet.get() ); @@ -475,9 +475,9 @@ void ScCellShell::Execute( SfxRequest& rReq ) OUString aArgName; OUString aArgComment; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_SCENARIOS, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_SCENARIOS, true, &pItem ) == SfxItemState::SET ) aArgName = ((const SfxStringItem*)pItem)->GetValue(); - if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, true, &pItem ) == SfxItemState::SET ) aArgComment = ((const SfxStringItem*)pItem)->GetValue(); aColor = Color( COL_LIGHTGRAY ); // Default @@ -734,7 +734,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { bCenter = true; SfxPoolItem* pItem = 0; - if( rBindings.QueryState( nSlot, pItem ) >= SFX_ITEM_DEFAULT ) + if( rBindings.QueryState( nSlot, pItem ) >= SfxItemState::DEFAULT ) bMerge = !static_cast< SfxBoolItem* >( pItem )->GetValue(); delete pItem; @@ -749,7 +749,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) bool bApi = rReq.IsAPI(); const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET ) + pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET ) { OSL_ENSURE(pItem && pItem->ISA(SfxBoolItem), "falsches Item"); bMoveContents = ((const SfxBoolItem*)pItem)->GetValue(); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 5ab8b2bcea81..1c2d6dddb12e 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -250,7 +250,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) sal_uLong nFormat = 0; const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET && + pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -510,7 +510,7 @@ void ScEditShell::Execute( 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(); @@ -1072,19 +1072,19 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) } // #i55929# according to spec, nInputScript is used for font and font height only - if ( rSet.GetItemState( EE_CHAR_FONTINFO ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( EE_CHAR_FONTINFO ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rSet, aAttribs, EE_CHAR_FONTINFO, nInputScript ); - if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rSet, aAttribs, EE_CHAR_FONTHEIGHT, nInputScript ); - if ( rSet.GetItemState( EE_CHAR_WEIGHT ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( EE_CHAR_WEIGHT ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rSet, aAttribs, EE_CHAR_WEIGHT, nScript ); - if ( rSet.GetItemState( EE_CHAR_ITALIC ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( EE_CHAR_ITALIC ) != SfxItemState::UNKNOWN ) ScViewUtil::PutItemScript( rSet, aAttribs, EE_CHAR_ITALIC, nScript ); // Unterstreichung SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem( SID_ULINE_VAL_NONE ); rSet.InvalidateItem( SID_ULINE_VAL_SINGLE ); @@ -1127,7 +1127,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) eState = aAttribs.GetItemState( EE_CHAR_KERNING, true ); pViewData->GetBindings().Invalidate( SID_ATTR_CHAR_KERNING ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { // rSet.InvalidateItem( SID_ATTR_CHAR_KERNING ); rSet.InvalidateItem(EE_CHAR_KERNING); @@ -1182,7 +1182,7 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq) sal_uInt16 nCount = 1; const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) nCount = ((const SfxUInt16Item*)pItem)->GetValue(); for (sal_uInt16 i=0; i<nCount; i++) diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index cb376c5c0271..48ec587da9b1 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -276,11 +276,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA; const SfxPoolItem* pFamItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) ) + if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) ) eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue(); const SfxPoolItem* pNameItem; OUString aStyleName; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, true, &pNameItem )) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pNameItem )) aStyleName = ((const SfxStringItem*)pNameItem)->GetValue(); if ( eFamily == SFX_STYLE_FAMILY_PARA ) // CellStyles { @@ -356,9 +356,9 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA; const SfxPoolItem* pFamItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) ) + if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) ) eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue(); - else if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, true, &pFamItem ) ) + else if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, true, &pFamItem ) ) { OUString sFamily = ((const SfxStringItem*)pFamItem)->GetValue(); if (sFamily.equalsAscii("CellStyles")) @@ -377,11 +377,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_NEW: { const SfxPoolItem* pNameItem; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, true, &pNameItem )) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pNameItem )) aStyleName = ((const SfxStringItem*)pNameItem)->GetValue(); const SfxPoolItem* pRefItem=NULL; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, true, &pRefItem )) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_REFERENCE, true, &pRefItem )) { if(pRefItem!=NULL) aRefName = ((const SfxStringItem*)pRefItem)->GetValue(); @@ -427,7 +427,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_NEW_BY_EXAMPLE: { const SfxPoolItem* pNameItem; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, true, &pNameItem )) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pNameItem )) aStyleName = ((const SfxStringItem*)pNameItem)->GetValue(); pStyleSheet = pStylePool->Find( aStyleName, eFamily ); @@ -443,7 +443,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pItem ) ) { const SfxStringItem* pStrItem = PTR_CAST(SfxStringItem,pItem); @@ -796,7 +796,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) const SfxPoolItem* pItem; if ( rSet.GetItemState( ATTR_VALUE_FORMAT, - false, &pItem ) == SFX_ITEM_SET ) + false, &pItem ) == SfxItemState::SET ) { // NumberFormat Value aus Value und Language // erzeugen und eintueten @@ -827,7 +827,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // (wenn gar kein Item da ist, loescht der Dialog auch das // BORDER_OUTER SvxBoxItem aus dem Vorlagen-Set) - if ( rSet.GetItemState( ATTR_BORDER_INNER, false ) != SFX_ITEM_SET ) + if ( rSet.GetItemState( ATTR_BORDER_INNER, false ) != SfxItemState::SET ) { SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER ); aBoxInfoItem.SetTable(false); // keine inneren Linien @@ -1086,7 +1086,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) //if ( pReqArgs ) //{ // const SfxPoolItem* pItem; - // if(pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET) + // if(pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SfxItemState::SET) // { // String aCode = ((const SfxStringItem*)pItem)->GetValue(); // pTabViewShell->SetNumFmtByStr( aCode ); @@ -1129,7 +1129,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) eType =-1; } - if(SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, true, &pItem) && eType != -1) + if(SfxItemState::SET == pReqArgs->GetItemState(nSlot, true, &pItem) && eType != -1) { OUString aCode = ((const SfxStringItem*)pItem)->GetValue(); sal_uInt16 aLen = aCode.getLength(); @@ -1181,7 +1181,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) if ( pReqArgs ) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) == SfxItemState::SET ) { // We have to accomplish this using ApplyAttributes() // because we also need the language information to be @@ -1200,7 +1200,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) if ( pReqArgs ) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) { sal_uInt16 nFormat = ((SfxInt16Item *)pItem)->GetValue(); switch(nFormat) @@ -1279,7 +1279,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq ) if( pSet ) { const SfxPoolItem* pItem = NULL; - if( pSet->GetItemState(GetPool().GetWhich(nSlot), true, &pItem ) == SFX_ITEM_SET ) + if( pSet->GetItemState(GetPool().GetWhich(nSlot), true, &pItem ) == SfxItemState::SET ) { switch ( nSlot ) @@ -1503,12 +1503,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD; SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD; - if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, true,&pItem ) == SFX_ITEM_SET) + if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, true,&pItem ) == SfxItemState::SET) { pHorJustify = (const SvxHorJustifyItem*)pItem; eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() ); } - if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, true,&pItem ) == SFX_ITEM_SET) + if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, true,&pItem ) == SfxItemState::SET) { pVerJustify = (const SvxVerJustifyItem*)pItem; eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() ); @@ -1795,7 +1795,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) const SfxPoolItem* pItem = 0; if ( pNewAttrs->GetItemState( ATTR_BORDER, true, &pItem ) - == SFX_ITEM_SET ) + == SfxItemState::SET ) { // The SvxFrameToolBoxControl toolbox controller uses a default // SvxBorderLine (all widths 0) to mark the lines that should be set. @@ -1816,7 +1816,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) } if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, true, &pItem ) - == SFX_ITEM_SET ) + == SfxItemState::SET ) { SvxBoxInfoItem aBoxInfoItem( *(const SvxBoxInfoItem*)pItem ); if ( aBoxInfoItem.GetHori() && aBoxInfoItem.GetHori()->GetOutWidth() == 0 ) @@ -1849,7 +1849,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) if(SID_ATTR_BORDER_DIAG_TLBR == nSlot) { - if(SFX_ITEM_SET == pNewAttrs->GetItemState(ATTR_BORDER_TLBR, true, &pItem)) + if(SfxItemState::SET == pNewAttrs->GetItemState(ATTR_BORDER_TLBR, true, &pItem)) { SvxLineItem aItem(ATTR_BORDER_TLBR); aItem.SetLine(((const SvxLineItem&)pNewAttrs->Get(ATTR_BORDER_TLBR)).GetLine()); @@ -1860,7 +1860,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) } else // if( nSlot == SID_ATTR_BORDER_DIAG_BLTR ) { - if(SFX_ITEM_SET == pNewAttrs->GetItemState(ATTR_BORDER_BLTR, true, &pItem )) + if(SfxItemState::SET == pNewAttrs->GetItemState(ATTR_BORDER_BLTR, true, &pItem )) { SvxLineItem aItem(ATTR_BORDER_BLTR); aItem.SetLine(((const SvxLineItem&)pNewAttrs->Get(ATTR_BORDER_BLTR)).GetLine()); @@ -1934,12 +1934,12 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) // choose font info according to selection script type sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0 - if ( rSet.GetItemState( ATTR_FONT ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( ATTR_FONT ) != SfxItemState::UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT, nScript ); } - if ( rSet.GetItemState( ATTR_FONT_HEIGHT ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( ATTR_FONT_HEIGHT ) != SfxItemState::UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT_HEIGHT, nScript ); @@ -1953,7 +1953,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) { rSet.Put( SvxColorItem( rBrushItem.GetColor(), SID_BACKGROUND_COLOR ) ); - if(SFX_ITEM_DONTCARE == rAttrSet.GetItemState(ATTR_BACKGROUND)) + if(SfxItemState::DONTCARE == rAttrSet.GetItemState(ATTR_BACKGROUND)) { rSet.InvalidateItem(SID_BACKGROUND_COLOR); } @@ -2145,12 +2145,12 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) // choose font info according to selection script type sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0 - if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SfxItemState::UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT_WEIGHT, nScript ); } - if ( rSet.GetItemState( ATTR_FONT_POSTURE ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( ATTR_FONT_POSTURE ) != SfxItemState::UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT_POSTURE, nScript ); @@ -2164,7 +2164,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) // Unterstreichung eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem( SID_ULINE_VAL_NONE ); rSet.InvalidateItem( SID_ULINE_VAL_SINGLE ); @@ -2200,7 +2200,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) (const SfxPoolItem**)&pHorJustify ); switch ( eState ) { - case SFX_ITEM_SET: + case SfxItemState::SET: { switch ( SvxCellHorJustify( pHorJustify->GetValue() ) ) { @@ -2231,7 +2231,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: rSet.InvalidateItem( SID_ALIGNLEFT ); rSet.InvalidateItem( SID_ALIGNRIGHT ); rSet.InvalidateItem( SID_ALIGNCENTERHOR ); @@ -2268,7 +2268,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) switch ( eState ) { - case SFX_ITEM_SET: + case SfxItemState::SET: { eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() ); @@ -2294,7 +2294,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: rSet.InvalidateItem( SID_ALIGNTOP ); rSet.InvalidateItem( SID_ALIGNBOTTOM ); rSet.InvalidateItem( SID_ALIGNCENTERVER ); @@ -2327,9 +2327,9 @@ void ScFormatShell::GetBorderState( SfxItemSet& rSet ) pTabViewShell->GetSelectionFrame( aBoxItem, aInfoItem ); - if ( rSet.GetItemState( ATTR_BORDER ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( ATTR_BORDER ) != SfxItemState::UNKNOWN ) rSet.Put( aBoxItem ); - if ( rSet.GetItemState( ATTR_BORDER_INNER ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( ATTR_BORDER_INNER ) != SfxItemState::UNKNOWN ) rSet.Put( aInfoItem ); } @@ -2341,12 +2341,12 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet ) sal_uInt16 nWhich = aIter.FirstWhich(); SvxCellHorJustify eHAlign = SVX_HOR_JUSTIFY_STANDARD; - bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SFX_ITEM_DONTCARE; + bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SfxItemState::DONTCARE; if( bHasHAlign ) eHAlign = (SvxCellHorJustify)((const SvxHorJustifyItem&) rAttrSet.Get( ATTR_HOR_JUSTIFY )).GetValue(); SvxCellVerJustify eVAlign = SVX_VER_JUSTIFY_STANDARD; - bool bHasVAlign = rAttrSet.GetItemState( ATTR_VER_JUSTIFY ) != SFX_ITEM_DONTCARE; + bool bHasVAlign = rAttrSet.GetItemState( ATTR_VER_JUSTIFY ) != SfxItemState::DONTCARE; if( bHasVAlign ) eVAlign = (SvxCellVerJustify)((const SvxVerJustifyItem&) rAttrSet.Get( ATTR_VER_JUSTIFY )).GetValue(); @@ -2399,7 +2399,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) // String aFormatCode; // bleibt leer, wenn dont-care // // const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - // if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SFX_ITEM_DONTCARE ) + // if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SfxItemState::DONTCARE ) // { // sal_uLong nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get( // ATTR_VALUE_FORMAT )).GetValue(); @@ -2417,7 +2417,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) { const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - if(SFX_ITEM_DONTCARE != rAttrSet.GetItemState(ATTR_VALUE_FORMAT)) + if(SfxItemState::DONTCARE != rAttrSet.GetItemState(ATTR_VALUE_FORMAT)) { SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); sal_uInt32 nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get(ATTR_VALUE_FORMAT)).GetValue(); @@ -2456,7 +2456,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) { sal_Int16 aFormatCode = -1; const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) >= SFX_ITEM_DEFAULT ) //Modify for more robust + if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) >= SfxItemState::DEFAULT ) //Modify for more robust { SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); sal_uInt32 nNumberFormat = pTabViewShell->GetSelectionPattern()->GetNumberFormat( pFormatter ); @@ -2596,14 +2596,14 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); bool bVertDontCare = - (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SFX_ITEM_DONTCARE) || - (rAttrSet.GetItemState( ATTR_STACKED ) == SFX_ITEM_DONTCARE); + (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SfxItemState::DONTCARE) || + (rAttrSet.GetItemState( ATTR_STACKED ) == SfxItemState::DONTCARE); bool bLeftRight = !bVertDontCare && !((const SfxBoolItem&) rAttrSet.Get( ATTR_STACKED )).GetValue(); bool bTopBottom = !bVertDontCare && !bLeftRight && ((const SfxBoolItem&) rAttrSet.Get( ATTR_VERTICAL_ASIAN )).GetValue(); - bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE); + bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SfxItemState::DONTCARE); EEHorizontalTextDirection eBidiDir = EE_HTEXTDIR_DEFAULT; if ( !bBidiDontCare ) { diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 23300387d009..a52e4f738eec 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -169,7 +169,7 @@ public: void SetShrinkScale( long nScale, sal_uInt8 nScript ); - bool HasCondHeight() const { return pCondSet && SFX_ITEM_SET == + bool HasCondHeight() const { return pCondSet && SfxItemState::SET == pCondSet->GetItemState( ATTR_FONT_HEIGHT, true ); } bool HasEditCharacters() const; @@ -450,10 +450,10 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt sal_uLong nOld = nValueFormat; 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 = &pPattern->GetItem(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 = &pPattern->GetItem(ATTR_LANGUAGE_FORMAT); nValueFormat = pOutput->mpDoc->GetFormatTable()->GetFormatForLanguageIfBuiltIn( ((SfxUInt32Item*)pFormItem)->GetValue(), @@ -1617,11 +1617,11 @@ void ScOutputData::DrawStrings( bool bPixelToLogic ) else if ( SfxItemSet* pFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, nTab ) ) { const SfxPoolItem* pItem; - if ( pFontSet->GetItemState( ATTR_FONT, true, &pItem ) == SFX_ITEM_SET ) + if ( pFontSet->GetItemState( ATTR_FONT, true, &pItem ) == SfxItemState::SET ) pAltPattern->GetItemSet().Put( (const SvxFontItem&)*pItem ); - if ( pFontSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) == SFX_ITEM_SET ) + if ( pFontSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) == SfxItemState::SET ) pAltPattern->GetItemSet().Put( (const SvxFontItem&)*pItem ); - if ( pFontSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) == SFX_ITEM_SET ) + if ( pFontSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) == SfxItemState::SET ) pAltPattern->GetItemSet().Put( (const SvxFontItem&)*pItem ); } pPattern = pAltPattern; @@ -2379,19 +2379,19 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) if ( mpPreviewFontSet ) { const SfxPoolItem* pItem; - if ( mpPreviewFontSet->GetItemState( ATTR_FONT, true, &pItem ) == SFX_ITEM_SET ) + if ( mpPreviewFontSet->GetItemState( ATTR_FONT, true, &pItem ) == SfxItemState::SET ) { SvxFontItem aFontItem(EE_CHAR_FONTINFO); aFontItem = (const SvxFontItem&)*pItem; pSet->Put( aFontItem ); } - if ( mpPreviewFontSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) == SFX_ITEM_SET ) + if ( mpPreviewFontSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) == SfxItemState::SET ) { SvxFontItem aCjkFontItem(EE_CHAR_FONTINFO_CJK); aCjkFontItem = (const SvxFontItem&)*pItem; pSet->Put( aCjkFontItem ); } - if ( mpPreviewFontSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) == SFX_ITEM_SET ) + if ( mpPreviewFontSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) == SfxItemState::SET ) { SvxFontItem aCtlFontItem(EE_CHAR_FONTINFO_CTL); aCtlFontItem = (const SvxFontItem&)*pItem; @@ -2986,7 +2986,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) //! Allow clipping when vertically merged? if ( eType != OUTTYPE_PRINTER || ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) || - ( rParam.mpCondSet && SFX_ITEM_SET == + ( rParam.mpCondSet && SfxItemState::SET == rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) ) bClip = true; else @@ -3200,7 +3200,7 @@ bool ScOutputData::Clip( DrawEditParam& rParam, const Size& aCellSize, //! Allow clipping when vertically merged? if ( eType != OUTTYPE_PRINTER || ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) || - ( rParam.mpCondSet && SFX_ITEM_SET == + ( rParam.mpCondSet && SfxItemState::SET == rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) ) bClip = true; else @@ -3962,7 +3962,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam) //! Allow clipping when vertically merged? if ( eType != OUTTYPE_PRINTER || ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) || - ( rParam.mpCondSet && SFX_ITEM_SET == + ( rParam.mpCondSet && SfxItemState::SET == rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) ) bClip = true; else @@ -4310,7 +4310,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam) //! Allow clipping when vertically merged? if ( eType != OUTTYPE_PRINTER || ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) || - ( rParam.mpCondSet && SFX_ITEM_SET == + ( rParam.mpCondSet && SfxItemState::SET == rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) ) bClip = true; else diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index bd7d984e8d81..f6b3f31c8248 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -1184,7 +1184,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) else if( bHeaderRulerMove && bHeaderRulerChange ) { const SfxPoolItem* pItem = NULL; - if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SFX_ITEM_SET ) + if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET ) { SfxItemSet& pHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); Size aHeaderSize = ((const SvxSizeItem&)pHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize(); @@ -1199,7 +1199,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) else if( bFooterRulerMove && bFooterRulerChange ) { const SfxPoolItem* pItem = NULL; - if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SFX_ITEM_SET ) + if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET ) { SfxItemSet& pFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); Size aFooterSize = ((const SvxSizeItem&)pFooterSet.Get(ATTR_PAGE_SIZE)).GetSize(); diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 25fbbb2958ce..e1c9a71cf206 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -722,7 +722,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem; eZoom = SVX_ZOOM_PERCENT; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, true, &pItem ) ) + if( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, true, &pItem ) ) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem*)pItem)->GetValue(); if( nCurrentZoom ) @@ -742,7 +742,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE ); OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" ); - if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, true, &pItem ) ) + if ( pReqArgs && pStyleSheet && SfxItemState::SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, true, &pItem ) ) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SfxItemSet& rSet = pStyleSheet->GetItemSet(); diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 129486f07c0b..7160b05019cd 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -826,7 +826,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) const SvxSetItem* pHeaderSetItem; const SfxItemSet* pHeaderSet = NULL; if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, false, - (const SfxPoolItem**)&pHeaderSetItem ) == SFX_ITEM_SET ) + (const SfxPoolItem**)&pHeaderSetItem ) == SfxItemState::SET ) { pHeaderSet = &pHeaderSetItem->GetItemSet(); // Headline has space below @@ -842,7 +842,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) const SvxSetItem* pFooterSetItem; const SfxItemSet* pFooterSet = NULL; if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, false, - (const SfxPoolItem**)&pFooterSetItem ) == SFX_ITEM_SET ) + (const SfxPoolItem**)&pFooterSetItem ) == SfxItemState::SET ) { pFooterSet = &pFooterSetItem->GetItemSet(); // Footline has space above @@ -861,19 +861,19 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, false, (const SfxPoolItem**)&pScaleItem ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) pScaleItem = (const SfxUInt16Item*) &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALE ); eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, false, (const SfxPoolItem**)&pScaleToItem ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) pScaleToItem = (const ScPageScaleToItem*) &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETO ); eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false, (const SfxPoolItem**)&pScaleToPagesItem ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) pScaleToPagesItem = (const SfxUInt16Item*) &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETOPAGES ); diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index c29ac7daf37f..ce22a5f73415 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -101,7 +101,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) if (nNewId == SID_INSERT_DRAW && pArgs) { const SfxPoolItem* pItem; - if ( pArgs->GetItemState( SID_INSERT_DRAW, true, &pItem ) == SFX_ITEM_SET && + if ( pArgs->GetItemState( SID_INSERT_DRAW, true, &pItem ) == SfxItemState::SET && pItem->ISA( SvxDrawToolItem ) ) { SvxDrawToolEnum eSel = (SvxDrawToolEnum)((const SvxDrawToolItem*)pItem)->GetValue(); @@ -138,7 +138,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) if ( nNewId == SID_FM_CREATE_CONTROL && pArgs ) { const SfxPoolItem* pItem; - if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, true, &pItem ) == SFX_ITEM_SET && + if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, true, &pItem ) == SfxItemState::SET && pItem->ISA( SfxUInt16Item ) ) nNewFormId = ((const SfxUInt16Item*)pItem)->GetValue(); } @@ -147,7 +147,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) if ( pArgs ) { const SfxPoolItem* pItem; - if ( pArgs->GetItemState( nNewId, true, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) ) + if ( pArgs->GetItemState( nNewId, true, &pItem ) == SfxItemState::SET && pItem->ISA( SfxStringItem ) ) sStringItemValue = static_cast<const SfxStringItem*>(pItem)->GetValue(); } bool bSwitchCustom = ( !sStringItemValue.isEmpty() && !sDrawCustom.isEmpty() && sStringItemValue != sDrawCustom ); diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 0676d4355cad..d32a366b4880 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -107,14 +107,14 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(FID_INSERT_FILE,true,&pItem) == SFX_ITEM_SET ) + pReqArgs->GetItemState(FID_INSERT_FILE,true,&pItem) == SfxItemState::SET ) { OUString aFileName = ((const SfxStringItem*)pItem)->GetValue(); // Einfuege-Position Point aInsertPos; - if ( pReqArgs->GetItemState(FN_PARAM_1,true,&pItem) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState(FN_PARAM_1,true,&pItem) == SfxItemState::SET ) aInsertPos = ((const SfxPointItem*)pItem)->GetValue(); else aInsertPos = GetInsertPos(); @@ -122,7 +122,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) // als Link? bool bAsLink = false; - if ( pReqArgs->GetItemState(FN_PARAM_2,true,&pItem) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState(FN_PARAM_2,true,&pItem) == SfxItemState::SET ) bAsLink = ((const SfxBoolItem*)pItem)->GetValue(); // ausfuehren @@ -150,13 +150,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) OUString aColStr; bool bEntire = false; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, true, &pItem ) == SfxItemState::SET ) aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SfxItemState::SET ) aRowStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_3, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_3, true, &pItem ) == SfxItemState::SET ) aColStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_4, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_4, true, &pItem ) == SfxItemState::SET ) bEntire = static_cast<const SfxBoolItem*>(pItem)->GetValue(); SetPrintRanges( bEntire, &aPrintStr, &aColStr, &aRowStr, false ); @@ -174,7 +174,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { OUString aPrintStr; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, true, &pItem ) == SfxItemState::SET ) aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); SetPrintRanges( false, &aPrintStr, NULL, NULL, bAdd ); } @@ -224,10 +224,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { OUString aAddress; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) aAddress = ((const SfxStringItem*)pItem)->GetValue(); else if ( nSlot == SID_JUMPTOMARK && pReqArgs->GetItemState( - SID_JUMPTOMARK, true, &pItem ) == SFX_ITEM_SET ) + SID_JUMPTOMARK, true, &pItem ) == SfxItemState::SET ) aAddress = ((const SfxStringItem*)pItem)->GetValue(); // #i14927# SID_CURRENTCELL with a single cell must unmark if FN_PARAM_1 @@ -235,11 +235,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) // ScGridWindow::MouseButtonUp no longer executes the slot for a single // cell if there is a multi selection. bool bUnmark = ( nSlot == SID_CURRENTCELL ); - if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET ) bUnmark = ((const SfxBoolItem*)pItem)->GetValue(); bool bAlignToCursor = true; - if (pReqArgs->GetItemState(FN_PARAM_2, true, &pItem) == SFX_ITEM_SET) + if (pReqArgs->GetItemState(FN_PARAM_2, true, &pItem) == SfxItemState::SET) bAlignToCursor = static_cast<const SfxBoolItem*>(pItem)->GetValue(); if ( nSlot == SID_JUMPTOMARK ) @@ -520,7 +520,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) // check whether there is an explicit argument, use it const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET ) { bool bItemValue = ((const SfxBoolItem*)pItem)->GetValue(); bWantPageBreak = (nSlot == FID_PAGEBREAKMODE) == bItemValue; @@ -561,7 +561,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { bool bSet = !GetViewData().IsSyntaxMode(); const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); GetViewData().SetSyntaxMode( bSet ); PaintGrid(); @@ -574,7 +574,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { bool bSet = !GetViewData().IsHeaderMode(); const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); GetViewData().SetHeaderMode( bSet ); RepeatResize(); @@ -590,7 +590,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) const ScViewOptions& rOpts = rViewData.GetOptions(); bool bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS ); const SfxPoolItem *pItem; - if( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET ) + if( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET ) bFormulaMode = ((const SfxBoolItem *)pItem)->GetValue(); ScViewOptions rSetOpts = ScViewOptions( rOpts ); @@ -611,7 +611,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId ); bool bSet = ( pWnd == NULL ); const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); pThisFrame->SetChildWindow( nId, bSet ); @@ -736,7 +736,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem = NULL; bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); - if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem) == SfxItemState::SET ) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); if( nCurrentZoom ) @@ -931,7 +931,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET && + pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET && pItem->ISA( SfxStringItem ) ) { OUString aComment = ((const SfxStringItem*)pItem)->GetValue(); diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 0d90705a650f..adde73054bbb 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -535,7 +535,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); const SfxPoolItem* pItem=NULL; - if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,true,&pItem)==SFX_ITEM_SET) + if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,true,&pItem)==SfxItemState::SET) { UpdateNumberFormatter((const SvxNumberInfoItem&)*pItem); @@ -744,7 +744,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq ) switch (nSlotId) { case SID_GRID_VISIBLE: - if ( pArgs && pArgs->GetItemState(nSlotId,true,&pItem) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState(nSlotId,true,&pItem) == SfxItemState::SET ) { aGridOptions.SetGridVisible( ((const SfxBoolItem*)pItem)->GetValue() ); aViewOptions.SetGridOptions(aGridOptions); @@ -753,7 +753,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq ) break; case SID_GRID_USE: - if ( pArgs && pArgs->GetItemState(nSlotId,true,&pItem) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState(nSlotId,true,&pItem) == SfxItemState::SET ) { aGridOptions.SetUseGridSnap( ((const SfxBoolItem*)pItem)->GetValue() ); aViewOptions.SetGridOptions(aGridOptions); @@ -762,7 +762,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq ) break; case SID_HELPLINES_MOVE: - if ( pArgs && pArgs->GetItemState(nSlotId,true,&pItem) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState(nSlotId,true,&pItem) == SfxItemState::SET ) { aViewOptions.SetOption( VOPT_HELPLINES, ((const SfxBoolItem*)pItem)->GetValue() ); rBindings.Invalidate(SID_HELPLINES_MOVE); diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index e42950bdc9e0..3e4ddf8ddb67 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -506,7 +506,7 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) sal_uInt16 nCount = 1; const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET ) nCount = ((const SfxUInt16Item*)pItem)->GetValue(); // lock paint for more than one cell undo action (not for editing within a cell) diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 5a58806d589f..72e10f842bc6 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -225,7 +225,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) case FID_SEARCH_NOW: { if ( pReqArgs && - SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem) ) + SfxItemState::SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem) ) { OSL_ENSURE( pItem->ISA(SvxSearchItem), "falsches Item" ); const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem; @@ -257,7 +257,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) break; case SID_SEARCH_ITEM: - if (pReqArgs && SFX_ITEM_SET == + if (pReqArgs && SfxItemState::SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem)) { // Search-Item merken @@ -274,7 +274,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) case FID_REPLACE_ALL: case FID_SEARCH_ALL: { - if (pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, false, &pItem)) + if (pReqArgs && SfxItemState::SET == pReqArgs->GetItemState(nSlot, false, &pItem)) { // SearchItem holen @@ -283,7 +283,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) // SearchItem fuellen aSearchItem.SetSearchString(((SfxStringItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == pReqArgs->GetItemState(FN_PARAM_1, false, &pItem)) + if(SfxItemState::SET == pReqArgs->GetItemState(FN_PARAM_1, false, &pItem)) aSearchItem.SetReplaceString(((SfxStringItem*)pItem)->GetValue()); if (nSlot == FID_SEARCH) diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index 4ece0051951a..05ba436ebf8e 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -98,7 +98,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) { bool bDone = false; const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState( nSlotId, true, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState( nSlotId, true, &pItem ) == SfxItemState::SET ) { long nNewVal = ((const SfxInt32Item*)pItem)->GetValue(); if ( nNewVal < 0 ) diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 410eae91c080..50c517debd04 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2852,10 +2852,10 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, true, &pBLTRItem ); // any of the lines visible? - if( (eItemState != SFX_ITEM_DEFAULT) || (eTLBRState != SFX_ITEM_DEFAULT) || (eBLTRState != SFX_ITEM_DEFAULT) ) + if( (eItemState != SfxItemState::DEFAULT) || (eTLBRState != SfxItemState::DEFAULT) || (eBLTRState != SfxItemState::DEFAULT) ) { // none of the lines don't care? - if( (eItemState != SFX_ITEM_DONTCARE) && (eTLBRState != SFX_ITEM_DONTCARE) && (eBLTRState != SFX_ITEM_DONTCARE) ) + if( (eItemState != SfxItemState::DONTCARE) && (eTLBRState != SfxItemState::DONTCARE) && (eBLTRState != SfxItemState::DONTCARE) ) { boost::scoped_ptr<SfxItemSet> pOldSet(new SfxItemSet( *(pDoc->GetPool()), @@ -2910,7 +2910,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, ApplyAttributes( pNewSet.get(), pOldSet.get() ); } - else // if ( eItemState == SFX_ITEM_DONTCARE ) + else // if ( eItemState == SfxItemState::DONTCARE ) { aFuncMark.MarkToMulti(); pDoc->ApplySelectionLineStyle( aFuncMark, pLine, bColorOnly ); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 1993cca5d2a7..a7ed961f7943 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -885,7 +885,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, ScPatternAttr aNewAttrs( new SfxItemSet(*pDialogSet) ); aNewAttrs.DeleteUnchanged( &aOldAttrs ); - if ( pDialogSet->GetItemState( ATTR_VALUE_FORMAT ) == SFX_ITEM_SET ) + if ( pDialogSet->GetItemState( ATTR_VALUE_FORMAT ) == SfxItemState::SET ) { // don't reset to default SYSTEM GENERAL if not intended sal_uInt32 nOldFormat = ((const SfxUInt32Item&)pOldSet->Get( ATTR_VALUE_FORMAT )).GetValue(); @@ -934,8 +934,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, * */ - bool bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT) - || (pDialogSet->GetItemState( ATTR_BORDER_INNER ) != SFX_ITEM_DEFAULT); + bool bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SfxItemState::DEFAULT) + || (pDialogSet->GetItemState( ATTR_BORDER_INNER ) != SfxItemState::DEFAULT); if ( pNewOuter==pOldOuter && pNewInner==pOldInner ) bFrame = false; @@ -1096,13 +1096,13 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, bRecord = false; // State from old ItemSet doesn't matter for paint flags, as any change will be - // from SFX_ITEM_SET in the new ItemSet (default is ignored in ApplyPattern). + // from SfxItemState::SET in the new ItemSet (default is ignored in ApplyPattern). // New alignment is checked (check in PostPaint isn't enough) in case a right // alignment is changed to left. const SfxItemSet& rNewSet = rAttr.GetItemSet(); - bool bSetLines = rNewSet.GetItemState( ATTR_BORDER, true ) == SFX_ITEM_SET || - rNewSet.GetItemState( ATTR_SHADOW, true ) == SFX_ITEM_SET; - bool bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, true ) == SFX_ITEM_SET; + bool bSetLines = rNewSet.GetItemState( ATTR_BORDER, true ) == SfxItemState::SET || + rNewSet.GetItemState( ATTR_SHADOW, true ) == SfxItemState::SET; + bool bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, true ) == SfxItemState::SET; sal_uInt16 nExtFlags = 0; if ( bSetLines ) @@ -1231,7 +1231,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich ) { const SfxPoolItem* pItem = 0; - if ( rNewSet.GetItemState( nWhich, true, &pItem ) == SFX_ITEM_SET && pItem ) + if ( rNewSet.GetItemState( nWhich, true, &pItem ) == SfxItemState::SET && pItem ) { PropertyEntryVector_t::const_iterator aIt = aPropVector.begin(); while ( aIt != aPropVector.end()) @@ -2888,9 +2888,9 @@ void ScViewFunc::UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAt if ( pAttr ) { const SfxItemSet& rNewSet = pAttr->GetItemSet(); - bSetLines = rNewSet.GetItemState( ATTR_BORDER, true ) == SFX_ITEM_SET || - rNewSet.GetItemState( ATTR_SHADOW, true ) == SFX_ITEM_SET; - bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, true ) == SFX_ITEM_SET; + bSetLines = rNewSet.GetItemState( ATTR_BORDER, true ) == SfxItemState::SET || + rNewSet.GetItemState( ATTR_SHADOW, true ) == SfxItemState::SET; + bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, true ) == SfxItemState::SET; } sal_uInt16 nExtFlags = 0; diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 17f6008421f2..628c735faebd 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -59,9 +59,9 @@ void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSe SfxItemPool& rPool = *rShellSet.GetPool(); SvxScriptSetItem aSetItem( rPool.GetSlotId(nWhichId), rPool ); - // use PutExtended with eDefaultAs = SFX_ITEM_SET, so defaults from rCoreSet + // use PutExtended with eDefaultAs = SfxItemState::SET, so defaults from rCoreSet // (document pool) are read and put into rShellSet (MessagePool) - aSetItem.GetItemSet().PutExtended( rCoreSet, SFX_ITEM_DONTCARE, SFX_ITEM_SET ); + aSetItem.GetItemSet().PutExtended( rCoreSet, SfxItemState::DONTCARE, SfxItemState::SET ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript ); if (pI) rShellSet.Put( *pI, nWhichId ); @@ -371,7 +371,7 @@ bool ScViewUtil::IsFullScreen( SfxViewShell& rViewShell ) SfxPoolItem* pItem = 0; bool bIsFullScreen = false; - if (rBindings.QueryState( SID_WIN_FULLSCREEN, pItem ) >= SFX_ITEM_DEFAULT) + if (rBindings.QueryState( SID_WIN_FULLSCREEN, pItem ) >= SfxItemState::DEFAULT) bIsFullScreen = static_cast< SfxBoolItem* >( pItem )->GetValue(); delete pItem; diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index ee75b7d6c9c7..75e41fb8b085 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1905,7 +1905,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR nFontHeight = long(nFontHeight * (double) aFractY); rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT)); - if( SFX_ITEM_DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) { rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CJK); nFontHeight = rOldHgt.GetHeight(); @@ -1913,7 +1913,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK)); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) { rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CTL); nFontHeight = rOldHgt.GetHeight(); @@ -1944,7 +1944,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR nFontHeight = long(nFontHeight * (double) aFractY); aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT)); - if( SFX_ITEM_DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) + if( SfxItemState::DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) ) { rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CJK); nFontHeight = rOldHgt.GetHeight(); @@ -1952,7 +1952,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK)); } - if( SFX_ITEM_DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) + if( SfxItemState::DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) ) { rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CTL); nFontHeight = rOldHgt.GetHeight(); @@ -1972,7 +1972,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR // Special treatment: only the valid parts // of the BulletItems - if (aTempSet.GetItemState(EE_PARA_BULLET) == SFX_ITEM_DEFAULT) + if (aTempSet.GetItemState(EE_PARA_BULLET) == SfxItemState::DEFAULT) { SvxBulletItem aOldBulItem((SvxBulletItem&) pOutlineSheet->GetItemSet().Get(EE_PARA_BULLET)); SvxBulletItem& rNewBulItem = (SvxBulletItem&) aTempSet.Get(EE_PARA_BULLET); diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index b8ef36d62f89..07983588f9a9 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -495,7 +495,7 @@ void SdPage::getAlienAttributes( com::sun::star::uno::Any& rAttributes ) { const SfxPoolItem* pItem; - if( (mpItems == NULL) || ( SFX_ITEM_SET != mpItems->GetItemState( SDRATTR_XMLATTRIBUTES, false, &pItem ) ) ) + if( (mpItems == NULL) || ( SfxItemState::SET != mpItems->GetItemState( SDRATTR_XMLATTRIBUTES, false, &pItem ) ) ) { SvXMLAttrContainerItem aAlienAttributes; aAlienAttributes.QueryValue( rAttributes, 0 ); diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 757c378b6854..73bb35c8d25f 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -559,13 +559,13 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems) if (eFamily == SD_STYLE_FAMILY_MASTERPAGE && aStyleName.indexOf(OUString(SdResId(STR_LAYOUT_OUTLINE))) != -1 && - rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SFX_ITEM_SET) + rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SfxItemState::SET) { const SfxItemSet* pCurSet = &GetItemSet(); sal_uInt32 nNewHeight = ((SvxFontHeightItem&)rSet.Get(EE_CHAR_FONTHEIGHT)).GetHeight(); sal_uInt32 nOldHeight = ((SvxFontHeightItem&)pCurSet->Get(EE_CHAR_FONTHEIGHT)).GetHeight(); - if (rSet.GetItemState(EE_PARA_BULLET) != SFX_ITEM_SET || !bOnlyMissingItems) + if (rSet.GetItemState(EE_PARA_BULLET) != SfxItemState::SET || !bOnlyMissingItems) { const SvxBulletItem& rBItem = (const SvxBulletItem&)pCurSet->Get(EE_PARA_BULLET); double fBulletFraction = double(rBItem.GetWidth()) / nOldHeight; @@ -574,7 +574,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems) rSet.Put(aNewBItem); } - if (rSet.GetItemState(EE_PARA_LRSPACE) != SFX_ITEM_SET || !bOnlyMissingItems) + if (rSet.GetItemState(EE_PARA_LRSPACE) != SfxItemState::SET || !bOnlyMissingItems) { const SvxLRSpaceItem& rLRItem = (const SvxLRSpaceItem&)pCurSet->Get(EE_PARA_LRSPACE); double fIndentFraction = double(rLRItem.GetTxtLeft()) / nOldHeight; @@ -585,7 +585,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems) rSet.Put(aNewLRItem); } - if (rSet.GetItemState(EE_PARA_ULSPACE) != SFX_ITEM_SET || !bOnlyMissingItems) + if (rSet.GetItemState(EE_PARA_ULSPACE) != SfxItemState::SET || !bOnlyMissingItems) { const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pCurSet->Get(EE_PARA_ULSPACE); SvxULSpaceItem aNewULItem(rULItem); @@ -1111,7 +1111,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro const SfxPoolItem* pItem; SfxItemSet& rStyleSet = GetItemSet(); - if( rStyleSet.GetItemState( pEntry->nWID, true, &pItem ) == SFX_ITEM_SET ) + if( rStyleSet.GetItemState( pEntry->nWID, true, &pItem ) == SfxItemState::SET ) aSet.Put( *pItem ); if( !aSet.Count() ) @@ -1173,8 +1173,8 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN { const SfxItemSet& rSet = GetItemSet(); - if( rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SFX_ITEM_SET || - rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SFX_ITEM_SET ) + if( rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET || + rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET ) { return PropertyState_DIRECT_VALUE; } @@ -1191,11 +1191,11 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN switch( rStyleSet.GetItemState( pEntry->nWID, false ) ) { - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: + case SfxItemState::READONLY: + case SfxItemState::SET: eState = PropertyState_DIRECT_VALUE; break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: eState = PropertyState_DEFAULT_VALUE; break; default: diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 322624a07498..727fba485427 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -309,7 +309,7 @@ bool SdGRFFilter::Export() } // take selection if needed - if( ( SFX_ITEM_SET == pSet->GetItemState( SID_SELECTION ) ) + if( ( SfxItemState::SET == pSet->GetItemState( SID_SELECTION ) ) && static_cast< const SfxBoolItem& >( pSet->Get( SID_SELECTION ) ).GetValue() && pDrawViewShell ) { diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 0dc8bd793350..ae36786ef1e5 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -833,7 +833,7 @@ void HtmlExport::SetDocColors( SdPage* pPage ) if(pSheet) { SfxItemSet& rSet = pSheet->GetItemSet(); - if(rSet.GetItemState(EE_CHAR_COLOR,true) == SFX_ITEM_SET) + if(rSet.GetItemState(EE_CHAR_COLOR,true) == SfxItemState::SET) maTextColor = ((SvxColorItem*)rSet.GetItem(EE_CHAR_COLOR,true))->GetValue(); } @@ -1462,7 +1462,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState return OUString(); OUString aLink, aTarget; - if ( pSet->GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_SET ) + if ( pSet->GetItemState( EE_FEATURE_FIELD ) == SfxItemState::SET ) { SvxFieldItem* pItem = (SvxFieldItem*)pSet->GetItem( EE_FEATURE_FIELD ); if(pItem) @@ -1479,7 +1479,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState bool bTemp; OUString aTemp; - if ( pSet->GetItemState( EE_CHAR_WEIGHT ) == SFX_ITEM_SET ) + if ( pSet->GetItemState( EE_CHAR_WEIGHT ) == SfxItemState::SET ) { bTemp = ((const SvxWeightItem&)pSet->Get( EE_CHAR_WEIGHT )).GetWeight() == WEIGHT_BOLD; aTemp = pState->SetWeight( bTemp ); @@ -1489,7 +1489,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState aStr.append(aTemp); } - if ( pSet->GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_SET ) + if ( pSet->GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) { bTemp = ((const SvxUnderlineItem&)pSet->Get( EE_CHAR_UNDERLINE )).GetLineStyle() != UNDERLINE_NONE; aTemp = pState->SetUnderline( bTemp ); @@ -1499,7 +1499,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState aStr.append(aTemp); } - if ( pSet->GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_SET ) + if ( pSet->GetItemState( EE_CHAR_STRIKEOUT ) == SfxItemState::SET ) { bTemp = ((const SvxCrossedOutItem&)pSet->Get( EE_CHAR_STRIKEOUT )).GetStrikeout() != STRIKEOUT_NONE; aTemp = pState->SetStrikeout( bTemp ); @@ -1509,7 +1509,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState aStr.append(aTemp); } - if ( pSet->GetItemState( EE_CHAR_ITALIC ) == SFX_ITEM_SET ) + if ( pSet->GetItemState( EE_CHAR_ITALIC ) == SfxItemState::SET ) { bTemp = ((const SvxPostureItem&)pSet->Get( EE_CHAR_ITALIC )).GetPosture() != ITALIC_NONE; aTemp = pState->SetItalic( bTemp ); @@ -1521,7 +1521,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState if(mbDocColors) { - if ( pSet->GetItemState( EE_CHAR_COLOR ) == SFX_ITEM_SET ) + if ( pSet->GetItemState( EE_CHAR_COLOR ) == SfxItemState::SET ) { Color aTextColor = ((const SvxColorItem&) pSet->Get( EE_CHAR_COLOR )).GetValue(); if( aTextColor == COL_AUTO ) diff --git a/sd/source/filter/html/sdhtmlfilter.cxx b/sd/source/filter/html/sdhtmlfilter.cxx index f4f6e0cb28ed..524362204768 100644 --- a/sd/source/filter/html/sdhtmlfilter.cxx +++ b/sd/source/filter/html/sdhtmlfilter.cxx @@ -61,10 +61,10 @@ bool SdHTMLFilter::Export() const SfxPoolItem* pItem; - if ( pSet->GetItemState( SID_FILTER_DATA, false, &pItem ) == SFX_ITEM_SET ) + if ( pSet->GetItemState( SID_FILTER_DATA, false, &pItem ) == SfxItemState::SET ) ((SfxUnoAnyItem*)pItem)->GetValue() >>= aParams; - 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(); HtmlExport aExport(mrMedium.GetName(), aParams, sFilterOptions, &mrDocument, &mrDocShell); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 12a89b9e49bd..8f35f43c1628 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -145,7 +145,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvSto { SfxItemSet& rSet = pSheet->GetItemSet(); // if autokerning is set in style, override it, ppt has no autokerning - if( rSet.GetItemState( EE_CHAR_PAIRKERNING, false ) == SFX_ITEM_SET ) + if( rSet.GetItemState( EE_CHAR_PAIRKERNING, false ) == SfxItemState::SET ) rSet.ClearItem( EE_CHAR_PAIRKERNING ); } } diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx index cb9e1854d8ac..3b3f1d036a43 100644 --- a/sd/source/filter/xml/sdtransform.cxx +++ b/sd/source/filter/xml/sdtransform.cxx @@ -223,7 +223,7 @@ void SdTransformOOo2xDocument::transformTextShape( SdrTextObj& rTextShape ) // now set all none hard attributes from the style while(nWhich) { - if(SFX_ITEM_SET != aParaSet.GetItemState(nWhich, true)) + if(SfxItemState::SET != aParaSet.GetItemState(nWhich, true)) { aParaSet.Put(rStyleSet.Get(nWhich)); bItemChange = true; @@ -274,7 +274,7 @@ bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, SfxStyleS bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, sal_uInt16 nWhich, bool& rState ) { - if( (rSet.GetItemState( nWhich ) == SFX_ITEM_SET) ) + if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) ) { const SvXMLAttrContainerItem& rAttr = *static_cast< const SvXMLAttrContainerItem* >( rSet.GetItem( nWhich ) ); @@ -320,7 +320,7 @@ bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet ) bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet, sal_uInt16 nWhich ) { - if( (rSet.GetItemState( nWhich ) == SFX_ITEM_SET) ) + if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) ) { const SvXMLAttrContainerItem& rAttr = *static_cast< const SvXMLAttrContainerItem* >( rSet.GetItem( nWhich ) ); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 71e99321b3af..1c10fddcf32c 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -303,7 +303,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, true, &pPoolItem ) ) { OUString sAuthor( (( const SfxStringItem* ) pPoolItem )->GetValue() ); DeleteAnnotationsByAuthor( sAuthor ); @@ -319,7 +319,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETE_POSTIT, true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_DELETE_POSTIT, true, &pPoolItem ) ) ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue() >>= xAnnotation; } } @@ -419,7 +419,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( rReq.GetSlot(), true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( rReq.GetSlot(), true, &pPoolItem ) ) ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue() >>= xAnnotation; } @@ -947,25 +947,25 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation { SfxItemSet aSet(pAnnotationWindow->getView()->GetAttribs()); - if ( aSet.GetItemState( EE_CHAR_WEIGHT ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_WEIGHT ) == SfxItemState::SET ) { if( ((const SvxWeightItem&)aSet.Get( EE_CHAR_WEIGHT )).GetWeight() == WEIGHT_BOLD ) pMenu->CheckItem( SID_ATTR_CHAR_WEIGHT ); } - if ( aSet.GetItemState( EE_CHAR_ITALIC ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_ITALIC ) == SfxItemState::SET ) { if( ((const SvxPostureItem&)aSet.Get( EE_CHAR_ITALIC )).GetPosture() != ITALIC_NONE ) pMenu->CheckItem( SID_ATTR_CHAR_POSTURE ); } - if ( aSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) { if( ((const SvxUnderlineItem&)aSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() != UNDERLINE_NONE ) pMenu->CheckItem( SID_ATTR_CHAR_UNDERLINE ); } - if ( aSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( EE_CHAR_STRIKEOUT ) == SfxItemState::SET ) { if( ((const SvxCrossedOutItem&)aSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() != STRIKEOUT_NONE ) pMenu->CheckItem( SID_ATTR_CHAR_STRIKEOUT ); diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index ccaafc5776fc..77a34765c753 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -107,7 +107,7 @@ void SdModule::Execute(SfxRequest& rReq) { // automatic spell checker const SfxPoolItem* pItem; - if( pSet && SFX_ITEM_SET == pSet->GetItemState( + if( pSet && SfxItemState::SET == pSet->GetItemState( SID_AUTOSPELL_CHECK, false, &pItem ) ) { bool bOnlineSpelling = ( (const SfxBoolItem*) pItem )->GetValue(); @@ -125,7 +125,7 @@ void SdModule::Execute(SfxRequest& rReq) case SID_ATTR_METRIC: { const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_METRIC, true, &pItem ) ) + if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_ATTR_METRIC, true, &pItem ) ) { FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue(); switch( eUnit ) @@ -164,9 +164,9 @@ void SdModule::Execute(SfxRequest& rReq) const SfxPoolItem* pItem; if( pSet && ( - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, false, &pItem ) || - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem ) || - SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem ) + SfxItemState::SET == pSet->GetItemState(SID_ATTR_LANGUAGE, false, &pItem ) || + SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem ) || + SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem ) ) ) { @@ -320,7 +320,7 @@ static bool bOnce = false; void SdModule::GetState(SfxItemSet& rItemSet) { // disable Autopilot during presentation - if (rItemSet.GetItemState(SID_SD_AUTOPILOT) != SFX_ITEM_UNKNOWN) + if (rItemSet.GetItemState(SID_SD_AUTOPILOT) != SfxItemState::UNKNOWN) { if (!SvtModuleOptions().IsImpress()) { @@ -343,7 +343,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) } } - if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_METRIC ) ) + if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_METRIC ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() ); if(pDocSh) @@ -356,7 +356,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) } // state of SID_OPENDOC is determined by the base class - if (rItemSet.GetItemState(SID_OPENDOC) != SFX_ITEM_UNKNOWN) + if (rItemSet.GetItemState(SID_OPENDOC) != SfxItemState::UNKNOWN) { const SfxPoolItem* pItem = SfxGetpApp()->GetSlotState(SID_OPENDOC, SfxGetpApp()->GetInterface()); if (pItem) @@ -364,14 +364,14 @@ void SdModule::GetState(SfxItemSet& rItemSet) } // state of SID_OPENHYPERLINK is determined by the base class - if (rItemSet.GetItemState(SID_OPENHYPERLINK) != SFX_ITEM_UNKNOWN) + if (rItemSet.GetItemState(SID_OPENHYPERLINK) != SfxItemState::UNKNOWN) { const SfxPoolItem* pItem = SfxGetpApp()->GetSlotState(SID_OPENHYPERLINK, SfxGetpApp()->GetInterface()); if (pItem) rItemSet.Put(*pItem); } - if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_AUTOSPELL_CHECK ) ) + if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_AUTOSPELL_CHECK ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); @@ -382,21 +382,21 @@ void SdModule::GetState(SfxItemSet& rItemSet) } } - if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_LANGUAGE ) ) + if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_LANGUAGE ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocSh ) rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE ), SID_ATTR_LANGUAGE ) ); } - if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE ) ) + if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocSh ) rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE_CJK ), SID_ATTR_CHAR_CJK_LANGUAGE ) ); } - if( SFX_ITEM_DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE ) ) + if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE ) ) { ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocSh ) diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 6ef224f1a3fc..12b5aa7b45cb 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -526,7 +526,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) } SdOptions* pOptions = GetSdOptions(eDocType); // Grid - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , false, (const SfxPoolItem**) &pItem )) { const SdOptionsGridItem* pGridItem = (SdOptionsGridItem*) pItem; @@ -535,14 +535,14 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Layout const SdOptionsLayoutItem* pLayoutItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_LAYOUT, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_LAYOUT, false, (const SfxPoolItem**) &pLayoutItem )) { pLayoutItem->SetOptions( pOptions ); } // Metric - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC, false, &pItem ) ) { if( pDoc && eDocType == pDoc->GetDocumentType() ) PutItem( *pItem ); @@ -550,7 +550,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) } sal_uInt16 nDefTab = pOptions->GetDefTab(); // Default-Tabulator - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_DEFTABSTOP, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_DEFTABSTOP, false, &pItem ) ) { nDefTab = ( (SfxUInt16Item*) pItem )->GetValue(); pOptions->SetDefTab( nDefTab ); @@ -559,10 +559,10 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) } // Scale - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_X, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_X, false, &pItem ) ) { sal_Int32 nX = ( (SfxInt32Item*) pItem )->GetValue(); - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_Y, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_Y, false, &pItem ) ) { sal_Int32 nY = ( (SfxInt32Item*) pItem )->GetValue(); pOptions->SetScale( nX, nY ); @@ -579,7 +579,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Contents const SdOptionsContentsItem* pContentsItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_CONTENTS, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_CONTENTS, false, (const SfxPoolItem**) &pContentsItem )) { pContentsItem->SetOptions( pOptions ); @@ -587,7 +587,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Misc const SdOptionsMiscItem* pMiscItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_MISC, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_MISC, false, (const SfxPoolItem**) &pMiscItem )) { pMiscItem->SetOptions( pOptions ); @@ -596,7 +596,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Snap const SdOptionsSnapItem* pSnapItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SNAP, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_SNAP, false, (const SfxPoolItem**) &pSnapItem )) { pSnapItem->SetOptions( pOptions ); @@ -610,7 +610,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Print const SdOptionsPrintItem* pPrintItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_PRINT, + if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrintItem )) { pPrintItem->SetOptions( pOptions ); diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index 734112851e02..e48084fc07fc 100644 --- a/sd/source/ui/app/tbxww.cxx +++ b/sd/source/ui/app/tbxww.cxx @@ -132,7 +132,7 @@ void SdTbxControl::StateChanged( sal_uInt16 nSId, { SfxToolBoxControl::StateChanged( nSId, eState, pState ); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { TbxImageItem* pItem = PTR_CAST( TbxImageItem, pState ); // StarDesktop can also receive another item, diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx index 4f6380d6c84f..30f0b8b1eeb0 100644 --- a/sd/source/ui/app/tmplctrl.cxx +++ b/sd/source/ui/app/tmplctrl.cxx @@ -73,7 +73,7 @@ SdTemplateControl::~SdTemplateControl() void SdTemplateControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_DEFAULT || pState->ISA( SfxVoidItem ) ) + if( eState != SfxItemState::DEFAULT || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else if ( pState->ISA( SfxStringItem ) ) { diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 89dabc6a7a1b..d39ef489a6d7 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -1220,7 +1220,7 @@ AnimationControllerItem::AnimationControllerItem( void AnimationControllerItem::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pItem ) { - if( eState >= SFX_ITEM_DEFAULT && nSId == SID_ANIMATOR_STATE ) + if( eState >= SfxItemState::DEFAULT && nSId == SID_ANIMATOR_STATE ) { const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pItem ); assert(pStateItem); //SfxUInt16Item expected diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index 607678441ce4..33e41a5c8b67 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -120,37 +120,37 @@ void CopyDlg::Reset() if (comphelper::string::getTokenCount(aStr, TOKEN) < 8) { - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) m_pNumFldCopies->SetValue( ( ( const SfxUInt16Item* ) pPoolItem )->GetValue() ); else m_pNumFldCopies->SetValue( 1L ); long nMoveX = 500L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) nMoveX = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldMoveX, Fraction(nMoveX) / maUIScale, SFX_MAPUNIT_100TH_MM); long nMoveY = 500L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) nMoveY = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldMoveY, Fraction(nMoveY) / maUIScale, SFX_MAPUNIT_100TH_MM); - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) m_pMtrFldAngle->SetValue( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); else m_pMtrFldAngle->SetValue( 0L ); long nWidth = 0L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) nWidth = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldWidth, Fraction(nWidth) / maUIScale, SFX_MAPUNIT_100TH_MM); long nHeight = 0L; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) nHeight = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() ); SetMetricValue( *m_pMtrFldHeight, Fraction(nHeight) / maUIScale, SFX_MAPUNIT_100TH_MM); - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); m_pLbStartColor->SelectEntry( aColor ); @@ -256,7 +256,7 @@ IMPL_LINK_NOARG(CopyDlg, SetViewData) // sets color attribute const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); m_pLbStartColor->SelectEntry( aColor ); @@ -283,7 +283,7 @@ IMPL_LINK_NOARG(CopyDlg, SetDefault) // set color attribute const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); m_pLbStartColor->SelectEntry( aColor ); diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx index 09da8ea9e653..674185f0305a 100644 --- a/sd/source/ui/dlg/diactrl.cxx +++ b/sd/source/ui/dlg/diactrl.cxx @@ -112,7 +112,7 @@ void SdTbxCtlDiaPages::StateChanged( sal_uInt16, SdPagesField* pFld = (SdPagesField*) GetToolBox().GetItemWindow( GetId() ); DBG_ASSERT( pFld, "Window not found" ); - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) { pFld->Disable(); pFld->SetText( OUString() ); @@ -122,7 +122,7 @@ void SdTbxCtlDiaPages::StateChanged( sal_uInt16, pFld->Enable(); const SfxUInt16Item* pItem = 0; - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { pItem = dynamic_cast< const SfxUInt16Item* >( pState ); DBG_ASSERT( pItem, "sd::SdTbxCtlDiaPages::StateChanged(), wrong item type!" ); diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx index 48069700a855..d79043d75367 100644 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -289,7 +289,7 @@ void SdModifyFieldDlg::FillControls() m_pRbtVar->SaveValue(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == maInputSet.GetItemState(EE_CHAR_LANGUAGE, true, &pItem ) ) + if( SfxItemState::SET == maInputSet.GetItemState(EE_CHAR_LANGUAGE, true, &pItem ) ) m_pLbLanguage->SelectLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() ); m_pLbLanguage->SaveValue(); diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index 0bbcc57a574c..4db3a43b5ee5 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -89,7 +89,7 @@ OutlineBulletDlg::OutlineBulletDlg( } } - if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET)) + if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET)) { const SvxNumBulletItem *pItem = NULL; if(bOutliner) @@ -109,7 +109,7 @@ OutlineBulletDlg::OutlineBulletDlg( aInputSet.Put(*pItem, EE_PARA_NUMBULLET); } - if(bTitle && aInputSet.GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && aInputSet.GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pItem = (SvxNumBulletItem*)aInputSet.GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pRule = pItem->GetNumRule(); @@ -171,14 +171,14 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const pOutputSet->Put( aSet ); const SfxPoolItem *pItem = NULL; - if( SFX_ITEM_SET == pOutputSet->GetItemState(pOutputSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE), false, &pItem )) + if( SfxItemState::SET == pOutputSet->GetItemState(pOutputSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE), false, &pItem )) { SdBulletMapper::MapFontsInNumRule( *((SvxNumBulletItem*)pItem)->GetNumRule(), *pOutputSet ); // #i35937 - removed EE_PARA_BULLETSTATE setting } - if(bTitle && pOutputSet->GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && pOutputSet->GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)pOutputSet->GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pRule = pBulletItem->GetNumRule(); diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx index f3d7da4f3172..195d5d3dce0c 100644 --- a/sd/source/ui/dlg/gluectrl.cxx +++ b/sd/source/ui/dlg/gluectrl.cxx @@ -130,7 +130,7 @@ SdTbxCtlGlueEscDir::SdTbxCtlGlueEscDir( void SdTbxCtlGlueEscDir::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { GlueEscDirLB* pGlueEscDirLB = (GlueEscDirLB*) ( GetToolBox(). GetItemWindow( GetId() ) ); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index e9f9bc21c280..12cae5bbc49d 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -863,7 +863,7 @@ SdNavigatorControllerItem::SdNavigatorControllerItem( void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pItem ) { - if( eState >= SFX_ITEM_DEFAULT && nSId == SID_NAVIGATOR_STATE ) + if( eState >= SfxItemState::DEFAULT && nSId == SID_NAVIGATOR_STATE ) { const SfxUInt32Item* pStateItem = PTR_CAST( SfxUInt32Item, pItem ); DBG_ASSERT( pStateItem, "SfxUInt16Item expected"); @@ -946,7 +946,7 @@ SdPageNameControllerItem::SdPageNameControllerItem( void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pItem ) { - if( eState >= SFX_ITEM_DEFAULT && nSId == SID_NAVIGATOR_PAGENAME ) + if( eState >= SfxItemState::DEFAULT && nSId == SID_NAVIGATOR_PAGENAME ) { // only if doc in LB is the active NavDocInfo* pInfo = pNavigatorWin->GetDocInfo(); diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index bfecb9288bd3..b571cbbf83ff 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -111,7 +111,7 @@ bool SdParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) void SdParagraphNumTabPage::Reset( const SfxItemSet* rSet ) { SfxItemState eItemState = rSet->GetItemState( ATTR_NUMBER_NEWSTART ); - if(eItemState > SFX_ITEM_DEFAULT ) + if(eItemState > SfxItemState::DEFAULT ) { const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(ATTR_NUMBER_NEWSTART); m_pNewStartCB->SetState( rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -125,7 +125,7 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartCB->SaveValue(); eItemState = rSet->GetItemState( ATTR_NUMBER_NEWSTART_AT); - if( eItemState > SFX_ITEM_DEFAULT ) + if( eItemState > SfxItemState::DEFAULT ) { sal_Int16 nNewStart = ((const SfxInt16Item&)rSet->Get(ATTR_NUMBER_NEWSTART_AT)).GetValue(); m_pNewStartNumberCB->Check(-1 != nNewStart); diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 6d5542af4f71..428a98c0e494 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -97,13 +97,13 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, // If there is no bullet item in this stylesheet, we get it // from 'Outline 1' style sheet. - if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem )) + if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem )) { OUString aStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1"); SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO); if(pFirstStyleSheet) - if( SFX_ITEM_SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, &pItem) ) + if( SfxItemState::SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, &pItem) ) aInputSet.Put( *pItem ); } @@ -287,7 +287,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const pOutSet->Put( *SfxTabDialog::GetOutputItemSet() ); const SvxNumBulletItem *pSvxNumBulletItem = NULL; - if( SFX_ITEM_SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, (const SfxPoolItem**)&pSvxNumBulletItem )) + if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, (const SfxPoolItem**)&pSvxNumBulletItem )) SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet ); return pOutSet; } diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index e1cbbd50a23d..e886dbc83996 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -130,7 +130,7 @@ bool SdPrintOptions::FillItemSet( SfxItemSet* rAttrs ) void SdPrintOptions::Reset( const SfxItemSet* rAttrs ) { const SdOptionsPrintItem* pPrintOpts = NULL; - if( SFX_ITEM_SET == rAttrs->GetItemState( ATTR_OPTIONS_PRINT, false, + if( SfxItemState::SET == rAttrs->GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrintOpts ) ) { m_pCbxDraw->Check( pPrintOpts->GetOptionsPrint().IsDraw() ); diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index d6b14c909c9d..13c92f49f622 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -66,7 +66,7 @@ void SdPresLayoutDlg::Reset() long nName; // replace master page - if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, false, &pPoolItem ) == SFX_ITEM_SET ) + if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, false, &pPoolItem ) == SfxItemState::SET ) { bool bMasterPage = ( (const SfxBoolItem*) pPoolItem)->GetValue(); m_pCbxMasterPage->Enable( !bMasterPage ); @@ -76,7 +76,7 @@ void SdPresLayoutDlg::Reset() // remove not used master pages m_pCbxCheckMasters->Check(false); - if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, true, &pPoolItem) == SFX_ITEM_SET) + if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, true, &pPoolItem) == SfxItemState::SET) maName = ((const SfxStringItem*)pPoolItem)->GetValue(); else maName = ""; diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 300bc8f9cc87..38ebfe206e44 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -305,7 +305,7 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs ) OUString aFileName; // m_pLbAction - if( rAttrs->GetItemState( ATTR_ACTION ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( ATTR_ACTION ) != SfxItemState::DONTCARE ) { eCA = (presentation::ClickAction) ( ( const SfxAllEnumItem& ) rAttrs-> Get( ATTR_ACTION ) ).GetValue(); @@ -315,7 +315,7 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs ) m_pLbAction->SetNoSelection(); // m_pEdtSound - if( rAttrs->GetItemState( ATTR_ACTION_FILENAME ) != SFX_ITEM_DONTCARE ) + if( rAttrs->GetItemState( ATTR_ACTION_FILENAME ) != SfxItemState::DONTCARE ) { aFileName = ( ( const SfxStringItem& ) rAttrs->Get( ATTR_ACTION_FILENAME ) ).GetValue(); SetEditText( aFileName ); diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index fc123faa32b2..d80266fcef0b 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -217,7 +217,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(Window* pParent, const SfxItemSet& rInAttrs) FieldUnit eFUnit; sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC ); - if ( rInAttrs.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rInAttrs.GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rInAttrs.Get( nWhich ); eFUnit = (FieldUnit)rItem.GetValue(); @@ -286,7 +286,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet ) // change metric if necessary (since TabPage is in the Dialog where // the metric is set) const SfxPoolItem* pAttr = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , false, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC , false, (const SfxPoolItem**)&pAttr )) { const SfxUInt16Item* pItem = (SfxUInt16Item*) pAttr; @@ -441,7 +441,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC ); m_pLbMetric->SetNoSelection(); - if ( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if ( rAttrs->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs->Get( nWhich ); long nFieldUnit = (long)rItem.GetValue(); @@ -458,7 +458,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) // tabulator space nWhich = GetWhich( SID_ATTR_DEFTABSTOP ); - if( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) + if( rAttrs->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) { SfxMapUnit eUnit = rAttrs->GetPool()->GetMetric( nWhich ); const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs->Get( nWhich ); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index b4c43625897a..7190485673ec 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -272,12 +272,12 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) if( pSet ) { - if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) + if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) { mpDoc->SetStarDrawPreviewMode( true ); } - if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& + if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() ) { bStartPresentation = true; @@ -379,7 +379,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium, SfxItemSet* pSet = rMedium.GetItemSet(); if( pSet ) { - if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& + if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() ) { mpDoc->SetStartWithPresentation( true ); @@ -413,12 +413,12 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) SfxItemSet* pSet = rMedium.GetItemSet(); if( pSet ) { - if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) + if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) { mpDoc->SetStarDrawPreviewMode( true ); } - if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& + if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() ) { bStartPresentation = true; @@ -1075,7 +1075,7 @@ bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) OUString aLayoutName; SfxStringItem* pLayoutItem; - if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, false, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET ) + if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, false, (const SfxPoolItem**) & pLayoutItem ) == SfxItemState::SET ) { aLayoutName = pLayoutItem->GetValue(); } diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 180aede5cbd4..a184ccf93d10 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -275,7 +275,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) if (pFrame) { - if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN) { pFrame->GetSlotState(SID_RELOAD, pFrame->GetInterface(), &rSet); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 7409c4c0d4ab..7fdee9ce7011 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -290,14 +290,14 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* pViewShell, SfxViewFrame* pViewFrame ) { - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CHARMAP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_RLM ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_LRM ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_ZWNBSP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_INSERT_ZWSP )) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CHARMAP ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_SOFT_HYPHEN ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_HARDHYPHEN ) || + SfxItemState::DEFAULT == rSet.GetItemState( FN_INSERT_HARD_SPACE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_RLM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_LRM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_ZWNBSP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_ZWSP )) { ::sd::View* pView = pViewShell ? pViewShell->GetView() : 0; OutlinerView* pOLV = pView ? pView->GetTextEditOutlinerView() : 0; diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index 8b929c373df7..174391ac74da 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -115,9 +115,9 @@ void FuChar::DoExecute( SfxRequest& rReq ) if( mpDoc->GetOnlineSpell() ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, false, &pItem ) || - SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pItem ) || - SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, false, &pItem ) || + SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pItem ) || + SfxItemState::SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pItem ) ) { mpDoc->StopOnlineSpelling(); mpDoc->StartOnlineSpelling(); diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index ad605555c805..bf74e9c2414b 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -79,7 +79,7 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq ) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) ) maTargets = ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue(); } } diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index ced9706fe4e2..3ed1773d8790 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -599,7 +599,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) long nWidth = 300; // (1/100th mm) // determine line width and calculate with it the line end width - if( aSet.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE ) + if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) { long nValue = ( ( const XLineWidthItem& ) aSet.Get( XATTR_LINEWIDTH ) ).GetValue(); if( nValue > 0 ) diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index c4bc3d791c1f..03477a588620 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -84,12 +84,12 @@ void FuCopy::DoExecute( SfxRequest& rReq ) mpView->GetAttributes( aAttr ); const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) ) + if( SfxItemState::SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) ) { drawing::FillStyle eStyle = ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); if( eStyle == drawing::FillStyle_SOLID && - SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLCOLOR, true, &pPoolItem ) ) + SfxItemState::SET == aAttr.GetItemState( XATTR_FILLCOLOR, true, &pPoolItem ) ) { const XFillColorItem* pItem = ( const XFillColorItem* ) pPoolItem; XColorItem aXColorItem( ATTR_COPY_START_COLOR, pItem->GetName(), @@ -134,30 +134,30 @@ void FuCopy::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pPoolItem = NULL; // Count - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) nNumber = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue(); // translation - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) lSizeX = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) lSizeY = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) lAngle = ( ( const SfxInt32Item* )pPoolItem )->GetValue(); // scale - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) lWidth = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) lHeight = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); // start/end color - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { aStartColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); bColor = true; } - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) { aEndColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); if( aStartColor == aEndColor ) diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index 604e04cff453..24a3f0b1212f 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -164,11 +164,11 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const Fo const bool bHasParent = !pStyle->GetParent().isEmpty(); - if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, false ) == SFX_ITEM_SET ) + if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, false ) == SfxItemState::SET ) rSet.Put( SvxLanguageItem( nTargetLanguage, EE_CHAR_LANGUAGE_CJK ) ); if( pTargetFont && - ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, false ) == SFX_ITEM_SET ) ) + ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, false ) == SfxItemState::SET ) ) { // set new font attribute SvxFontItem aFontItem( (SvxFontItem&) rSet.Get( EE_CHAR_FONTINFO_CJK ) ); diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 0f1e27d7185d..fe23ac51e4fb 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -461,7 +461,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) } // evaluation of the ItemSets - if (pArgs->GetItemState(ATTR_ANIMATION_ACTIVE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_ACTIVE) == SfxItemState::SET) { bActive = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_ACTIVE)).GetValue(); nAnimationSet = ATTR_SET; @@ -469,7 +469,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nAnimationSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SfxItemState::SET) { eEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_EFFECT)).GetValue(); @@ -478,7 +478,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SfxItemState::SET) { eTextEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_TEXTEFFECT)).GetValue(); @@ -487,7 +487,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nTextEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SfxItemState::SET) { eSpeed = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs-> Get(ATTR_ANIMATION_SPEED)).GetValue(); @@ -496,7 +496,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSpeedSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_FADEOUT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_FADEOUT) == SfxItemState::SET) { bFadeOut = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_FADEOUT)).GetValue(); nFadeOutSet = ATTR_SET; @@ -504,7 +504,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nFadeOutSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_INVISIBLE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_INVISIBLE) == SfxItemState::SET) { bInvisible = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_INVISIBLE)).GetValue(); nInvisibleSet = ATTR_SET; @@ -512,7 +512,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nInvisibleSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDON) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDON) == SfxItemState::SET) { bSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_SOUNDON)).GetValue(); nSoundOnSet = ATTR_SET; @@ -520,7 +520,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSoundOnSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDFILE) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_SOUNDFILE) == SfxItemState::SET) { aSound = ((SfxStringItem&)pArgs->Get(ATTR_ANIMATION_SOUNDFILE)).GetValue(); nSoundFileSet = ATTR_SET; @@ -528,7 +528,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSoundFileSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_COLOR) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_COLOR) == SfxItemState::SET) { aFadeColor = ((SvxColorItem&)pArgs->Get(ATTR_ANIMATION_COLOR)).GetValue(); nFadeColorSet = ATTR_SET; @@ -536,7 +536,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nFadeColorSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ANIMATION_PLAYFULL) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ANIMATION_PLAYFULL) == SfxItemState::SET) { bPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ANIMATION_PLAYFULL)).GetValue(); nPlayFullSet = ATTR_SET; @@ -544,7 +544,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nPlayFullSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION) == SfxItemState::SET) { eClickAction = (presentation::ClickAction)((SfxAllEnumItem&)pArgs-> Get(ATTR_ACTION)).GetValue(); @@ -553,7 +553,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nClickActionSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_FILENAME) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_FILENAME) == SfxItemState::SET) { aBookmark = ((SfxStringItem&)pArgs-> Get(ATTR_ACTION_FILENAME)).GetValue(); @@ -562,7 +562,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nBookmarkSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SfxItemState::SET) { eSecondEffect = (presentation::AnimationEffect)((SfxAllEnumItem&) pArgs-> Get(ATTR_ACTION_EFFECT)).GetValue(); @@ -571,7 +571,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondEffectSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SfxItemState::SET) { eSecondSpeed = (presentation::AnimationSpeed)((SfxAllEnumItem&) pArgs-> Get(ATTR_ACTION_EFFECTSPEED)).GetValue(); @@ -580,7 +580,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondSpeedSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_SOUNDON) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_SOUNDON) == SfxItemState::SET) { bSecondSoundOn = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_SOUNDON)).GetValue(); nSecondSoundOnSet = ATTR_SET; @@ -588,7 +588,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) else nSecondSoundOnSet = ATTR_MISSING; - if (pArgs->GetItemState(ATTR_ACTION_PLAYFULL) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_ACTION_PLAYFULL) == SfxItemState::SET) { bSecondPlayFull = ((SfxBoolItem&)pArgs->Get(ATTR_ACTION_PLAYFULL)).GetValue(); nSecondPlayFullSet = ATTR_SET; diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 2bc9809f53ae..c4776f558875 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -207,7 +207,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) { sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF; const SfxPoolItem* pNumLevelItem = NULL; - if(SFX_ITEM_SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pNumLevelItem)) + if(SfxItemState::SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pNumLevelItem)) nActNumLvl = ((const SfxUInt16Item*)pNumLevelItem)->GetValue(); pNumRuleMgr->SetItems(&aNewAttr); @@ -301,7 +301,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u //SvxNumBulletItem* pRetItem = NULL; const SfxPoolItem* pTmpItem = NULL; - if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SFX_ITEM_SET) + if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SfxItemState::SET) { return pTmpItem; } @@ -309,7 +309,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u { nNumItemId = aNewAttr.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); SfxItemState eState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) return pTmpItem; else { @@ -356,7 +356,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u aNewAttr.Put(*pItem, EE_PARA_NUMBULLET); - if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)aNewAttr.GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pLclRule = pBulletItem->GetNumRule(); @@ -371,11 +371,11 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u } SfxItemState eItemState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eItemState == SFX_ITEM_SET) + if (eItemState == SfxItemState::SET) return pTmpItem; } - //DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!") + //DBG_ASSERT(eState == SfxItemState::SET, "kein Item gefunden!") } return pTmpItem; } diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 53429c37f7b8..fe3e1f145a86 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -326,9 +326,9 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) bool bChanges = false; for( sal_uInt16 i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ ) { - if( aMergedAttr.GetItemState( i ) != SFX_ITEM_DEFAULT ) + if( aMergedAttr.GetItemState( i ) != SfxItemState::DEFAULT ) { - if( pTempSet->GetItemState( i ) == SFX_ITEM_DEFAULT ) + if( pTempSet->GetItemState( i ) == SfxItemState::DEFAULT ) pTempSet->Put( aMergedAttr.Get( i ) ); else if( aMergedAttr.GetItem( i ) != pTempSet->GetItem( i ) ) @@ -338,7 +338,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) // if the background for this page was set to invisible, the background-object has to be deleted, too. if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) || - ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) && + ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT ) && ( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) ) ) mbPageBckgrdDeleted = true; @@ -451,7 +451,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) } const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) ) + if( SfxItemState::SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) ) { sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); mpDoc->SetDefaultWritingMode( nVal == FRMDIR_HORI_RIGHT_TOP ? ::com::sun::star::text::WritingMode_RL_TB : ::com::sun::star::text::WritingMode_LR_TB ); @@ -495,7 +495,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) bool bFullSize = pMasterPage->IsBackgroundFullSize(); sal_uInt16 nPaperBin = mpPage->GetPaperBin(); - if( pArgs->GetItemState(SID_ATTR_PAGE, true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(SID_ATTR_PAGE, true, &pPoolItem) == SfxItemState::SET ) { mpDoc->SetPageNumType(((const SvxPageItem*) pPoolItem)->GetNumType()); @@ -508,7 +508,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) mpDrawViewShell->ResetActualPage(); } - if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, true, &pPoolItem) == SfxItemState::SET ) { aNewSize = ((const SvxSizeItem*) pPoolItem)->GetSize(); @@ -517,7 +517,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE), - true, &pPoolItem) == SFX_ITEM_SET ) + true, &pPoolItem) == SfxItemState::SET ) { nLeft = ((const SvxLRSpaceItem*) pPoolItem)->GetLeft(); nRight = ((const SvxLRSpaceItem*) pPoolItem)->GetRight(); @@ -528,7 +528,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE), - true, &pPoolItem) == SFX_ITEM_SET ) + true, &pPoolItem) == SfxItemState::SET ) { nUpper = ((const SvxULSpaceItem*) pPoolItem)->GetUpper(); nLower = ((const SvxULSpaceItem*) pPoolItem)->GetLower(); @@ -537,12 +537,12 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) bSetPageSizeAndBorder = true; } - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), true, &pPoolItem) == SfxItemState::SET ) { bScaleAll = ((const SfxBoolItem*) pPoolItem)->GetValue(); } - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), true, &pPoolItem) == SfxItemState::SET ) { bFullSize = ((const SfxBoolItem*) pPoolItem)->GetValue(); @@ -551,7 +551,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) } // Paper Bin - if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), true, &pPoolItem) == SFX_ITEM_SET ) + if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), true, &pPoolItem) == SfxItemState::SET ) { nPaperBin = ((const SvxPaperBinItem*) pPoolItem)->GetValue(); diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx index 08db2fb6dc3d..2b62f4013d05 100644 --- a/sd/source/ui/func/fuparagr.cxx +++ b/sd/source/ui/func/fuparagr.cxx @@ -118,13 +118,13 @@ void FuParagraph::DoExecute( SfxRequest& rReq ) ESelection eSelection = pOutlView->GetSelection(); const SfxPoolItem *pItem = 0; - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, false, &pItem ) ) { const bool bNewStart = ((SfxBoolItem*)pItem)->GetValue() ? sal_True : sal_False; pOutliner->SetParaIsNumberingRestart( eSelection.nStartPara, bNewStart ); } - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART_AT, false, &pItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART_AT, false, &pItem ) ) { const sal_Int16 nStartAt = ((SfxInt16Item*)pItem)->GetValue(); pOutliner->SetNumberingStartValue( eSelection.nStartPara, nStartAt ); diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index d91aa0527915..53f901639a85 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -1048,7 +1048,7 @@ void FuPoor::ReceiveRequest(SfxRequest& rReq) if (pSet) { - if( pSet->GetItemState( nSlotId ) == SFX_ITEM_SET ) + if( pSet->GetItemState( nSlotId ) == SfxItemState::SET ) { const SfxPoolItem& rItem = pSet->Get( nSlotId ); diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index dfd71bc2a90d..283916836247 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -135,13 +135,13 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) if (pArgs) { - if (pArgs->GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET) bLoad = ((SfxBoolItem&)pArgs->Get(ATTR_PRESLAYOUT_LOAD)).GetValue(); - if( pArgs->GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET ) + if( pArgs->GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET ) bMasterPage = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue(); - if( pArgs->GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET ) + if( pArgs->GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET ) bCheckMasters = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue(); - if (pArgs->GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET) + if (pArgs->GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET) aFile = ((SfxStringItem&)pArgs->Get(ATTR_PRESLAYOUT_NAME)).GetValue(); } else @@ -156,13 +156,13 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) case RET_OK: { pDlg->GetAttr(aSet); - if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET) + if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET) bLoad = ((SfxBoolItem&)aSet.Get(ATTR_PRESLAYOUT_LOAD)).GetValue(); - if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET ) + if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET ) bMasterPage = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue(); - if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET ) + if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET ) bCheckMasters = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue(); - if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET) + if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET) aFile = ((SfxStringItem&)aSet.Get(ATTR_PRESLAYOUT_NAME)).GetValue(); } break; diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 4c730bfd7671..bdb8fe32bfbe 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -105,12 +105,12 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pItem; sal_uInt16 nFamily = USHRT_MAX; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, false, &pItem )) { nFamily = ( (const SfxUInt16Item &) pArgs->Get( SID_STYLE_FAMILY ) ).GetValue(); } - else if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, + else if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, false, &pItem )) { OUString sFamily = ( (const SfxStringItem &) pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue(); @@ -154,7 +154,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } } - if (pArgs && pArgs->GetItemState(nSId) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(nSId) == SfxItemState::SET) aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); } } @@ -171,7 +171,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } pStyleSheet = &pSSPool->Make( aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_USERDEF ); - if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SfxItemState::SET) { OUString aParentName(((const SfxStringItem&) pArgs->Get(SID_STYLE_REFERENCE)).GetValue()); pStyleSheet->SetParent(aParentName); @@ -255,7 +255,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { if( !SD_MOD()->GetWaterCan() ) { - if (pArgs && pArgs->GetItemState( nSId ) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState( nSId ) == SfxItemState::SET) { aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); SD_MOD()->SetWaterCan( true ); @@ -410,7 +410,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) // EE_PARA_NUMBULLET item is only valid in first outline template if( (ePO >= PO_OUTLINE_2) && (ePO <= PO_OUTLINE_9) ) { - if (aTempSet.GetItemState(EE_PARA_NUMBULLET) == SFX_ITEM_SET) + if (aTempSet.GetItemState(EE_PARA_NUMBULLET) == SfxItemState::SET) { SvxNumRule aRule(*((SvxNumBulletItem*)aTempSet.GetItem(EE_PARA_NUMBULLET))->GetNumRule()); @@ -437,7 +437,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) sdr::properties::CleanupFillProperties( rAttr ); // check for unique names of named items for xml - if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLBITMAP ); SfxPoolItem* pNewItem = ((XFillBitmapItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -447,7 +447,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINEDASH ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINEDASH ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEDASH ); SfxPoolItem* pNewItem = ((XLineDashItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -457,7 +457,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINESTART ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINESTART ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINESTART ); SfxPoolItem* pNewItem = ((XLineStartItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -467,7 +467,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_LINEEND ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_LINEEND ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEEND ); SfxPoolItem* pNewItem = ((XLineEndItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -477,7 +477,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLGRADIENT ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLGRADIENT ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLGRADIENT ); SfxPoolItem* pNewItem = ((XFillGradientItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -487,7 +487,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLFLOATTRANSPARENCE ); SfxPoolItem* pNewItem = ((XFillFloatTransparenceItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -497,7 +497,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) delete pNewItem; } } - if( rAttr.GetItemState( XATTR_FILLHATCH ) == SFX_ITEM_SET ) + if( rAttr.GetItemState( XATTR_FILLHATCH ) == SfxItemState::SET ) { const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLHATCH ); SfxPoolItem* pNewItem = ((XFillHatchItem*)pOldItem)->checkForUniqueItem( mpDoc ); @@ -543,9 +543,9 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( mpDoc->GetOnlineSpell() ) { const SfxPoolItem* pTempItem; - if( SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, false, &pTempItem ) || - SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pTempItem ) || - SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pTempItem ) ) + if( SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, false, &pTempItem ) || + SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, false, &pTempItem ) || + SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, false, &pTempItem ) ) { mpDoc->StopOnlineSpelling(); mpDoc->StartOnlineSpelling(); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 2b4ca731a409..8f518dedae9b 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -235,7 +235,7 @@ void FuText::DoExecute( SfxRequest& ) // test for type before using && SID_TEXTEDIT == nSlotId - && SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT) + && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) && (sal_uInt16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) { @@ -1260,7 +1260,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq) // test for type before using && SID_TEXTEDIT == nSlotId - && SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT) + && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) && (sal_uInt16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) { diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx index 3423c23bb1db..08c9dda54c65 100644 --- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx @@ -186,7 +186,7 @@ void AllMasterPagesSelector::GetState (SfxItemSet& rItemSet) { // MasterPagesSelector::GetState(rItemSet); - if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_DEFAULT) + if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SfxItemState::DEFAULT) rItemSet.DisableItem(SID_TP_EDIT_MASTER); } diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 832e31592f47..ebf319ce6ce9 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -616,7 +616,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) const SfxPoolItem* pItem = NULL; const SfxItemState aState ( mrBase.GetViewFrame()->GetDispatcher()->QueryState(SID_INSERTPAGE, pItem)); - if (aState == SFX_ITEM_DISABLED) + if (aState == SfxItemState::DISABLED) pMenu->EnableItem(SID_INSERTPAGE_LAYOUT_MENU, false); // Show the menu. diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index ea1df06df56c..b3f920a4692a 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -611,7 +611,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent) void SlideSorterController::GetCtrlState (SfxItemSet& rSet) { - if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN) { // let SFx en-/disable "last version" SfxViewFrame* pSlideViewFrame = SfxViewFrame::Current(); @@ -628,10 +628,10 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) } // Output quality. - if (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SFX_ITEM_DEFAULT - ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SFX_ITEM_DEFAULT - ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_DEFAULT - ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SfxItemState::DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SfxItemState::DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SfxItemState::DEFAULT + ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SfxItemState::DEFAULT) { if (mrSlideSorter.GetContentWindow()) { @@ -661,7 +661,7 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) } } - if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SfxItemState::DEFAULT) { rSet.Put (SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true)); } diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index f3572685579a..dba3fa2cf7b7 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -550,7 +550,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) rSet.DisableItem(SID_SEARCH_DLG); } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) { bool bDisable = true; if (eEditMode == EM_PAGE) @@ -593,7 +593,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) rSet.DisableItem (SID_EXPAND_PAGE); } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) { bool bDisable = true; if (eEditMode == EM_PAGE) @@ -618,8 +618,8 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } // starting of presentation possible? - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) { bool bDisable = true; model::PageEnumeration aAllPages ( @@ -641,9 +641,9 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) // Disable the rename slots when there are no or more than one slides/master // pages selected; disable the duplicate slot when there are no slides // selected: - if (rSet.GetItemState(SID_RENAMEPAGE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_RENAME_MASTER_PAGE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_RENAMEPAGE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_RENAME_MASTER_PAGE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DUPLICATE_PAGE) == SfxItemState::DEFAULT) { int n = mrSlideSorter.GetController().GetPageSelector() .GetSelectedPageCount(); @@ -658,8 +658,8 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } } - if (rSet.GetItemState(SID_HIDE_SLIDE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_SHOW_SLIDE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_HIDE_SLIDE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_SHOW_SLIDE) == SfxItemState::DEFAULT) { model::PageEnumeration aSelectedPages ( model::PageEnumerationProvider::CreateSelectedPagesEnumeration( @@ -700,9 +700,9 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) // Disable some slots when in master page mode. if (eEditMode == EM_MASTERPAGE) { - if (rSet.GetItemState(SID_INSERTPAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_INSERTPAGE) == SfxItemState::DEFAULT) rSet.DisableItem(SID_INSERTPAGE); - if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SfxItemState::DEFAULT) rSet.DisableItem(SID_DUPLICATE_PAGE); } } @@ -711,8 +711,8 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet) { SdTransferable* pTransferClip = SD_MOD()->pTransferClip; - if (rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_PASTE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::DEFAULT) { // no own clipboard data? if ( !pTransferClip || !pTransferClip->GetDocShell() ) @@ -755,30 +755,30 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet) } // Cut, copy and paste of master pages is not yet implemented properly - if (rSet.GetItemState(SID_COPY) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_COPY) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_PASTE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_CUT) == SfxItemState::DEFAULT) { if (mrSlideSorter.GetModel().GetEditMode() == EM_MASTERPAGE) { - if (rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_CUT) == SfxItemState::DEFAULT) rSet.DisableItem(SID_CUT); - if (rSet.GetItemState(SID_COPY) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_COPY) == SfxItemState::DEFAULT) rSet.DisableItem(SID_COPY); - if (rSet.GetItemState(SID_PASTE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_PASTE) == SfxItemState::DEFAULT) rSet.DisableItem(SID_PASTE); - if (rSet.GetItemState(SID_PASTE_SPECIAL) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::DEFAULT) rSet.DisableItem(SID_PASTE_SPECIAL); } } // Cut, copy, and delete page are disabled when there is no selection. - if (rSet.GetItemState(SID_CUT) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_COPY) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_DELETE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_DELETE_PAGE) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_DELETE_MASTER_PAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_CUT) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_COPY) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DELETE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DELETE_PAGE) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DELETE_MASTER_PAGE) == SfxItemState::DEFAULT) { model::PageEnumeration aSelectedPages ( model::PageEnumerationProvider::CreateSelectedPagesEnumeration( diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 094c08d7a2b1..a0de11fb609f 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -413,7 +413,7 @@ throw (UnknownPropertyException, PropertyVetoException, if( pPrinter ) { SdOptionsPrintItem* pPrinterOptions = NULL; - if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) + if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SfxItemState::SET) aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint(); } else @@ -977,7 +977,7 @@ throw (UnknownPropertyException, WrappedTargetException, RuntimeException) if( pPrinter ) { SdOptionsPrintItem* pPrinterOptions = NULL; - if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) + if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, (const SfxPoolItem**) &pPrinterOptions) == SfxItemState::SET) aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint(); } else diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 8c8f396c82f1..8b50af5c0498 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -340,8 +340,8 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr { if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE ) { - if( mpSet->GetItemState( XATTR_FILLBMP_STRETCH, false ) == SFX_ITEM_SET || - mpSet->GetItemState( XATTR_FILLBMP_TILE, false ) == SFX_ITEM_SET ) + if( mpSet->GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET || + mpSet->GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET ) { return beans::PropertyState_DIRECT_VALUE; } @@ -353,14 +353,14 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr switch( mpSet->GetItemState( pEntry->nWID, false ) ) { - 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: -// case SFX_ITEM_DONTCARE: -// case SFX_ITEM_DISABLED: +// case SfxItemState::DONTCARE: +// case SfxItemState::DISABLED: return beans::PropertyState_AMBIGUOUS_VALUE; } } diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index 8d074fa12c05..5d904cefba0b 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -118,7 +118,7 @@ void MediaObjectBar::Execute( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) + if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) pItem = NULL; if( pItem ) diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 3c4ea2923d19..69dcb5d9b0a5 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -207,7 +207,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, aTempSet.Put( rSet ); aTempSet.ClearInvalidItems(); - if( nDepth > 0 && aTempSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET ) + if( nDepth > 0 && aTempSet.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET ) { // no SvxNumBulletItem in outline level 1 to 8! aTempSet.ClearItem( EE_PARA_NUMBULLET ); @@ -237,7 +237,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, pPara = iter != aSelList.rend() ? *iter : NULL; bool bJumpToLevel1 = false; - if( !pPara && nDepth > 0 && rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET ) + if( !pPara && nDepth > 0 && rSet.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET ) bJumpToLevel1 = true; if (bJumpToLevel1) @@ -318,7 +318,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, sal_uInt16 nWhich(aWhichIter.FirstWhich()); while( nWhich ) { - if( SFX_ITEM_SET == rSet.GetItemState( nWhich ) ) + if( SfxItemState::SET == rSet.GetItemState( nWhich ) ) aTempSet.ClearItem( nWhich ); nWhich = aWhichIter.NextWhich(); } @@ -345,7 +345,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, sal_uInt16 nWhich(aWhichIter.FirstWhich()); while( nWhich ) { - if( SFX_ITEM_SET == rSet.GetItemState( nWhich ) ) + if( SfxItemState::SET == rSet.GetItemState( nWhich ) ) pObject->ClearMergedItem( nWhich ); nWhich = aWhichIter.NextWhich(); } diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index d7ec657e8fbf..37c82a1e7ace 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -140,7 +140,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet ) rSet.Put(aKern); SfxItemState eState = aCharAttrSet.GetItemState( EE_CHAR_KERNING, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_CHAR_KERNING); } @@ -559,7 +559,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) Invalidate(SID_ATTR_PARA_LRSPACE); //Added by xuxu SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_LRSPACE); rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 37f5de8f848f..7f435665ab42 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -191,7 +191,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) // gets enabled, through it doesn't really work (see above) SfxItemSet aEditAttr( mpView->GetDoc().GetPool() ); mpView->GetAttributes( aEditAttr ); - if( aEditAttr.GetItemState( EE_PARA_ULSPACE ) >= SFX_ITEM_DEFAULT ) + if( aEditAttr.GetItemState( EE_PARA_ULSPACE ) >= SfxItemState::DEFAULT ) { SfxItemSet aNewAttrs(*(aEditAttr.GetPool()), aEditAttr.GetRanges()); const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); @@ -592,7 +592,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; sal_uInt16 nAdjust = SVX_ADJUST_LEFT; - if( SFX_ITEM_SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) + if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue(); if( bLeftToRight ) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index e93b366ccecc..05c6c4086b83 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -905,12 +905,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) boost::scoped_ptr<SfxItemSet> pNewSet(rAttr.first); SdrObjUserCall* pUserCall = rAttr.second; - if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SFX_ITEM_SET ) + if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SfxItemState::SET ) { pObj->SetMergedItem(pNewSet->Get(SDRATTR_TEXT_MINFRAMEHEIGHT)); } - if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) == SFX_ITEM_SET ) + if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) == SfxItemState::SET ) { pObj->SetMergedItem(pNewSet->Get(SDRATTR_TEXT_AUTOGROWHEIGHT)); } @@ -3180,7 +3180,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet) case SID_TABLE_VERT_BOTTOM: bool bContour = false; SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ); - if( eConState != SFX_ITEM_DONTCARE ) + if( eConState != SfxItemState::DONTCARE ) { bContour = ( ( const SdrOnOffItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); } @@ -3189,8 +3189,8 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet) SfxItemState eVState = aAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ); //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - //if(SFX_ITEM_DONTCARE != eVState && SFX_ITEM_DONTCARE != eHState) - if(SFX_ITEM_DONTCARE != eVState) + //if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) + if(SfxItemState::DONTCARE != eVState) { SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 59a05ede3e10..414923858bab 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -457,7 +457,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { const SfxPoolItem* pItem; if (rReq.GetArgs()->GetItemState( - SID_ATTR_YEAR2000, true, &pItem) == SFX_ITEM_SET) + SID_ATTR_YEAR2000, true, &pItem) == SfxItemState::SET) pFormShell->SetY2KState ( static_cast<const SfxUInt16Item*>(pItem)->GetValue()); } @@ -904,7 +904,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) { SfxItemSet aEditAttr( GetDoc()->GetPool() ); mpDrawView->GetAttributes( aEditAttr ); - if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SFX_ITEM_DEFAULT ) + if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SfxItemState::DEFAULT ) { const SvxTabStopItem& rItem = (const SvxTabStopItem&) aEditAttr.Get( EE_PARA_TABS ); rSet.Put( rItem ); @@ -932,7 +932,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) Point aPos( aPagePos + maMarkRect.TopLeft() ); - if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SFX_ITEM_SET ) + if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET ) { const SdrMetricItem& rTLDItem = (const SdrMetricItem&) aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); @@ -944,7 +944,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) aLRSpace.SetLeft( aPagePos.X() + maMarkRect.Left() ); - if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SFX_ITEM_SET ) + if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET ) { const SdrMetricItem& rTLDItem = (const SdrMetricItem&) aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); @@ -963,7 +963,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) aProtect.SetPosProtect( true ); } - if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SFX_ITEM_DEFAULT ) + if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SfxItemState::DEFAULT ) { const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ); rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, rItem.GetValue() == ::com::sun::star::text::WritingMode_RL_TB)); diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index cf7631823c89..d754afecf0fc 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -217,42 +217,42 @@ void DrawViewShell::GetAnimationWinState( SfxItemSet& rSet ) void DrawViewShell::SetChildWindowState( SfxItemSet& rSet ) { // State of SfxChild-Windows (Animator, Fontwork etc.) - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_FONTWORK ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_FONTWORK ) ) { sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem(SID_FONTWORK, GetViewFrame()->HasChildWindow(nId))); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COLOR_CONTROL ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_COLOR_CONTROL ) ) { sal_uInt16 nId = SvxColorChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem(SID_COLOR_CONTROL, GetViewFrame()->HasChildWindow(nId))); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ANIMATION_OBJECTS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ANIMATION_OBJECTS ) ) { sal_uInt16 nId = AnimationChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_ANIMATION_OBJECTS, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_NAVIGATOR ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_NAVIGATOR ) ) { sal_uInt16 nId = SID_NAVIGATOR; rSet.Put( SfxBoolItem( SID_NAVIGATOR, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BMPMASK ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_BMPMASK ) ) { sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_BMPMASK, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_IMAP ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_IMAP ) ) { sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_IMAP, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_3D_WIN ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_3D_WIN ) ) { sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_3D_WIN, GetViewFrame()->HasChildWindow( nId ) ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_AVMEDIA_PLAYER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_AVMEDIA_PLAYER ) ) { sal_uInt16 nId = ::avmedia::MediaPlayer::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_AVMEDIA_PLAYER, GetViewFrame()->HasChildWindow( nId ) ) ); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 86353ff12403..b6dff0c24dd6 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -317,7 +317,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) GetMenuStateSel(rSet); - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) { bool bDisable = true; if( pPageView ) @@ -337,7 +337,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) { bool bDisable = true; if( pPageView ) @@ -378,7 +378,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) { bool bDisable = true; if( pPageView ) @@ -402,7 +402,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_ASSIGN_LAYOUT)) { bool bDisable = true; if( pPageView ) @@ -423,8 +423,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // is it possible to start the presentation? - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PRESENTATION ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) { bool bDisable = true; sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD ); @@ -445,20 +445,20 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // glue points - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_EDITMODE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_INSERT_POINT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_PERCENT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_LEFT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_RIGHT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_TOP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_BOTTOM ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_CENTER ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_LEFT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_RIGHT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_CENTER ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_TOP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_BOTTOM ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_EDITMODE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_INSERT_POINT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_PERCENT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_LEFT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_RIGHT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_TOP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_ESCDIR_BOTTOM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_CENTER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_LEFT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_HORZALIGN_RIGHT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_CENTER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_TOP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_GLUE_VERTALIGN_BOTTOM ) ) { // percent TRISTATE eState = mpDrawView->IsMarkedGluePointsPercent(); @@ -521,8 +521,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_BOTTOM, eState == TRISTATE_TRUE ) ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_GRID_FRONT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_HELPLINES_FRONT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_GRID_FRONT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_HELPLINES_FRONT ) ) { rSet.Put( SfxBoolItem( SID_GRID_FRONT, mpDrawView->IsGridFront() ) ); rSet.Put( SfxBoolItem( SID_HELPLINES_FRONT, mpDrawView->IsHlplFront() ) ); @@ -597,7 +597,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) else rSet.Put( SfxBoolItem( SID_LEAVE_ALL_GROUPS, true ) ); - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) { if ( !mpDrawView->IsTextEdit() ) { @@ -618,8 +618,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_THESAURUS ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SELECTALL ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SIZE_ALL ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_SELECTALL ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_SIZE_ALL ) ) { if( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) { @@ -629,14 +629,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONTEXT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CONTEXT ) ) rSet.Put( SfxStringItem( SID_CONTEXT, mpDrawView->GetStatusText() ) ); // clipboard (paste) - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE_SPECIAL ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE_UNFORMATTED ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE_SPECIAL ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE_UNFORMATTED ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) { if ( !mpClipEvtLstnr ) { @@ -665,7 +665,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_PASTE_UNFORMATTED ); rSet.DisableItem( SID_CLIPBOARD_FORMAT_ITEMS ); } - else if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) + else if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) ) { if (mpCurrentClipboardFormats.get() != NULL) rSet.Put(*mpCurrentClipboardFormats); @@ -701,7 +701,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_CONVERT_TO_3D_LATHE_FAST); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MANAGE_LINKS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_MANAGE_LINKS ) ) { if ( GetDoc()->GetLinkCount() == 0 ) { @@ -784,7 +784,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, false)); if (mePageKind == PK_STANDARD && - rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_DEFAULT) + rSet.GetItemState(SID_TITLE_MASTERPAGE) == SfxItemState::DEFAULT) { // Is there a page with the AutoLayout "Title"? bool bDisable = true; @@ -836,7 +836,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, false)); - if (rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_TITLE_MASTERPAGE) == SfxItemState::DEFAULT) { bool bCheck = false; bool bDisable = true; @@ -904,12 +904,12 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // set state of the ruler - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_RULER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_RULER ) ) rSet.Put( SfxBoolItem( SID_RULER, HasRuler() ) ); // do not delete the last page or a master page - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_PAGE ) - || SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_MASTER_PAGE ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_DELETE_PAGE ) + || SfxItemState::DEFAULT == rSet.GetItemState( SID_DELETE_MASTER_PAGE ) ) { if (maTabControl.GetPageCount() == 1 || meEditMode == EM_MASTERPAGE || @@ -917,15 +917,15 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) mePageKind == PK_HANDOUT || (GetShellType()!=ST_DRAW&&IsLayerModeActive())) { - if (rSet.GetItemState(SID_DELETE_PAGE) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_DELETE_PAGE) == SfxItemState::DEFAULT) rSet.DisableItem(SID_DELETE_PAGE); - if (rSet.GetItemState(SID_DELETE_MASTER_PAGE)==SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_DELETE_MASTER_PAGE)==SfxItemState::DEFAULT) rSet.DisableItem(SID_DELETE_MASTER_PAGE); } } // is it allowed to delete the current layer? - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DELETE_LAYER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_DELETE_LAYER ) ) { if(GetLayerTabControl()) // #i87182# { @@ -951,9 +951,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CUT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COPY ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTLINE_BULLET )) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CUT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_COPY ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTLINE_BULLET )) { OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView(); @@ -1017,9 +1017,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } // Zoom-State - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_OUT )|| - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_PANNING ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_OUT )|| + SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_PANNING ) ) { if( GetActiveWindow()->GetZoom() <= GetActiveWindow()->GetMinZoom() || GetDocSh()->IsUIActive() ) { @@ -1039,7 +1039,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_ZOOM_PREV); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REMOTE_DLG ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_REMOTE_DLG ) ) { bool bDisableSdremoteForGood = false; @@ -1573,17 +1573,17 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) if(HasCurrentFunction()) nCurrentSId = GetCurrentFunction()->GetSlotID(); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_BASIC ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_BASIC ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_BASIC, SID_DRAWTBX_CS_BASIC == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_SYMBOL ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_SYMBOL ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_SYMBOL, SID_DRAWTBX_CS_SYMBOL == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_ARROW ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_ARROW ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_ARROW, SID_DRAWTBX_CS_ARROW == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_FLOWCHART ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_FLOWCHART ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_FLOWCHART, SID_DRAWTBX_CS_FLOWCHART == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_CALLOUT ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_CALLOUT ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_CALLOUT,SID_DRAWTBX_CS_CALLOUT == nCurrentSId )); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_STAR ) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState( SID_DRAWTBX_CS_STAR ) ) rSet.Put(SfxBoolItem(SID_DRAWTBX_CS_STAR, SID_DRAWTBX_CS_STAR == nCurrentSId )); } @@ -1639,8 +1639,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) // Set the state of two entries in the 'Slide' context sub-menu // concerning the visibility of master page background and master page // shapes. - if (rSet.GetItemState(SID_DISPLAY_MASTER_BACKGROUND) == SFX_ITEM_DEFAULT - || rSet.GetItemState(SID_DISPLAY_MASTER_OBJECTS) == SFX_ITEM_DEFAULT) + if (rSet.GetItemState(SID_DISPLAY_MASTER_BACKGROUND) == SfxItemState::DEFAULT + || rSet.GetItemState(SID_DISPLAY_MASTER_OBJECTS) == SfxItemState::DEFAULT) { SdPage* pPage = GetActualPage(); if (pPage != NULL @@ -1658,7 +1658,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } #if !HAVE_FEATURE_GLTF - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_INSERT_3DMODEL)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_INSERT_3DMODEL)) { rSet.DisableItem(SID_INSERT_3DMODEL); rSet.Put(SfxVisibilityItem(SID_INSERT_3DMODEL, false)); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 094ee9fea530..d183d947e817 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -574,7 +574,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) /* Zoom-Item Here we should propagate the corresponding value (Optimal ?, page width or page) with the help of the ZoomItems !!! */ - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) { if (GetDocSh()->IsUIActive() || (SlideShow::IsRunning(GetViewShellBase())) ) { @@ -604,7 +604,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) rSet.Put( *pZoomItem ); } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) { rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) ); if (GetDocSh()->IsUIActive() || (xSlideshow.is() && xSlideshow->isRunning()) || !GetActiveWindow() ) @@ -696,7 +696,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) } // Display of current page and layer. - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_STATUS_PAGE ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_STATUS_PAGE ) ) { sal_Int32 nPageCount = sal_Int32(GetDoc()->GetSdPageCount(mePageKind)); sal_Int32 nActivePageCount = sal_Int32(GetDoc()->GetActiveSdPageCount()); @@ -758,7 +758,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) rSet.Put (SfxStringItem (SID_STATUS_PAGE, aOUString)); } // Layout - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_STATUS_LAYOUT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_STATUS_LAYOUT ) ) { OUString aString = mpActualPage->GetLayoutName(); sal_Int32 nPos = aString.indexOf(SD_LT_SEPARATOR); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 30109bdce1cd..45f0fd775694 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -113,7 +113,7 @@ void ImpAddPrintableCharactersToTextEdit(SfxRequest& rReq, ::sd::View* pView) { OUString aInputString; - if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR)) + if(SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR)) aInputString = ((SfxStringItem&)pSet->Get(SID_ATTR_CHAR)).GetValue(); if(!aInputString.isEmpty()) diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index b9015ba7df7f..3a06f3c583fc 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -75,13 +75,13 @@ namespace sd { */ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) { - if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN) { // let "last version" of SFx en/disable GetViewFrame()->GetSlotState (SID_RELOAD, NULL, &rSet); } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) { SvxHyperlinkItem aHLinkItem; @@ -187,10 +187,10 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) rSet.Put( SfxBoolItem( SID_READONLY_MODE, mbReadOnly ) ); // output quality - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_COLOR ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_GRAYSCALE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_BLACKWHITE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_CONTRAST ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_COLOR ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_GRAYSCALE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_BLACKWHITE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTPUT_QUALITY_CONTRAST ) ) { const sal_uLong nMode = (sal_Int32)GetActiveWindow()->GetDrawMode(); rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_COLOR, (sal_uLong)OUTPUT_DRAWMODE_COLOR == nMode ) ); @@ -199,12 +199,12 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_CONTRAST, (sal_uLong)OUTPUT_DRAWMODE_CONTRAST == nMode ) ); } - if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) { rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true ) ); } - if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_ATTR_YEAR2000) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_ATTR_YEAR2000) ) { FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell(); if (pFormShell != NULL) @@ -420,7 +420,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) { SfxItemSet aAttrs( GetDoc()->GetPool() ); mpDrawView->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_HYPHENATION, bValue ) ); @@ -691,14 +691,14 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) if( bAttr && pSet ) { // if the view owns selected objects, corresponding items have to be - // changed from SFX_ITEM_DEFAULT (_ON) to SFX_ITEM_DISABLED + // changed from SfxItemState::DEFAULT (_ON) to SfxItemState::DISABLED if( mpDrawView->AreObjectsMarked() ) { SfxWhichIter aNewIter( *pSet, XATTR_LINE_FIRST, XATTR_FILL_LAST ); nWhich = aNewIter.FirstWhich(); while( nWhich ) { - if( SFX_ITEM_DEFAULT == pSet->GetItemState( nWhich ) ) + if( SfxItemState::DEFAULT == pSet->GetItemState( nWhich ) ) { rSet.ClearItem( nWhich ); rSet.DisableItem( nWhich ); @@ -708,19 +708,19 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_LRSPACE); rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); } eState = pSet->GetItemState( EE_PARA_SBL ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_SBL); rSet.InvalidateItem(SID_ATTR_PARA_LINESPACE); } eState = pSet->GetItemState( EE_PARA_ULSPACE ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_PARA_ULSPACE); rSet.InvalidateItem(SID_ATTR_PARA_ULSPACE); @@ -738,7 +738,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } eState = pSet->GetItemState( EE_CHAR_KERNING, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_CHAR_KERNING); rSet.InvalidateItem(SID_ATTR_CHAR_KERNING); diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index e03d97d6fbbd..d48c46243766 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -65,50 +65,50 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) if ( nMarkCount == 1 ) { - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BEZIER_EDIT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_UNGROUP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ENTER_GROUP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_NAME_GROUP ) || + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_BEZIER_EDIT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_UNGROUP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ENTER_GROUP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_NAME_GROUP ) || // #i68101# - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) || - - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CHANGEBEZIER ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CHANGEPOLYGON ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_LINEEND_POLYGON ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MEASURE_DLG ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONNECTION_DLG ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_SHEAR ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_GRAYS ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_COLORS ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_GRAYS ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_COLORS ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_CONVERT_TO_24BIT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_FRAME_TO_TOP ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MOREFRONT ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MOREBACK ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BEFORE_OBJ ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BEHIND_OBJ ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_REVERSE_ORDER ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ORIGINAL_SIZE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SAVE_GRAPHIC ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_TEXTATTR_DLG ) ) + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) || + + SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CHANGEBEZIER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CHANGEPOLYGON ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_LINEEND_POLYGON ) || + SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || + SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_MEASURE_DLG ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONNECTION_DLG ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_SHEAR ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_GRAYS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_4BIT_COLORS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_GRAYS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_8BIT_COLORS ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_CONVERT_TO_24BIT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_TOP ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREFRONT ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREBACK ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_BEFORE_OBJ ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_BEHIND_OBJ ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_REVERSE_ORDER ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ORIGINAL_SIZE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_SAVE_GRAPHIC ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_TEXTATTR_DLG ) ) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj); @@ -201,9 +201,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) SfxItemSet aAttrSet( GetDoc()->GetPool() ); GetView()->GetAttributes( aAttrSet ); - if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SFX_ITEM_DEFAULT && - aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SFX_ITEM_DEFAULT && - aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SFX_ITEM_DEFAULT ) + if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SfxItemState::DEFAULT && + aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SfxItemState::DEFAULT && + aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SfxItemState::DEFAULT ) { long nVal1 = ( ( const SdrMetricItem& ) aAttrSet.Get( SDRATTR_EDGELINE1DELTA ) ).GetValue(); long nVal2 = ( ( const SdrMetricItem& ) aAttrSet.Get( SDRATTR_EDGELINE2DELTA ) ).GetValue(); @@ -243,8 +243,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_DISMANTLE ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_BREAK ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_DISMANTLE ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_BREAK ) ) { if ( !mpDrawView->IsDismantlePossible(false) ) { @@ -258,7 +258,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) rSet.DisableItem( SID_BREAK ); } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) { OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView(); @@ -277,7 +277,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) else rSet.DisableItem( SID_MODIFY_FIELD ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) ) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); const bool bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE; diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 83f4405d8611..802cadb880e7 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -373,7 +373,7 @@ void OutlineViewShell::Deactivate( bool bIsMDIActivate ) */ void OutlineViewShell::GetCtrlState(SfxItemSet &rSet) { - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK)) { SvxHyperlinkItem aHLinkItem; @@ -400,13 +400,13 @@ void OutlineViewShell::GetCtrlState(SfxItemSet &rSet) } rSet.Put( SfxBoolItem( SID_READONLY_MODE, GetDocSh()->IsReadOnly() ) ); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) ) rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, true ) ); - if ( SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HALFWIDTH) || - SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_FULLWIDTH) || - SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HIRAGANA) || - SFX_ITEM_DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_KATAGANA) ) + if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HALFWIDTH) || + SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_FULLWIDTH) || + SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_HIRAGANA) || + SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_KATAGANA) ) { SvtCJKOptions aCJKOptions; if( !aCJKOptions.IsChangeCaseMapEnabled() ) @@ -762,8 +762,8 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_ZOOM_PREV); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || - SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ZOOM_OUT ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_IN ) || + SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_OUT ) ) { if( GetActiveWindow()->GetZoom() <= GetActiveWindow()->GetMinZoom() || GetDocSh()->IsUIActive() ) rSet.DisableItem( SID_ZOOM_IN ); @@ -774,7 +774,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) ::Outliner& rOutl = pOlView->GetOutliner(); // allow 'Select All'? - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_SELECTALL ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_SELECTALL ) ) { sal_Int32 nParaCount = rOutl.GetParagraphCount(); bool bDisable = nParaCount == 0; @@ -900,7 +900,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) if (bDisableCollapseAll) rSet.DisableItem(SID_OUTLINE_COLLAPSE_ALL); - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PASTE ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PASTE ) ) { if ( !pClipEvtLstnr ) { @@ -957,7 +957,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } // field commands - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) ) { const SvxFieldItem* pFldItem = pOutlinerView->GetFieldAtSelection(); @@ -970,7 +970,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_EXPAND_PAGE)) { bool bDisable = true; sal_uInt16 i = 0; @@ -1017,7 +1017,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } } - if (SFX_ITEM_DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) + if (SfxItemState::DEFAULT == rSet.GetItemState(SID_SUMMARY_PAGE)) { bool bDisable = true; sal_uInt16 i = 0; @@ -1047,7 +1047,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_THESAURUS ) ) { if ( !pOlView->IsTextEdit() ) { @@ -1064,7 +1064,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) } // is starting the presentation possible? - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_PRESENTATION ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PRESENTATION ) ) { bool bDisable = true; sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD ); @@ -1291,7 +1291,7 @@ void OutlineViewShell::ExecStatusBar(SfxRequest&) void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) { // Zoom-Item - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) { sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom(); @@ -1307,7 +1307,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) rSet.Put( *pZoomItem ); } - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) { if (GetDocSh()->IsUIActive() || !GetActiveWindow() ) { diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 47cdee4557b4..3751311a5f25 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -771,7 +771,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) // restore the old bullet item but not if the style changed if ( pOutliner->GetPrevDepth() != -1 && nDepth != -1 && - aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET ) + aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET ) { SfxItemSet aAttrs( pOutliner->GetParaAttribs( nPara ) ); aAttrs.Put( *aOldAttrs.GetItem( EE_PARA_NUMBULLET ) ); diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 72448daab8a2..c1886cd5bf74 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -86,7 +86,7 @@ namespace sd { */ void ViewShell::GetMenuState( SfxItemSet &rSet ) { - if( SFX_ITEM_DEFAULT == rSet.GetItemState( SID_STYLE_FAMILY ) ) + if( SfxItemState::DEFAULT == rSet.GetItemState( SID_STYLE_FAMILY ) ) { sal_uInt16 nFamily = (sal_uInt16)GetDocSh()->GetStyleFamily(); @@ -112,17 +112,17 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxUInt16Item(SID_STYLE_FAMILY, nFamily )); } - if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_GETUNDOSTRINGS)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_GETUNDOSTRINGS)) { ImpGetUndoStrings(rSet); } - if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_GETREDOSTRINGS)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_GETREDOSTRINGS)) { ImpGetRedoStrings(rSet); } - if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_UNDO)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_UNDO)) { ::svl::IUndoManager* pUndoManager = ImpGetUndoManager(); bool bActivate(false); @@ -149,7 +149,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) } } - if(SFX_ITEM_DEFAULT == rSet.GetItemState(SID_REDO)) + if(SfxItemState::DEFAULT == rSet.GetItemState(SID_REDO)) { ::svl::IUndoManager* pUndoManager = ImpGetUndoManager(); bool bActivate(false); diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 95eb3e90a81e..e0a1800deaff 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -722,7 +722,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& { const SfxPoolItem* pTmpItem = NULL; - if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SFX_ITEM_SET) + if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SfxItemState::SET) { return pTmpItem; } @@ -730,7 +730,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& { nNumItemId = aNewAttr.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); SfxItemState eState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) return pTmpItem; else { @@ -775,7 +775,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& aNewAttr.Put(*pItem, EE_PARA_NUMBULLET); - if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SFX_ITEM_SET ) + if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,true) == SfxItemState::SET ) { SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)aNewAttr.GetItem(EE_PARA_NUMBULLET,true); SvxNumRule* pRule = pBulletItem->GetNumRule(); @@ -790,7 +790,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& } SfxItemState eNumState = aNewAttr.GetItemState(nNumItemId, false, &pTmpItem); - if (eNumState == SFX_ITEM_SET) + if (eNumState == SfxItemState::SET) return pTmpItem; } diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 8ced478adf56..a88ae482b2d0 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -507,7 +507,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) SvtMiscOptions aMiscOptions; boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create()); - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), true, &pItem) ) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), true, &pItem) ) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); sal_uInt16 nOutStyle = @@ -515,7 +515,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) aMiscOptions.SetToolboxStyle( nOutStyle ); } - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), true, &pItem) ) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), true, &pItem) ) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); bool bBigSize = ( (const SfxBoolItem*)pItem )->GetValue(); @@ -533,104 +533,104 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) } // Backup - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), true, &pItem) ) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), true, &pItem) ) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetBackup( ( (const SfxBoolItem*)pItem )->GetValue() ); } // PrettyPrinting - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" ); aSaveOptions.SetPrettyPrinting( static_cast< const SfxBoolItem*> ( pItem )->GetValue() ); } // WarnAlienFormat - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" ); aSaveOptions.SetWarnAlienFormat( static_cast< const SfxBoolItem*> ( pItem )->GetValue() ); } // AutoSave - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() ); } // AutoSave-Propt - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetAutoSavePrompt(((const SfxBoolItem *)pItem)->GetValue()); } // AutoSave-Time - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected"); aSaveOptions.SetAutoSaveTime(((const SfxUInt16Item *)pItem)->GetValue()); } // UserAutoSave - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_USERAUTOSAVE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_USERAUTOSAVE), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetUserAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() ); } // DocInfo - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetDocInfoSave(((const SfxBoolItem *)pItem)->GetValue()); } // Mark open Documents - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue()); } // Save window settings - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveDocView(((const SfxBoolItem *)pItem)->GetValue()); } // Metric - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected"); } // HelpBalloons - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aHelpOptions.SetExtendedHelp(((const SfxBoolItem *)pItem)->GetValue()); } // HelpTips - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aHelpOptions.SetHelpTips(((const SfxBoolItem *)pItem)->GetValue()); } // WelcomeScreen - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aHelpOptions.SetWelcomeScreen( ((const SfxBoolItem *)pItem)->GetValue() ); } // WelcomeScreen - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); bool bReset = ((const SfxBoolItem *)pItem)->GetValue(); @@ -639,28 +639,28 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) OSL_FAIL( "Not implemented, may be EOL!" ); } } - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected"); aHelpOptions.SetHelpStyleSheet( ((const SfxStringItem *)pItem)->GetValue() ); } // SaveRelINet - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveRelINet(((const SfxBoolItem *)pItem)->GetValue()); } // SaveRelFSys - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveRelFSys(((const SfxBoolItem *)pItem)->GetValue()); } // Undo-Count - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected"); sal_uInt16 nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue(); @@ -689,58 +689,58 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) } // Office autostart - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() ); } // StarBasic Enable - if ( SFX_ITEM_SET == rSet.GetItemState(SID_BASIC_ENABLED, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_BASIC_ENABLED, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "SfxInt16Item expected"); aSecurityOptions.SetBasicMode( (EBasicSecurityMode)( (const SfxUInt16Item*)pItem )->GetValue() ); } // Execute PlugIns - if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected"); aSecurityOptions.SetExecutePlugins( ( (const SfxBoolItem *)pItem )->GetValue() ); } - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), true, &pItem)) { DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" ); officecfg::Inet::Settings::ooInetProxyType::set( static_cast< SfxUInt16Item const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" ); officecfg::Inet::Settings::ooInetHTTPProxyName::set( static_cast< SfxStringItem const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" ); officecfg::Inet::Settings::ooInetHTTPProxyPort::set( static_cast< SfxInt32Item const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" ); officecfg::Inet::Settings::ooInetFTPProxyName::set( static_cast< SfxStringItem const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" ); officecfg::Inet::Settings::ooInetFTPProxyPort::set( static_cast< SfxInt32Item const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_INET_NOPROXY, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected"); officecfg::Inet::Settings::ooInetNoProxy::set( @@ -748,7 +748,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) } // Secure-Referers - if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_SECURE_URL, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxStringListItem), "StringListItem expected"); ::com::sun::star::uno::Sequence< OUString > seqURLs; @@ -756,12 +756,12 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) aSecurityOptions.SetSecureURLs( seqURLs ); } - if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_WARNING, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_MACRO_WARNING, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected"); aSecurityOptions.SetWarningEnabled( ( (const SfxBoolItem *)pItem )->GetValue() ); } - if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected"); aSecurityOptions.SetConfirmationEnabled( ( (const SfxBoolItem *)pItem )->GetValue() ); @@ -783,7 +783,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) SfxAllItemSet aSendSet( rSet ); // PathName - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxAllEnumItem), "AllEnumItem expected"); const SfxAllEnumItem* pEnumItem = (const SfxAllEnumItem *)pItem; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index f16be36b767e..7fcb63c9c470 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -811,8 +811,8 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) const SfxPoolItem *pItem; SfxItemState aState = pCurrentShell ? - pCurrentShell->GetDispatcher()->QueryState(SID_ATTR_ZOOM, pItem) : SFX_ITEM_DISABLED; - if ( aState == SFX_ITEM_DISABLED ) + pCurrentShell->GetDispatcher()->QueryState(SID_ATTR_ZOOM, pItem) : SfxItemState::DISABLED; + if ( aState == SfxItemState::DISABLED ) rSet.DisableItem( nWhich ); } break; @@ -975,7 +975,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetInternalArgs_Impl(); const SfxPoolItem* pItem = NULL; Reference < XFrame > xFrame; - if ( pArgs && pArgs->GetItemState( SID_FILLFRAME, false, &pItem ) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState( SID_FILLFRAME, false, &pItem ) == SfxItemState::SET ) { OSL_ENSURE( pItem->ISA( SfxUnoFrameItem ), "SfxApplication::OfaExec_Impl: XFrames are to be transported via SfxUnoFrameItem by now!" ); xFrame = static_cast< const SfxUnoFrameItem*>( pItem )->GetFrame(); @@ -1106,7 +1106,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxPoolItem* pItem; bool bChooseOnly = false; Reference< XModel > xLimitToModel; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_RECORDMACRO, false, &pItem) ) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_RECORDMACRO, false, &pItem) ) { bool bRecord = ((SfxBoolItem*)pItem)->GetValue(); if ( bRecord ) @@ -1131,7 +1131,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; sal_Int16 nTabId = 0; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_MACROORGANIZER, false, &pItem) ) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_MACROORGANIZER, false, &pItem) ) { nTabId = ((SfxUInt16Item*)pItem)->GetValue(); } @@ -1201,7 +1201,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; OUString aLanguage; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SCRIPTORGANIZER, false, &pItem) ) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SCRIPTORGANIZER, false, &pItem) ) { aLanguage = ((SfxScriptOrganizerItem*)pItem)->getLanguage(); } @@ -1250,7 +1250,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxPoolItem* pItem=NULL; const SfxItemSet* pSet = rReq.GetArgs(); SfxItemPool* pSetPool = pSet ? pSet->GetPool() : NULL; - if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), false, &pItem ) == SFX_ITEM_SET ) + if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), false, &pItem ) == SfxItemState::SET ) aSet.Put( *pItem ); boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL )); diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index c77707bd40fa..6cb532108eee 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -940,7 +940,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b { // slot is a property sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); - if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? + if ( rSet.GetItemState( nWhich ) == SfxItemState::SET ) //??? { sal_uInt16 nSubCount = pType->nAttribs; if ( nSubCount ) @@ -976,7 +976,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArg] : pSlot->GetFormalArgument( nArg ); sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); - if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? + if ( rSet.GetItemState( nWhich ) == SfxItemState::SET ) //??? { sal_uInt16 nSubCount = rArg.pType->nAttribs; if ( nSubCount ) @@ -996,109 +996,109 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b if ( bIsMediaDescriptor ) { sal_Int32 nAdditional=0; - if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_INTERACTIONHANDLER ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INTERACTIONHANDLER ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_SALVAGE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SALVAGE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_PATH ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PATH ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FILE_DIALOG ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILE_DIALOG ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_STANDARD_DIR ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STANDARD_DIR ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_BLACK_LIST ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_BLACK_LIST ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_CONTENT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_INPUTSTREAM ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INPUTSTREAM ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_STREAM ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STREAM ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_OUTPUTSTREAM ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OUTPUTSTREAM ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TEMPLATE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_OPEN_NEW_VIEW ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OPEN_NEW_VIEW ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FAIL_ON_WARNING ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FAIL_ON_WARNING ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_VIEW_ID ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_ID ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_VIEW_DATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_DATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FILTER_DATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILTER_DATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_PLUGIN_MODE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PLUGIN_MODE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_READONLY ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_READONLY ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SELECTION ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SELECTION ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_CONTENTTYPE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENTTYPE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_POSTDATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_POSTDATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FILLFRAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILLFRAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_CHARSET ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CHARSET ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TARGETNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TARGETNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TEMPLATE_NAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_NAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_HIDDEN ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_HIDDEN ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_MINIMIZED ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MINIMIZED ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_PREVIEW ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PREVIEW ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_VIEWONLY ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEWONLY ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_EDITDOC ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_EDITDOC ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SILENT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SILENT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_JUMPMARK ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_JUMPMARK ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOCUMENT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCUMENT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_MACROEXECMODE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MACROEXECMODE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_UPDATEDOCMODE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_UPDATEDOCMODE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_REPAIRPACKAGE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_REPAIRPACKAGE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOCINFO_TITLE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCINFO_TITLE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_COMPONENTDATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTDATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_COMPONENTCONTEXT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTCONTEXT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_BASEURL ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_BASEURL ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_NOAUTOSAVE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_NOAUTOSAVE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_ENCRYPTIONDATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_ENCRYPTIONDATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_SERVICE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SERVICE ) == SfxItemState::SET ) nAdditional++; if (rSet.HasItem(SID_FILTER_PROVIDER)) ++nAdditional; @@ -1122,7 +1122,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b { for(sal_uInt16 nId = *pRanges++; nId <= *pRanges; ++nId) { - if ( rSet.GetItemState(nId) < SFX_ITEM_SET ) //??? + if ( rSet.GetItemState(nId) < SfxItemState::SET ) //??? // not really set continue; @@ -1377,67 +1377,67 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b nSlotId == SID_SAVEACOPY ) { const SfxPoolItem *pItem=0; - if ( rSet.GetItemState( SID_COMPONENTDATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sComponentData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_COMPONENTCONTEXT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTCONTEXT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sComponentContext); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStatusInd); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_INTERACTIONHANDLER, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INTERACTIONHANDLER, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sInteractionHdl); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_VIEW_DATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_DATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sViewData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FILTER_DATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILTER_DATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFilterData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOCUMENT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCUMENT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sModel); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_CONTENT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sUCBContent); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_INPUTSTREAM, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INPUTSTREAM, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sInputStream); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_STREAM, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STREAM, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStream); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_OUTPUTSTREAM, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OUTPUTSTREAM, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sOutputStream); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_POSTDATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_POSTDATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sPostData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FILLFRAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILLFRAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFrame); if ( pItem->ISA( SfxUsrAnyItem ) ) @@ -1450,92 +1450,92 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b else OSL_FAIL( "TransformItems: invalid item type for SID_FILLFRAME!" ); } - if ( rSet.GetItemState( SID_TEMPLATE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sAsTemplate); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sOpenNewView); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FAIL_ON_WARNING, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FAIL_ON_WARNING, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFailOnWarning); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_VIEW_ID, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_ID, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sViewId); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_PLUGIN_MODE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PLUGIN_MODE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sPluginMode); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOC_READONLY, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_READONLY, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sReadOnly); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDdeReconnect); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStartPresentation); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_SELECTION, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SELECTION, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSelectionOnly); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_HIDDEN, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_HIDDEN, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sHidden); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_MINIMIZED, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MINIMIZED, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sMinimized); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_SILENT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SILENT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSilent); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_PREVIEW, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PREVIEW, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sPreview); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_VIEWONLY, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEWONLY, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sViewOnly); pValue[nActProp++].Value <<= ((SfxBoolItem*)pItem)->GetValue() ; } - if ( rSet.GetItemState( SID_EDITDOC, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_EDITDOC, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDontEdit); pValue[nActProp++].Value <<= !( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FILE_DIALOG, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILE_DIALOG, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sUseSystemDialog); pValue[nActProp++].Value <<= ((SfxBoolItem*)pItem)->GetValue(); } - if ( rSet.GetItemState( SID_STANDARD_DIR, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STANDARD_DIR, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStandardDir); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_BLACK_LIST, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_BLACK_LIST, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sBlackList); @@ -1543,108 +1543,108 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b ((SfxStringListItem*)pItem)->GetStringList( aList ); pValue[nActProp++].Value <<= aList ; } - if ( rSet.GetItemState( SID_TARGETNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TARGETNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFrameName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_SALVAGE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SALVAGE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSalvagedFile); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_PATH, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PATH, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFolderName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_CONTENTTYPE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENTTYPE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sMediaType); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_TEMPLATE_NAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_NAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sTemplateName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sTemplateRegionName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_JUMPMARK, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_JUMPMARK, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sJumpMark); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_CHARSET, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CHARSET, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sCharacterSet); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_MACROEXECMODE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MACROEXECMODE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sMacroExecMode); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_UPDATEDOCMODE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_UPDATEDOCMODE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sUpdateDocMode); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_REPAIRPACKAGE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_REPAIRPACKAGE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sRepairPackage); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOCINFO_TITLE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCINFO_TITLE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDocumentTitle); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_BASEURL, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_BASEURL, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDocumentBaseURL); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sHierarchicalDocumentName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sCopyStreamIfPossible); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_NOAUTOSAVE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_NOAUTOSAVE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sNoAutoSave); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sModifyPasswordInfo); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_ENCRYPTIONDATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_ENCRYPTIONDATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sEncryptionData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSuggestedSaveAsDir); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSuggestedSaveAsName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_SERVICE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SERVICE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDocumentService); pValue[nActProp++].Value <<= OUString(static_cast<const SfxStringItem*>(pItem)->GetValue()); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 0b95c9bc368a..4184c34b10fd 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -382,7 +382,7 @@ void SfxBindings::Update_Impl sal_uInt16 nWhich = pFound->nWhichId; const SfxPoolItem *pItem = 0; SfxItemState eState = pSet->GetItemState(nWhich, true, &pItem); - if ( eState == SFX_ITEM_DEFAULT && SfxItemPool::IsWhich(nWhich) ) + if ( eState == SfxItemState::DEFAULT && SfxItemPool::IsWhich(nWhich) ) pItem = &pSet->Get(nWhich); UpdateControllers_Impl( pInterface, aFound[nPos], pItem, eState ); } @@ -400,7 +400,7 @@ void SfxBindings::Update_Impl SfxFoundCache_Impl aFoundCache( pCache->GetId(), 0, pRealSlot, pCache ); - UpdateControllers_Impl( 0, &aFoundCache, 0, SFX_ITEM_DISABLED); + UpdateControllers_Impl( 0, &aFoundCache, 0, SfxItemState::DISABLED); } } @@ -472,7 +472,7 @@ void SfxBindings::Update } if (!pMsgServer) { - pCache->SetState(SFX_ITEM_DISABLED, 0); + pCache->SetState(SfxItemState::DISABLED, 0); pImp->bInUpdate = false; InvalidateSlotsInMap_Impl(); return; @@ -549,7 +549,7 @@ void SfxBindings::SetState // Update status if ( !pCache->IsControllerDirty() ) pCache->Invalidate(false); - pCache->SetState( SFX_ITEM_DEFAULT, pItem ); + pCache->SetState( SfxItemState::DEFAULT, pItem ); //! Not implemented: Updates from EnumSlots via master slots } @@ -583,7 +583,7 @@ void SfxBindings::SetState // Update Status if ( !pCache->IsControllerDirty() ) pCache->Invalidate(false); - pCache->SetState( SFX_ITEM_DEFAULT, &rItem ); + pCache->SetState( SfxItemState::DEFAULT, &rItem ); //! Not implemented: Updates from EnumSlots via master slots } @@ -1168,14 +1168,14 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell pShell->CallState( aFunc, aSet ); const SfxPoolItem *pOldItem; SfxItemState eState = aSet.GetItemState(nWhich, true, &pOldItem); - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) return; - if ( SFX_ITEM_DEFAULT == eState && SfxItemPool::IsWhich(nWhich) ) + if ( SfxItemState::DEFAULT == eState && SfxItemPool::IsWhich(nWhich) ) pOldItem = &aSet.Get(nWhich); - if ( SFX_ITEM_SET == eState || - ( SFX_ITEM_DEFAULT == eState && + if ( SfxItemState::SET == eState || + ( SfxItemState::DEFAULT == eState && SfxItemPool::IsWhich(nWhich) && pOldItem ) ) { @@ -1202,7 +1202,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell OSL_FAIL( "Toggle only for Enums and Bools allowed" ); } } - else if ( SFX_ITEM_DONTCARE == eState ) + else if ( SfxItemState::DONTCARE == eState ) { // Create one Status-Item for each Factory SfxPoolItem *pNewItem = pSlot->GetType()->CreateItem(); @@ -1423,22 +1423,22 @@ void SfxBindings::UpdateControllers_Impl // bound until now, the Controller to update the Slot. if ( pCache && pCache->IsControllerDirty() ) { - if ( SFX_ITEM_DONTCARE == eState ) + if ( SfxItemState::DONTCARE == eState ) { // ambiguous - pCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 ); + pCache->SetState( SfxItemState::DONTCARE, (SfxPoolItem *)-1 ); } - else if ( SFX_ITEM_DEFAULT == eState && + else if ( SfxItemState::DEFAULT == eState && pFound->nWhichId > SFX_WHICH_MAX ) { // no Status or Default but without Pool SfxVoidItem aVoid(0); - pCache->SetState( SFX_ITEM_UNKNOWN, &aVoid ); + pCache->SetState( SfxItemState::UNKNOWN, &aVoid ); } - else if ( SFX_ITEM_DISABLED == eState ) - pCache->SetState(SFX_ITEM_DISABLED, 0); + else if ( SfxItemState::DISABLED == eState ) + pCache->SetState(SfxItemState::DISABLED, 0); else - pCache->SetState(SFX_ITEM_DEFAULT, pItem); + pCache->SetState(SfxItemState::DEFAULT, pItem); } // Update the slots for so far available and bound Controllers for @@ -1452,8 +1452,8 @@ void SfxBindings::UpdateControllers_Impl // Items cast on EnumItem const SfxEnumItemInterface *pEnumItem = PTR_CAST(SfxEnumItemInterface,pItem); - if ( eState == SFX_ITEM_DEFAULT && !pEnumItem ) - eState = SFX_ITEM_DONTCARE; + if ( eState == SfxItemState::DEFAULT && !pEnumItem ) + eState = SfxItemState::DONTCARE; else eState = SfxControllerItem::GetItemState( pEnumItem ); @@ -1471,10 +1471,10 @@ void SfxBindings::UpdateControllers_Impl pEnumCache->Invalidate(false); // HACK(CONTROL/SELECT Kram) ??? - if ( eState == SFX_ITEM_DONTCARE && pFound->nWhichId == 10144 ) + if ( eState == SfxItemState::DONTCARE && pFound->nWhichId == 10144 ) { SfxVoidItem aVoid(0); - pEnumCache->SetState( SFX_ITEM_UNKNOWN, &aVoid ); + pEnumCache->SetState( SfxItemState::UNKNOWN, &aVoid ); if (pSlave->GetNextSlot() == pFirstSlave) break; @@ -1482,22 +1482,22 @@ void SfxBindings::UpdateControllers_Impl continue; } - if ( SFX_ITEM_DISABLED == eState || (pEnumItem && !pEnumItem->IsEnabled( pSlave->GetSlotId())) ) + if ( SfxItemState::DISABLED == eState || (pEnumItem && !pEnumItem->IsEnabled( pSlave->GetSlotId())) ) { // disabled - pEnumCache->SetState(SFX_ITEM_DISABLED, 0); + pEnumCache->SetState(SfxItemState::DISABLED, 0); } - else if ( SFX_ITEM_DEFAULT == eState && pEnumItem ) + else if ( SfxItemState::DEFAULT == eState && pEnumItem ) { // Determine enum value sal_uInt16 nValue = pEnumItem->GetEnumValue(); SfxBoolItem aBool( pFound->nWhichId, pSlave->GetValue() == nValue ); - pEnumCache->SetState(SFX_ITEM_DEFAULT, &aBool); + pEnumCache->SetState(SfxItemState::DEFAULT, &aBool); } else { // ambiguous - pEnumCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 ); + pEnumCache->SetState( SfxItemState::DONTCARE, (SfxPoolItem *)-1 ); } } @@ -1848,7 +1848,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) { const SfxSlot* pSlot = SfxSlotPool::GetSlotPool( pDispatcher->GetFrame() ).GetSlot( nSlot ); if ( !pSlot || !pSlot->pUnoName ) - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; ::com::sun::star::util::URL aURL; OUString aCmd( ".uno:" ); @@ -1881,14 +1881,14 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) bDeleteCache = true; } - SfxItemState eState = SFX_ITEM_SET; + SfxItemState eState = SfxItemState::SET; SfxPoolItem *pItem=NULL; BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, pCache, pSlot ); pBind->acquire(); xDisp->addStatusListener( pBind, aURL ); if ( !pBind->GetStatus().IsEnabled ) { - eState = SFX_ITEM_DISABLED; + eState = SfxItemState::DISABLED; } else { @@ -1938,13 +1938,13 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) // order to allow for transition of ownership. const SfxPoolItem *pItem = NULL; SfxItemState eState = pDispatcher->QueryState( nSlot, pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { - DBG_ASSERT( pItem, "SFX_ITEM_SET but no item!" ); + DBG_ASSERT( pItem, "SfxItemState::SET but no item!" ); if ( pItem ) rpState = pItem->Clone(); } - else if ( eState == SFX_ITEM_DEFAULT && pItem ) + else if ( eState == SfxItemState::DEFAULT && pItem ) { rpState = pItem->Clone(); } diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index f28ba9883dac..dcc788ea5c7e 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -302,21 +302,21 @@ SfxItemState SfxControllerItem::GetItemState [Return value] - SfxItemState SFX_ITEM_UNKNOWN + SfxItemState SfxItemState::UNKNOWN Enabled, but no further status information available. Typical for <Slot>s, which anyway are sometimes disabled, but otherwise do not change their appearance. - SFX_ITEM_DISABLED + SfxItemState::DISABLED Disabled and no further status information available. All other values that may appear should be reset to default. - SFX_ITEM_DONTCARE + SfxItemState::DONTCARE Enabled but there were only ambiguous values available (i.e. non that can be queried). - SFX_ITEM_DEFAULT + SfxItemState::DEFAULT Enabled and with available values, which are queried by 'pState'. The Type is thus clearly defined in the entire Program and specified through the Slot. @@ -324,12 +324,12 @@ SfxItemState SfxControllerItem::GetItemState { return !pState - ? SFX_ITEM_DISABLED + ? SfxItemState::DISABLED : IsInvalidItem(pState) - ? SFX_ITEM_DONTCARE + ? SfxItemState::DONTCARE : pState->ISA(SfxVoidItem) && !pState->Which() - ? SFX_ITEM_UNKNOWN - : SFX_ITEM_DEFAULT; + ? SfxItemState::UNKNOWN + : SfxItemState::DEFAULT; } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index d04075e41fb8..bbd0d20698e1 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -2056,12 +2056,12 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp { rpState = pShell->GetSlotState(nSlot); if ( !rpState ) - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; else - return SFX_ITEM_DEFAULT; + return SfxItemState::DEFAULT; } - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; } SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno::Any& rAny ) @@ -2074,7 +2074,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: pItem = pShell->GetSlotState( nSID ); if ( !pItem ) - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; else { ::com::sun::star::uno::Any aState; @@ -2089,11 +2089,11 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: } rAny = aState; - return SFX_ITEM_DEFAULT; + return SfxItemState::DEFAULT; } } - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; } bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index e97616a68237..751614ce9f1c 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -75,7 +75,7 @@ class SfxQueryStatus_Impl: SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) : m_bQueryInProgress( false ), - m_eState( SFX_ITEM_DISABLED ), + m_eState( SfxItemState::DISABLED ), m_pItem( 0 ), m_nSlotID( nSlotId ) { @@ -104,11 +104,11 @@ throw( RuntimeException, std::exception ) SolarMutexGuard aGuard; m_pItem = NULL; - m_eState = SFX_ITEM_DISABLED; + m_eState = SfxItemState::DISABLED; if ( rEvent.IsEnabled ) { - m_eState = SFX_ITEM_DEFAULT; + m_eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getBooleanCppuType() ) @@ -150,7 +150,7 @@ throw( RuntimeException, std::exception ) } else { - m_eState = SFX_ITEM_UNKNOWN; + m_eState = SfxItemState::UNKNOWN; m_pItem = new SfxVoidItem( m_nSlotID ); } } @@ -176,7 +176,7 @@ SfxItemState SfxQueryStatus_Impl::QueryState( SfxPoolItem*& rpPoolItem ) if ( !m_bQueryInProgress ) { m_pItem = NULL; - m_eState = SFX_ITEM_DISABLED; + m_eState = SfxItemState::DISABLED; if ( m_xDispatch.is() ) { diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index fed4e29738b0..b3d8b0d79c1e 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -489,7 +489,7 @@ const SfxPoolItem* SfxRequest::GetItem // Is the item set or available at bDeep == sal_True? const SfxPoolItem *pItem = 0; - if ( ( bDeep ? SFX_ITEM_DEFAULT : SFX_ITEM_SET ) + if ( ( bDeep ? SfxItemState::DEFAULT : SfxItemState::SET ) <= pArgs->GetItemState( nWhich, bDeep, &pItem ) ) { // Compare type @@ -703,9 +703,9 @@ void SfxRequest::Done_Impl // get the property as SfxPoolItem const SfxPoolItem *pItem; sal_uInt16 nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId()); - SfxItemState eState = pSet ? pSet->GetItemState( nWhich, false, &pItem ) : SFX_ITEM_UNKNOWN; + SfxItemState eState = pSet ? pSet->GetItemState( nWhich, false, &pItem ) : SfxItemState::UNKNOWN; #ifdef DBG_UTIL - if ( SFX_ITEM_SET != eState ) + if ( SfxItemState::SET != eState ) { OStringBuffer aStr("Recording property not available: "); aStr.append(static_cast<sal_Int32>(pImp->pSlot->GetSlotId())); @@ -713,7 +713,7 @@ void SfxRequest::Done_Impl } #endif uno::Sequence < beans::PropertyValue > aSeq; - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) TransformItems( pImp->pSlot->GetSlotId(), *pSet, aSeq, pImp->pSlot ); pImp->Record( aSeq ); } diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index 96c77e4565d1..56b9aecdc6a5 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -163,17 +163,17 @@ throw( RuntimeException, std::exception ) SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame ); const SfxSlot* pSlot = rPool.GetSlot( m_nSlotID ); - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::cppu::UnoType< ::cppu::UnoVoidType >::get() ) { pItem = new SfxVoidItem( m_nSlotID ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == cppu::UnoType< bool >::get() ) { diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 140726e2e189..808c0b439a3f 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -210,7 +210,7 @@ void SfxShell::PutItem SfxStateCache* pCache = pBindings->GetStateCache( nSlotId ); if ( pCache ) { - pCache->SetState( SFX_ITEM_DEFAULT, pItem->Clone(), true ); + pCache->SetState( SfxItemState::DEFAULT, pItem->Clone(), true ); pCache->SetCachedState( true ); } } @@ -424,7 +424,7 @@ bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot ) SfxItemSet aSet(rPool, nId, nId); SfxStateFunc pFunc = rSlot.GetStateFnc(); CallState( pFunc, aSet ); - return aSet.GetItemState(nId) != SFX_ITEM_DISABLED; + return aSet.GetItemState(nId) != SfxItemState::DISABLED; } long ShellCall_Impl( void* pObj, void* pArg ) @@ -481,7 +481,7 @@ const SfxPoolItem* SfxShell::GetSlotState // Get Slot on the given Interface if ( !pIF ) pIF = GetInterface(); - SfxItemState eState = SFX_ITEM_UNKNOWN; + SfxItemState eState = SfxItemState::UNKNOWN; SfxItemPool &rPool = GetPool(); const SfxSlot* pSlot = NULL; @@ -505,26 +505,26 @@ const SfxPoolItem* SfxShell::GetSlotState eState = aSet.GetItemState( nSlotId, true, &pItem ); // get default Item if possible - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { if ( SfxItemPool::IsWhich(nSlotId) ) pItem = &rPool.GetDefaultItem(nSlotId); else - eState = SFX_ITEM_DONTCARE; + eState = SfxItemState::DONTCARE; } } else - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; // Evaluate Item and item status and possibly maintain them in pStateSet SfxPoolItem *pRetItem = 0; - if ( eState <= SFX_ITEM_DISABLED ) + if ( eState <= SfxItemState::DISABLED ) { if ( pStateSet ) pStateSet->DisableItem(nSlotId); return 0; } - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) { if ( pStateSet ) pStateSet->ClearItem(nSlotId); diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index ec2b36c70a63..61d65b499d6b 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -85,14 +85,14 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame:: { SfxPoolItem *pItem=NULL; sal_uInt16 nId = pCache->GetId(); - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; if ( !aStatus.IsEnabled ) { // default } else if (aStatus.State.hasValue()) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Any aAny = aStatus.State; ::com::sun::star::uno::Type pType = aAny.getValueType(); @@ -137,7 +137,7 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame:: { // DONTCARE status pItem = new SfxVoidItem(0); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } for ( SfxControllerItem *pCtrl = pCache->GetItemLink(); @@ -184,7 +184,7 @@ SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ): pInternalController(0), pController(0), pLastItem( 0 ), - eLastState( SFX_ITEM_UNKNOWN ), + eLastState( SfxItemState::UNKNOWN ), bItemVisible( true ) { bCtrlDirty = true; @@ -343,7 +343,7 @@ void SfxStateCache::SetState void SfxStateCache::SetVisibleState( bool bShow ) { - SfxItemState eState( SFX_ITEM_DEFAULT ); + SfxItemState eState( SfxItemState::DEFAULT ); const SfxPoolItem* pState( NULL ); bool bDeleteItem( false ); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index f25c0e6755e0..9086313fd26a 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -134,11 +134,11 @@ void SAL_CALL SfxUnoControllerItem::statusChanged(const ::com::sun::star::frame: } else if ( pCtrlItem ) { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == cppu::UnoType< bool >::get() ) @@ -223,7 +223,7 @@ void SfxUnoControllerItem::GetNewDispatch() if ( xDispatch.is() ) xDispatch->addStatusListener( (::com::sun::star::frame::XStatusListener*) this, aCommand ); else if ( pCtrlItem ) - pCtrlItem->StateChanged( pCtrlItem->GetId(), SFX_ITEM_DISABLED, NULL ); + pCtrlItem->StateChanged( pCtrlItem->GetId(), SfxItemState::DISABLED, NULL ); } ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SfxUnoControllerItem::TryGetDispatch( SfxFrame *pFrame ) @@ -808,9 +808,9 @@ void SAL_CALL SfxDispatchController_Impl::addStatusListener(const ::com::sun::st ::com::sun::star::uno::Any aState; if ( !pDispatcher && pBindings ) pDispatcher = GetBindings().GetDispatcher_Impl(); - SfxItemState eState = pDispatcher ? pDispatcher->QueryState( GetId(), aState ) : SFX_ITEM_DONTCARE; + SfxItemState eState = pDispatcher ? pDispatcher->QueryState( GetId(), aState ) : SfxItemState::DONTCARE; - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { // Use special uno struct to transport don't care state ::com::sun::star::frame::status::ItemStatus aItemStatus; @@ -824,7 +824,7 @@ void SAL_CALL SfxDispatchController_Impl::addStatusListener(const ::com::sun::st aEvent.Requery = sal_False; if ( bVisible ) { - aEvent.IsEnabled = eState != SFX_ITEM_DISABLED; + aEvent.IsEnabled = eState != SfxItemState::DISABLED; aEvent.State = aState; } else @@ -876,7 +876,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( bNotify && pContnr ) { ::com::sun::star::uno::Any aState; - if ( ( eState >= SFX_ITEM_DEFAULT ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) ) + if ( ( eState >= SfxItemState::DEFAULT ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) ) { // Retrieve metric from pool to have correct sub ID when calling QueryValue sal_uInt16 nSubId( 0 ); @@ -899,7 +899,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt pState->QueryValue( aState, (sal_uInt8)nSubId ); } - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) { // Use special uno struct to transport don't care state ::com::sun::star::frame::status::ItemStatus aItemStatus; @@ -910,7 +910,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt ::com::sun::star::frame::FeatureStateEvent aEvent; aEvent.FeatureURL = aDispatchURL; aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch; - aEvent.IsEnabled = eState != SFX_ITEM_DISABLED; + aEvent.IsEnabled = eState != SfxItemState::DISABLED; aEvent.Requery = sal_False; aEvent.State = aState; diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d92fa6b6d62f..561f5ce1bd0c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -655,7 +655,7 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet) if ( pDlg ) pExSet = pDlg->GetExampleSet(); - if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, true, &pItem ) ) + if ( pExSet && SfxItemState::SET != pExSet->GetItemState( SID_DOCINFO, true, &pItem ) ) pInfo = m_pInfoItem; else if ( pItem ) pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem *)pItem ); @@ -936,7 +936,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) + if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { SfxDocumentInfoItem* m_pInfoItem = (SfxDocumentInfoItem*)pItem; bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); @@ -950,7 +950,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) { const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) + if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { SfxDocumentInfoItem* m_pInfoItem = (SfxDocumentInfoItem*)pItem; bool bUseAuthor = bEnableUseUserData && m_pUseUserDataCB->IsChecked(); @@ -1012,7 +1012,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) // determine name OUString aName; const SfxPoolItem* pItem = 0; - if ( SFX_ITEM_SET != rSet->GetItemState( ID_FILETP_TITLE, false, &pItem ) ) + if ( SfxItemState::SET != rSet->GetItemState( ID_FILETP_TITLE, false, &pItem ) ) { INetURLObject aURL(aFile); aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET ); @@ -1029,7 +1029,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) m_pNameED->ClearModifyFlag(); // determine RO-Flag - if ( SFX_ITEM_UNKNOWN == rSet->GetItemState( ID_FILETP_READONLY, false, &pItem ) + if ( SfxItemState::UNKNOWN == rSet->GetItemState( ID_FILETP_READONLY, false, &pItem ) || !pItem ) m_pReadOnlyCB->Hide(); else @@ -1173,7 +1173,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent, // Determine the Titels const SfxPoolItem* pItem = 0; OUString aTitle( GetText() ); - if ( SFX_ITEM_SET != + if ( SfxItemState::SET != rItemSet.GetItemState( SID_EXPLORER_PROPS_START, false, &pItem ) ) { // File name @@ -2129,7 +2129,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet ) if ( GetTabDialog() && GetTabDialog()->GetExampleSet() ) { - if ( SFX_ITEM_SET != + if ( SfxItemState::SET != GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) ) pInfo = &( SfxDocumentInfoItem& )rSet->Get( SID_DOCINFO ); else @@ -2601,7 +2601,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet ) if ( GetTabDialog() && GetTabDialog()->GetExampleSet() ) { - if ( SFX_ITEM_SET != + if ( SfxItemState::SET != GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) ) pInfo = &( SfxDocumentInfoItem& )rSet->Get( SID_DOCINFO ); else diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx index 921132947d58..de97fa5246dc 100644 --- a/sfx2/source/dialog/itemconnect.cxx +++ b/sfx2/source/dialog/itemconnect.cxx @@ -49,13 +49,13 @@ sal_uInt16 ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { - return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), true ) != SFX_ITEM_UNKNOWN; + return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), true ) != SfxItemState::UNKNOWN; } const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot ); - return (rItemSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, true ) : 0; + return (rItemSet.GetItemState( nWhich, true ) >= SfxItemState::DEFAULT) ? rItemSet.GetItem( nWhich, true ) : 0; } const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) @@ -66,7 +66,7 @@ const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot ) { sal_uInt16 nWhich = GetWhichId( rDestSet, nSlot ); - if( rOldSet.GetItemState( nWhich, false ) == SFX_ITEM_DEFAULT ) + if( rOldSet.GetItemState( nWhich, false ) == SfxItemState::DEFAULT ) rDestSet.ClearItem( nWhich ); } diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 90c11e82533f..a563b553e769 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -221,7 +221,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const SfxItemS LINK( this, SfxManageStyleSheetPage, LoseFocusHdl ) ); } // It is a style with auto update? (SW only) - if(SFX_ITEM_SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) + if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) m_pAutoCB->Show(); } @@ -504,7 +504,7 @@ void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet) // It is a style with auto update? (SW only) const SfxPoolItem* pPoolItem; - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, false, &pPoolItem ) ) m_pAutoCB->Check( ( (const SfxBoolItem*)pPoolItem )->GetValue() ); m_pAutoCB->SaveValue(); diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index ee897442ad77..c8bce8afa3d2 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -60,7 +60,7 @@ namespace const SfxPoolItem* pItem; SfxDispatcher* pDisp = pViewSh->GetDispatcher(); SfxItemState nState = pDisp->QueryState( _nSlot, pItem ); - bRet = SFX_ITEM_DEFAULT <= nState; + bRet = SfxItemState::DEFAULT <= nState; if (bRet) _rValue = ( static_cast< const SfxBoolItem* >( pItem ) )->GetValue(); } @@ -261,7 +261,7 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & ) { const SfxPoolItem* pItem; SfxDispatcher* pDisp = pViewSh->GetDispatcher(); - if (SFX_ITEM_DEFAULT <= pDisp->QueryState( SID_HTML_MODE, pItem )) + if (SfxItemState::DEFAULT <= pDisp->QueryState( SID_HTML_MODE, pItem )) { sal_uInt16 nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue(); bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 ); diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 664468a769d5..52669b69e170 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -134,7 +134,7 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) { SfxItemState eState = pInSet->GetItemState( nWhich, false ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) pExampleSet->ClearItem( nWhich ); else pExampleSet->Put( pInSet->Get( nWhich ) ); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index e0a7ce4ccebb..d71879ef83cb 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -282,7 +282,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet, if ( pImpl->mbStandard && rOldSet.GetParent() ) pItem = GetItem( *rOldSet.GetParent(), nSlot ); else if ( rSet.GetParent() && - SFX_ITEM_DONTCARE == rSet.GetItemState( nWh ) ) + SfxItemState::DONTCARE == rSet.GetItemState( nWh ) ) pItem = GetItem( *rSet.GetParent(), nSlot ); else pItem = GetItem( rOldSet, nSlot ); diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index cdb9899f7e7f..aad39a00fffb 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -66,7 +66,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta case SID_STYLE_FAMILY4: case SID_STYLE_FAMILY5: { - bool bAvailable = SFX_ITEM_DEFAULT == eState; + bool bAvailable = SfxItemState::DEFAULT == eState; if ( !bAvailable ) rTemplateDlg.SetFamilyState(GetId(), 0); else { @@ -75,7 +75,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta DBG_ASSERT(pStateItem != 0, "SfxTemplateItem expected"); rTemplateDlg.SetFamilyState( GetId(), pStateItem ); } - bool bDisable = eState == SFX_ITEM_DISABLED; + bool bDisable = eState == SfxItemState::DISABLED; // Disable Familly sal_uInt16 nFamily = 0; switch( GetId()) @@ -98,9 +98,9 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta } case SID_STYLE_WATERCAN: { - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) nWaterCanState = 0xff; - else if( eState == SFX_ITEM_DEFAULT ) + else if( eState == SfxItemState::DEFAULT ) { const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem); assert(pStateItem); //BoolItem expected @@ -116,36 +116,36 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta break; } case SID_STYLE_EDIT: - rTemplateDlg.EnableEdit( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableEdit( SfxItemState::DISABLED != eState ); break; case SID_STYLE_DELETE: - rTemplateDlg.EnableDel( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableDel( SfxItemState::DISABLED != eState ); break; case SID_STYLE_HIDE: - rTemplateDlg.EnableHide( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableHide( SfxItemState::DISABLED != eState ); break; case SID_STYLE_SHOW: - rTemplateDlg.EnableShow( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableShow( SfxItemState::DISABLED != eState ); break; case SID_STYLE_NEW_BY_EXAMPLE: rTemplateDlg.EnableExample_Impl( - GetId(), SFX_ITEM_DISABLED != eState ); + GetId(), SfxItemState::DISABLED != eState ); break; case SID_STYLE_UPDATE_BY_EXAMPLE: { rTemplateDlg.EnableExample_Impl( - GetId(), eState != SFX_ITEM_DISABLED ); + GetId(), eState != SfxItemState::DISABLED ); break; } case SID_STYLE_NEW: { - rTemplateDlg.EnableNew( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableNew( SfxItemState::DISABLED != eState ); break; } case SID_STYLE_DRAGHIERARCHIE: { - rTemplateDlg.EnableTreeDrag( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableTreeDrag( SfxItemState::DISABLED != eState ); break; } case SID_STYLE_FAMILY : diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 62146bac2ec4..eceacca0e6bf 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -382,7 +382,7 @@ IMPL_LINK_NOARG(SfxVersionDialog, SelectHdl_Impl) const SfxPoolItem *pDummy=NULL; SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy ); eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy ); - m_pCompareButton->Enable(bEnable && eState >= SFX_ITEM_DEFAULT); + m_pCompareButton->Enable(bEnable && eState >= SfxItemState::DEFAULT); return 0L; } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index e19e5172117a..1922cad4c5b7 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1057,7 +1057,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, NULL ); const SfxPoolItem* pItem = NULL; - if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, true, &pItem ) != SFX_ITEM_SET ) + if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, true, &pItem ) != SfxItemState::SET ) { // the file dialog preselects the password checkbox if the provided mediadescriptor has encryption data entry // after dialog execution the password interaction flag will be either removed or not diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 33700ffc22f7..a5ec5c907ecc 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -352,7 +352,7 @@ void SfxObjectShell::LoadStyles for ( sal_uInt16 i = 0; i < nFound; ++i ) { - pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT); + pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT); if(pFound[i].pSource->HasParentSupport()) pFound[i].pDest->SetParent(pFound[i].pSource->GetParent()); if(pFound[i].pSource->HasFollowSupport()) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index d534b6b958c0..41f05b33117c 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -917,11 +917,11 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo // we need some properties in the media descriptor, so we have to make sure that they are in Any aStreamAny; aStreamAny <<= pMedium->GetInputStream(); - if ( pSet->GetItemState( SID_INPUTSTREAM ) < SFX_ITEM_SET ) + if ( pSet->GetItemState( SID_INPUTSTREAM ) < SfxItemState::SET ) pSet->Put( SfxUnoAnyItem( SID_INPUTSTREAM, aStreamAny ) ); - if ( pSet->GetItemState( SID_FILE_NAME ) < SFX_ITEM_SET ) + if ( pSet->GetItemState( SID_FILE_NAME ) < SfxItemState::SET ) pSet->Put( SfxStringItem( SID_FILE_NAME, pMedium->GetName() ) ); - if ( pSet->GetItemState( SID_FILTER_NAME ) < SFX_ITEM_SET ) + if ( pSet->GetItemState( SID_FILTER_NAME ) < SfxItemState::SET ) pSet->Put( SfxStringItem( SID_FILTER_NAME, pFilter->GetName() ) ); Sequence< PropertyValue > rProperties; @@ -2666,7 +2666,7 @@ bool SfxObjectShell::CommonSaveAs_Impl } aParams->ClearItem( SID_COPY_STREAM_IF_POSSIBLE ); - pImp->bPasswd = SFX_ITEM_SET == aParams->GetItemState(SID_PASSWORD); + pImp->bPasswd = SfxItemState::SET == aParams->GetItemState(SID_PASSWORD); SfxMedium *pActMed = GetMedium(); const INetURLObject aActName(pActMed->GetName()); @@ -2680,7 +2680,7 @@ bool SfxObjectShell::CommonSaveAs_Impl return false; } - if( SFX_ITEM_SET != aParams->GetItemState(SID_UNPACK) && SvtSaveOptions().IsSaveUnpacked() ) + if( SfxItemState::SET != aParams->GetItemState(SID_UNPACK) && SvtSaveOptions().IsSaveUnpacked() ) aParams->Put( SfxBoolItem( SID_UNPACK, false ) ); OUString aTempFileURL; @@ -2788,7 +2788,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl pMergedParams->Put( *pParams ); #ifdef DBG_UTIL - if ( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SFX_ITEM_SET ) + if ( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SfxItemState::SET ) SAL_WARN( "sfx.doc","Salvage item present in Itemset, check the parameters!"); #endif diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx index f7bfe683da08..cf58c3c6557d 100644 --- a/sfx2/source/inet/inettbc.cxx +++ b/sfx2/source/inet/inettbc.cxx @@ -204,7 +204,7 @@ void SfxURLToolBoxControl_Impl::StateChanged if ( nSID == SID_OPENURL ) { // Disable URL box if command is disabled - GetURLBox()->Enable( SFX_ITEM_DISABLED != eState ); + GetURLBox()->Enable( SfxItemState::DISABLED != eState ); } if ( GetURLBox()->IsEnabled() ) @@ -214,7 +214,7 @@ void SfxURLToolBoxControl_Impl::StateChanged if ( GetURLBox()->IsVisible() ) GetURLBox()->GrabFocus(); } - else if ( !GetURLBox()->IsModified() && SFX_ITEM_DEFAULT == eState ) + else if ( !GetURLBox()->IsModified() && SfxItemState::DEFAULT == eState ) { SvtURLBox* pURLBox = GetURLBox(); pURLBox->Clear(); diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index eb4cf2575ac6..69799c96c55e 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -178,9 +178,9 @@ void SfxMenuControl::StateChanged #endif pOwnMenu->EnableItem( GetId(), bIsObjMenu ? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() ) - : eState != SFX_ITEM_DISABLED ); + : eState != SfxItemState::DISABLED ); - if ( eState != SFX_ITEM_DEFAULT ) + if ( eState != SfxItemState::DEFAULT ) { // check only for non-Object Menus if ( !bIsObjMenu ) diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx index bf817cd69563..a0de0e3ebae3 100644 --- a/sfx2/source/sidebar/ControllerItem.cxx +++ b/sfx2/source/sidebar/ControllerItem.cxx @@ -141,7 +141,7 @@ void ControllerItem::StateChanged ( bool ControllerItem::IsEnabled (SfxItemState eState) const { - if (eState == SFX_ITEM_DISABLED) + if (eState == SfxItemState::DISABLED) return false; else if ( ! SvtCommandOptions().HasEntries(SvtCommandOptions::CMDOPTION_DISABLED)) { diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 41f77ae74fd0..70e828000a4d 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -249,17 +249,17 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) svt::StatusbarController::statusChanged( rEvent ); else { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) { pItem = new SfxVoidItem( nSlotID ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == ::getBooleanCppuType() ) { @@ -446,11 +446,11 @@ void SfxStatusBarControl::StateChanged DBG_ASSERT( pBar != 0, "setting state to dangling StatusBar" ); const SfxStringItem* pStr = PTR_CAST( SfxStringItem, pState ); - if ( eState == SFX_ITEM_DEFAULT && pStr ) + if ( eState == SfxItemState::DEFAULT && pStr ) pBar->SetItemText( nSID, pStr->GetValue() ); else { - DBG_ASSERT( eState != SFX_ITEM_DEFAULT || pState->ISA(SfxVoidItem), + DBG_ASSERT( eState != SfxItemState::DEFAULT || pState->ISA(SfxVoidItem), "wrong SfxPoolItem subclass in SfxStatusBarControl" ); pBar->SetItemText( nSID, OUString() ); } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 0e559cb18169..7133fefa9526 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -388,21 +388,21 @@ SfxItemState SfxToolBoxControl::GetItemState( [Return value] - SfxItemState SFX_ITEM_UNKNOWN + SfxItemState SfxItemState::UNKNOWN Enabled, however no further status information is available. Typical for <Slot>s, which are temporarily disabled a anyway but other than that do not change their appearance. - SFX_ITEM_DISABLED + SfxItemState::DISABLED Disabled, no further status information is available. All other displayed values should be reset to the default if possible. - SFX_ITEM_DONTCARE + SfxItemState::DONTCARE Enabled but there were only ambiguous values available (i.e. none that could be queried). - SFX_ITEM_DEFAULT + SfxItemState::DEFAULT Enabled and with available values which can be queried through'pState'. The type is thus by the Slot clearly defined in the entire Program. @@ -410,12 +410,12 @@ SfxItemState SfxToolBoxControl::GetItemState( { return !pState - ? SFX_ITEM_DISABLED + ? SfxItemState::DISABLED : IsInvalidItem(pState) - ? SFX_ITEM_DONTCARE + ? SfxItemState::DONTCARE : pState->ISA(SfxVoidItem) && !pState->Which() - ? SFX_ITEM_UNKNOWN - : SFX_ITEM_DEFAULT; + ? SfxItemState::UNKNOWN + : SfxItemState::DEFAULT; } void SfxToolBoxControl::Dispatch( @@ -507,17 +507,17 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) svt::ToolboxController::statusChanged( rEvent ); else { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) { pItem = new SfxVoidItem( nSlotId ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == ::getBooleanCppuType() ) { @@ -549,9 +549,9 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= aItemStatus; SfxItemState tmpState = (SfxItemState) aItemStatus.State; // make sure no-one tries to send us a combination of states - if (eState != SFX_ITEM_UNKNOWN && eState != SFX_ITEM_DISABLED && - eState != SFX_ITEM_READONLY && eState != SFX_ITEM_DONTCARE && - eState != SFX_ITEM_DEFAULT && eState != SFX_ITEM_SET) + if (eState != SfxItemState::UNKNOWN && eState != SfxItemState::DISABLED && + eState != SfxItemState::READONLY && eState != SfxItemState::DONTCARE && + eState != SfxItemState::DEFAULT && eState != SfxItemState::SET) throw ::com::sun::star::uno::RuntimeException("unknown status"); eState = tmpState; pItem = new SfxVoidItem( nSlotId ); @@ -908,14 +908,14 @@ void SfxToolBoxControl::StateChanged return; // enabled/disabled-Flag correcting the lump sum - pImpl->pBox->EnableItem( GetId(), eState != SFX_ITEM_DISABLED ); + pImpl->pBox->EnableItem( GetId(), eState != SfxItemState::DISABLED ); sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() ); nItemBits &= ~TIB_CHECKABLE; ::TriState eTri = TRISTATE_FALSE; switch ( eState ) { - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: if ( pState ) { if ( pState->ISA(SfxBoolItem) ) @@ -938,7 +938,7 @@ void SfxToolBoxControl::StateChanged } break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: { eTri = TRISTATE_INDET; nItemBits |= TIB_CHECKABLE; @@ -1061,17 +1061,17 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) } else { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) { pItem = new SfxVoidItem( nSlotId ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == ::getBooleanCppuType() ) { @@ -1103,9 +1103,9 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= aItemStatus; SfxItemState tmpState = (SfxItemState) aItemStatus.State; // make sure no-one tries to send us a combination of states - if (eState != SFX_ITEM_UNKNOWN && eState != SFX_ITEM_DISABLED && - eState != SFX_ITEM_READONLY && eState != SFX_ITEM_DONTCARE && - eState != SFX_ITEM_DEFAULT && eState != SFX_ITEM_SET) + if (eState != SfxItemState::UNKNOWN && eState != SfxItemState::DISABLED && + eState != SfxItemState::READONLY && eState != SfxItemState::DONTCARE && + eState != SfxItemState::DEFAULT && eState != SfxItemState::SET) throw ::com::sun::star::uno::RuntimeException("unknown status"); eState = tmpState; pItem = new SfxVoidItem( nSlotId ); @@ -1357,7 +1357,7 @@ void SfxPopupWindow::StateChanged( /* [Description] See also <SfxControllerItem::StateChanged()>. In addition the Popup - will become hidden when eState==SFX_ITEM_DISABLED and in all other + will become hidden when eState==SfxItemState::DISABLED and in all other cases it will be shown again if it is floating. In general this requires to call the Base class. @@ -1365,7 +1365,7 @@ void SfxPopupWindow::StateChanged( */ { - if ( SFX_ITEM_DISABLED == eState ) + if ( SfxItemState::DISABLED == eState ) { Hide(); } diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index f28748f44386..98402fc29acc 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -375,7 +375,7 @@ void SfxFrame::GetViewData_Impl() SfxItemSet *pSet = GetDescriptor()->GetArgs(); bool bGetViewData = false; - if ( GetController().is() && pSet->GetItemState( SID_VIEW_DATA ) != SFX_ITEM_SET ) + if ( GetController().is() && pSet->GetItemState( SID_VIEW_DATA ) != SfxItemState::SET ) { ::com::sun::star::uno::Any aData = GetController()->getViewData(); pSet->Put( SfxUsrAnyItem( SID_VIEW_DATA, aData ) ); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 0a89ad9d3dda..e7ebd7686800 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2259,7 +2259,7 @@ void SfxViewFrame::ExecView_Impl { const SfxPoolItem *pItem = 0; if ( rReq.GetArgs() - && SFX_ITEM_SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, false, &pItem ) + && SfxItemState::SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, false, &pItem ) ) { const sal_uInt16 nViewId = static_cast< const SfxUInt16Item* >( pItem )->GetValue(); @@ -3185,7 +3185,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) { const SfxPoolItem* pDummy = NULL; SfxItemState eState = GetDispatcher()->QueryState( SID_HYPERLINK_SETLINK, pDummy ); - if ( SFX_ITEM_DISABLED == eState ) + if ( SfxItemState::DISABLED == eState ) rState.DisableItem(nSID); else { diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 9590acc75922..404a8b8ca1ff 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -361,7 +361,7 @@ void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest ) SfxControllerItem* pCtrl = pCache->GetItemLink(); while( pCtrl ) { - pCtrl->StateChanged( SID_FOCUSURLBOX, SFX_ITEM_UNKNOWN, 0 ); + pCtrl->StateChanged( SID_FOCUSURLBOX, SfxItemState::UNKNOWN, 0 ); pCtrl = pCtrl->GetItemLink(); } } diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index c480adfcb7eb..f7e3d0d3a1a0 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -1028,7 +1028,7 @@ SfxItemSet SmTextForwarder::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( pEditEngine->HasParaAttrib( nPara, nWhich ) ) aSet.Put( pEditEngine->GetParaAttrib( nPara, nWhich ) ); @@ -1118,12 +1118,12 @@ static SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ES 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; @@ -1163,7 +1163,7 @@ static SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ES { // ... and its different to this one than the state is dont care if( *pParaItem != *(i->pAttr) ) - return SFX_ITEM_DONTCARE; + return SfxItemState::DONTCARE; } else { @@ -1182,17 +1182,17 @@ static SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ES if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) ) 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 { @@ -1206,7 +1206,7 @@ static SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ES SfxItemState SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { - SfxItemState nState = SFX_ITEM_DISABLED; + SfxItemState nState = SfxItemState::DISABLED; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) nState = GetSvxEditEngineItemState( *pEditEngine, rSel, nWhich ); @@ -1215,7 +1215,7 @@ SfxItemState SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 n SfxItemState SmTextForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const { - SfxItemState nState = SFX_ITEM_DISABLED; + SfxItemState nState = SfxItemState::DISABLED; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) { diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx index 4756e8277721..e8643fdd5999 100644 --- a/starmath/source/config.cxx +++ b/starmath/source/config.cxx @@ -52,31 +52,31 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet) sal_uInt16 nU16; bool bVal; - if (rSet.GetItemState(SID_PRINTSIZE, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_PRINTSIZE, true, &pItem) == SfxItemState::SET) { nU16 = ((const SfxUInt16Item *) pItem)->GetValue(); SetPrintSize( (SmPrintSize) nU16 ); } - if (rSet.GetItemState(SID_PRINTZOOM, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_PRINTZOOM, true, &pItem) == SfxItemState::SET) { nU16 = ((const SfxUInt16Item *) pItem)->GetValue(); SetPrintZoomFactor( nU16 ); } - if (rSet.GetItemState(SID_PRINTTITLE, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_PRINTTITLE, true, &pItem) == SfxItemState::SET) { bVal = ((const SfxBoolItem *) pItem)->GetValue(); SetPrintTitle( bVal ); } - if (rSet.GetItemState(SID_PRINTTEXT, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_PRINTTEXT, true, &pItem) == SfxItemState::SET) { bVal = ((const SfxBoolItem *) pItem)->GetValue(); SetPrintFormulaText( bVal ); } - if (rSet.GetItemState(SID_PRINTFRAME, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_PRINTFRAME, true, &pItem) == SfxItemState::SET) { bVal = ((const SfxBoolItem *) pItem)->GetValue(); SetPrintFrame( bVal ); } - if (rSet.GetItemState(SID_AUTOREDRAW, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_AUTOREDRAW, true, &pItem) == SfxItemState::SET) { bVal = ((const SfxBoolItem *) pItem)->GetValue(); SetAutoRedraw( bVal ); } - if (rSet.GetItemState(SID_NO_RIGHT_SPACES, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_NO_RIGHT_SPACES, true, &pItem) == SfxItemState::SET) { bVal = ((const SfxBoolItem *) pItem)->GetValue(); if (IsIgnoreSpacesRight() != bVal) { @@ -86,7 +86,7 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet) Broadcast(SfxSimpleHint(HINT_FORMATCHANGED)); } } - if (rSet.GetItemState(SID_SAVE_ONLY_USED_SYMBOLS, true, &pItem) == SFX_ITEM_SET) + if (rSet.GetItemState(SID_SAVE_ONLY_USED_SYMBOLS, true, &pItem) == SfxItemState::SET) { bVal = ((const SfxBoolItem *) pItem)->GetValue(); SetSaveOnlyUsedSymbols( bVal ); } diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index d4b06a448551..b110cc33acbe 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -1111,7 +1111,7 @@ void SmDocShell::Execute(SfxRequest& rReq) sal_uInt16 nId = rReq.GetSlot(), nCnt = 1; const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem )) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem )) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); bool (::svl::IUndoManager:: *fnDo)(); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index a03e497f22c3..5da9f2908755 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1509,7 +1509,7 @@ void SmViewShell::Execute(SfxRequest& rReq) bool bVal; if ( pArgs && - SFX_ITEM_SET == pArgs->GetItemState( SID_FORMULACURSOR, false, &pItem)) + SfxItemState::SET == pArgs->GetItemState( SID_FORMULACURSOR, false, &pItem)) bVal = ((SfxBoolItem *) pItem)->GetValue(); else bVal = !pp->GetConfig()->IsShowFormulaCursor(); @@ -1806,7 +1806,7 @@ void SmViewShell::Execute(SfxRequest& rReq) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) ) + if ( pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) ) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); aGraphic.SetZoom( nCurrentZoom ); diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx index 9b1de9e2289d..53f948455687 100644 --- a/svl/source/items/itemprop.cxx +++ b/svl/source/items/itemprop.cxx @@ -185,10 +185,10 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn // get the SfxPoolItem const SfxPoolItem* pItem = 0; SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem ); - if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > rEntry.nWID ) + if(SfxItemState::SET != eState && SFX_WHICH_MAX > rEntry.nWID ) pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID); // return item values as uno::Any - if(eState >= SFX_ITEM_DEFAULT && pItem) + if(eState >= SfxItemState::DEFAULT && pItem) { pItem->QueryValue( rAny, rEntry.nMemberId ); } @@ -245,10 +245,10 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn const SfxPoolItem* pItem = 0; boost::scoped_ptr<SfxPoolItem> pNewItem; SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem ); - if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > rEntry.nWID ) + if(SfxItemState::SET != eState && SFX_WHICH_MAX > rEntry.nWID ) pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID); //maybe there's another way to find an Item - if(eState < SFX_ITEM_DEFAULT) + if(eState < SfxItemState::DEFAULT) { SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID); if(FillItem(aSet, rEntry.nWID, false)) @@ -296,9 +296,9 @@ PropertyState SfxItemPropertySet::getPropertyState(const SfxItemPropertySimpleEn // Get item state SfxItemState eState = rSet.GetItemState( nWhich, false ); // Return item value as UnoAny - if(eState == SFX_ITEM_DEFAULT) + if(eState == SfxItemState::DEFAULT) eRet = PropertyState_DEFAULT_VALUE; - else if(eState < SFX_ITEM_DEFAULT) + else if(eState < SfxItemState::DEFAULT) eRet = PropertyState_AMBIGUOUS_VALUE; return eRet; } @@ -319,9 +319,9 @@ PropertyState SfxItemPropertySet::getPropertyState(const OUString& rName, cons // Get item state SfxItemState eState = rSet.GetItemState(nWhich, false); // Return item value as UnoAny - if(eState == SFX_ITEM_DEFAULT) + if(eState == SfxItemState::DEFAULT) eRet = PropertyState_DEFAULT_VALUE; - else if(eState < SFX_ITEM_DEFAULT) + else if(eState < SfxItemState::DEFAULT) eRet = PropertyState_AMBIGUOUS_VALUE; return eRet; } diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 295c3f798d93..249082ce00a7 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -452,7 +452,7 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich, { // Find the range in which the Which is located const SfxItemSet* pAktSet = this; - SfxItemState eRet = SFX_ITEM_UNKNOWN; + SfxItemState eRet = SfxItemState::UNKNOWN; do { SfxItemArray ppFnd = pAktSet->_aItems; @@ -467,7 +467,7 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich, ppFnd += nWhich - *pPtr; if ( !*ppFnd ) { - eRet = SFX_ITEM_DEFAULT; + eRet = SfxItemState::DEFAULT; if( !bSrchInParent ) return eRet; // Not present break; // Keep searching in the parents! @@ -475,16 +475,16 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich, if ( (SfxPoolItem*) -1 == *ppFnd ) // Different ones are present - return SFX_ITEM_DONTCARE; + return SfxItemState::DONTCARE; if ( (*ppFnd)->Type() == TYPE(SfxVoidItem) ) - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; if (ppItem) { *ppItem = *ppFnd; } - return SFX_ITEM_SET; + return SfxItemState::SET; } ppFnd += *(pPtr+1) - *pPtr + 1; pPtr += 2; @@ -496,7 +496,7 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich, bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem) const { - bool bRet = SFX_ITEM_SET == GetItemState(nWhich, true, ppItem); + bool bRet = SfxItemState::SET == GetItemState(nWhich, true, ppItem); if (!bRet && ppItem) *ppItem = NULL; return bRet; @@ -621,9 +621,9 @@ bool SfxItemSet::Put( const SfxItemSet& rSet, bool bInvalidAsDefault ) * Default (0 pointer) and Invalid (-1 pointer) Items are processed * according to their parameter 'eDontCareAs' and 'eDefaultAs': * - * SFX_ITEM_SET: Hard set to the default of the Pool - * SFX_ITEM_DEFAULT: Deleted (0 pointer) - * SFX_ITEM_DONTCARE: Invalid (-1 pointer) + * SfxItemState::SET: Hard set to the default of the Pool + * SfxItemState::DEFAULT: Deleted (0 pointer) + * SfxItemState::DONTCARE: Invalid (-1 pointer) * * NB: All other values for 'eDontCareAs' and 'eDefaultAs' are invalid */ @@ -647,15 +647,15 @@ void SfxItemSet::PutExtended // Item ist DontCare: switch ( eDontCareAs ) { - case SFX_ITEM_SET: + case SfxItemState::SET: Put( rSet.GetPool()->GetDefaultItem(nWhich), nWhich ); break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: ClearItem( nWhich ); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: InvalidateItem( nWhich ); break; @@ -672,15 +672,15 @@ void SfxItemSet::PutExtended // Item is default: switch ( eDefaultAs ) { - case SFX_ITEM_SET: + case SfxItemState::SET: Put( rSet.GetPool()->GetDefaultItem(nWhich), nWhich ); break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: ClearItem( nWhich ); break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: InvalidateItem( nWhich ); break; @@ -701,7 +701,7 @@ void SfxItemSet::MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo ) { // special case: exactly one sal_uInt16 which is already included? SfxItemState eItemState = GetItemState(nFrom, false); - if ( nFrom == nTo && ( eItemState == SFX_ITEM_DEFAULT || eItemState == SFX_ITEM_SET ) ) + if ( nFrom == nTo && ( eItemState == SfxItemState::DEFAULT || eItemState == SfxItemState::SET ) ) return; // merge new range @@ -745,19 +745,19 @@ void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges ) { // direct move of pointer (not via pool) SfxItemState eState = GetItemState( nWID, false, aNewItems+n ); - if ( SFX_ITEM_SET == eState ) + if ( SfxItemState::SET == eState ) { // increment new item count and possibly increment ref count ++nNewCount; aNewItems[n]->AddRef(); } - else if ( SFX_ITEM_DISABLED == eState ) + else if ( SfxItemState::DISABLED == eState ) { // put "disabled" item ++nNewCount; aNewItems[n] = new SfxVoidItem(0); } - else if ( SFX_ITEM_DONTCARE == eState ) + else if ( SfxItemState::DONTCARE == eState ) { ++nNewCount; aNewItems[n] = (SfxPoolItem*)-1; @@ -845,7 +845,7 @@ bool SfxItemSet::Set while ( nWhich ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, true, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( nWhich, true, &pItem ) ) bRet |= 0 != Put( *pItem, pItem->Which() ); nWhich = aIter.NextWhich(); } @@ -879,7 +879,7 @@ const SfxPoolItem* SfxItemSet::GetItem // Is the Item set or 'bDeep == true' available? const SfxPoolItem *pItem = 0; SfxItemState eState = GetItemState( nWhich, bSrchInParent, &pItem ); - if ( bSrchInParent && SFX_ITEM_DEFAULT == eState && + if ( bSrchInParent && SfxItemState::DEFAULT == eState && nWhich <= SFX_WHICH_MAX ) pItem = &_pPool->GetDefaultItem(nWhich); @@ -1042,7 +1042,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet ) sal_uInt16 nWhich = IsInvalidItem( pItem ) ? GetWhichByPos( aIter.GetCurPos() ) : pItem->Which(); - if( SFX_ITEM_UNKNOWN == rSet.GetItemState( nWhich, false ) ) + if( SfxItemState::UNKNOWN == rSet.GetItemState( nWhich, false ) ) ClearItem( nWhich ); // Delete if( aIter.IsAtEnd() ) break; @@ -1112,7 +1112,7 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet ) sal_uInt16 nWhich = IsInvalidItem( pItem ) ? GetWhichByPos( aIter.GetCurPos() ) : pItem->Which(); - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, false ) ) + if( SfxItemState::SET == rSet.GetItemState( nWhich, false ) ) ClearItem( nWhich ); // Delete if( aIter.IsAtEnd() ) break; @@ -1603,7 +1603,7 @@ SfxItemSet *SfxItemSet::Clone(bool bItems, SfxItemPool *pToPool ) const while ( nWhich ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == GetItemState( nWhich, false, &pItem ) ) + if ( SfxItemState::SET == GetItemState( nWhich, false, &pItem ) ) pNewSet->Put( *pItem, pItem->Which() ); nWhich = aIter.NextWhich(); } diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx index 113989791779..d1ba00a6e504 100644 --- a/svx/inc/sdr/properties/e3dsceneproperties.hxx +++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx @@ -53,7 +53,7 @@ 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 SAL_OVERRIDE; diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx index f5c026baa6b5..032110694d59 100644 --- a/svx/inc/sdr/properties/groupproperties.hxx +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -65,7 +65,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/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 043718365ae8..2f3f8629c5ca 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -107,8 +107,8 @@ namespace accessibility void RemoveAttribs( const ESelection& /*rSelection*/, bool /*bRemoveParaAttribs*/, sal_uInt16 /*nWhich*/ ) SAL_OVERRIDE {} void GetPortions( sal_Int32 /*nPara*/, std::vector<sal_Int32>& /*rList*/ ) const SAL_OVERRIDE {} - SfxItemState GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SFX_ITEM_UNKNOWN; } - SfxItemState GetItemState( sal_Int32 /*nPara*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SFX_ITEM_UNKNOWN; } + SfxItemState GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SfxItemState::UNKNOWN; } + SfxItemState GetItemState( sal_Int32 /*nPara*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SfxItemState::UNKNOWN; } SfxItemPool* GetPool() const SAL_OVERRIDE { return NULL; } diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index bcf20610d1ad..3e7c0ab7866a 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -246,7 +246,7 @@ sal_uInt16 SvxXConnectionPreview::GetLineDeltaAnz() const SfxItemSet& rSet = pEdgeObj->GetMergedItemSet(); sal_uInt16 nCount(0); - if(SFX_ITEM_DONTCARE != rSet.GetItemState(SDRATTR_EDGELINEDELTAANZ)) + if(SfxItemState::DONTCARE != rSet.GetItemState(SDRATTR_EDGELINEDELTAANZ)) nCount = ((const SdrEdgeLineDeltaAnzItem&)rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue(); return nCount; diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx index 7f2aa04ce3ce..0bf0012f7bdf 100644 --- a/svx/source/dialog/dlgutil.cxx +++ b/svx/source/dialog/dlgutil.cxx @@ -32,7 +32,7 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) { FieldUnit eUnit = FUNIT_INCH; const SfxPoolItem* pItem = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC, false, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC, false, &pItem ) ) eUnit = (FieldUnit)( (const SfxUInt16Item*)pItem )->GetValue(); else { @@ -46,7 +46,7 @@ bool GetApplyCharUnit( const SfxItemSet& rSet ) { bool bUseCharUnit = false; const SfxPoolItem* pItem = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_APPLYCHARUNIT, false, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_APPLYCHARUNIT, false, &pItem ) ) bUseCharUnit = ((const SfxBoolItem*)pItem )->GetValue(); else { diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 5f4a53da0dde..88e101bb4303 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -71,7 +71,7 @@ //TODO: remove this and calculate off the actual size of text, not //an arbitrary number of characters #define TEXT_WIDTH 80 -#define ISITEMSET rSet.GetItemState(nWhich)>=SFX_ITEM_DEFAULT +#define ISITEMSET rSet.GetItemState(nWhich)>=SfxItemState::DEFAULT using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -857,7 +857,7 @@ void SvxFontPrevWindow::AutoCorrectFontColor( void ) static bool GetWhich (const SfxItemSet &rSet, sal_uInt16 nSlot, sal_uInt16 &rWhich) { rWhich = rSet.GetPool()->GetWhich( nSlot, true ); - return rSet.GetItemState(rWhich) >= SFX_ITEM_DEFAULT; + return rSet.GetItemState(rWhich) >= SfxItemState::DEFAULT; } static void SetPrevFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ) diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index d7f167c6bdb6..0deaeb51f97c 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -279,40 +279,40 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj void SvxGraphicFilter::DisableGraphicFilterSlots( SfxItemSet& rSet ) { - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER ) ) rSet.DisableItem( SID_GRFFILTER ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_INVERT ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_INVERT ) ) rSet.DisableItem( SID_GRFFILTER_INVERT ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SMOOTH ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SMOOTH ) ) rSet.DisableItem( SID_GRFFILTER_SMOOTH ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SHARPEN ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SHARPEN ) ) rSet.DisableItem( SID_GRFFILTER_SHARPEN ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_REMOVENOISE ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_REMOVENOISE ) ) rSet.DisableItem( SID_GRFFILTER_REMOVENOISE ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SOBEL ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SOBEL ) ) rSet.DisableItem( SID_GRFFILTER_SOBEL ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_MOSAIC ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_MOSAIC ) ) rSet.DisableItem( SID_GRFFILTER_MOSAIC ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_EMBOSS ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_EMBOSS ) ) rSet.DisableItem( SID_GRFFILTER_EMBOSS ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_POSTER ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_POSTER ) ) rSet.DisableItem( SID_GRFFILTER_POSTER ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_POPART ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_POPART ) ) rSet.DisableItem( SID_GRFFILTER_POPART ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SEPIA ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SEPIA ) ) rSet.DisableItem( SID_GRFFILTER_SEPIA ); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SOLARIZE ) ) + if( SfxItemState::DEFAULT <= rSet.GetItemState( SID_GRFFILTER_SOLARIZE ) ) rSet.DisableItem( SID_GRFFILTER_SOLARIZE ); }; diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 3b9c05d887e2..3051c57ab536 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -318,26 +318,26 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet ) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == GetItemSet().GetItemState(GetWhich(nId), false, &pItem)) + if(SfxItemState::SET == GetItemSet().GetItemState(GetWhich(nId), false, &pItem)) { const SfxItemSet* _pSet = &(static_cast< const SvxSetItem* >(pItem)->GetItemSet()); - if(_pSet->GetItemState(nWBrush) == SFX_ITEM_SET) + if(_pSet->GetItemState(nWBrush) == SfxItemState::SET) { aSet.Put(_pSet->Get(nWBrush)); } - if(_pSet->GetItemState(nWBoxInfo) == SFX_ITEM_SET) + if(_pSet->GetItemState(nWBoxInfo) == SfxItemState::SET) { aSet.Put(_pSet->Get(nWBoxInfo)); } - if(_pSet->GetItemState(nWBox) == SFX_ITEM_SET) + if(_pSet->GetItemState(nWBox) == SfxItemState::SET) { aSet.Put(_pSet->Get(nWBox)); } - if(_pSet->GetItemState(nWShadow) == SFX_ITEM_SET) + if(_pSet->GetItemState(nWShadow) == SfxItemState::SET) { aSet.Put(_pSet->Get(nWShadow)); } @@ -345,7 +345,7 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet ) //UUUU take care of [XATTR_XATTR_FILL_FIRST .. XATTR_FILL_LAST] for(sal_uInt16 nFillStyleId(XATTR_FILL_FIRST); nFillStyleId <= XATTR_FILL_LAST; nFillStyleId++) { - if(_pSet->GetItemState(nFillStyleId) == SFX_ITEM_SET) + if(_pSet->GetItemState(nFillStyleId) == SfxItemState::SET) { aSet.Put(_pSet->Get(nFillStyleId)); } @@ -381,7 +381,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) // Evaluate header-/footer- attributes const SvxSetItem* pSetItem = 0; - if ( SFX_ITEM_SET == rSet->GetItemState( GetWhich(nId), false, + if ( SfxItemState::SET == rSet->GetItemState( GetWhich(nId), false, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rHeaderSet = pSetItem->GetItemSet(); @@ -465,7 +465,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) 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)))) { @@ -642,7 +642,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl) const SfxPoolItem* pItem; - if(SFX_ITEM_SET == GetItemSet().GetItemState(GetWhich(nId), false, &pItem)) + if(SfxItemState::SET == GetItemSet().GetItemState(GetWhich(nId), false, &pItem)) { // If a SfxItemSet from the SetItem for SID_ATTR_PAGE_HEADERSET or // SID_ATTR_PAGE_FOOTERSET exists, use it's content @@ -660,7 +660,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl) } } - if(SFX_ITEM_SET == GetItemSet().GetItemState(nInner, false, &pItem)) + if(SfxItemState::SET == GetItemSet().GetItemState(nInner, false, &pItem)) { // The set InfoItem is always required pBBSet->Put(*pItem); @@ -706,7 +706,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl) { const sal_uInt16 nWhich = GetWhich(SID_ATTR_BRUSH); - if(pBBSet->GetItemState(nWhich) == SFX_ITEM_SET) + if(pBBSet->GetItemState(nWhich) == SfxItemState::SET) { //UUUU create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(pBBSet->Get(nWhich)); @@ -732,7 +732,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl) { const sal_uInt16 nWhich = GetWhich(SID_ATTR_BORDER_OUTER); - if(pBBSet->GetItemState(nWhich) == SFX_ITEM_SET) + if(pBBSet->GetItemState(nWhich) == SfxItemState::SET) { const SvxBoxItem& rItem = (const SvxBoxItem&)pBBSet->Get(nWhich); @@ -776,7 +776,7 @@ void SvxHFPage::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(); @@ -795,7 +795,7 @@ void SvxHFPage::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)); @@ -809,7 +809,7 @@ void SvxHFPage::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); @@ -820,7 +820,7 @@ void SvxHFPage::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(); @@ -839,7 +839,7 @@ void SvxHFPage::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)); @@ -853,7 +853,7 @@ void SvxHFPage::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); @@ -872,7 +872,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) { nWhich = GetWhich(SID_ATTR_BRUSH); - if(rSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) + if(rSet.GetItemState(nWhich) >= SfxItemState::DEFAULT) { //UUUU create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rSet.Get(nWhich)); @@ -886,7 +886,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) m_pBspWin->setPageFillAttributes(aPageFillAttributes); nWhich = GetWhich(SID_ATTR_BORDER_OUTER); - if(rSet.GetItemState(nWhich) >= SFX_ITEM_DEFAULT) + if(rSet.GetItemState(nWhich) >= SfxItemState::DEFAULT) { const SvxBoxItem& rItem = static_cast< const SvxBoxItem& >(rSet.Get(nWhich)); m_pBspWin->SetBorder(rItem); @@ -955,7 +955,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) // Evaluate Header attribute const SvxSetItem* pSetItem = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), + if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), false, (const SfxPoolItem**)&pSetItem ) ) { @@ -995,7 +995,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) } pSetItem = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), + if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), false, (const SfxPoolItem**)&pSetItem ) ) { diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 61f800447146..81b4d502e720 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -211,7 +211,7 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) { const SfxPoolItem* pAttr = 0; - if( SFX_ITEM_SET == rSet->GetItemState( SID_ATTR_GRID_OPTIONS , false, + if( SfxItemState::SET == rSet->GetItemState( SID_ATTR_GRID_OPTIONS , false, (const SfxPoolItem**)&pAttr )) { const SvxGridItem* pGridAttr = (SvxGridItem*)pAttr; @@ -237,7 +237,7 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet ) { const SfxPoolItem* pAttr = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , false, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , false, (const SfxPoolItem**)&pAttr )) { const SvxGridItem* pGridAttr = (SvxGridItem*) pAttr; @@ -248,7 +248,7 @@ void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet ) // Metric Change if necessary (as TabPage is in the dialog, where the // metric can be set - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , false, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC , false, (const SfxPoolItem**)&pAttr )) { const SfxUInt16Item* pItem = (SfxUInt16Item*) pAttr; diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index 4133eaea288b..d87ddabb5826 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -46,8 +46,8 @@ SvxRulerItem::SvxRulerItem(sal_uInt16 _nId, SvxRuler &rRul, SfxBindings &rBindin void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) { - // SFX_ITEM_DONTCARE => pState == -1 => PTR_CAST buff - if ( eState != SFX_ITEM_DEFAULT ) + // SfxItemState::DONTCARE => pState == -1 => PTR_CAST buff + if ( eState != SfxItemState::DEFAULT ) pState = 0; switch(nSID) diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 804b11ee74fa..0d35871225d0 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -291,7 +291,7 @@ void SvxRubyDialog::Activate() SfxModelessDialog::Activate(); SfxPoolItem* pState = 0; SfxItemState eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState ); - bool bEnable = (eState < SFX_ITEM_DEFAULT) || !pState || !((SfxBoolItem*)pState)->GetValue(); + bool bEnable = (eState < SfxItemState::DEFAULT) || !pState || !((SfxBoolItem*)pState)->GetValue(); delete pState; m_pStylistPB->Enable(bEnable); //get selection from current view frame @@ -565,7 +565,7 @@ IMPL_LINK_NOARG(SvxRubyDialog, StylistHdl_Impl) { SfxPoolItem* pState = 0; SfxItemState eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState ); - if(eState <= SFX_ITEM_SET || !pState || !((SfxBoolItem*)pState)->GetValue()) + if(eState <= SfxItemState::SET || !pState || !((SfxBoolItem*)pState)->GetValue()) { pBindings->GetDispatcher()->Execute( SID_STYLE_DESIGNER, SFX_CALLMODE_ASYNCHRON | diff --git a/svx/source/dialog/srchctrl.cxx b/svx/source/dialog/srchctrl.cxx index 8b11d6d5ed82..16f76437a265 100644 --- a/svx/source/dialog/srchctrl.cxx +++ b/svx/source/dialog/srchctrl.cxx @@ -43,7 +43,7 @@ SvxSearchController::SvxSearchController void SvxSearchController::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { if ( SID_STYLE_FAMILY1 <= nSID && nSID <= SID_STYLE_FAMILY4 ) { diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 0a5ca73116d6..a78060580bcb 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1905,7 +1905,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl) const SfxPoolItem* pItem; for( sal_uInt16 n = 0; n < pList->Count(); ++n ) if( !IsInvalidItem( (pAItem = &pList->GetObject(n))->pItem ) && - SFX_ITEM_SET == aOutSet.GetItemState( + SfxItemState::SET == aOutSet.GetItemState( pAItem->pItem->Which(), false, &pItem ) ) { delete pAItem->pItem; diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index febf4d025dc2..d28b3cded20b 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -495,9 +495,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) while(nWhich) { SfxItemState eState = rAttrs.GetItemState(nWhich, false); - if(SFX_ITEM_DONTCARE == eState) + if(SfxItemState::DONTCARE == eState) mpRemember2DAttributes->InvalidateItem(nWhich); - else if(SFX_ITEM_SET == eState) + else if(SfxItemState::SET == eState) mpRemember2DAttributes->Put(rAttrs.Get(nWhich, false)); nWhich = aIter.NextWhich(); @@ -518,7 +518,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Segment Number Can be changed? and other states SfxItemState eState = rAttrs.GetItemState( SID_ATTR_3D_INTERN, false, &pItem ); - if( SFX_ITEM_SET == eState ) + if( SfxItemState::SET == eState ) { sal_uInt32 nState = ( ( const SfxUInt32Item* )pItem )->GetValue(); bool bExtrude = ( nState & 2 ); @@ -599,7 +599,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Bitmap fill ? -> Status bool bBitmap(false); eState = rAttrs.GetItemState(XATTR_FILLSTYLE); - if(eState != SFX_ITEM_DONTCARE) + if(eState != SfxItemState::DONTCARE) { drawing::FillStyle eXFS = (drawing::FillStyle)((const XFillStyleItem&)rAttrs.Get(XATTR_FILLSTYLE)).GetValue(); bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH); @@ -630,7 +630,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aNumHorizontal.IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS); - if(eState != SFX_ITEM_DONTCARE) + if(eState != SfxItemState::DONTCARE) { sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); if(nValue != (sal_uInt32 )aNumHorizontal.GetValue()) @@ -655,7 +655,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aNumVertical.IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); if( nValue != (sal_uInt32) aNumVertical.GetValue() ) @@ -680,7 +680,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aMtrDepth.IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); sal_uInt32 nValue2 = GetCoreValue( aMtrDepth, ePoolUnit ); @@ -707,7 +707,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Double walled / Double sided eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); if( bValue != aBtnDoubleSided.IsChecked() ) @@ -731,7 +731,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aMtrPercentDiagonal.IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); if( nValue != aMtrPercentDiagonal.GetValue() ) @@ -756,7 +756,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aMtrBackscale.IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); if( nValue != aMtrBackscale.GetValue() ) @@ -781,7 +781,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aMtrEndAngle.IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_Int32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); if( nValue != aMtrEndAngle.GetValue() ) @@ -802,7 +802,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Normal type eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_KIND); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const Svx3DNormalsKindItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); @@ -831,7 +831,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Normal inverted eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_INVERT); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); if( bValue != aBtnNormalsInvert.IsChecked() ) @@ -853,7 +853,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // 2-sided lighting eState = rAttrs.GetItemState(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); if( bValue != aBtnTwoSidedLighting.IsChecked() ) @@ -876,7 +876,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Representation // Shademode eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADE_MODE); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const Svx3DShadeModeItem&)rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue(); if( nValue != aLbShademode.GetSelectEntryPos() ) @@ -896,7 +896,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // 3D-Shadow eState = rAttrs.GetItemState(SDRATTR_3DOBJ_SHADOW_3D); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); if( bValue != aBtnShadow3d.IsChecked() ) @@ -920,7 +920,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Inclination (Shadow) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADOW_SLANT); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); if( nValue != aMtrSlant.GetValue() ) @@ -940,7 +940,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Distance eState = rAttrs.GetItemState(SDRATTR_3DSCENE_DISTANCE); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); sal_uInt32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit ); @@ -964,7 +964,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Focal length eState = rAttrs.GetItemState(SDRATTR_3DSCENE_FOCAL_LENGTH); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); sal_uInt32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit ); @@ -991,7 +991,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) basegfx::B3DVector aVector; // Light 1 (Color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_1); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); ColorLB* pLb = &aLbLight1; @@ -1011,7 +1011,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 1 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_1); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight1 )) || @@ -1033,14 +1033,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 1 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_1); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } //Light 2 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_2); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); ColorLB* pLb = &aLbLight2; @@ -1060,7 +1060,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 2 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_2); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight2 )) || @@ -1082,14 +1082,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } //Light 2 (Direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_2); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } //Light 3 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); ColorLB* pLb = &aLbLight3; @@ -1109,7 +1109,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Ligh 3 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_3); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight3)) || @@ -1131,14 +1131,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 3 (Direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_3); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } // Light 4 (Color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); ColorLB* pLb = &aLbLight4; @@ -1158,7 +1158,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 4 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_4); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight4 )) || @@ -1180,14 +1180,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 4 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_4); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } // Light 5 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); ColorLB* pLb = &aLbLight5; @@ -1207,7 +1207,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 5 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_5); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight5 )) || @@ -1229,14 +1229,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 5 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_5); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } // Light 6 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); ColorLB* pLb = &aLbLight6; @@ -1256,7 +1256,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 6 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_6); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight6 )) || @@ -1278,14 +1278,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 6 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_6); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } // Light 7 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); ColorLB* pLb = &aLbLight7; @@ -1305,7 +1305,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 7 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_7); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight7 )) || @@ -1327,14 +1327,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 7 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_7); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } // Light 8 (color) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); ColorLB* pLb = &aLbLight8; @@ -1354,7 +1354,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 8 (on/off) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_8); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bOn = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue(); if( ( bOn && !GetUILightState( aBtnLight8 )) || @@ -1376,14 +1376,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } // Light 8 (direction) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_8); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bUpdate = true; } // Ambient light eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); ColorLB* pLb = &aLbAmbientlight; @@ -1408,7 +1408,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( bBitmap ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_KIND); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const Svx3DTextureKindItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue(); @@ -1433,7 +1433,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Mode eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_MODE); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const Svx3DTextureModeItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue(); @@ -1458,7 +1458,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Projection X eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_X); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const Svx3DTextureProjectionXItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); @@ -1487,7 +1487,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Projection Y eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_Y); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const Svx3DTextureProjectionYItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); @@ -1516,7 +1516,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Filter eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { bool bValue = ((const SfxBoolItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); if( bValue != aBtnTexFilter.IsChecked() ) @@ -1543,7 +1543,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Object color eState = rAttrs.GetItemState(XATTR_FILLCOLOR); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const XFillColorItem&)rAttrs.Get(XATTR_FILLCOLOR)).GetColorValue(); ColorLB* pLb = &aLbMatColor; @@ -1564,7 +1564,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Self-luminous color eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_EMISSION); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); ColorLB* pLb = &aLbMatEmission; @@ -1585,7 +1585,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Specular eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); ColorLB* pLb = &aLbMatSpecular; @@ -1606,7 +1606,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Specular Intensity eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); if( nValue != aMtrMatSpecularIntensity.GetValue() ) @@ -1628,7 +1628,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Other // Perspective eState = rAttrs.GetItemState(SDRATTR_3DSCENE_PERSPECTIVE); - if( eState != SFX_ITEM_DONTCARE ) + if( eState != SfxItemState::DONTCARE ) { ProjectionType ePT = (ProjectionType)((const Svx3DPerspectiveItem&)rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); if( ( !aBtnPerspective.IsChecked() && ePT == PR_PERSPECTIVE ) || @@ -1663,12 +1663,12 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // set LineStyle hard to XLINE_NONE when it's not set so that // the default (XLINE_SOLID) is not used for 3d preview - if(SFX_ITEM_SET != aSet.GetItemState(XATTR_LINESTYLE, false)) + if(SfxItemState::SET != aSet.GetItemState(XATTR_LINESTYLE, false)) aSet.Put(XLineStyleItem(XLINE_NONE)); - // set FillColor hard to WHITE when it's SFX_ITEM_DONTCARE so that + // set FillColor hard to WHITE when it's SfxItemState::DONTCARE so that // the default (Blue7) is not used for 3d preview - if(SFX_ITEM_DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false)) + if(SfxItemState::DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false)) aSet.Put(XFillColorItem(OUString(), Color(COL_WHITE))); aCtlPreview.Set3DAttributes(aSet); @@ -1717,9 +1717,9 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) while(nWhich) { SfxItemState eState = mpRemember2DAttributes->GetItemState(nWhich, false); - if(SFX_ITEM_DONTCARE == eState) + if(SfxItemState::DONTCARE == eState) rAttrs.InvalidateItem(nWhich); - else if(SFX_ITEM_SET == eState) + else if(SfxItemState::SET == eState) rAttrs.Put(mpRemember2DAttributes->Get(nWhich, false)); nWhich = aIter.NextWhich(); @@ -3267,7 +3267,7 @@ SvxConvertTo3DItem::SvxConvertTo3DItem(sal_uInt16 _nId, SfxBindings* _pBindings) void SvxConvertTo3DItem::StateChanged(sal_uInt16 /*_nId*/, SfxItemState eState, const SfxPoolItem* /*pState*/) { - bool bNewState = (eState != SFX_ITEM_DISABLED); + bool bNewState = (eState != SfxItemState::DISABLED); if(bNewState != bState) { bState = bNewState; diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index fbb3b368d721..56d5a8320822 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -752,14 +752,14 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe { SfxViewFrame* pCurrentFrame = SfxViewFrame::Current(); - SfxItemState eState = SFX_ITEM_UNKNOWN; + SfxItemState eState = SfxItemState::UNKNOWN; // ask the bindings of the current view frame (which should be the one we're residing in) for the state if (pCurrentFrame) { SfxPoolItem* pItem = NULL; eState = pCurrentFrame->GetBindings().QueryState(SID_FM_CTL_PROPERTIES, pItem); - if (eState >= SFX_ITEM_DEFAULT && pItem ) + if (eState >= SfxItemState::DEFAULT && pItem ) { bChecked = pItem->ISA(SfxBoolItem) && ((SfxBoolItem*)pItem)->GetValue(); rMenu.CheckItem(SID_FM_SHOW_PROPERTY_BROWSER,bChecked); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 0d746437043c..bfc357101e1f 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2162,7 +2162,7 @@ namespace svxform if ( !pState || SID_FM_DATANAVIGATOR_CONTROL != nSID ) return; - if ( eState >= SFX_ITEM_DEFAULT ) + if ( eState >= SfxItemState::DEFAULT ) { FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() ); Update( pShell ); diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index efd0890eb4a5..ea6fa56e03c9 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1910,7 +1910,7 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c if( !pState || SID_FM_FILTER_NAVIGATOR_CONTROL != nSID ) return; - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() ); UpdateContent( pShell ); diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 86964972ba5c..6eefc8108c18 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -627,7 +627,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool m_bInStateChange = true; try { - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) { FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell()); InterfaceBag aSelection; diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index aae32a4fc7b0..e49e4dab2de8 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -529,7 +529,7 @@ namespace svxform if( !pState || SID_FM_FMEXPLORER_CONTROL != nSID ) return; - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() ); UpdateContent( pShell ); diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 36671195d898..69d232a590ae 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -739,7 +739,7 @@ void FmFormShell::Execute(SfxRequest &rReq) if ( pArgs ) { const SfxPoolItem* pItem; - if ( ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) ) == SFX_ITEM_SET ) + if ( ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) ) == SfxItemState::SET ) { const SfxInt32Item* pTypedItem = PTR_CAST( SfxInt32Item, pItem ); if ( pTypedItem ) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index b555eb8c7942..379188c3f769 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -4083,11 +4083,11 @@ void ControlConversionMenuController::StateChanged(sal_uInt16 nSID, SfxItemState SfxMenuControl::StateChanged(nSID, eState, pState); else if (FmXFormShell::isControlConversionSlot(nSID)) { - if ((m_pConversionMenu->GetItemPos(nSID) != MENU_ITEM_NOTFOUND) && (eState == SFX_ITEM_DISABLED)) + if ((m_pConversionMenu->GetItemPos(nSID) != MENU_ITEM_NOTFOUND) && (eState == SfxItemState::DISABLED)) { m_pConversionMenu->RemoveItem(m_pConversionMenu->GetItemPos(nSID)); } - else if ((m_pConversionMenu->GetItemPos(nSID) == MENU_ITEM_NOTFOUND) && (eState != SFX_ITEM_DISABLED)) + else if ((m_pConversionMenu->GetItemPos(nSID) == MENU_ITEM_NOTFOUND) && (eState != SfxItemState::DISABLED)) { // We can't simply re-insert the item because we have a clear order for all the our items. // So first we have to determine the position of the item to insert. diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 2a7c71e59018..a1c5702c858b 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -663,7 +663,7 @@ namespace svx const SfxItemSet& rModifiedItems = *xDialog->GetOutputItemSet(); for ( WhichId nWhich = pPool->GetFirstWhich(); nWhich <= pPool->GetLastWhich(); ++nWhich ) { - if ( rModifiedItems.GetItemState( nWhich ) == SFX_ITEM_SET ) + if ( rModifiedItems.GetItemState( nWhich ) == SfxItemState::SET ) { SfxSlotId nSlotForItemSet = pPool->GetSlotId( nWhich ); const SfxPoolItem* pModifiedItem = rModifiedItems.GetItem( nWhich ); diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index b4e8a960975a..b5da823bbc3a 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -123,7 +123,7 @@ void FmFormView::Init() if ( pObjShell && pObjShell->GetMedium() ) { const SfxPoolItem *pItem=0; - if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, false, &pItem ) == SFX_ITEM_SET ) + if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET ) { ::comphelper::NamedValueCollection aComponentData( ((SfxUnoAnyItem*)pItem)->GetValue() ); bInitDesignMode = aComponentData.getOrDefault( "ApplyFormDesignMode", bInitDesignMode ); diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 58b357b31f14..6de6ee7ab443 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -280,7 +280,7 @@ void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoo if (!pState || SID_FM_FIELDS_CONTROL != nSID) return; - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) { FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell()); UpdateContent(pShell); diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 6405cf53afbc..f519dd462b19 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -156,7 +156,7 @@ void SvxFmTbxCtlConfig::StateChanged(sal_uInt16 nSID, SfxItemState eState, const if (nSID == SID_FM_CONFIG) { sal_uInt16 nSlot = 0; - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) nSlot = ((SfxUInt16Item*)pState)->GetValue(); switch( nSlot ) @@ -264,7 +264,7 @@ void SvxFmTbxCtlAbsRec::StateChanged( sal_uInt16 nSID, SfxItemState eState, cons pWin->SetValue( pItem ? pItem->GetValue() : -1 ); } - bool bEnable = SFX_ITEM_DISABLED != eState && pState; + bool bEnable = SfxItemState::DISABLED != eState && pState; if (!bEnable) pWin->SetText(OUString()); diff --git a/svx/source/mnuctrls/SmartTagCtl.cxx b/svx/source/mnuctrls/SmartTagCtl.cxx index 78a2ffb9999c..5dc91c703b07 100644 --- a/svx/source/mnuctrls/SmartTagCtl.cxx +++ b/svx/source/mnuctrls/SmartTagCtl.cxx @@ -138,9 +138,9 @@ void SvxSmartTagsControl::FillMenu() void SvxSmartTagsControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - mrParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState ); + mrParent.EnableItem( GetId(), SfxItemState::DISABLED != eState ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { const SvxSmartTagItem* pSmartTagItem = PTR_CAST( SvxSmartTagItem, pState ); if ( 0 != pSmartTagItem ) diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index ecd4c5303c41..fec5d11d2aed 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -119,7 +119,7 @@ void SvxClipBoardControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co if ( SID_CLIPBOARD_FORMAT_ITEMS == nSID ) { DELETEZ( pClipboardFmtItem ); - if ( eState >= SFX_ITEM_DEFAULT ) + if ( eState >= SfxItemState::DEFAULT ) { pClipboardFmtItem = pState->Clone(); GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) | TIB_DROPDOWN ); @@ -131,8 +131,8 @@ void SvxClipBoardControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co else { // enable the item as a whole - bDisabled = (GetItemState(pState) == SFX_ITEM_DISABLED); - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); + bDisabled = (GetItemState(pState) == SfxItemState::DISABLED); + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); } } diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx index 8a36eb685a1c..6ef5157b5cbf 100644 --- a/svx/source/mnuctrls/fntctl.cxx +++ b/svx/source/mnuctrls/fntctl.cxx @@ -93,9 +93,9 @@ void SvxFontMenuControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - rParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState ); + rParent.EnableItem( GetId(), SfxItemState::DISABLED != eState ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { if ( !pMenu->GetItemCount() ) FillMenu(); diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index 1b17c56ebb68..dae879db0e1f 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -80,9 +80,9 @@ void SvxFontSizeMenuControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - rParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState ); + rParent.EnableItem( GetId(), SfxItemState::DISABLED != eState ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { if ( pState->ISA(SvxFontHeightItem) ) { diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 116b7e8cec4d..637e5405b4e9 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -397,7 +397,7 @@ namespace drawinglayer // need to check XFillFloatTransparence, object fill may still be completely transparent const SfxPoolItem* pGradientItem; - if(SFX_ITEM_SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem) + if(SfxItemState::SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem) && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()) { const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue(); @@ -590,7 +590,7 @@ namespace drawinglayer { const SfxPoolItem* pGradientItem; - if(SFX_ITEM_SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem) + if(SfxItemState::SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem) && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()) { // test if float transparence is completely transparent diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 5ad4d9e0b956..78c6895208f0 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -75,7 +75,7 @@ namespace sdr while(nWhich) { - if(SFX_ITEM_SET == rStyle.GetItemState(nWhich)) + if(SfxItemState::SET == rStyle.GetItemState(nWhich)) { mpItemSet->ClearItem(nWhich); } @@ -435,7 +435,7 @@ namespace sdr while(nWhich) { - if(mpItemSet->GetItemState(nWhich, false) == SFX_ITEM_SET) + if(mpItemSet->GetItemState(nWhich, false) == SfxItemState::SET) { pNewSet->Put(mpItemSet->Get(nWhich)); } @@ -498,7 +498,7 @@ namespace sdr { // #i61284# use mpItemSet with parents, makes things easier and reduces to // one loop - if(SFX_ITEM_SET == mpItemSet->GetItemState(nWhich, true, &pItem)) + if(SfxItemState::SET == mpItemSet->GetItemState(nWhich, true, &pItem)) { pDestItemSet->Put(*pItem); } diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index a7d60a499c75..c6f09bd5bb7f 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -152,7 +152,7 @@ namespace sdr while(nWhich) { - if(SFX_ITEM_SET == rSet.GetItemState(nWhich, false, &pPoolItem)) + if(SfxItemState::SET == rSet.GetItemState(nWhich, false, &pPoolItem)) { if(AllowItemChange(nWhich, pPoolItem)) { diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index 9005d4842390..cb4799927d8f 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -92,7 +92,7 @@ namespace sdr // and always equal. if(nWhich <= SDRATTR_3DSCENE_FIRST || nWhich >= SDRATTR_3DSCENE_LAST) { - if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, false)) + if(SfxItemState::DONTCARE == rSet.GetItemState(nWhich, false)) { mpItemSet->InvalidateItem(nWhich); } diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx index 0ce6be8028b0..f49eb5fb408f 100644 --- a/svx/source/sdr/properties/groupproperties.cxx +++ b/svx/source/sdr/properties/groupproperties.cxx @@ -92,7 +92,7 @@ namespace sdr while(nWhich) { - if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, false)) + if(SfxItemState::DONTCARE == rSet.GetItemState(nWhich, false)) { mpItemSet->InvalidateItem(nWhich); } diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index dac8ac2e26d8..835f23552c64 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -109,7 +109,7 @@ namespace sdr while(nWhich) { - if(SFX_ITEM_SET == rSet.GetItemState(nWhich, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(nWhich, false, &pItem)) { if(pItem->HasMetrics()) { diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index a950b4a6f012..16af145d4946 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -162,9 +162,9 @@ namespace sdr void CleanupFillProperties( SfxItemSet& rItemSet ) { - const bool bFillBitmap = rItemSet.GetItemState(XATTR_FILLBITMAP, false) == SFX_ITEM_SET; - const bool bFillGradient = rItemSet.GetItemState(XATTR_FILLGRADIENT, false) == SFX_ITEM_SET; - const bool bFillHatch = rItemSet.GetItemState(XATTR_FILLHATCH, false) == SFX_ITEM_SET; + const bool bFillBitmap = rItemSet.GetItemState(XATTR_FILLBITMAP, false) == SfxItemState::SET; + const bool bFillGradient = rItemSet.GetItemState(XATTR_FILLGRADIENT, false) == SfxItemState::SET; + const bool bFillHatch = rItemSet.GetItemState(XATTR_FILLHATCH, false) == SfxItemState::SET; if( bFillBitmap || bFillGradient || bFillHatch ) { const XFillStyleItem* pFillStyleItem = dynamic_cast< const XFillStyleItem* >( rItemSet.GetItem(XATTR_FILLSTYLE) ); diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 0196faa3b44d..bd857b6ff19f 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -137,7 +137,7 @@ namespace sdr } // Extra-Repaint for radical layout changes (#43139#) - if(SFX_ITEM_SET == rSet.GetItemState(SDRATTR_TEXT_CONTOURFRAME)) + if(SfxItemState::SET == rSet.GetItemState(SDRATTR_TEXT_CONTOURFRAME)) { // Here only repaint wanted rObj.ActionChanged(); @@ -453,7 +453,7 @@ namespace sdr bool bHasURL(false); - if(aSet.GetItemState(EE_CHAR_COLOR) == SFX_ITEM_SET) + if(aSet.GetItemState(EE_CHAR_COLOR) == SfxItemState::SET) { EditEngine* pEditEngine = const_cast<EditEngine*>(&(pOutliner->GetEditEngine())); std::vector<EECharAttrib> aAttribs; diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index c43e09c47f9b..ee9eca71f4b2 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -736,7 +736,7 @@ void AreaPropertyPanel::NotifyItemUpdate( const bool bIsEnabled) { (void)bIsEnabled; - const bool bDisabled(SFX_ITEM_DISABLED == eState); + const bool bDisabled(SfxItemState::DISABLED == eState); switch(nSID) { @@ -749,7 +749,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { bFillTransparenceChanged = true; - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState); @@ -771,7 +771,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { bFillTransparenceChanged = true; - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XFillFloatTransparenceItem* pItem = dynamic_cast< const XFillFloatTransparenceItem* >(pState); @@ -812,7 +812,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpStyleItem.reset(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XFillStyleItem* pItem = dynamic_cast< const XFillStyleItem* >(pState); @@ -847,7 +847,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_COLOR: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpColorItem.reset(pState ? (XFillColorItem*)pState->Clone() : 0); } @@ -857,14 +857,14 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Hide(); mpToolBoxColor->Show(); - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpToolBoxColor->Enable(); mbColorAvail = true; // maLastColor = mpColorItem->GetColorValue(); Update(); } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpToolBoxColor->Disable(); mbColorAvail = false; @@ -880,7 +880,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_GRADIENT: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpFillGradientItem.reset(pState ? (XFillGradientItem*)pState->Clone() : 0); } @@ -890,12 +890,12 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Show(); mpToolBoxColor->Hide(); - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpLbFillAttr->Enable(); Update(); } - else if(SFX_ITEM_DISABLED == eState ) + else if(SfxItemState::DISABLED == eState ) { mpLbFillAttr->Disable(); mpLbFillAttr->SetNoSelection(); @@ -909,7 +909,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_HATCH: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpHatchItem.reset(pState ? (XFillHatchItem*)pState->Clone() : 0); } @@ -919,12 +919,12 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Show(); mpToolBoxColor->Hide(); - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpLbFillAttr->Enable(); Update(); } - else if(SFX_ITEM_DISABLED == eState ) + else if(SfxItemState::DISABLED == eState ) { mpLbFillAttr->Disable(); mpLbFillAttr->SetNoSelection(); @@ -938,7 +938,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_ATTR_FILL_BITMAP: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpBitmapItem.reset(pState ? (XFillBitmapItem*)pState->Clone() : 0); } @@ -948,12 +948,12 @@ void AreaPropertyPanel::NotifyItemUpdate( mpLbFillAttr->Show(); mpToolBoxColor->Hide(); - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { mpLbFillAttr->Enable(); Update(); } - else if(SFX_ITEM_DISABLED == eState ) + else if(SfxItemState::DISABLED == eState ) { mpLbFillAttr->Disable(); mpLbFillAttr->SetNoSelection(); @@ -967,7 +967,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_COLOR_TABLE: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue()) { @@ -992,7 +992,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_GRADIENT_LIST: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) { @@ -1017,7 +1017,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_HATCH_LIST: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) { @@ -1042,7 +1042,7 @@ void AreaPropertyPanel::NotifyItemUpdate( } case SID_BITMAP_LIST: { - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) { diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index 506894c72f22..235f622bab26 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -263,7 +263,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( { case SID_ATTR_GRAF_LUMINANCE: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpMtrBrightness->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -274,7 +274,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpMtrBrightness->SetValue(nBright); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpMtrBrightness->Disable(); } @@ -287,7 +287,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_CONTRAST: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpMtrContrast->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -298,7 +298,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpMtrContrast->SetValue(nContrast); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpMtrContrast->Disable(); } @@ -311,7 +311,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_TRANSPARENCE: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpMtrTrans->Enable(); const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState); @@ -322,7 +322,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpMtrTrans->SetValue(nTrans); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpMtrTrans->Disable(); } @@ -335,7 +335,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_MODE: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpLBColorMode->Enable(); const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState); @@ -346,7 +346,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpLBColorMode->SelectEntryPos(nTrans); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpLBColorMode->Disable(); } @@ -359,7 +359,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_RED: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpMtrRed->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -370,7 +370,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpMtrRed->SetValue( nRed ); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpMtrRed->Disable(); } @@ -383,7 +383,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_GREEN: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpMtrGreen->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -394,7 +394,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpMtrGreen->SetValue( nGreen ); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpMtrGreen->Disable(); } @@ -407,7 +407,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_BLUE: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpMtrBlue->Enable(); const SfxInt16Item* pItem = dynamic_cast< const SfxInt16Item* >(pState); @@ -418,7 +418,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpMtrBlue->SetValue( nBlue ); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpMtrBlue->Disable(); } @@ -431,7 +431,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( } case SID_ATTR_GRAF_GAMMA: { - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { mpMtrGamma->Enable(); const SfxUInt32Item* pItem = dynamic_cast< const SfxUInt32Item* >(pState); @@ -442,7 +442,7 @@ void GraphicPropertyPanel::NotifyItemUpdate( mpMtrGamma->SetValue( nGamma ); } } - else if(SFX_ITEM_DISABLED == eState) + else if(SfxItemState::DISABLED == eState) { mpMtrGamma->Disable(); } diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index a85875e518b4..ff171deb07ee 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -338,7 +338,7 @@ void LinePropertyPanel::NotifyItemUpdate( const bool bIsEnabled) { (void)bIsEnabled; - const bool bDisabled(SFX_ITEM_DISABLED == eState); + const bool bDisabled(SfxItemState::DISABLED == eState); // By default, fill and show the color of existing line-color mpColorUpdater->Update( maColor ); @@ -358,7 +358,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpTBColor->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XLineColorItem* pItem = dynamic_cast< const XLineColorItem* >(pState); if(pItem) @@ -388,7 +388,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpLBStyle->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { if(nSID == SID_ATTR_LINE_STYLE) { @@ -437,7 +437,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpMFTransparent->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XLineTransparenceItem* pItem = dynamic_cast< const XLineTransparenceItem* >(pState); @@ -466,7 +466,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpFTWidth->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XLineWidthItem* pItem = dynamic_cast< const XLineWidthItem* >(pState); @@ -496,7 +496,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpLBStart->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XLineStartItem* pItem = dynamic_cast< const XLineStartItem* >(pState); @@ -525,7 +525,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpLBEnd->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XLineEndItem* pItem = dynamic_cast< const XLineEndItem* >(pState); @@ -567,7 +567,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpFTEdgeStyle->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XLineJointItem* pItem = dynamic_cast< const XLineJointItem* >(pState); @@ -627,7 +627,7 @@ void LinePropertyPanel::NotifyItemUpdate( mpLBCapStyle->Enable(); } - if(eState >= SFX_ITEM_DEFAULT) + if(eState >= SfxItemState::DEFAULT) { const XLineCapItem* pItem = dynamic_cast< const XLineCapItem* >(pState); diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index d5915090c415..37c274e630be 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -237,13 +237,13 @@ void NBOTypeMgrBase::StoreMapUnit_impl() { { const SfxPoolItem* pItem; SfxItemState eState = pSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); - if(eState == SFX_ITEM_SET) + if(eState == SfxItemState::SET) { eCoreUnit = pSet->GetPool()->GetMetric(pSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); } else { //sd use different sid for numbering rule eState = pSet->GetItemState(EE_PARA_NUMBULLET, false, &pItem); - if(eState == SFX_ITEM_SET) + if(eState == SfxItemState::SET) { eCoreUnit = pSet->GetPool()->GetMetric(pSet->GetPool()->GetWhich(EE_PARA_NUMBULLET)); } diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index e844acb2efa3..08892b9828c8 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -264,7 +264,7 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe pActLineDistFld->SetText( "" ); //bool bValueSetFocus = sal_False; //wj - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { // SfxMapUnit eUnit = maLNSpaceControl.GetCoreMetric(); SfxMapUnit eUnit = SFX_MAPUNIT_100TH_MM; @@ -450,7 +450,7 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe break; } } - else if( eState == SFX_ITEM_DISABLED ) + else if( eState == SfxItemState::DISABLED ) { aLineDist.Disable(); pActLineDistFld->Enable(false); diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index e57252c4487f..52b1100fbcf2 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -430,7 +430,7 @@ IMPL_LINK(ParaPropertyPanel, ToolBoxBackColorDDHandler,ToolBox*, pToolBox) void ParaPropertyPanel::ParaBKGStateChanged(sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState) { - if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxColorItem)) + if( eState >= SfxItemState::DEFAULT && pState->ISA(SvxColorItem)) { const SvxColorItem* pItem = (const SvxColorItem*)pState; maColor = pItem->GetValue(); @@ -761,7 +761,7 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat const sal_uInt16 nIdHangingIndent = mpTbxIndent_IncDec->GetItemId(UNO_HANGINGINDENT); const sal_uInt16 nIdHangingIndent2 = mpTbxIndent_IncDec->GetItemId(UNO_HANGINGINDENT2); - if( pState && eState >= SFX_ITEM_DEFAULT ) + if( pState && eState >= SfxItemState::DEFAULT ) { SvxLRSpaceItem* pSpace = ( SvxLRSpaceItem*)pState; maTxtLeft = pSpace->GetTxtLeft(); @@ -836,7 +836,7 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat mpTbxProDemote->EnableItem(nIdHangingIndent2, true); } - else if( eState == SFX_ITEM_DISABLED ) + else if( eState == SfxItemState::DISABLED ) { mpLeftIndent-> Disable(); mpRightIndent->Disable(); @@ -871,7 +871,7 @@ void ParaPropertyPanel::StateChangedLnSPImpl( sal_uInt16 /*nSID*/, SfxItemState { meLnSpState = eState; - if( pState && eState >= SFX_ITEM_DEFAULT ) + if( pState && eState >= SfxItemState::DEFAULT ) { if(mpLnSPItem) delete mpLnSPItem; @@ -884,7 +884,7 @@ void ParaPropertyPanel::StateChangedULImpl( sal_uInt16 /*nSID*/, SfxItemState eS mpTopDist->SetMax( mpTopDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) ); mpBottomDist->SetMax( mpBottomDist->Normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) ); - if( pState && eState >= SFX_ITEM_DEFAULT ) + if( pState && eState >= SfxItemState::DEFAULT ) { SvxULSpaceItem* pOldItem = (SvxULSpaceItem*)pState; @@ -905,7 +905,7 @@ void ParaPropertyPanel::StateChangedULImpl( sal_uInt16 /*nSID*/, SfxItemState eS mpBottomDist->SetValue( nVal, FUNIT_100TH_MM ); mpTbxUL_IncDec->Enable(); } - else if(eState == SFX_ITEM_DISABLED ) + else if(eState == SfxItemState::DISABLED ) { mpTopDist->Disable(); mpBottomDist->Disable(); @@ -923,14 +923,14 @@ void ParaPropertyPanel::StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eS { if (nSID==SID_OUTLINE_LEFT) { - if( pState && eState == SFX_ITEM_UNKNOWN ) + if( pState && eState == SfxItemState::UNKNOWN ) mbOutLineLeft = true; else mbOutLineLeft = false; } if (nSID==SID_OUTLINE_RIGHT) { - if( pState && eState == SFX_ITEM_UNKNOWN ) + if( pState && eState == SfxItemState::UNKNOWN ) mbOutLineRight = true; else mbOutLineRight = false; @@ -958,13 +958,13 @@ void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eSt && ( nSID == SID_INC_INDENT || nSID == SID_DEC_INDENT ) ) { // Writer's text shell is the only one which provides reasonable states for Slots SID_INC_INDENT and SID_DEC_INDENT - // - namely SFX_ITEM_UNKNOWN and SFX_ITEM_DISABLED + // - namely SfxItemState::UNKNOWN and SfxItemState::DISABLED const sal_uInt16 nIdIncrIndent = mpTbxIndent_IncDec->GetItemId(UNO_INCREMENTINDENT); const sal_uInt16 nIdDecrIndent = mpTbxIndent_IncDec->GetItemId(UNO_DECREMENTINDENT); mpTbxIndent_IncDec->EnableItem( nSID == SID_INC_INDENT ? nIdIncrIndent : nIdDecrIndent, - ( pState && eState == SFX_ITEM_UNKNOWN ) ? sal_True : sal_False ); + ( pState && eState == SfxItemState::UNKNOWN ) ? sal_True : sal_False ); } } @@ -972,7 +972,7 @@ void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eSt // Add toggle state for numbering and bullet icons void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if ( (eState >= SFX_ITEM_DEFAULT) && (pState->ISA(SfxBoolItem)) ) + if ( (eState >= SfxItemState::DEFAULT) && (pState->ISA(SfxBoolItem)) ) { const SfxBoolItem* pItem= (const SfxBoolItem*)pState; const bool aBool = pItem->GetValue(); @@ -998,7 +998,7 @@ void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState void ParaPropertyPanel::StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if ( eState >= SFX_ITEM_DEFAULT && pState->ISA(SfxUInt16Item) ) + if ( eState >= SfxItemState::DEFAULT && pState->ISA(SfxUInt16Item) ) { sal_uInt16 nValue = (sal_uInt16)0xFFFF; { @@ -1023,7 +1023,7 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI { FieldUnit eUnit = FUNIT_NONE; - if ( pState && eState >= SFX_ITEM_DEFAULT ) + if ( pState && eState >= SfxItemState::DEFAULT ) eUnit = (FieldUnit)( (const SfxUInt16Item*)pState )->GetValue(); else { @@ -1103,7 +1103,7 @@ ParaPropertyPanel::ParaPropertyPanel(Window* pParent, maNumBImageListRTL (SVX_RES(IL_NUM_BULLET_RTL)), maTxtLeft (0), mpLnSPItem (NULL), - meLnSpState (SFX_ITEM_DONTCARE), + meLnSpState (SfxItemState::DONTCARE), mbOutLineLeft (false), mbOutLineRight (false), maUpper (0), diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index d218e0a5222e..f4e4acb29933 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -599,7 +599,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( switch (nSID) { case SID_ATTR_TRANSFORM_WIDTH: - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { pWidthItem = dynamic_cast< const SfxUInt32Item* >(pState); @@ -619,7 +619,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_HEIGHT: - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { pHeightItem = dynamic_cast< const SfxUInt32Item* >(pState); @@ -639,7 +639,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_POS_X: - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -657,7 +657,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_POS_Y: - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -675,7 +675,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_ROT_X: - if (SFX_ITEM_DEFAULT == eState) + if (SfxItemState::DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -688,7 +688,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_ROT_Y: - if (SFX_ITEM_DEFAULT == eState) + if (SfxItemState::DEFAULT == eState) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -701,7 +701,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_PROTECT_POS: - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -717,7 +717,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_PROTECT_SIZE: - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -733,7 +733,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_AUTOWIDTH: - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -745,7 +745,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_AUTOHEIGHT: - if(SFX_ITEM_DEFAULT == eState) + if(SfxItemState::DEFAULT == eState) { const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState); @@ -757,7 +757,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_TRANSFORM_ANGLE: - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) { const SfxInt32Item* pItem = dynamic_cast< const SfxInt32Item* >(pState); @@ -1041,7 +1041,7 @@ FieldUnit PosSizePropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPo { FieldUnit eUnit = FUNIT_NONE; - if ( pState && eState >= SFX_ITEM_DEFAULT ) + if ( pState && eState >= SfxItemState::DEFAULT ) { eUnit = (FieldUnit)( (const SfxUInt16Item*)pState )->GetValue(); } diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index f8a1f716c05a..68d65c0a53ca 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -240,7 +240,7 @@ void TextPropertyPanel::NotifyItemUpdate ( { case SID_ATTR_CHAR_FONTHEIGHT: { - if ( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxFontHeightItem) ) + if ( eState >= SfxItemState::DEFAULT && pState->ISA(SvxFontHeightItem) ) mpHeightItem = (SvxFontHeightItem*)pState; else mpHeightItem = NULL; @@ -248,7 +248,7 @@ void TextPropertyPanel::NotifyItemUpdate ( break; case SID_ATTR_CHAR_UNDERLINE: { - if( eState >= SFX_ITEM_DEFAULT && pState->ISA(SvxUnderlineItem) ) + if( eState >= SfxItemState::DEFAULT && pState->ISA(SvxUnderlineItem) ) { const SvxUnderlineItem* pItem = (const SvxUnderlineItem*)pState; meUnderline = (FontUnderline)pItem->GetValue(); @@ -260,7 +260,7 @@ void TextPropertyPanel::NotifyItemUpdate ( break; case SID_ATTR_CHAR_KERNING: { - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { mbKernLBAvailable = true; @@ -276,7 +276,7 @@ void TextPropertyPanel::NotifyItemUpdate ( mbKernAvailable =false; } } - else if (SFX_ITEM_DISABLED == eState) + else if (SfxItemState::DISABLED == eState) { mbKernLBAvailable = false; mbKernAvailable = false; diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx index a3076e2c2fda..32f328e12792 100644 --- a/svx/source/stbctrls/insctrl.cxx +++ b/svx/source/stbctrls/insctrl.cxx @@ -49,7 +49,7 @@ SvxInsertStatusBarControl::~SvxInsertStatusBarControl() void SvxInsertStatusBarControl::StateChanged( sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_DEFAULT != eState ) + if ( SfxItemState::DEFAULT != eState ) GetStatusBar().SetItemText( GetId(), "" ); else { diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index f1bf93424434..8ee08e46e9d6 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -90,7 +90,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, Status void SvxModifyControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_DEFAULT != eState ) + if ( SfxItemState::DEFAULT != eState ) return; DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" ); diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index cd4f6020a21b..47502c02b9c3 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -235,7 +235,7 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( nSID == SID_PSZ_FUNCTION ) { - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { pImp->bHasMenu = true; if ( pState && pState->ISA(SfxUInt16Item) ) @@ -244,7 +244,7 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt else pImp->bHasMenu = false; } - else if ( SFX_ITEM_DEFAULT != eState ) + else if ( SfxItemState::DEFAULT != eState ) { // don't switch to empty display before an empty state was // notified for all display types diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index c7dc22af0619..878153efae97 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -93,7 +93,7 @@ SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId, void SvxSelectionModeControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { DBG_ASSERT( pState->ISA( SfxUInt16Item ), "invalid item type" ); SfxUInt16Item* pItem = (SfxUInt16Item*)pState; diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 35950a4ea4e5..cb6e953f52cb 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -85,7 +85,7 @@ XmlSecStatusBarControl::~XmlSecStatusBarControl() void XmlSecStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if( SFX_ITEM_DEFAULT != eState ) + if( SfxItemState::DEFAULT != eState ) { mpImpl->mnState = (sal_uInt16)SIGNATURESTATE_UNKNOWN; } diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 9c7e5b50660c..e333eadce0e7 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -108,7 +108,7 @@ SvxZoomStatusBarControl::SvxZoomStatusBarControl( sal_uInt16 _nSlotId, void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - if( SFX_ITEM_DEFAULT != eState ) + if( SfxItemState::DEFAULT != eState ) { GetStatusBar().SetItemText( GetId(), "" ); nValueSet = 0; diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index bc03af8ae244..6f5b400ca7a7 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -185,7 +185,7 @@ SvxZoomSliderControl::~SvxZoomSliderControl() void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if ( (SFX_ITEM_DEFAULT != eState) || pState->ISA( SfxVoidItem ) ) + if ( (SfxItemState::DEFAULT != eState) || pState->ISA( SfxVoidItem ) ) { GetStatusBar().SetItemText( GetId(), "" ); mpImpl->mbValuesSet = false; diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 130690d19761..fdca37d26875 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -519,7 +519,7 @@ void SdrEditView::CheckPossibilities() const SfxItemSet& rSet = pObj->GetMergedItemSet(); SfxItemState eState = rSet.GetItemState(XATTR_FILLSTYLE, false); - if(SFX_ITEM_DONTCARE != eState) + if(SfxItemState::DONTCARE != eState) { // If state is not DONTCARE, test the item drawing::FillStyle eFillStyle = ((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index e776a7c513ba..500633aa3ca1 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -709,19 +709,19 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep // bReplaceAll has no effect here Rectangle aAllSnapRect(GetMarkedObjRect()); const SfxPoolItem *pPoolItem=NULL; - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrTransformRef1XItem*)pPoolItem)->GetValue(); SetRef1(Point(n,GetRef1().Y())); } - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrTransformRef1YItem*)pPoolItem)->GetValue(); SetRef1(Point(GetRef1().X(),n)); } - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrTransformRef2XItem*)pPoolItem)->GetValue(); SetRef2(Point(n,GetRef2().Y())); } - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrTransformRef2YItem*)pPoolItem)->GetValue(); SetRef2(Point(GetRef2().X(),n)); } @@ -730,19 +730,19 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep long nAllWdt=0; bool bAllWdt=false; long nAllHgt=0; bool bAllHgt=false; bool bDoIt=false; - if (rAttr.GetItemState(SDRATTR_ALLPOSITIONX,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ALLPOSITIONX,true,&pPoolItem)==SfxItemState::SET) { nAllPosX=((const SdrAllPositionXItem*)pPoolItem)->GetValue(); bAllPosX=true; bDoIt=true; } - if (rAttr.GetItemState(SDRATTR_ALLPOSITIONY,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ALLPOSITIONY,true,&pPoolItem)==SfxItemState::SET) { nAllPosY=((const SdrAllPositionYItem*)pPoolItem)->GetValue(); bAllPosY=true; bDoIt=true; } - if (rAttr.GetItemState(SDRATTR_ALLSIZEWIDTH,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ALLSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) { nAllWdt=((const SdrAllSizeWidthItem*)pPoolItem)->GetValue(); bAllWdt=true; bDoIt=true; } - if (rAttr.GetItemState(SDRATTR_ALLSIZEHEIGHT,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ALLSIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) { nAllHgt=((const SdrAllSizeHeightItem*)pPoolItem)->GetValue(); bAllHgt=true; bDoIt=true; } @@ -754,23 +754,23 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep if (bAllHgt) aRect.Bottom()=aAllSnapRect.Top()+nAllHgt; SetMarkedObjRect(aRect); } - if (rAttr.GetItemState(SDRATTR_RESIZEXALL,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_RESIZEXALL,true,&pPoolItem)==SfxItemState::SET) { Fraction aXFact=((const SdrResizeXAllItem*)pPoolItem)->GetValue(); ResizeMarkedObj(aAllSnapRect.TopLeft(),aXFact,Fraction(1,1)); } - if (rAttr.GetItemState(SDRATTR_RESIZEYALL,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_RESIZEYALL,true,&pPoolItem)==SfxItemState::SET) { Fraction aYFact=((const SdrResizeYAllItem*)pPoolItem)->GetValue(); ResizeMarkedObj(aAllSnapRect.TopLeft(),Fraction(1,1),aYFact); } - if (rAttr.GetItemState(SDRATTR_ROTATEALL,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ROTATEALL,true,&pPoolItem)==SfxItemState::SET) { long nAngle=((const SdrRotateAllItem*)pPoolItem)->GetValue(); RotateMarkedObj(aAllSnapRect.Center(),nAngle); } - if (rAttr.GetItemState(SDRATTR_HORZSHEARALL,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_HORZSHEARALL,true,&pPoolItem)==SfxItemState::SET) { long nAngle=((const SdrHorzShearAllItem*)pPoolItem)->GetValue(); ShearMarkedObj(aAllSnapRect.Center(),nAngle,false); } - if (rAttr.GetItemState(SDRATTR_VERTSHEARALL,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_VERTSHEARALL,true,&pPoolItem)==SfxItemState::SET) { long nAngle=((const SdrVertShearAllItem*)pPoolItem)->GetValue(); ShearMarkedObj(aAllSnapRect.Center(),nAngle,true); } @@ -937,12 +937,12 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con { if(!bOnlyHardAttr) { - if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, false)) + if(SfxItemState::DONTCARE == rSet.GetItemState(nWhich, false)) rAttr.InvalidateItem(nWhich); else rAttr.MergeValue(rSet.Get(nWhich), true); } - else if(SFX_ITEM_SET == rSet.GetItemState(nWhich, false)) + else if(SfxItemState::SET == rSet.GetItemState(nWhich, false)) { const SfxPoolItem& rItem = rSet.Get(nWhich); rAttr.MergeValue(rItem, true); @@ -1008,7 +1008,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) while(!bPossibleGeomChange && nWhich) { SfxItemState eState = rAttr.GetItemState(nWhich); - if(eState == SFX_ITEM_SET) + if(eState == SfxItemState::SET) { if((nWhich >= SDRATTR_TEXT_MINFRAMEHEIGHT && nWhich <= SDRATTR_TEXT_CONTOURFRAME) || nWhich == SDRATTR_3DOBJ_PERCENT_DIAGONAL @@ -1034,7 +1034,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) const size_t nMarkAnz(GetMarkedObjectCount()); std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters; - // create ItemSet without SFX_ITEM_DONTCARE. Put() + // create ItemSet without SfxItemState::DONTCARE. Put() // uses its second parameter (bInvalidAsDefault) to // remove all such items to set them to default. SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges()); @@ -1044,7 +1044,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) bool bResetAnimationTimer(false); // check if LineWidth is part of the change - const bool bLineWidthChange(SFX_ITEM_SET == aAttr.GetItemState(XATTR_LINEWIDTH)); + const bool bLineWidthChange(SfxItemState::SET == aAttr.GetItemState(XATTR_LINEWIDTH)); sal_Int32 nNewLineWidth(0); sal_Int32 nOldLineWidth(0); @@ -1111,7 +1111,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) if(nOldLineWidth != nNewLineWidth) { - if(SFX_ITEM_DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH)) + if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH)) { const sal_Int32 nValAct(((const XLineStartWidthItem&)rSet.Get(XATTR_LINESTARTWIDTH)).GetValue()); const sal_Int32 nValNewStart(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10))); @@ -1119,7 +1119,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) pObj->SetMergedItem(XLineStartWidthItem(nValNewStart)); } - if(SFX_ITEM_DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH)) + if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH)) { const sal_Int32 nValAct(((const XLineEndWidthItem&)rSet.Get(XATTR_LINEENDWIDTH)).GetValue()); const sal_Int32 nValNewEnd(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10))); @@ -1371,25 +1371,25 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const SfxItemState eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWWIDTH); bool bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue(); - if (eState==SFX_ITEM_DONTCARE) { + if (eState==SfxItemState::DONTCARE) { aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOWIDTH); - } else if (eState==SFX_ITEM_SET) { + } else if (eState==SfxItemState::SET) { aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOWIDTH,bAutoGrow)); } eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWHEIGHT); bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); - if (eState==SFX_ITEM_DONTCARE) { + if (eState==SfxItemState::DONTCARE) { aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOHEIGHT); - } else if (eState==SFX_ITEM_SET) { + } else if (eState==SfxItemState::SET) { aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOHEIGHT,bAutoGrow)); } eState=aMarkAttr.GetItemState(SDRATTR_ECKENRADIUS); long nRadius=((SdrMetricItem&)(aMarkAttr.Get(SDRATTR_ECKENRADIUS))).GetValue(); - if (eState==SFX_ITEM_DONTCARE) { + if (eState==SfxItemState::DONTCARE) { aRetSet.InvalidateItem(SDRATTR_ECKENRADIUS); - } else if (eState==SFX_ITEM_SET) { + } else if (eState==SfxItemState::SET) { aRetSet.Put(makeSdrEckenradiusItem(nRadius)); } @@ -1512,21 +1512,21 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) const SfxPoolItem* pPoolItem=NULL; // position - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) { + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) { nPosDX=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Left(); bChgPos=true; } - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)){ + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)){ nPosDY=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Top(); bChgPos=true; } // size - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) { + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)) { nSizX=((const SfxUInt32Item*)pPoolItem)->GetValue(); bChgSiz=true; bChgWdh=true; } - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) { + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)) { nSizY=((const SfxUInt32Item*)pPoolItem)->GetValue(); bChgSiz=true; bChgHgt=true; @@ -1536,21 +1536,21 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) } // rotation - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ANGLE,true,&pPoolItem)) { + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ANGLE,true,&pPoolItem)) { nRotateAngle=((const SfxInt32Item*)pPoolItem)->GetValue()-nOldRotateAngle; bRotate = (nRotateAngle != 0); } // position rotation point x - if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_X, true ,&pPoolItem)) + if(bRotate || SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_X, true ,&pPoolItem)) nRotateX = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_X)).GetValue(); // position rotation point y - if(bRotate || SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_Y, true ,&pPoolItem)) + if(bRotate || SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ROT_Y, true ,&pPoolItem)) nRotateY = ((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_Y)).GetValue(); // shearing - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,true,&pPoolItem)) { + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,true,&pPoolItem)) { long nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue(); if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR; if (nNewShearAngle<-SDRMAXSHEAR) nNewShearAngle=-SDRMAXSHEAR; @@ -1579,20 +1579,20 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) } // AutoGrow - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOWIDTH,true,&pPoolItem)) { + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOWIDTH,true,&pPoolItem)) { bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue(); aSetAttr.Put(makeSdrTextAutoGrowWidthItem(bAutoGrow)); bSetAttr=true; } - if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOHEIGHT,true,&pPoolItem)) { + if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOHEIGHT,true,&pPoolItem)) { bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue(); aSetAttr.Put(makeSdrTextAutoGrowHeightItem(bAutoGrow)); bSetAttr=true; } // corner radius - if (bEdgeRadiusAllowed && SFX_ITEM_SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,true,&pPoolItem)) { + if (bEdgeRadiusAllowed && SfxItemState::SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,true,&pPoolItem)) { long nRadius=((SdrMetricItem*)pPoolItem)->GetValue(); aSetAttr.Put(makeSdrEckenradiusItem(nRadius)); bSetAttr=true; @@ -1670,7 +1670,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) } // protect position - if(SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_POS, true, &pPoolItem)) + if(SfxItemState::SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_POS, true, &pPoolItem)) { const bool bProtPos(((const SfxBoolItem*)pPoolItem)->GetValue()); bool bChanged(false); @@ -1711,7 +1711,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) if(!bMoveProtect) { // protect size - if(SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_SIZE, true, &pPoolItem)) + if(SfxItemState::SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_SIZE, true, &pPoolItem)) { const bool bProtSize(((const SfxBoolItem*)pPoolItem)->GetValue()); bool bChanged(false); diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 6945d2f66aca..ebef27daece7 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1564,7 +1564,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) { const SfxPoolItem* pItem; SfxItemState eState=pSet->GetItemState(nWhich,false,&pItem); - if (eState==SFX_ITEM_SET) aSet.Put(*pItem); + if (eState==SfxItemState::SET) aSet.Put(*pItem); nWhich=aIter.NextWhich(); } diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index e5e373ea3d1e..4911c00aacd9 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -485,7 +485,7 @@ bool SearchOutlinerItems(const SfxItemSet& rSet, bool bInklDefaults, bool* pbOnl // in other cases only the set items are. // Disabled and DontCare are regarded as holes in the Which range. SfxItemState eState=rSet.GetItemState(nWhich); - if ((eState==SFX_ITEM_DEFAULT && bInklDefaults) || eState==SFX_ITEM_SET) { + if ((eState==SfxItemState::DEFAULT && bInklDefaults) || eState==SfxItemState::SET) { if (nWhich<EE_ITEMS_START || nWhich>EE_ITEMS_END) bOnly=false; else bHas=true; } diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 70e30e67dbfd..18f354a0f240 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -95,7 +95,7 @@ public: public: ImpItemListRow() - : eState(SFX_ITEM_UNKNOWN), + : eState(SfxItemState::UNKNOWN), nWhichId(0), pType(NULL), eItemType(ITEM_DONTKNOW), @@ -320,12 +320,12 @@ OUString _SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) con { switch (pEntry->eState) { - case SFX_ITEM_UNKNOWN : sRet = "Unknown"; break; - case SFX_ITEM_DISABLED: sRet = "Disabled"; break; - case SFX_ITEM_DONTCARE: sRet = "DontCare"; break; - case SFX_ITEM_SET : sRet = "Set"; break; - case SFX_ITEM_DEFAULT : sRet = "Default"; break; - case SFX_ITEM_READONLY: sRet = "ReadOnly"; break; + case SfxItemState::UNKNOWN : sRet = "Unknown"; break; + case SfxItemState::DISABLED: sRet = "Disabled"; break; + case SfxItemState::DONTCARE: sRet = "DontCare"; break; + case SfxItemState::SET : sRet = "Set"; break; + case SfxItemState::DEFAULT : sRet = "Default"; break; + case SfxItemState::READONLY: sRet = "ReadOnly"; break; } // switch } break; case ITEMBROWSER_TYPECOL_ID: sRet = pEntry->GetItemTypeStr(); break; @@ -589,10 +589,10 @@ void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, sal_uIntP bool ImpGetItem(const SfxItemSet& rSet, sal_uInt16 nWhich, const SfxPoolItem*& rpItem) { SfxItemState eState=rSet.GetItemState(nWhich,true,&rpItem); - if (eState==SFX_ITEM_DEFAULT) { + if (eState==SfxItemState::DEFAULT) { rpItem=&rSet.Get(nWhich); } - return (eState==SFX_ITEM_DEFAULT || eState==SFX_ITEM_SET) && rpItem!=NULL; + return (eState==SfxItemState::DEFAULT || eState==SfxItemState::SET) && rpItem!=NULL; } bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rIndent) @@ -922,10 +922,10 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem SfxItemState eState=pSet->GetItemState(nWhich); if (p2ndSet!=NULL) { SfxItemState e2ndState=p2ndSet->GetItemState(nWhich); - if (eState==SFX_ITEM_DEFAULT) eState=SFX_ITEM_DISABLED; - else if (e2ndState==SFX_ITEM_DEFAULT) eState=SFX_ITEM_DEFAULT; + if (eState==SfxItemState::DEFAULT) eState=SfxItemState::DISABLED; + else if (e2ndState==SfxItemState::DEFAULT) eState=SfxItemState::DEFAULT; } - if (eState!=SFX_ITEM_DISABLED) { + if (eState!=SfxItemState::DISABLED) { const SfxPoolItem& rItem=pSet->Get(nWhich); sal_uInt16 nIndent=0; if (!HAS_BASE(SfxVoidItem,&rItem) && !HAS_BASE(SfxSetItem,&rItem) && (!IsItemIneffective(nWhich,pSet,nIndent) || bDontHideIneffectiveItems)) { diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 4e7d9313738a..ce465ce52fe0 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1814,7 +1814,7 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe while(nWhich) { - if(SFX_ITEM_SET == pSourceSet->GetItemState(nWhich, false, &pPoolItem)) + if(SfxItemState::SET == pSourceSet->GetItemState(nWhich, false, &pPoolItem)) { const SfxPoolItem* pResultItem = NULL; diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 8b066f0ab6e8..890a418f6817 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -928,7 +928,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) SdrModel* pModel = GetModel(); const SfxItemSet& rSet = pObj->GetMergedItemSet(); - if(SFX_ITEM_SET != rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, false)) + if(SfxItemState::SET != rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, false)) { // add this item, it's not yet there XFillFloatTransparenceItem aNewItem( diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index ab285d42ddf5..76539b6f064b 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2124,41 +2124,41 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) Point aRef1(rSnap.Center()); Point aRef2(aRef1); aRef2.Y()++; const SfxPoolItem *pPoolItem=NULL; - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) { aRef1.X()=((const SdrTransformRef1XItem*)pPoolItem)->GetValue(); } - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SfxItemState::SET) { aRef1.Y()=((const SdrTransformRef1YItem*)pPoolItem)->GetValue(); } - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SfxItemState::SET) { aRef2.X()=((const SdrTransformRef2XItem*)pPoolItem)->GetValue(); } - if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SfxItemState::SET) { aRef2.Y()=((const SdrTransformRef2YItem*)pPoolItem)->GetValue(); } Rectangle aNewSnap(rSnap); - if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrMoveXItem*)pPoolItem)->GetValue(); aNewSnap.Move(n,0); } - if (rAttr.GetItemState(SDRATTR_MOVEY,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_MOVEY,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrMoveYItem*)pPoolItem)->GetValue(); aNewSnap.Move(0,n); } - if (rAttr.GetItemState(SDRATTR_ONEPOSITIONX,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ONEPOSITIONX,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrOnePositionXItem*)pPoolItem)->GetValue(); aNewSnap.Move(n-aNewSnap.Left(),0); } - if (rAttr.GetItemState(SDRATTR_ONEPOSITIONY,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ONEPOSITIONY,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrOnePositionYItem*)pPoolItem)->GetValue(); aNewSnap.Move(0,n-aNewSnap.Top()); } - if (rAttr.GetItemState(SDRATTR_ONESIZEWIDTH,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ONESIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrOneSizeWidthItem*)pPoolItem)->GetValue(); aNewSnap.Right()=aNewSnap.Left()+n; } - if (rAttr.GetItemState(SDRATTR_ONESIZEHEIGHT,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ONESIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrOneSizeHeightItem*)pPoolItem)->GetValue(); aNewSnap.Bottom()=aNewSnap.Top()+n; } @@ -2170,7 +2170,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) } } - if (rAttr.GetItemState(SDRATTR_SHEARANGLE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_SHEARANGLE,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrShearAngleItem*)pPoolItem)->GetValue(); n-=GetShearAngle(); if (n!=0) { @@ -2178,7 +2178,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) NbcShear(aRef1,n,nTan,false); } } - if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrAngleItem*)pPoolItem)->GetValue(); n-=GetRotateAngle(); if (n!=0) { @@ -2187,28 +2187,28 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) NbcRotate(aRef1,n,nSin,nCos); } } - if (rAttr.GetItemState(SDRATTR_ROTATEONE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_ROTATEONE,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrRotateOneItem*)pPoolItem)->GetValue(); double nSin=sin(n*nPi180); double nCos=cos(n*nPi180); NbcRotate(aRef1,n,nSin,nCos); } - if (rAttr.GetItemState(SDRATTR_HORZSHEARONE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_HORZSHEARONE,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrHorzShearOneItem*)pPoolItem)->GetValue(); double nTan=tan(n*nPi180); NbcShear(aRef1,n,nTan,false); } - if (rAttr.GetItemState(SDRATTR_VERTSHEARONE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_VERTSHEARONE,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrVertShearOneItem*)pPoolItem)->GetValue(); double nTan=tan(n*nPi180); NbcShear(aRef1,n,nTan,true); } - if (rAttr.GetItemState(SDRATTR_OBJMOVEPROTECT,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_OBJMOVEPROTECT,true,&pPoolItem)==SfxItemState::SET) { bool b=((const SdrYesNoItem*)pPoolItem)->GetValue(); SetMoveProtect(b); } - if (rAttr.GetItemState(SDRATTR_OBJSIZEPROTECT,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_OBJSIZEPROTECT,true,&pPoolItem)==SfxItemState::SET) { bool b=((const SdrYesNoItem*)pPoolItem)->GetValue(); SetResizeProtect(b); } @@ -2217,21 +2217,21 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) if( IsMoveProtect() ) SetResizeProtect( true ); - if (rAttr.GetItemState(SDRATTR_OBJPRINTABLE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_OBJPRINTABLE,true,&pPoolItem)==SfxItemState::SET) { bool b=((const SdrObjPrintableItem*)pPoolItem)->GetValue(); SetPrintable(b); } - if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,true,&pPoolItem)==SfxItemState::SET) { bool b=((const SdrObjVisibleItem*)pPoolItem)->GetValue(); SetVisible(b); } SdrLayerID nLayer=SDRLAYER_NOTFOUND; - if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SfxItemState::SET) { nLayer=((const SdrLayerIdItem*)pPoolItem)->GetValue(); } - if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SFX_ITEM_SET && pModel!=NULL) { + if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SfxItemState::SET && pModel!=NULL) { OUString aLayerName=((const SdrLayerNameItem*)pPoolItem)->GetValue(); const SdrLayerAdmin* pLayAd=pPage!=NULL ? &pPage->GetLayerAdmin() : pModel!=NULL ? &pModel->GetLayerAdmin() : NULL; if (pLayAd!=NULL) { @@ -2246,16 +2246,16 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) NbcSetLayer(nLayer); } - if (rAttr.GetItemState(SDRATTR_OBJECTNAME,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_OBJECTNAME,true,&pPoolItem)==SfxItemState::SET) { OUString aName=((const SfxStringItem*)pPoolItem)->GetValue(); SetName(aName); } Rectangle aNewLogic(rLogic); - if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrLogicSizeWidthItem*)pPoolItem)->GetValue(); aNewLogic.Right()=aNewLogic.Left()+n; } - if (rAttr.GetItemState(SDRATTR_LOGICSIZEHEIGHT,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_LOGICSIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) { long n=((const SdrLogicSizeHeightItem*)pPoolItem)->GetValue(); aNewLogic.Bottom()=aNewLogic.Top()+n; } @@ -2264,10 +2264,10 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) } Fraction aResizeX(1,1); Fraction aResizeY(1,1); - if (rAttr.GetItemState(SDRATTR_RESIZEXONE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_RESIZEXONE,true,&pPoolItem)==SfxItemState::SET) { aResizeX*=((const SdrResizeXOneItem*)pPoolItem)->GetValue(); } - if (rAttr.GetItemState(SDRATTR_RESIZEYONE,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_RESIZEYONE,true,&pPoolItem)==SfxItemState::SET) { aResizeY*=((const SdrResizeYOneItem*)pPoolItem)->GetValue(); } if (aResizeX!=Fraction(1,1) || aResizeY!=Fraction(1,1)) { diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index bc790703b41f..8c2070d120f1 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1000,7 +1000,7 @@ void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, bool /*bRep // bReplaceAll has no effect here at all. bool bMeasure=ISA(SdrView) && ((SdrView*)this)->IsMeasureTool(); const SfxPoolItem *pPoolItem=NULL; - if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SfxItemState::SET) { SdrLayerID nLayerId=((const SdrLayerIdItem*)pPoolItem)->GetValue(); const SdrLayer* pLayer=pMod->GetLayerAdmin().GetLayerPerID(nLayerId); if (pLayer!=NULL) { @@ -1008,7 +1008,7 @@ void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, bool /*bRep else aAktLayer=pLayer->GetName(); } } - if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SFX_ITEM_SET) { + if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SfxItemState::SET) { if (bMeasure) aMeasureLayer=((const SdrLayerNameItem*)pPoolItem)->GetValue(); else aAktLayer=((const SdrLayerNameItem*)pPoolItem)->GetValue(); } @@ -1068,7 +1068,7 @@ void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRe SfxWhichIter aIter(pStyleSheet->GetItemSet()); sal_uInt16 nWhich=aIter.FirstWhich(); while (nWhich!=0) { - if (pStyleSheet->GetItemSet().GetItemState(nWhich,true)==SFX_ITEM_SET) { + if (pStyleSheet->GetItemSet().GetItemState(nWhich,true)==SfxItemState::SET) { aDefaultAttr.ClearItem(nWhich); } nWhich=aIter.NextWhich(); diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx index 0dc5081a0165..ed99ae31008f 100644 --- a/svx/source/svdraw/svdtext.cxx +++ b/svx/source/svdraw/svdtext.cxx @@ -127,7 +127,7 @@ void SdrText::SetModel( SdrModel* pNewModel ) if( mpOutlinerParaObject && pOldModel!=NULL && pNewModel!=NULL) { - bool bHgtSet = GetObjectItemSet().GetItemState(EE_CHAR_FONTHEIGHT, true) == SFX_ITEM_SET; + bool bHgtSet = GetObjectItemSet().GetItemState(EE_CHAR_FONTHEIGHT, true) == SfxItemState::SET; MapUnit aOldUnit(pOldModel->GetScaleUnit()); MapUnit aNewUnit(pNewModel->GetScaleUnit()); diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 05e8af3fea04..e8a84e52de82 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -391,7 +391,7 @@ void SdrUndoAttrObj::Undo() while(nWhich) { - if(SFX_ITEM_SET != pUndoSet->GetItemState(nWhich, false)) + if(SfxItemState::SET != pUndoSet->GetItemState(nWhich, false)) { pObj->ClearMergedItem(nWhich); } @@ -468,7 +468,7 @@ void SdrUndoAttrObj::Redo() while(nWhich) { - if(SFX_ITEM_SET != pRedoSet->GetItemState(nWhich, false)) + if(SfxItemState::SET != pRedoSet->GetItemState(nWhich, false)) { pObj->ClearMergedItem(nWhich); } diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 35af45be5b32..ce7a6a91ee6b 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -265,7 +265,7 @@ namespace sdr { SfxItemSet aSet(pOutliner->GetParaAttribs(nPara)); aSet.Put(rSet); - if (aSet.GetItemState(EE_CHAR_COLOR, false) == SFX_ITEM_SET) + if (aSet.GetItemState(EE_CHAR_COLOR, false) == SfxItemState::SET) pOutliner->RemoveCharAttribs( nPara, EE_CHAR_COLOR ); pOutliner->SetParaAttribs(nPara, aSet); } @@ -1111,14 +1111,14 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& if( !SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pMap, rValue, aSet )) { - if( aSet.GetItemState( pMap->nWID ) != SFX_ITEM_SET ) + if( aSet.GetItemState( pMap->nWID ) != SfxItemState::SET ) { // Default aus ItemPool holen if(SfxItemPool::IsWhich(pMap->nWID)) aSet.Put(GetModel()->GetItemPool().GetDefaultItem(pMap->nWID)); } - if( aSet.GetItemState( pMap->nWID ) == SFX_ITEM_SET ) + if( aSet.GetItemState( pMap->nWID ) == SfxItemState::SET ) { SvxItemPropertySet_setPropertyValue( *mpPropSet, pMap, rValue, aSet ); } @@ -1349,8 +1349,8 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th { const SfxItemSet& rSet = mpProperties->GetMergedItemSet(); - const bool bStretch = rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SFX_ITEM_SET; - const bool bTile = rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SFX_ITEM_SET; + const bool bStretch = rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET; + const bool bTile = rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET; if( bStretch || bTile ) { eState = PropertyState_DIRECT_VALUE; @@ -1367,7 +1367,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th case OWN_ATTR_TABLEBORDER: { const SfxItemSet& rSet = mpProperties->GetMergedItemSet(); - if( (rSet.GetItemState( SDRATTR_TABLE_BORDER_INNER, false ) == SFX_ITEM_DEFAULT) && (rSet.GetItemState( SDRATTR_TABLE_BORDER, false ) == SFX_ITEM_DEFAULT) ) + if( (rSet.GetItemState( SDRATTR_TABLE_BORDER_INNER, false ) == SfxItemState::DEFAULT) && (rSet.GetItemState( SDRATTR_TABLE_BORDER, false ) == SfxItemState::DEFAULT) ) return PropertyState_DEFAULT_VALUE; return PropertyState_DIRECT_VALUE; @@ -1378,11 +1378,11 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th switch( rSet.GetItemState( pMap->nWID, false ) ) { - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: + case SfxItemState::READONLY: + case SfxItemState::SET: eState = PropertyState_DIRECT_VALUE; break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: eState = PropertyState_DEFAULT_VALUE; break; default: diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 976b4c84b967..95dd3e673ad3 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -2067,11 +2067,11 @@ WritingMode SdrTableObj::GetWritingMode() const const SfxItemSet &rSet = pStyle->GetItemSet(); const SfxPoolItem *pItem; - if ( rSet.GetItemState( SDRATTR_TEXTDIRECTION, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SDRATTR_TEXTDIRECTION, false, &pItem ) == SfxItemState::SET ) eWritingMode = static_cast< WritingMode >( static_cast< const SvxWritingModeItem * >( pItem )->GetValue() ); if ( ( eWritingMode != WritingMode_TB_RL ) && - ( rSet.GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) == SFX_ITEM_SET ) ) + ( rSet.GetItemState( EE_PARA_WRITINGDIR, false, &pItem ) == SfxItemState::SET ) ) { if ( static_cast< const SvxFrameDirectionItem * >( pItem )->GetValue() == FRMDIR_HORI_LEFT_TOP ) eWritingMode = WritingMode_LR_TB; diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index ae36dc639a9c..514505c368d9 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -422,7 +422,7 @@ void SvxTableController::GetState( SfxItemSet& rSet ) SdrTextVertAdjust eAdj = SDRTEXTVERTADJUST_BLOCK; - if( pSet->GetItemState( SDRATTR_TEXT_VERTADJUST ) != SFX_ITEM_DONTCARE ) + if( pSet->GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE ) eAdj = ((SdrTextVertAdjustItem&)(pSet->Get(SDRATTR_TEXT_VERTADJUST))).GetValue(); rSet.Put(SfxBoolItem(SID_TABLE_VERT_BOTTOM, eAdj == SDRTEXTVERTADJUST_BOTTOM)); @@ -505,7 +505,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs ) if (pItem) { nCount = ((const SfxInt16Item* )pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, true, &pItem)) bInsertAfter = ((const SfxBoolItem* )pItem)->GetValue(); } } @@ -850,7 +850,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() ); SdrModel* pModel = pTableObj ? pTableObj->GetModel() : 0; - if( !pTableObj || !pModel || !pArgs || (SFX_ITEM_SET != pArgs->GetItemState(SID_TABLE_STYLE, false)) ) + if( !pTableObj || !pModel || !pArgs || (SfxItemState::SET != pArgs->GetItemState(SID_TABLE_STYLE, false)) ) return; const SfxStringItem* pArg = dynamic_cast< const SfxStringItem* >( &pArgs->Get( SID_TABLE_STYLE ) ); @@ -891,7 +891,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ ) { - if( (rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_SET) && (aSet.GetItemState( nWhich ) == SFX_ITEM_SET) ) + if( (rStyleAttribs.GetItemState( nWhich ) == SfxItemState::SET) && (aSet.GetItemState( nWhich ) == SfxItemState::SET) ) { aSet.ClearItem( nWhich ); bChanges = true; @@ -935,22 +935,22 @@ void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs ) const SfxPoolItem *pPoolItem=NULL; - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, false,&pPoolItem)) ) + if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, false,&pPoolItem)) ) aSettings.mbUseFirstRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, false,&pPoolItem)) ) + if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, false,&pPoolItem)) ) aSettings.mbUseLastRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, false,&pPoolItem)) ) + if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, false,&pPoolItem)) ) aSettings.mbUseRowBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, false,&pPoolItem)) ) + if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, false,&pPoolItem)) ) aSettings.mbUseFirstColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, false,&pPoolItem)) ) + if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, false,&pPoolItem)) ) aSettings.mbUseLastColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SFX_ITEM_SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, false,&pPoolItem)) ) + if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, false,&pPoolItem)) ) aSettings.mbUseColumnBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); if( aSettings == pTableObj->getTableStyleSettings() ) @@ -1995,12 +1995,12 @@ void SvxTableController::MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnl { if(!bOnlyHardAttr) { - if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, false)) + if(SfxItemState::DONTCARE == rSet.GetItemState(nWhich, false)) rAttr.InvalidateItem(nWhich); else rAttr.MergeValue(rSet.Get(nWhich), true); } - else if(SFX_ITEM_SET == rSet.GetItemState(nWhich, false)) + else if(SfxItemState::SET == rSet.GetItemState(nWhich, false)) { const SfxPoolItem& rItem = rSet.Get(nWhich); rAttr.MergeValue(rItem, true); @@ -2191,19 +2191,19 @@ void SvxTableController::ApplyBorderAttr( const SfxItemSet& rAttr ) if( nRowCount && nColCount ) { const SvxBoxItem* pBoxItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER, false) ) + if(SfxItemState::SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER, false) ) pBoxItem = dynamic_cast< const SvxBoxItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER ) ); const SvxBoxInfoItem* pBoxInfoItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER_INNER, false) ) + if(SfxItemState::SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER_INNER, false) ) pBoxInfoItem = dynamic_cast< const SvxBoxInfoItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER_INNER ) ); const SvxColorItem* pLineColorItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINECOLOR, false) ) + if(SfxItemState::SET == rAttr.GetItemState(SID_FRAME_LINECOLOR, false) ) pLineColorItem = dynamic_cast< const SvxColorItem* >( &rAttr.Get( SID_FRAME_LINECOLOR ) ); const SvxBorderLine* pBorderLineItem = 0; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_FRAME_LINESTYLE, false) ) + if(SfxItemState::SET == rAttr.GetItemState(SID_FRAME_LINESTYLE, false) ) pBorderLineItem = ((const SvxLineItem&)rAttr.Get( SID_FRAME_LINESTYLE )).GetLine(); if( pBoxInfoItem && !pBoxItem ) @@ -2300,7 +2300,7 @@ void SvxTableController::SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bR SfxItemSet aAttr(*rAttr.GetPool(), rAttr.GetRanges()); aAttr.Put(rAttr, true); - const bool bFrame = (rAttr.GetItemState( SDRATTR_TABLE_BORDER ) == SFX_ITEM_SET) || (rAttr.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SFX_ITEM_SET); + const bool bFrame = (rAttr.GetItemState( SDRATTR_TABLE_BORDER ) == SfxItemState::SET) || (rAttr.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SfxItemState::SET); if( bFrame ) { @@ -2507,7 +2507,7 @@ bool SvxTableController::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNo SfxItemSet aAttr(*rFormatSet.GetPool(), rFormatSet.GetRanges()); aAttr.Put(rFormatSet, true); - const bool bFrame = (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER ) == SFX_ITEM_SET) || (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SFX_ITEM_SET); + const bool bFrame = (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER ) == SfxItemState::SET) || (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SfxItemState::SET); if( bFrame ) { diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index fa7b635d7133..69c9150e8239 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -270,7 +270,7 @@ void SdrTableRTFParser::FillTable() if( xCell.is() && xCellInfo.get() ) { const SfxPoolItem *pPoolItem = 0; - if( xCellInfo->maItemSet.GetItemState(SDRATTR_TABLE_BORDER,false,&pPoolItem)==SFX_ITEM_SET) + if( xCellInfo->maItemSet.GetItemState(SDRATTR_TABLE_BORDER,false,&pPoolItem)==SfxItemState::SET) xCell->SetMergedItem( *pPoolItem ); boost::scoped_ptr<OutlinerParaObject> pTextObject(mpOutliner->CreateParaObject( xCellInfo->mnStartPara, xCellInfo->mnParaCount )); diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 0d8ad1a2b725..e5ff211eef23 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -403,7 +403,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl) { SfxItemSet aAttrSet( pView->GetModel()->GetItemPool() ); pView->GetAttributes( aAttrSet ); - if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SFX_ITEM_DONTCARE ) + if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE ) { XLineStyle eXLS = (XLineStyle) ( (const XLineStyleItem&)aAttrSet.Get( XATTR_LINESTYLE ) ).GetValue(); diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 5b46ff9d2311..2a5b26a0e3a2 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -92,7 +92,7 @@ void SvxFillToolBoxControl::StateChanged( SfxItemState eState, const SfxPoolItem* pState) { - if(eState == SFX_ITEM_DISABLED) + if(eState == SfxItemState::DISABLED) { // slot disable state if(nSID == SID_ATTR_FILL_STYLE) @@ -104,7 +104,7 @@ void SvxFillToolBoxControl::StateChanged( mpFillAttrLB->Disable(); mpFillAttrLB->SetNoSelection(); } - else if(SFX_ITEM_DEFAULT == eState) + else if(SfxItemState::DEFAULT == eState) { bool bEnableControls(false); diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index 7e5619deeffa..2bcccfa2b978 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -96,7 +96,7 @@ void FormatPaintBrushToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/) void FormatPaintBrushToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_DEFAULT && eState != SFX_ITEM_SET ) + if( eState != SfxItemState::DEFAULT && eState != SfxItemState::SET ) m_bPersistentCopy = false; SfxToolBoxControl::StateChanged( nSID, eState, pState ); } diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 23a0d24ce4ad..2fff9959d316 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -440,7 +440,7 @@ SvxGrafFilterToolBoxControl::~SvxGrafFilterToolBoxControl() void SvxGrafFilterToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* ) { - GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) ); + GetToolBox().EnableItem( GetId(), ( eState != SfxItemState::DISABLED ) ); } SfxPopupWindowType SvxGrafFilterToolBoxControl::GetPopupWindowType() const @@ -473,7 +473,7 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const ImplGrafControl* pCtrl = (ImplGrafControl*) GetToolBox().GetItemWindow( GetId() ); DBG_ASSERT( pCtrl, "Control not found" ); - if( eState == SFX_ITEM_DISABLED ) + if( eState == SfxItemState::DISABLED ) { pCtrl->Disable(); pCtrl->SetText( OUString() ); @@ -482,7 +482,7 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const { pCtrl->Enable(); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) pCtrl->Update( pState ); else pCtrl->Update( NULL ); @@ -560,7 +560,7 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c ImplGrafModeControl* pCtrl = (ImplGrafModeControl*) GetToolBox().GetItemWindow( GetId() ); DBG_ASSERT( pCtrl, "Control not found" ); - if( eState == SFX_ITEM_DISABLED ) + if( eState == SfxItemState::DISABLED ) { pCtrl->Disable(); pCtrl->SetText( OUString() ); @@ -569,7 +569,7 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c { pCtrl->Enable(); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) pCtrl->Update( pState ); else pCtrl->Update( NULL ); @@ -598,7 +598,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) const SfxPoolItem* pItem; sal_uInt16 nSlot = rReq.GetSlot(); - if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, false, &pItem )) + if( !pArgs || SfxItemState::SET != pArgs->GetItemState( nSlot, false, &pItem )) pItem = 0; switch( nSlot ) @@ -757,7 +757,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCROP ); // set crop attributes - if( SFX_ITEM_SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) ) + if( SfxItemState::SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) ) { const SdrGrafCropItem& rNewCrop = (const SdrGrafCropItem&) pOutAttr->Get( SDRATTR_GRAFCROP ); @@ -767,7 +767,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) } // set new logic rect - if( SFX_ITEM_SET <= pOutAttr->GetItemState( SID_ATTR_GRAF_FRMSIZE ) ) + if( SfxItemState::SET <= pOutAttr->GetItemState( SID_ATTR_GRAF_FRMSIZE ) ) { Point aNewOrigin( pObj->GetLogicRect().TopLeft() ); const Size& rGrfSize = ( (const SvxSizeItem&) pOutAttr->Get( SID_ATTR_GRAF_FRMSIZE ) ).GetSize(); @@ -898,7 +898,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { case( SID_ATTR_GRAF_MODE ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) ) { if( bEnableColors ) { @@ -915,7 +915,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_RED ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) ) { if( bEnableColors ) { @@ -932,7 +932,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_GREEN ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) ) { if( bEnableColors ) { @@ -949,7 +949,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_BLUE ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) ) { if( bEnableColors ) { @@ -966,7 +966,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_LUMINANCE ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) ) { if( bEnableColors ) { @@ -983,7 +983,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_CONTRAST ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) ) { if( bEnableColors ) { @@ -1000,7 +1000,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_GAMMA ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) ) { if( bEnableColors ) { @@ -1017,7 +1017,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_TRANSPARENCE ): { - if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) ) + if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) ) { if( bEnableTransparency ) { diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 4e59d1d4df7c..4917f107f4e1 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -755,14 +755,14 @@ void SvxTableToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, cons bEnabled = ( nValue != 0 ); } else - bEnabled = SFX_ITEM_DISABLED != eState; + bEnabled = SfxItemState::DISABLED != eState; sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); rTbx.SetItemState( nId, - ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); + ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); } SvxColumnsToolBoxControl::SvxColumnsToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) @@ -817,7 +817,7 @@ void SvxColumnsToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - bEnabled = SFX_ITEM_DISABLED != eState; + bEnabled = SfxItemState::DISABLED != eState; SfxToolBoxControl::StateChanged(nSID, eState, pState ); } diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 33340d59cddf..5dea6904fca6 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -119,7 +119,7 @@ void SvxPopupWindowListBox::PopupModeEnd() void SvxPopupWindowListBox::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - rToolBox.EnableItem( nTbxId, ( SfxToolBoxControl::GetItemState( pState ) != SFX_ITEM_DISABLED) ); + rToolBox.EnableItem( nTbxId, ( SfxToolBoxControl::GetItemState( pState ) != SfxItemState::DISABLED) ); SfxPopupWindow::StateChanged( nSID, eState, pState ); } @@ -161,7 +161,7 @@ void SvxListBoxControl::StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), - SFX_ITEM_DISABLED != GetItemState(pState) ); + SfxItemState::DISABLED != GetItemState(pState) ); } @@ -241,7 +241,7 @@ void SvxUndoRedoControl::StateChanged( { if ( nSID == SID_UNDO || nSID == SID_REDO ) { - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) { ToolBox& rBox = GetToolBox(); rBox.SetQuickHelpText( GetId(), aDefaultText ); diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index a02b499abfc4..07eb01230c05 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -79,7 +79,7 @@ void SvxLineStyleToolBoxControl::StateChanged ( SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() ); DBG_ASSERT( pBox, "Window not found!" ); - if( eState == SFX_ITEM_DISABLED ) + if( eState == SfxItemState::DISABLED ) { pBox->Disable(); pBox->SetNoSelection(); @@ -88,7 +88,7 @@ void SvxLineStyleToolBoxControl::StateChanged ( { pBox->Enable(); - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { if( nSID == SID_ATTR_LINE_STYLE ) { @@ -215,7 +215,7 @@ void SvxLineWidthToolBoxControl::StateChanged( } else { - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) { pFld->Disable(); pFld->SetText( "" ); @@ -224,7 +224,7 @@ void SvxLineWidthToolBoxControl::StateChanged( { pFld->Enable(); - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { DBG_ASSERT( pState->ISA(XLineWidthItem), "wrong ItemType" ); @@ -644,8 +644,8 @@ void SvxLineEndToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, co sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); + rTbx.SetItemState( nId, ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 1b5972446ecb..288df13186ef 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1039,7 +1039,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, SID_ATTR_AUTO_COLOR_INVALID, OUString( ".uno:AutoColorInvalid" )); SfxItemState eState = aQueryStatus.QueryState( pDummy ); - if( (SFX_ITEM_DEFAULT > eState) || ( SID_EXTRUSION_3D_COLOR == theSlotId ) ) + if( (SfxItemState::DEFAULT > eState) || ( SID_EXTRUSION_3D_COLOR == theSlotId ) ) { aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD ); aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_AUTOMATIC ) ); @@ -1145,7 +1145,7 @@ bool SvxColorWindow_Impl::Close() void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if (( SFX_ITEM_DISABLED != eState ) && pState ) + if (( SfxItemState::DISABLED != eState ) && pState ) { if (( nSID == SID_COLOR_TABLE ) && ( pState->ISA( SvxColorListItem ))) { @@ -1159,7 +1159,7 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co aColorSet.Clear(); aColorSet.addEntriesForXColorList(*pColorList); } - else if ( SFX_ITEM_DEFAULT <= eState ) + else if ( SfxItemState::DEFAULT <= eState ) { aColorSet.SetNoSelection(); @@ -1598,7 +1598,7 @@ void SfxStyleControllerItem_Impl::StateChanged( { const sal_uInt16 nIdx = GetId() - SID_STYLE_FAMILY_START; - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { const SfxTemplateItem* pStateItem = PTR_CAST( SfxTemplateItem, pState ); @@ -2050,22 +2050,22 @@ void SvxStyleToolBoxControl::StateChanged( DBG_ASSERT( pBox, "Control not found!" ); - if ( SFX_ITEM_DISABLED == eState ) + if ( SfxItemState::DISABLED == eState ) pBox->Disable(); else pBox->Enable(); - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); switch ( eState ) { - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: eTri = ((const SfxBoolItem*)pState)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE; break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: eTri = TRISTATE_INDET; break; @@ -2075,7 +2075,7 @@ void SvxStyleToolBoxControl::StateChanged( rTbx.SetItemState( nId, eTri ); - if ( SFX_ITEM_DISABLED != eState ) + if ( SfxItemState::DISABLED != eState ) Update(); } @@ -2114,7 +2114,7 @@ void SvxFontNameToolBoxControl::StateChanged( DBG_ASSERT( pBox, "Control not found!" ); - if ( SFX_ITEM_DISABLED == eState ) + if ( SfxItemState::DISABLED == eState ) { pBox->Disable(); pBox->Update( (const SvxFontItem*)NULL ); @@ -2123,7 +2123,7 @@ void SvxFontNameToolBoxControl::StateChanged( { pBox->Enable(); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) { const SvxFontItem* pFontItem = dynamic_cast< const SvxFontItem* >( pState ); @@ -2136,7 +2136,7 @@ void SvxFontNameToolBoxControl::StateChanged( pBox->SaveValue(); } - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); } Window* SvxFontNameToolBoxControl::CreateItemWindow( Window *pParent ) @@ -2259,12 +2259,12 @@ void SvxColorToolBoxControl::StateChanged( { ToolBox& rTbx = GetToolBox(); sal_uInt16 nId = GetId(); - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); + rTbx.SetItemState( nId, ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); if ( nSID == SID_ATTR_CHAR_COLOR_EXT || nSID == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ) { - if ( pState && SFX_ITEM_DONTCARE != eState ) + if ( pState && SfxItemState::DONTCARE != eState ) { const SfxBoolItem* pBool = static_cast< const SfxBoolItem* >( pState ); rTbx.CheckItem( nId, pBool && pBool->GetValue() ); @@ -2368,8 +2368,8 @@ void SvxLineColorToolBoxControl::StateChanged( { ToolBox& rTbx = GetToolBox(); sal_uInt16 nId = GetId(); - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); + rTbx.SetItemState( nId, ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); } void SvxLineColorToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/) @@ -2415,8 +2415,8 @@ void SvxFrameToolBoxControl::StateChanged( sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState) + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); + rTbx.SetItemState( nId, (SfxItemState::DONTCARE == eState) ? TRISTATE_INDET : TRISTATE_FALSE ); } @@ -2454,8 +2454,8 @@ void SvxFrameLineStyleToolBoxControl::StateChanged( sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState) + rTbx.EnableItem( nId, SfxItemState::DISABLED != eState ); + rTbx.SetItemState( nId, (SfxItemState::DONTCARE == eState) ? TRISTATE_INDET : TRISTATE_FALSE ); } @@ -2474,14 +2474,14 @@ void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState eState, { SfxStringItem* pItem = PTR_CAST( SfxStringItem, pState ); ToolBox& rBox = GetToolBox(); - if ( pItem && eState != SFX_ITEM_DISABLED ) + if ( pItem && eState != SfxItemState::DISABLED ) { OUString aNewText( MnemonicGenerator::EraseAllMnemonicChars( pItem->GetValue() ) ); rBox.SetQuickHelpText( GetId(), aNewText ); } - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) rBox.SetQuickHelpText( GetId(), aDefaultText ); - rBox.EnableItem( GetId(), eState != SFX_ITEM_DISABLED ); + rBox.EnableItem( GetId(), eState != SfxItemState::DISABLED ); } static void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet ) diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx index 69c36b62cd55..52d208d94c25 100644 --- a/svx/source/tbxctrls/tbxdrctl.cxx +++ b/svx/source/tbxctrls/tbxdrctl.cxx @@ -57,7 +57,7 @@ SvxTbxCtlDraw::SvxTbxCtlDraw( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx void SvxTbxCtlDraw::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) ); + GetToolBox().EnableItem( GetId(), ( eState != SfxItemState::DISABLED ) ); SfxToolBoxControl::StateChanged( nSID, eState, pState ); Reference< XLayoutManager > xLayoutMgr = getLayoutManager(); diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index eb37bc6e892f..c80ccbfc95c1 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -182,7 +182,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem case SID_EXTRUSION_DIRECTION: { - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_DIRECTION ) == SFX_ITEM_SET ) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_DIRECTION ) == SfxItemState::SET ) { sal_Int32 nSkew = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_EXTRUSION_DIRECTION))->GetValue(); @@ -266,7 +266,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem break; case SID_EXTRUSION_PROJECTION: { - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_PROJECTION ) == SFX_ITEM_SET ) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_PROJECTION ) == SfxItemState::SET ) { sal_Int32 nProjection = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_EXTRUSION_PROJECTION))->GetValue(); ProjectionMode eProjectionMode = nProjection == 1 ? ProjectionMode_PARALLEL : ProjectionMode_PERSPECTIVE; @@ -279,7 +279,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem break; case SID_EXTRUSION_DEPTH: { - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH ) == SFX_ITEM_SET) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH ) == SfxItemState::SET) { double fDepth = ((const SvxDoubleItem*)rReq.GetArgs()->GetItem(SID_EXTRUSION_DEPTH))->GetValue(); double fFraction = 0.0; @@ -300,7 +300,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem { static const OUString sExtrusionColor( "Color" ); - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_3D_COLOR ) == SFX_ITEM_SET) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_3D_COLOR ) == SfxItemState::SET) { Color aColor( ((const SvxColorItem&)rReq.GetArgs()->Get(SID_EXTRUSION_3D_COLOR)).GetValue() ); @@ -330,7 +330,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem static const OUString sDiffusion( "Diffusion" ); static const OUString sMetal( "Metal" ); - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_SURFACE ) == SFX_ITEM_SET) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_SURFACE ) == SfxItemState::SET) { sal_Int32 nSurface = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_EXTRUSION_SURFACE))->GetValue(); @@ -384,7 +384,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem static const OUString sFirstLightLevel( "FirstLightLevel" ); static const OUString sSecondLightLevel( "SecondLightLevel" ); - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_LIGHTING_INTENSITY ) == SFX_ITEM_SET) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_LIGHTING_INTENSITY ) == SfxItemState::SET) { sal_Int32 nLevel = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_EXTRUSION_LIGHTING_INTENSITY))->GetValue(); @@ -444,7 +444,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem break; case SID_EXTRUSION_LIGHTING_DIRECTION: { - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_LIGHTING_DIRECTION ) == SFX_ITEM_SET) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_LIGHTING_DIRECTION ) == SfxItemState::SET) { sal_Int32 nDirection = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_EXTRUSION_LIGHTING_DIRECTION))->GetValue(); @@ -578,8 +578,8 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rB case SID_EXTRUSION_DEPTH_DIALOG: if( rReq.GetArgs() && - (rReq.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH ) == SFX_ITEM_SET) && - (rReq.GetArgs()->GetItemState( SID_ATTR_METRIC ) == SFX_ITEM_SET)) + (rReq.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH ) == SfxItemState::SET) && + (rReq.GetArgs()->GetItemState( SID_ATTR_METRIC ) == SfxItemState::SET)) { double fDepth = ((const SvxDoubleItem*)rReq.GetArgs()->GetItem(SID_EXTRUSION_DEPTH))->GetValue(); FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)rReq.GetArgs()->GetItem(SID_ATTR_METRIC))->GetValue(); @@ -1252,90 +1252,90 @@ bool checkForSelectedCustomShapes( SdrView* pSdrView, bool bOnlyExtruded ) void ExtrusionBar::getState( SdrView* pSdrView, SfxItemSet& rSet ) { - if (rSet.GetItemState(SID_EXTRUSION_DIRECTION) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_DIRECTION) != SfxItemState::UNKNOWN) { getExtrusionDirectionState( pSdrView, rSet ); } - if (rSet.GetItemState(SID_EXTRUSION_PROJECTION) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_PROJECTION) != SfxItemState::UNKNOWN) { getExtrusionProjectionState( pSdrView, rSet ); } const bool bOnlyExtrudedCustomShapes = checkForSelectedCustomShapes( pSdrView, true ); - if (rSet.GetItemState(SID_EXTRUSION_TILT_DOWN) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_TILT_DOWN) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_TILT_DOWN ); } - if (rSet.GetItemState(SID_EXTRUSION_TILT_DOWN) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_TILT_DOWN) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_TILT_DOWN ); } - if (rSet.GetItemState(SID_EXTRUSION_TILT_UP) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_TILT_UP) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_TILT_UP ); } - if (rSet.GetItemState(SID_EXTRUSION_TILT_LEFT) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_TILT_LEFT) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_TILT_LEFT ); } - if (rSet.GetItemState(SID_EXTRUSION_TILT_RIGHT) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_TILT_RIGHT) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_TILT_RIGHT ); } - if (rSet.GetItemState(SID_EXTRUSION_3D_COLOR) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_3D_COLOR) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_3D_COLOR ); } - if (rSet.GetItemState(SID_EXTRUSION_DEPTH_FLOATER) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_DEPTH_FLOATER) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_DEPTH_FLOATER ); } - if (rSet.GetItemState(SID_EXTRUSION_DIRECTION_FLOATER) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_DIRECTION_FLOATER) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_DIRECTION_FLOATER ); } - if (rSet.GetItemState(SID_EXTRUSION_LIGHTING_FLOATER) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_LIGHTING_FLOATER) != SfxItemState::UNKNOWN) { if (! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_LIGHTING_FLOATER ); } - if (rSet.GetItemState(SID_EXTRUSION_SURFACE_FLOATER) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_SURFACE_FLOATER) != SfxItemState::UNKNOWN) { if(! bOnlyExtrudedCustomShapes) rSet.DisableItem( SID_EXTRUSION_SURFACE_FLOATER ); } - if (rSet.GetItemState(SID_EXTRUSION_TOOGLE) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_TOOGLE) != SfxItemState::UNKNOWN) { if( !checkForSelectedCustomShapes( pSdrView, false ) ) rSet.DisableItem( SID_EXTRUSION_TOOGLE ); } - if (rSet.GetItemState(SID_EXTRUSION_DEPTH) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_DEPTH) != SfxItemState::UNKNOWN) { getExtrusionDepthState( pSdrView, rSet ); } - if (rSet.GetItemState(SID_EXTRUSION_SURFACE) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_SURFACE) != SfxItemState::UNKNOWN) { getExtrusionSurfaceState( pSdrView, rSet ); } - if (rSet.GetItemState(SID_EXTRUSION_LIGHTING_INTENSITY) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_LIGHTING_INTENSITY) != SfxItemState::UNKNOWN) { getExtrusionLightingIntensityState( pSdrView, rSet ); } - if (rSet.GetItemState(SID_EXTRUSION_LIGHTING_DIRECTION) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_LIGHTING_DIRECTION) != SfxItemState::UNKNOWN) { getExtrusionLightingDirectionState( pSdrView, rSet ); } - if (rSet.GetItemState(SID_EXTRUSION_3D_COLOR) != SFX_ITEM_UNKNOWN) + if (rSet.GetItemState(SID_EXTRUSION_3D_COLOR) != SfxItemState::UNKNOWN) { getExtrusionColorState( pSdrView, rSet ); } diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 8bf103061ddc..aae587aac6d3 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -268,7 +268,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem case SID_FONTWORK_ALIGNMENT: { - if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_FONTWORK_ALIGNMENT ) == SFX_ITEM_SET ) + if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_FONTWORK_ALIGNMENT ) == SfxItemState::SET ) { sal_Int32 nValue = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_FONTWORK_ALIGNMENT))->GetValue(); if ( ( nValue >= 0 ) && ( nValue < 5 ) ) @@ -293,7 +293,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem case SID_FONTWORK_CHARACTER_SPACING: { - if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING ) == SFX_ITEM_SET ) ) + if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) ) { sal_Int32 nCharSpacing = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING))->GetValue(); pObj->SetMergedItem( SvxCharScaleWidthItem( (sal_uInt16)nCharSpacing, EE_CHAR_FONTWIDTH ) ); @@ -304,7 +304,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem case SID_FONTWORK_KERN_CHARACTER_PAIRS: { - if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_KERN_CHARACTER_PAIRS ) == SFX_ITEM_SET ) ) + if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_KERN_CHARACTER_PAIRS ) == SfxItemState::SET ) ) { // sal_Bool bKernCharacterPairs = ((const SfxBoolItem*)rReq.GetArgs()->GetItem(SID_FONTWORK_KERN_CHARACTER_PAIRS))->GetValue(); //TODO: pObj->SetMergedItem( SvxCharScaleWidthItem( (sal_uInt16)nCharSpacing, EE_CHAR_FONTWIDTH ) ); @@ -488,7 +488,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi case SID_FONTWORK_CHARACTER_SPACING_DIALOG : { - if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING ) == SFX_ITEM_SET ) ) + if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) ) { sal_Int32 nCharSpacing = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING))->GetValue(); FontworkCharacterSpacingDialog aDlg( 0L, nCharSpacing ); @@ -555,43 +555,43 @@ void FontworkBar::getState( SdrView* pSdrView, SfxItemSet& rSet ) { sal_uInt32 nCheckStatus = 0; - if ( rSet.GetItemState( SID_FONTWORK_ALIGNMENT_FLOATER ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_FONTWORK_ALIGNMENT_FLOATER ) != SfxItemState::UNKNOWN ) { if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) rSet.DisableItem( SID_FONTWORK_ALIGNMENT_FLOATER ); } - if ( rSet.GetItemState( SID_FONTWORK_ALIGNMENT ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_FONTWORK_ALIGNMENT ) != SfxItemState::UNKNOWN ) { if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) rSet.DisableItem( SID_FONTWORK_ALIGNMENT ); else SetAlignmentState( pSdrView, rSet ); } - if ( rSet.GetItemState( SID_FONTWORK_CHARACTER_SPACING_FLOATER ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_FONTWORK_CHARACTER_SPACING_FLOATER ) != SfxItemState::UNKNOWN ) { if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) rSet.DisableItem( SID_FONTWORK_CHARACTER_SPACING_FLOATER ); } - if ( rSet.GetItemState( SID_FONTWORK_CHARACTER_SPACING ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_FONTWORK_CHARACTER_SPACING ) != SfxItemState::UNKNOWN ) { if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) rSet.DisableItem( SID_FONTWORK_CHARACTER_SPACING ); else SetCharacterSpacingState( pSdrView, rSet ); } - if ( rSet.GetItemState( SID_FONTWORK_KERN_CHARACTER_PAIRS ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_FONTWORK_KERN_CHARACTER_PAIRS ) != SfxItemState::UNKNOWN ) { if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) rSet.DisableItem( SID_FONTWORK_KERN_CHARACTER_PAIRS ); else SetKernCharacterPairsState( pSdrView, rSet ); } - if ( rSet.GetItemState( SID_FONTWORK_SAME_LETTER_HEIGHTS ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_FONTWORK_SAME_LETTER_HEIGHTS ) != SfxItemState::UNKNOWN ) { if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) rSet.DisableItem( SID_FONTWORK_SAME_LETTER_HEIGHTS ); } - if ( rSet.GetItemState( SID_FONTWORK_SHAPE_TYPE ) != SFX_ITEM_UNKNOWN ) + if ( rSet.GetItemState( SID_FONTWORK_SHAPE_TYPE ) != SfxItemState::UNKNOWN ) { if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) rSet.DisableItem( SID_FONTWORK_SHAPE_TYPE ); diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx index 8ba7dfd4c8db..93f2a01a0f0f 100644 --- a/svx/source/unodraw/unobrushitemhelper.cxx +++ b/svx/source/unodraw/unobrushitemhelper.cxx @@ -156,7 +156,7 @@ sal_uInt16 getTransparenceForSvxBrushItem(const SfxItemSet& rSourceSet, bool bSe sal_uInt16 nFillTransparence(static_cast< const XFillTransparenceItem& >(rSourceSet.Get(XATTR_FILLTRANSPARENCE, bSearchInParents)).GetValue()); const SfxPoolItem* pGradientItem = 0; - if(SFX_ITEM_SET == rSourceSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, bSearchInParents, &pGradientItem) + if(SfxItemState::SET == rSourceSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, bSearchInParents, &pGradientItem) && static_cast< const XFillFloatTransparenceItem* >(pGradientItem)->IsEnabled()) { const XGradient& rGradient = static_cast< const XFillFloatTransparenceItem* >(pGradientItem)->GetGradientValue(); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3c7371095033..30afdb116fc1 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1687,12 +1687,12 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const pSet = new SfxItemSet( mpModel->GetItemPool(), pMap->nWID, pMap->nWID); } - if( pSet->GetItemState( pMap->nWID ) != SFX_ITEM_SET ) + if( pSet->GetItemState( pMap->nWID ) != SfxItemState::SET ) pSet->Put(mpObj->GetMergedItem(pMap->nWID)); if( !SvxUnoTextRangeBase::SetPropertyValueHelper( *pSet, pMap, rVal, *pSet )) { - if( pSet->GetItemState( pMap->nWID ) != SFX_ITEM_SET ) + if( pSet->GetItemState( pMap->nWID ) != SfxItemState::SET ) { if(bIsNotPersist) { @@ -1701,14 +1701,14 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const } } - if( pSet->GetItemState( pMap->nWID ) != SFX_ITEM_SET ) + if( pSet->GetItemState( pMap->nWID ) != SfxItemState::SET ) { // Default aus ItemPool holen if(SfxItemPool::IsWhich(pMap->nWID)) pSet->Put(mpModel->GetItemPool().GetDefaultItem(pMap->nWID)); } - if( pSet->GetItemState( pMap->nWID ) == SFX_ITEM_SET ) + if( pSet->GetItemState( pMap->nWID ) == SfxItemState::SET ) { SvxItemPropertySet_setPropertyValue( *mpPropSet, pMap, rVal, *pSet ); } @@ -1964,7 +1964,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleE case SDRATTR_CIRCSTARTANGLE: { const SfxPoolItem* pPoolItem=NULL; - if(aSet.GetItemState(SDRATTR_CIRCSTARTANGLE,false,&pPoolItem)==SFX_ITEM_SET) + if(aSet.GetItemState(SDRATTR_CIRCSTARTANGLE,false,&pPoolItem)==SfxItemState::SET) { sal_Int32 nAngle = ((SdrCircStartAngleItem*)pPoolItem)->GetValue(); aAny <<= nAngle; @@ -1975,7 +1975,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleE case SDRATTR_CIRCENDANGLE: { const SfxPoolItem* pPoolItem=NULL; - if (aSet.GetItemState(SDRATTR_CIRCENDANGLE,false,&pPoolItem)==SFX_ITEM_SET) + if (aSet.GetItemState(SDRATTR_CIRCENDANGLE,false,&pPoolItem)==SfxItemState::SET) { sal_Int32 nAngle = ((SdrCircEndAngleItem*)pPoolItem)->GetValue(); aAny <<= nAngle; @@ -2066,11 +2066,11 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope switch( rSet.GetItemState( pMap->nWID, false ) ) { - case SFX_ITEM_READONLY: - case SFX_ITEM_SET: + case SfxItemState::READONLY: + case SfxItemState::SET: eState = beans::PropertyState_DIRECT_VALUE; break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: eState = beans::PropertyState_DEFAULT_VALUE; break; default: @@ -2959,8 +2959,8 @@ bool SvxShape::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty { const SfxItemSet& rSet = mpObj->GetMergedItemSet(); - if( rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SFX_ITEM_SET || - rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SFX_ITEM_SET ) + if( rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET || + rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET ) { rState = beans::PropertyState_DIRECT_VALUE; } diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx index 62eb2f1798d2..af2714a6fa74 100644 --- a/svx/source/xoutdev/xexch.cxx +++ b/svx/source/xoutdev/xexch.cxx @@ -64,7 +64,7 @@ SvStream& WriteXFillExchangeData( SvStream& rOStm, const XFillExchangeData& rDat while( nWhich ) { - if( SFX_ITEM_SET == rData.pXFillAttrSetItem->GetItemSet().GetItemState( nWhich, false, &pItem ) ) + if( SfxItemState::SET == rData.pXFillAttrSetItem->GetItemSet().GetItemState( nWhich, false, &pItem ) ) { VersionCompat aCompat( rOStm, STREAM_WRITE ); const sal_uInt16 nItemVersion2 = pItem->GetVersion( (sal_uInt16) rOStm.GetVersion() ); diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 77ace642a3e6..8041a6356657 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2027,7 +2027,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( const SfxPoolItem* pItem( 0 ); // #i82637# - Found character attributes, whose value equals the value of // the corresponding default character attributes, are excluded. - if ( aSet.GetItemState( aPropIt->nWID, true, &pItem ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( aPropIt->nWID, true, &pItem ) == SfxItemState::SET ) { uno::Any aVal; pItem->QueryValue( aVal, aPropIt->nMemberId ); diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 180b19ef858d..6a34f60756d7 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -328,7 +328,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) default: { // attribute is defined in this format - if( SFX_ITEM_SET == aSet.GetItemState( nWhich, false )) + if( SfxItemState::SET == aSet.GetItemState( nWhich, false )) { // DropCaps might come into this block OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify was sent without sender" ); @@ -430,15 +430,15 @@ SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, bool bSrchInParent, const S if( ppItem ) *ppItem = &aSvxBrushItem; - return SFX_ITEM_SET; + return SfxItemState::SET; } - // if not, reset pointer and return SFX_ITEM_DEFAULT to signal that + // if not, reset pointer and return SfxItemState::DEFAULT to signal that // the item is not set if( ppItem ) *ppItem = NULL; - return SFX_ITEM_DEFAULT; + return SfxItemState::DEFAULT; } return aSet.GetItemState( nWhich, bSrchInParent, ppItem ); @@ -458,11 +458,11 @@ SfxItemState SwFmt::GetBackgroundState(SvxBrushItem &rItem, bool bSrchInParent) // as good as possible to have an instance for the pointer to point // to and return as state that it is set rItem = getSvxBrushItemFromSourceSet(aSet, RES_BACKGROUND, bSrchInParent); - return SFX_ITEM_SET; + return SfxItemState::SET; } - // if not return SFX_ITEM_DEFAULT to signal that the item is not set - return SFX_ITEM_DEFAULT; + // if not return SfxItemState::DEFAULT to signal that the item is not set + return SfxItemState::DEFAULT; } const SfxPoolItem* pItem = 0; @@ -589,7 +589,7 @@ bool SwFmt::SetFmtAttr( const SfxItemSet& rSet ) { const SfxPoolItem* pSource = 0; - if(SFX_ITEM_SET == aTempSet.GetItemState(RES_BACKGROUND, false, &pSource)) + if(SfxItemState::SET == aTempSet.GetItemState(RES_BACKGROUND, false, &pSource)) { //UUUU FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] SAL_INFO("sw.core", "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)"); diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 20c787446cdd..383abcfaa80e 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -177,7 +177,7 @@ SfxItemSet* SwAttrSet::Clone( bool bItems, SfxItemPool *pToPool ) const while ( nWhich ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == GetItemState( nWhich, false, &pItem ) ) + if ( SfxItemState::SET == GetItemState( nWhich, false, &pItem ) ) pTmpSet->Put( *pItem, pItem->Which() ); nWhich = aIter.NextWhich(); } @@ -266,14 +266,14 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify ) bool bSet = false; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == GetItemState( RES_PAGEDESC, false, &pItem ) && + if( SfxItemState::SET == GetItemState( RES_PAGEDESC, false, &pItem ) && ((SwFmtPageDesc*)pItem)->GetDefinedIn() != pModify ) { ((SwFmtPageDesc*)pItem)->ChgDefinedIn( pModify ); bSet = true; } - if( SFX_ITEM_SET == GetItemState( RES_PARATR_DROP, false, &pItem ) && + if( SfxItemState::SET == GetItemState( RES_PARATR_DROP, false, &pItem ) && ((SwFmtDrop*)pItem)->GetDefinedIn() != pModify ) { // If CharFormat is set and it is set in different attribute pools then @@ -289,7 +289,7 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify ) bSet = true; } - if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, false, &pItem ) && + if( SfxItemState::SET == GetItemState( RES_BOXATR_FORMULA, false, &pItem ) && ((SwTblBoxFormula*)pItem)->GetDefinedIn() != pModify ) { ((SwTblBoxFormula*)pItem)->ChgDefinedIn( pModify ); @@ -318,7 +318,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const // Does the NumRule has to be copied? if( pSrcDoc != pDstDoc && - SFX_ITEM_SET == GetItemState( RES_PARATR_NUMRULE, false, &pItem ) ) + SfxItemState::SET == GetItemState( RES_PARATR_NUMRULE, false, &pItem ) ) { const OUString& rNm = ((SwNumRuleItem*)pItem)->GetValue(); if( !rNm.isEmpty() ) @@ -335,7 +335,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const // for text nodes if ( pSrcDoc != pDstDoc && pCNd && pCNd->IsTxtNode() && - GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SFX_ITEM_SET ) + GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SfxItemState::SET ) { const OUString& sListId = dynamic_cast<const SfxStringItem*>(pItem)->GetValue(); @@ -381,7 +381,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const } const SwPageDesc* pPgDesc; - if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState( + if( pSrcDoc != pDstDoc && SfxItemState::SET == GetItemState( RES_PAGEDESC, false, &pItem ) && 0 != ( pPgDesc = ((SwFmtPageDesc*)pItem)->GetPageDesc()) ) { diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 898f56b118bc..18608424398a 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1479,12 +1479,12 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, 0 != ( pBox = pTblNd->GetTable().GetTblBox( pSttNd->GetIndex() )) && #ifdef DBG_UTIL - ( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState( + ( SfxItemState::SET == pBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, false, &pItem ) || - SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState( + SfxItemState::SET == pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false, &pItem )) #else - SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState( + SfxItemState::SET == pBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, false, &pItem ) #endif ) diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 310c8d6c89de..21390e527123 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -289,7 +289,7 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam ) if( RES_TXTATR_END <= nWhich ) break; // end of text attributes - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, !bNoColls, &pFndItem ) + if( SfxItemState::SET == rSet.GetItemState( nWhich, !bNoColls, &pFndItem ) && !CmpAttr( *pFndItem, rSet.GetPool()->GetDefaultItem( nWhich ) )) { pFndArr[ nWhich - nArrStart ] = @@ -358,7 +358,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr ) pIter = new SfxWhichIter( *pSet ); nWhch = pIter->FirstWhich(); while( nWhch && - SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) + SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) nWhch = pIter->NextWhich(); if( !nWhch ) pTmpItem = NULL; @@ -370,7 +370,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr ) while( pTmpItem ) { SfxItemState eState = aCmpSet.GetItemState( nWhch, false, &pItem ); - if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState ) + if( SfxItemState::DONTCARE == eState || SfxItemState::SET == eState ) { sal_uInt16 n; _SwSrchChrAttr* pCmp; @@ -421,7 +421,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr ) bool bContinue = false; - if( SFX_ITEM_DONTCARE == eState ) + if( SfxItemState::DONTCARE == eState ) { // Will the attribute become valid? if( !CmpAttr( aCmpSet.GetPool()->GetDefaultItem( nWhch ), @@ -472,7 +472,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr ) { nWhch = pIter->NextWhich(); while( nWhch && - SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) + SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) nWhch = pIter->NextWhich(); if( !nWhch ) break; @@ -511,7 +511,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr ) pIter = new SfxWhichIter( *pSet ); nWhch = pIter->FirstWhich(); while( nWhch && - SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) + SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) nWhch = pIter->NextWhich(); if( !nWhch ) pTmpItem = NULL; @@ -523,7 +523,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr ) while( pTmpItem ) { SfxItemState eState = aCmpSet.GetItemState( nWhch, false, &pItem ); - if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState ) + if( SfxItemState::DONTCARE == eState || SfxItemState::SET == eState ) { sal_uInt16 n; _SwSrchChrAttr* pCmp; @@ -572,7 +572,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr ) } bool bContinue = false; - if( SFX_ITEM_DONTCARE == eState ) + if( SfxItemState::DONTCARE == eState ) { // Will the attribute become valid? if( !CmpAttr( aCmpSet.GetPool()->GetDefaultItem( nWhch ), @@ -623,7 +623,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr ) { nWhch = pIter->NextWhich(); while( nWhch && - SFX_ITEM_SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) + SfxItemState::SET != pSet->GetItemState( nWhch, true, &pTmpItem ) ) nWhch = pIter->NextWhich(); if( !nWhch ) break; @@ -860,7 +860,7 @@ static int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, bool if( IsInvalidItem( pItem )) { nWhich = rCmpSet.GetWhichByPos( aIter.GetCurPos() ); - if( SFX_ITEM_SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem ) + if( SfxItemState::SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem ) || CmpAttr( *pNdItem, rNdSet.GetPool()->GetDefaultItem( nWhich ) )) return sal_False; } @@ -938,7 +938,7 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove, aFmtArr.insert( pTmpFmt ); } - if( SFX_ITEM_SET == pNode->GetSwAttrSet().GetItemState( nWhich, + if( SfxItemState::SET == pNode->GetSwAttrSet().GetItemState( nWhich, true, &pItem ) && ( !bValue || *pItem == rAttr ) ) { // FORWARD: SPoint at the end, GetMark at the beginning of the node @@ -1190,7 +1190,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, while( true ) { // reset all that are not set with pool defaults - if( !IsInvalidItem( pItem ) && SFX_ITEM_SET != + if( !IsInvalidItem( pItem ) && SfxItemState::SET != pReplSet->GetItemState( pItem->Which(), false )) aSet.Put( pPool->GetDefaultItem( pItem->Which() )); diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 93329f62cab8..e72992c0b174 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -817,7 +817,7 @@ bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos ) pSttNd->GetIndex() + 1 ]->GetTxtNode(); if( !pNd || ( pNd->GetTxt() == SwViewShell::GetShellRes()->aCalc_Error && - SFX_ITEM_SET == pChkBox->GetFrmFmt()-> + SfxItemState::SET == pChkBox->GetFrmFmt()-> GetItemState( RES_BOXATR_FORMULA )) ) pChkBox = 0; } diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index c6cabe87a99a..c801788ffab0 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1197,7 +1197,7 @@ namespace //local functions originally from docfmt.cxx { SwTableNode* pTblNd; const SwFmtPageDesc* pDesc; - if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pOtherSet->GetItemState( RES_PAGEDESC, false, (const SfxPoolItem**)&pDesc )) { if( pNode ) @@ -1244,7 +1244,7 @@ namespace //local functions originally from docfmt.cxx const SvxFmtBreakItem* pBreak; if( pNode && 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) && 0 != (pTblNd = pNode->FindTableNode() ) && - SFX_ITEM_SET == pOtherSet->GetItemState( RES_BREAK, + SfxItemState::SET == pOtherSet->GetItemState( RES_BREAK, false, (const SfxPoolItem**)&pBreak ) ) { SwTableNode* pCurTblNd = pTblNd; @@ -1275,7 +1275,7 @@ namespace //local functions originally from docfmt.cxx // If we have a PoolNumRule, create it if needed const SwNumRuleItem* pRule; sal_uInt16 nPoolId=0; - if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PARATR_NUMRULE, + if( SfxItemState::SET == pOtherSet->GetItemState( RES_PARATR_NUMRULE, false, (const SfxPoolItem**)&pRule ) && !pDoc->FindNumRulePtr( pRule->GetValue() ) && USHRT_MAX != (nPoolId = SwStyleNameMapper::GetPoolIdFromUIName ( pRule->GetValue(), @@ -1498,8 +1498,8 @@ namespace //local functions originally from docfmt.cxx } bool bCreateSwpHints = pCharSet && ( - SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, false ) || - SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, false ) ); + SfxItemState::SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, false ) || + SfxItemState::SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, false ) ); for(; aSt < aEnd; ++aSt ) { @@ -1769,14 +1769,14 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) { const SfxPoolItem *pItem; const SfxItemSet* pSet = ((SwCntntNode*)pNd)->GetpSwAttrSet(); - if( pSet && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, + if( pSet && SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) { pTableFmt->SetFmtAttr( *pItem ); bSavePageDesc = true; } - if( pSet && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, + if( pSet && SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) ) { pTableFmt->SetFmtAttr( *pItem ); @@ -2835,8 +2835,8 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b { // Only if the table has page breaks! const SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt(); - if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, false) && - SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, false ) ) + if( SfxItemState::SET != pFrmFmt->GetItemState(RES_PAGEDESC, false) && + SfxItemState::SET != pFrmFmt->GetItemState( RES_BREAK, false ) ) pNd = 0; } } @@ -2856,13 +2856,13 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b { SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pFrmFmt->GetItemState( RES_PAGEDESC, false, &pItem ) ) { pTxtNd->SetAttr( *pItem ); pFrmFmt->ResetFmtAttr( RES_PAGEDESC ); } - if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_BREAK, + if( SfxItemState::SET == pFrmFmt->GetItemState( RES_BREAK, false, &pItem ) ) { pTxtNd->SetAttr( *pItem ); @@ -3999,9 +3999,9 @@ SwFlyFrmFmt* DocumentContentOperationsManager::_InsNoTxtNode( const SwPosition& } #define NUMRULE_STATE \ - SfxItemState aNumRuleState = SFX_ITEM_UNKNOWN; \ + SfxItemState aNumRuleState = SfxItemState::UNKNOWN; \ SwNumRuleItem aNumRuleItem; \ - SfxItemState aListIdState = SFX_ITEM_UNKNOWN; \ + SfxItemState aListIdState = SfxItemState::UNKNOWN; \ SfxStringItem aListIdItem( RES_PARATR_LIST_ID, OUString() ); \ #define PUSH_NUMRULE_STATE \ @@ -4021,12 +4021,12 @@ static void lcl_PushNumruleState( SfxItemState &aNumRuleState, SwNumRuleItem &aN { const SfxPoolItem * pItem = NULL; aNumRuleState = pAttrSet->GetItemState(RES_PARATR_NUMRULE, false, &pItem); - if (SFX_ITEM_SET == aNumRuleState) + if (SfxItemState::SET == aNumRuleState) aNumRuleItem = *((SwNumRuleItem *) pItem); aListIdState = pAttrSet->GetItemState(RES_PARATR_LIST_ID, false, &pItem); - if (SFX_ITEM_SET == aListIdState) + if (SfxItemState::SET == aListIdState) { aListIdItem.SetValue( static_cast<const SfxStringItem*>(pItem)->GetValue() ); } @@ -4042,7 +4042,7 @@ static void lcl_PopNumruleState( SfxItemState aNumRuleState, const SwNumRuleItem // #i86492# - restore also <ListId> item if ( !lcl_MarksWholeNode(rPam) ) { - if (SFX_ITEM_SET == aNumRuleState) + if (SfxItemState::SET == aNumRuleState) { pDestTxtNd->SetAttr(aNumRuleItem); } @@ -4050,7 +4050,7 @@ static void lcl_PopNumruleState( SfxItemState aNumRuleState, const SwNumRuleItem { pDestTxtNd->ResetAttr(RES_PARATR_NUMRULE); } - if (SFX_ITEM_SET == aListIdState) + if (SfxItemState::SET == aListIdState) { pDestTxtNd->SetAttr(aListIdItem); } @@ -4354,9 +4354,9 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, if( !bOneNode && pSttTxtNd && bCopyCollFmt && pDestTxtNd->HasSwAttrSet() ) { aBrkSet.Put( *pDestTxtNd->GetpSwAttrSet() ); - if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_BREAK, false ) ) + if( SfxItemState::SET == aBrkSet.GetItemState( RES_BREAK, false ) ) pDestTxtNd->ResetAttr( RES_BREAK ); - if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_PAGEDESC, false ) ) + if( SfxItemState::SET == aBrkSet.GetItemState( RES_PAGEDESC, false ) ) pDestTxtNd->ResetAttr( RES_PAGEDESC ); } diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 870685e656b9..95e51f852550 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -817,7 +817,7 @@ void DocumentFieldsManager::UpdateTblFlds( SfxPoolItem* pHt ) if( pCalc->IsCalcError() ) nValue = DBL_MAX; aTmp.Put( SwTblBoxValue( nValue )); - if( SFX_ITEM_SET != pFmt->GetItemState( RES_BOXATR_FORMAT )) + if( SfxItemState::SET != pFmt->GetItemState( RES_BOXATR_FORMAT )) aTmp.Put( SwTblBoxNumFormat( 0 )); pFmt->SetFmtAttr( aTmp ); diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index d094df7d8f78..3837e0ebb63e 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -575,7 +575,7 @@ static OUString lcl_dbg_out(const SwNode & rNode) const SfxPoolItem * pItem = NULL; - if (pAttrSet && SFX_ITEM_SET == + if (pAttrSet && SfxItemState::SET == pAttrSet->GetItemState(RES_PARATR_NUMRULE, false, &pItem)) { aTmpStr += "("; diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 081225629496..4459b55e9164 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -655,7 +655,7 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) const SfxPoolItem *pItem = NULL; SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, false, &pItem ); const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem); - if (eState > SFX_ITEM_DEFAULT && pPaperBinItem) + if (eState > SfxItemState::DEFAULT && pPaperBinItem) nRes = pPaperBinItem->GetValue(); return nRes; diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index c6eafa0c4781..b7bc4c4523a2 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -169,7 +169,7 @@ static void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, // All in aIdArr except from RES_HEADER_FOOTER_EAT_SPACING case RES_HEADER_FOOTER_EAT_SPACING: //UUUU take out SvxBrushItem; it's the result of the fallback - // at SwFmt::GetItemState and not really in state SFX_ITEM_SET + // at SwFmt::GetItemState and not really in state SfxItemState::SET case RES_BACKGROUND: bExecuteId = false; break; @@ -194,7 +194,7 @@ static void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, if(bExecuteId) { - if (SFX_ITEM_SET == rSource.GetItemState(nId, false, &pItem)) + if (SfxItemState::SET == rSource.GetItemState(nId, false, &pItem)) { rDest.SetFmtAttr(*pItem); } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 1b46038e5ee8..456740a84c78 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -357,11 +357,11 @@ void sw_JoinText( SwPaM& rPam, bool bJoinPrev ) if( ( pTxtNd = aIdx.GetNode().GetTxtNode())->HasSwAttrSet() ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pTxtNd->GetpSwAttrSet()->GetItemState( + if( SfxItemState::SET == pTxtNd->GetpSwAttrSet()->GetItemState( RES_BREAK, false, &pItem ) ) pTxtNd->ResetAttr( RES_BREAK ); if( pTxtNd->HasSwAttrSet() && - SFX_ITEM_SET == pTxtNd->GetpSwAttrSet()->GetItemState( + SfxItemState::SET == pTxtNd->GetpSwAttrSet()->GetItemState( RES_PAGEDESC, false, &pItem ) ) pTxtNd->ResetAttr( RES_PAGEDESC ); } @@ -372,10 +372,10 @@ void sw_JoinText( SwPaM& rPam, bool bJoinPrev ) const SfxPoolItem* pItem; SfxItemSet aSet( pDoc->GetAttrPool(), aBreakSetRange ); const SfxItemSet* pSet = pOldTxtNd->GetpSwAttrSet(); - if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, + if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) ) aSet.Put( *pItem ); - if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) aSet.Put( *pItem ); if( aSet.Count() ) diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 97f8f5dac583..1cc791c4ba7f 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -306,7 +306,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms pNd->InsertItem( aFmt, pPos->nContent.GetIndex(), 0 ); } - if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem )) + if( SfxItemState::SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem )) { SwFmtVertOrient aOldV( rFmt.GetVertOrient() ); bool bSet = true; @@ -333,7 +333,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms // such that the fly's document coordinates are preserved. // If only the alignment changes in the position attributes (text::RelOrientation::FRAME // vs. text::RelOrientation::PRTAREA), we also correct the position. - if( SFX_ITEM_SET != rSet.GetItemState( RES_HORI_ORIENT, false, &pItem )) + if( SfxItemState::SET != rSet.GetItemState( RES_HORI_ORIENT, false, &pItem )) pItem = 0; SwFmtHoriOrient aOldH( rFmt.GetHoriOrient() ); @@ -354,7 +354,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms rSet.Put( aOldH ); } - if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem )) + if( SfxItemState::SET != rSet.GetItemState( RES_VERT_ORIENT, false, &pItem )) pItem = 0; SwFmtVertOrient aOldV( rFmt.GetVertOrient() ); @@ -399,7 +399,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, // If so, we pass it to a special method, which returns sal_True // if the Fly needs to be created anew, because we e.g change the FlyType. sal_Int8 const nMakeFrms = - (SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false )) + (SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) ? (rDoc.*pSetFlyFrmAnchor)( rFlyFmt, rSet, false ) : DONTMAKEFRMS; @@ -425,7 +425,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, break; default: - if( !IsInvalidItem( aIter.GetCurItem() ) && ( SFX_ITEM_SET != + if( !IsInvalidItem( aIter.GetCurItem() ) && ( SfxItemState::SET != rFlyFmt.GetAttrSet().GetItemState( nWhich, true, &pItem ) || *pItem != *aIter.GetCurItem() )) aTmpSet.Put( *aIter.GetCurItem() ); @@ -605,7 +605,7 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt, // Set the column first, or we'll have trouble with //Set/Reset/Synch. and so on const SfxPoolItem* pItem; - if( SFX_ITEM_SET != rNewFmt.GetAttrSet().GetItemState( RES_COL )) + if( SfxItemState::SET != rNewFmt.GetAttrSet().GetItemState( RES_COL )) rFmt.ResetFmtAttr( RES_COL ); if( rFmt.DerivedFrom() != &rNewFmt ) @@ -614,7 +614,7 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt, // 1. If not automatic = ignore; else = dispose // 2. Dispose of it! - if( SFX_ITEM_SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, false )) + if( SfxItemState::SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, false )) { rFmt.ResetFmtAttr( RES_FRM_SIZE ); bFrmSz = true; @@ -622,7 +622,7 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt, const SfxItemSet* pAsk = pSet; if( !pAsk ) pAsk = &rNewFmt.GetAttrSet(); - if( SFX_ITEM_SET == pAsk->GetItemState( RES_ANCHOR, false, &pItem ) + if( SfxItemState::SET == pAsk->GetItemState( RES_ANCHOR, false, &pItem ) && ((SwFmtAnchor*)pItem)->GetAnchorId() != rFmt.GetAnchor().GetAnchorId() ) { diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 690555ab97cd..19858903db3e 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -131,7 +131,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs ) sal_uInt16 const aSavIds[3] = { RES_PAGEDESC, RES_BREAK, RES_PARATR_NUMRULE }; for (sal_uInt16 n = 0; n < 3; ++n) { - if (SFX_ITEM_SET == pAttrSetOfNode->GetItemState(aSavIds[n], false, &pItem)) + if (SfxItemState::SET == pAttrSetOfNode->GetItemState(aSavIds[n], false, &pItem)) { bool bSave = false; switch( aSavIds[ n ] ) @@ -181,7 +181,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs ) if ( ( pItem->Which() != RES_PAGEDESC && pItem->Which() != RES_BREAK && pItem->Which() != RES_PARATR_NUMRULE ) || - ( aSavedAttrsSet.GetItemState( pItem->Which(), false ) != SFX_ITEM_SET ) ) + ( aSavedAttrsSet.GetItemState( pItem->Which(), false ) != SfxItemState::SET ) ) { pNode->ResetAttr( pItem->Which() ); } @@ -602,7 +602,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet ) } const SfxPoolItem* pTmpItem; - if( ( SFX_ITEM_SET == + if( ( SfxItemState::SET == aNew.GetItemState( RES_PARATR_TABSTOP, false, &pTmpItem ) ) && ((SvxTabStopItem*)pTmpItem)->Count() ) { @@ -999,7 +999,7 @@ static bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs ) // #i62675# check, if paragraph style has changed if ( pPara->bResetListAttrs && pFmt != pCNd->GetFmtColl() && - pFmt->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET ) + pFmt->GetItemState( RES_PARATR_NUMRULE ) == SfxItemState::SET ) { // Check, if the list style of the paragraph will change. bool bChangeOfListStyleAtParagraph( true ); @@ -1188,7 +1188,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl ) if( this != rColl.GetDoc() ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pNewColl->GetItemState( RES_PARATR_NUMRULE, + if( SfxItemState::SET == pNewColl->GetItemState( RES_PARATR_NUMRULE, false, &pItem )) { const SwNumRule* pRule; @@ -1285,7 +1285,7 @@ void SwDoc::CopyFmtArr( const SwFmtsBase& rSourceArr, // #i94285#: existing <SwFmtPageDesc> instance, before copying attributes const SfxPoolItem* pItem; if( &GetAttrPool() != pSrc->GetAttrSet().GetPool() && - SFX_ITEM_SET == pSrc->GetAttrSet().GetItemState( + SfxItemState::SET == pSrc->GetAttrSet().GetItemState( RES_PAGEDESC, false, &pItem ) && ((SwFmtPageDesc*)pItem)->GetPageDesc() ) { @@ -1344,7 +1344,7 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader, // Copy content nodes across documents! sal_uInt16 nAttr = static_cast<sal_uInt16>( bCpyHeader ? RES_HEADER : RES_FOOTER ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, false, &pItem )) + if( SfxItemState::SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, false, &pItem )) return ; // The header only contains the reference to the format from the other document! @@ -1362,7 +1362,7 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader, GetDfltFrmFmt() ); pNewFmt->CopyAttrs( *pOldFmt, true ); - if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState( + if( SfxItemState::SET == pNewFmt->GetAttrSet().GetItemState( RES_CNTNT, false, &pItem )) { SwFmtCntnt* pCntnt = (SwFmtCntnt*)pItem; @@ -1760,7 +1760,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId, aTmp.Differentiate( *pSet ); // we handle the adjust item separately const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pTNd->GetpSwAttrSet()->GetItemState( + if( SfxItemState::SET == pTNd->GetpSwAttrSet()->GetItemState( RES_PARATR_ADJUST, false, &pItem )) aTmp.Put( *pItem ); aExtraData.SetItemSet( aTmp ); @@ -1942,7 +1942,7 @@ namespace docfunc if ( !pParentTxtFmtColl ) continue; - if ( SFX_ITEM_SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) ) + if ( SfxItemState::SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) ) { // #i106218# consider that the outline style is set const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule(); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 0fb8c41e3b10..865324ac2bf5 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -109,7 +109,7 @@ static bool lcl_IsItemSet(const SwCntntNode & rNode, sal_uInt16 which) { bool bResult = false; - if (SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState(which)) + if (SfxItemState::SET == rNode.GetSwAttrSet().GetItemState(which)) bResult = true; return bResult; @@ -192,7 +192,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, { pFlySet->GetItemState( RES_ANCHOR, false, (const SfxPoolItem**)&pAnchor ); - if( SFX_ITEM_SET == pFlySet->GetItemState( RES_CNTNT, false )) + if( SfxItemState::SET == pFlySet->GetItemState( RES_CNTNT, false )) { SfxItemSet aTmpSet( *pFlySet ); aTmpSet.ClearItem( RES_CNTNT ); @@ -225,7 +225,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, else { if( eRequestId != aAnch.GetAnchorId() && - SFX_ITEM_SET != pFmt->GetItemState( RES_ANCHOR, true ) ) + SfxItemState::SET != pFmt->GetItemState( RES_ANCHOR, true ) ) { aAnch.SetType( eRequestId ); } @@ -262,7 +262,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, } } - if( SFX_ITEM_SET != pFmt->GetAttrSet().GetItemState( RES_FRM_SIZE )) + if( SfxItemState::SET != pFmt->GetAttrSet().GetItemState( RES_FRM_SIZE )) { SwFmtFrmSize aFmtSize( ATT_VAR_SIZE, 0, DEF_FLY_WIDTH ); const SwNoTxtNode* pNoTxtNode = rNode.GetNoTxtNode(); @@ -308,9 +308,9 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType, if ( !pAnchorPos && (FLY_AT_PAGE != eAnchorType) ) { const SwFmtAnchor* pAnch; - if( (pFlySet && SFX_ITEM_SET == pFlySet->GetItemState( + if( (pFlySet && SfxItemState::SET == pFlySet->GetItemState( RES_ANCHOR, false, (const SfxPoolItem**)&pAnch )) || - ( pFrmFmt && SFX_ITEM_SET == pFrmFmt->GetItemState( + ( pFrmFmt && SfxItemState::SET == pFrmFmt->GetItemState( RES_ANCHOR, true, (const SfxPoolItem**)&pAnch )) ) { if ( (FLY_AT_PAGE != pAnch->GetAnchorId()) ) @@ -343,7 +343,7 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType, const SfxPoolItem * pItem = NULL; if (bCalledFromShell && !lcl_IsItemSet(*pNewTxtNd, RES_PARATR_ADJUST) && - SFX_ITEM_SET == pAnchorNode->GetSwAttrSet(). + SfxItemState::SET == pAnchorNode->GetSwAttrSet(). GetItemState(RES_PARATR_ADJUST, true, &pItem)) { static_cast<SwCntntNode *>(pNewTxtNd)->SetAttr(*pItem); @@ -761,17 +761,17 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl, // If there's no BoxItem at graphic, but the new Format has one, then set the // default item in the new Set. Because the graphic's size has never changed! const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pOldFmt->GetAttrSet(). + if( SfxItemState::SET == pOldFmt->GetAttrSet(). GetItemState( RES_BOX, true, &pItem )) pNewSet->Put( *pItem ); - else if( SFX_ITEM_SET == pNewFmt->GetAttrSet(). + else if( SfxItemState::SET == pNewFmt->GetAttrSet(). GetItemState( RES_BOX, true )) pNewSet->Put( *GetDfltAttr( RES_BOX ) ); - if( SFX_ITEM_SET == pOldFmt->GetAttrSet(). + if( SfxItemState::SET == pOldFmt->GetAttrSet(). GetItemState( RES_SHADOW, true, &pItem )) pNewSet->Put( *pItem ); - else if( SFX_ITEM_SET == pNewFmt->GetAttrSet(). + else if( SfxItemState::SET == pNewFmt->GetAttrSet(). GetItemState( RES_SHADOW, true )) pNewSet->Put( *GetDfltAttr( RES_SHADOW ) ); } @@ -1099,10 +1099,10 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl, rDoc.getIDocumentStylePoolAccess().GetFrmFmtFromPool( RES_POOLFRM_FRAME ) ); // Set border and shadow to default if the template contains any. - if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState( RES_BOX, true )) + if( SfxItemState::SET == pNewFmt->GetAttrSet().GetItemState( RES_BOX, true )) pNewSet->Put( *GetDfltAttr( RES_BOX ) ); - if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState(RES_SHADOW,true)) + if( SfxItemState::SET == pNewFmt->GetAttrSet().GetItemState(RES_SHADOW,true)) pNewSet->Put( *GetDfltAttr( RES_SHADOW ) ); pNewFmt->SetFmtAttr( SwFmtCntnt( pSttNd )); diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index e2ad87b1f9e5..1b078e2b152d 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1322,7 +1322,7 @@ void SwDoc::DelNumRules( const SwPaM& rPam ) // list style is applied const SfxItemSet* pAttrSet = pTNd->GetpSwAttrSet(); if ( pAttrSet && - pAttrSet->GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET ) + pAttrSet->GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET ) pTNd->ResetAttr( RES_PARATR_NUMRULE ); else pTNd->SetAttr( aEmptyRule ); diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 7c76282869ec..a335a290c2d4 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -630,9 +630,9 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, const SfxItemSet* pSSet = rBox.GetItemSet( i, nS ); if( pSSet || - SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) || - SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) || - SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) ) + SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) || + SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) || + SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) ) { pTFmt = ((SwTableBox*)pT)->ClaimFrmFmt(); pTFmt->LockModify(); @@ -674,9 +674,9 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, const SfxItemSet* pSSet = rBox.GetItemSet( nS, i ); if( pSSet || - SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) || - SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) || - SFX_ITEM_SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) ) + SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMAT ) || + SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_FORMULA ) || + SfxItemState::SET == pTFmt->GetItemState( RES_BOXATR_VALUE ) ) { pTFmt = ((SwTableBox*)pT)->ClaimFrmFmt(); pTFmt->LockModify(); @@ -895,9 +895,9 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, bool bLastBox) // Save the Formula/Format/Value values const SwFrmFmt* pFmt = pBox->GetBox()->GetFrmFmt(); - if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT ) || - SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA ) || - SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE ) ) + if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMAT ) || + SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMULA ) || + SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE ) ) { SfxItemSet* pSet = new SfxItemSet( pDoc->GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE, diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 37332818b0d2..759462ca5edb 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -205,7 +205,7 @@ void SwTxtFmtColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) bool bContinue = true; // Check against the own attributes - if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, false, + if( pNewLRSpace && SfxItemState::SET == GetItemState( RES_LR_SPACE, false, (const SfxPoolItem**)&pOldLRSpace )) { bool bChg = false; @@ -246,7 +246,7 @@ void SwTxtFmtColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } } - if( pNewULSpace && SFX_ITEM_SET == GetItemState( + if( pNewULSpace && SfxItemState::SET == GetItemState( RES_UL_SPACE, false, (const SfxPoolItem**)&pOldULSpace ) && pOldULSpace != pNewULSpace ) // Avoid recursion (SetAttr!) { @@ -281,7 +281,7 @@ void SwTxtFmtColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) nC < nArrLen; ++nC ) { SvxFontHeightItem *pFSize = aFontSizeArr[ nC ], *pOldFSize; - if( pFSize && SFX_ITEM_SET == GetItemState( + if( pFSize && SfxItemState::SET == GetItemState( pFSize->Which(), false, (const SfxPoolItem**)&pOldFSize ) && // Avoid recursion (SetAttr!) pFSize != pOldFSize ) @@ -350,7 +350,7 @@ bool SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr ) bool SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet ) { const bool bIsNumRuleItemAffected = - rSet.GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET; + rSet.GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET; if ( bIsNumRuleItemAffected ) { TxtFmtCollFunc::RemoveFromNumRule( *this ); @@ -413,17 +413,17 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const { bool bAreListLevelIndentsApplicable( true ); - if ( GetItemState( RES_PARATR_NUMRULE ) != SFX_ITEM_SET ) + if ( GetItemState( RES_PARATR_NUMRULE ) != SfxItemState::SET ) { // no list style applied to paragraph style bAreListLevelIndentsApplicable = false; } - else if ( GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET ) + else if ( GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET ) { // paragraph style has hard-set indent attributes bAreListLevelIndentsApplicable = false; } - else if ( GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET ) + else if ( GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET ) { // list style is directly applied to paragraph style and paragraph // style has no hard-set indent attributes @@ -438,14 +438,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const const SwTxtFmtColl* pColl = dynamic_cast<const SwTxtFmtColl*>(DerivedFrom()); while ( pColl ) { - if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET ) + if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET ) { // indent attributes found in the paragraph style hierarchy. bAreListLevelIndentsApplicable = false; break; } - if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET ) + if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET ) { // paragraph style with the list style found and until now no // indent attributes are found in the paragraph style hierarchy. @@ -638,12 +638,12 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel) { if ( !pDerivedTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() ) { - if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_DEFAULT ) + if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::DEFAULT ) { SwNumRuleItem aItem(aEmptyOUStr); pDerivedTxtFmtColl->SetFmtAttr( aItem ); } - if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, false ) == SFX_ITEM_DEFAULT ) + if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, false ) == SfxItemState::DEFAULT ) { pDerivedTxtFmtColl->SetAttrOutlineLevel( 0 ); } diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 71adadbc683a..bac1c50627fe 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -35,7 +35,7 @@ bool _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrmFmt& rFmt ) { const SvxBorderLine* pBrd; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rFmt.GetItemState( RES_BOX, true, &pItem ) && + if( SfxItemState::SET == rFmt.GetItemState( RES_BOX, true, &pItem ) && 0 != ( pBrd = ((SvxBoxItem*)pItem)->GetLeft() ) ) { if( *pBrdLn == *pBrd ) @@ -104,7 +104,7 @@ static sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB, const SvxBorderLine* pBrd; const SwTableBox& rBox = rCollTLB.GetBox( rStt, &nPos ); - if( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,true, &pItem ) + if( SfxItemState::SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,true, &pItem ) || 0 == ( pBrd = GetLineTB( (SvxBoxItem*)pItem, bTop )) || !( *pBrd == rBrdLn )) break; @@ -117,7 +117,7 @@ static inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBo bool bTop, const SfxPoolItem** ppItem ) { - return SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, true, ppItem ) + return SfxItemState::SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, true, ppItem ) ? GetLineTB( (SvxBoxItem*)*ppItem, bTop ) : 0; } @@ -183,7 +183,7 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara ) SwTableBox* pBox; for( sal_uInt16 i = aBoxes.size(); i; ) - if( SFX_ITEM_SET == (pBox = aBoxes[ --i ])->GetFrmFmt()-> + if( SfxItemState::SET == (pBox = aBoxes[ --i ])->GetFrmFmt()-> GetItemState( RES_BOX, true, &pItem ) && 0 != ( pBrd = ((SvxBoxItem*)pItem)->GetRight() ) ) { @@ -394,12 +394,12 @@ static bool lcl_MergeGCLine(SwTableLine* pLn, _GCLinePara* pGCPara) // JP 31.03.99: Bug 60000 // Pass the attributes of the to-be-deleted Lines to the "inserted" one const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pLn->GetFrmFmt()->GetItemState( + if( SfxItemState::SET == pLn->GetFrmFmt()->GetItemState( RES_BACKGROUND, true, &pItem )) { SwTableLines& rBoxLns = pBox->GetTabLines(); for( sal_uInt16 nLns = 0; nLns < nLen; ++nLns ) - if( SFX_ITEM_SET != rBoxLns[ nLns ]->GetFrmFmt()-> + if( SfxItemState::SET != rBoxLns[ nLns ]->GetFrmFmt()-> GetItemState( RES_BACKGROUND, true )) pGCPara->pShareFmts->SetAttr( *rBoxLns[ nLns ], *pItem ); } diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 87d635187c9e..82d653a25006 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -618,7 +618,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { sal_uInt16 n; for( n = RES_GRFATR_BEGIN; n < RES_GRFATR_END; ++n ) - if( SFX_ITEM_SET == ((SwAttrSetChg*)pOld)->GetChgSet()-> + if( SfxItemState::SET == ((SwAttrSetChg*)pOld)->GetChgSet()-> GetItemState( n, false )) { CLEARCACHE( (SwGrfNode*) GetNode() ) diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 546e86fddbc0..977dd406c37d 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -731,7 +731,7 @@ void SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos, const SwTblBoxNumFormat* pNumFmtItem; const SvNumberformat* pNumFormat = 0; - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, true, + if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, true, (const SfxPoolItem**)&pNumFmtItem ) && pNFmtr && 0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) ) pFmt->SetValueFormat( ((SvNumberformat*)pNumFormat)->GetFormatstring(), diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 8f5d1558f70e..0dd85ad45d0f 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -628,9 +628,9 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox, } // Delete the current Formula/Format/Value values - if( SFX_ITEM_SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT ) || - SFX_ITEM_SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA ) || - SFX_ITEM_SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE ) ) + if( SfxItemState::SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT ) || + SfxItemState::SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA ) || + SfxItemState::SET == pDstBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE ) ) { pDstBox->ClaimFrmFmt()->ResetFmtAttr( RES_BOXATR_FORMAT, RES_BOXATR_VALUE ); @@ -646,7 +646,7 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox, { const SfxPoolItem* pItem; SvNumberFormatter* pN = pDoc->GetNumberFormatter( false ); - if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet. + if( pN && pN->HasMergeFmtTbl() && SfxItemState::SET == aBoxAttrSet. GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue(); diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index b136668aace4..1ce8a372c978 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -1973,7 +1973,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) { const SfxPoolItem* pItem; SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( false ); - if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet. + if( pN && pN->HasMergeFmtTbl() && SfxItemState::SET == aBoxAttrSet. GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue(); @@ -4438,7 +4438,7 @@ SwFrmFmt* SwShareBoxFmt::GetFormat( const SfxPoolItem& rItem ) const SwFrmFmt *pRet = 0, *pTmp; const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, false ); for( sal_uInt16 n = aNewFmts.size(); n; ) - if( SFX_ITEM_SET == ( pTmp = aNewFmts[ --n ])-> + if( SfxItemState::SET == ( pTmp = aNewFmts[ --n ])-> GetItemState( nWhich, false, &pItem ) && *pItem == rItem && pTmp->GetFmtAttr( RES_FRM_SIZE, false ) == rFrmSz ) { diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 37ad94d5baea..59ef2fc5ffe1 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -146,7 +146,7 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT ) if( pBoxFmt == pBox->GetFrmFmt() ) // Create a new one? { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, false, + if( SfxItemState::SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, false, &pItem ) && ((SwTblBoxFormula*)pItem)->IsIntrnlName() ) { ((SwTblBoxFormula*)pItem)->PtrToBoxNm( pCT->pOldTable ); @@ -158,7 +158,7 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT ) if( pBox->GetSttIdx() ) { SvNumberFormatter* pN = pCT->pDoc->GetNumberFormatter( false ); - if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == pBoxFmt-> + if( pN && pN->HasMergeFmtTbl() && SfxItemState::SET == pBoxFmt-> GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue(); @@ -331,10 +331,10 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd ) { // Special cases for Break-Attributes const SfxPoolItem* pAttr; - if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pAttr ) ) + if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pAttr ) ) aPgBrkSet.Put( *pAttr ); - if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pAttr ) ) + if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pAttr ) ) aPgBrkSet.Put( *pAttr ); } diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index f8680b44b61d..7e265985b3a3 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -523,9 +523,9 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, bool bDelNodes ) { const SwNodeIndex* pIdx = pFmt->GetCntnt( false ).GetCntntIdx(); const SfxPoolItem* pFtnEndAtTxtEnd; - if( SFX_ITEM_SET != pFmt->GetItemState( + if( SfxItemState::SET != pFmt->GetItemState( RES_FTN_AT_TXTEND, true, &pFtnEndAtTxtEnd ) || - SFX_ITEM_SET != pFmt->GetItemState( + SfxItemState::SET != pFmt->GetItemState( RES_END_AT_TXTEND, true, &pFtnEndAtTxtEnd )) pFtnEndAtTxtEnd = 0; @@ -864,8 +864,8 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, { // Move PageDesc/Break to the first Node of the section const SfxItemSet& rSet = *pCpyTNd->GetpSwAttrSet(); - if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK ) || - SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC )) + if( SfxItemState::SET == rSet.GetItemState( RES_BREAK ) || + SfxItemState::SET == rSet.GetItemState( RES_PAGEDESC )) { SfxItemSet aSet( rSet ); if( bInsAtStart ) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index b6473ac504fc..d5956b7e2001 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -400,7 +400,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, const SwAttrSet & aNdSet = pCntntNd->GetSwAttrSet(); const SfxPoolItem *pItem = NULL; - if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem ) + if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem ) && pItem != NULL) { pTableFmt->SetFmtAttr( *pItem ); @@ -442,14 +442,14 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, { const SfxItemSet* pNdSet = pNextNd->GetpSwAttrSet(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, false, + if( SfxItemState::SET == pNdSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) { pTableFmt->SetFmtAttr( *pItem ); pNextNd->ResetAttr( RES_PAGEDESC ); pNdSet = pNextNd->GetpSwAttrSet(); } - if( pNdSet && SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, false, + if( pNdSet && SfxItemState::SET == pNdSet->GetItemState( RES_BREAK, false, &pItem ) ) { pTableFmt->SetFmtAttr( *pItem ); @@ -602,8 +602,8 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx, const sal_uInt16* pIdx = aPropagateItems; while ( *pIdx != 0 ) { - if ( SFX_ITEM_SET != pTmpNd->GetSwAttrSet().GetItemState( *pIdx ) && - SFX_ITEM_SET == pAttrSet->GetItemState( *pIdx, true, &pItem ) ) + if ( SfxItemState::SET != pTmpNd->GetSwAttrSet().GetItemState( *pIdx ) && + SfxItemState::SET == pAttrSet->GetItemState( *pIdx, true, &pItem ) ) static_cast<SwCntntNode *>(pTmpNd)->SetAttr(*pItem); ++pIdx; } @@ -711,7 +711,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts, const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet(); const SfxPoolItem *pItem = NULL; - if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem ) + if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem ) && pItem != NULL) { pTableFmt->SetFmtAttr( *pItem ); @@ -895,7 +895,7 @@ static void lcl_RemoveBreaks(SwCntntNode & rNode, SwTableFmt *const pTableFmt) if (pSet) { const SfxPoolItem* pItem; - if (SFX_ITEM_SET == pSet->GetItemState(RES_BREAK, false, &pItem)) + if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false, &pItem)) { if (pTableFmt) { @@ -906,7 +906,7 @@ static void lcl_RemoveBreaks(SwCntntNode & rNode, SwTableFmt *const pTableFmt) } if (pSet - && (SFX_ITEM_SET == pSet->GetItemState(RES_PAGEDESC, false, &pItem)) + && (SfxItemState::SET == pSet->GetItemState(RES_PAGEDESC, false, &pItem)) && static_cast<SwFmtPageDesc const*>(pItem)->GetPageDesc()) { if (pTableFmt) @@ -1202,7 +1202,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet(); const SfxPoolItem *pItem = NULL; - if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem ) + if (SfxItemState::SET == aNdSet.GetItemState( RES_FRAMEDIR, true, &pItem ) && pItem != NULL) { pTableFmt->SetFmtAttr( *pItem ); @@ -1586,9 +1586,9 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, // What about UNDO? const SfxItemSet& rTblSet = pTblNd->pTable->GetFrmFmt()->GetAttrSet(); const SfxPoolItem *pBreak, *pDesc; - if( SFX_ITEM_SET != rTblSet.GetItemState( RES_PAGEDESC, false, &pDesc )) + if( SfxItemState::SET != rTblSet.GetItemState( RES_PAGEDESC, false, &pDesc )) pDesc = 0; - if( SFX_ITEM_SET != rTblSet.GetItemState( RES_BREAK, false, &pBreak )) + if( SfxItemState::SET != rTblSet.GetItemState( RES_BREAK, false, &pBreak )) pBreak = 0; if( pBreak || pDesc ) @@ -2018,14 +2018,14 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) { SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC, false, &pItem ) ) { pNextNd->SetAttr( *pItem ); bSavePageDesc = true; } - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK, false, &pItem ) ) { pNextNd->SetAttr( *pItem ); @@ -2067,11 +2067,11 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) { SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC, false, &pItem ) ) pNextNd->SetAttr( *pItem ); - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK, false, &pItem ) ) pNextNd->SetAttr( *pItem ); } @@ -3673,7 +3673,7 @@ static bool lcl_SetAFmtBox( _FndBox & rBox, _SetAFmtTabPara *pSetPara ) if( aBoxSet.Count() ) { if( pSetPara->pUndo && - SFX_ITEM_SET == aBoxSet.GetItemState( RES_BOXATR_FORMAT )) + SfxItemState::SET == aBoxSet.GetItemState( RES_BOXATR_FORMAT )) pSetPara->pUndo->SaveBoxCntnt( *pSetBox ); pSetBox->ClaimFrmFmt()->SetFmtAttr( aBoxSet ); @@ -3970,7 +3970,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, bool bCallUpdate ) { // Optimization: If the Box says it's Text, it remains Text const SfxPoolItem* pNumFmtItem = 0; - if( SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, + if( SfxItemState::SET == rBox.GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, false, &pNumFmtItem ) && GetNumberFormatter()->IsTextFormat( ((SwTblBoxNumFormat*)pNumFmtItem)->GetValue() )) return ; @@ -4055,9 +4055,9 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, bool bCallUpdate ) // It's not a number const SfxPoolItem* pValueItem = 0, *pFmtItem = 0; SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)rBox.GetFrmFmt(); - if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMAT, + if( SfxItemState::SET == pBoxFmt->GetItemState( RES_BOXATR_FORMAT, false, &pFmtItem ) || - SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_VALUE, + SfxItemState::SET == pBoxFmt->GetItemState( RES_BOXATR_VALUE, false, &pValueItem )) { if (GetIDocumentUndoRedo().DoesUndo()) @@ -4116,13 +4116,13 @@ void SwDoc::SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet ) } SwFrmFmt* pBoxFmt = rBox.ClaimFrmFmt(); - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA )) + if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA )) { pBoxFmt->LockModify(); pBoxFmt->ResetFmtAttr( RES_BOXATR_VALUE ); pBoxFmt->UnlockModify(); } - else if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE )) + else if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_VALUE )) { pBoxFmt->LockModify(); pBoxFmt->ResetFmtAttr( RES_BOXATR_FORMULA ); @@ -4150,7 +4150,7 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos ) RES_PARATR_BEGIN, RES_PARATR_END - 1, 0); pTxtNode->SwCntntNode::GetAttr( rSet ); - if ( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE , false , &pFmtItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE , false , &pFmtItem ) ) { SwUndoDelNum * pUndo; if( GetIDocumentUndoRedo().DoesUndo() ) @@ -4186,9 +4186,9 @@ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode ) const SfxPoolItem* pFmtItem = 0; const SfxItemSet& rSet = pBox->GetFrmFmt()->GetAttrSet(); - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, false, &pFmtItem ) || - SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA, false ) || - SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE, false )) + if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, false, &pFmtItem ) || + SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA, false ) || + SfxItemState::SET == rSet.GetItemState( RES_BOXATR_VALUE, false )) { if (GetIDocumentUndoRedo().DoesUndo()) { diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index dee8291e43a9..344d54eb620a 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -575,7 +575,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) bLeftValid = true, bRightValid = true; // The Flags in the BoxInfo Item decide whether a BorderLine is valid! - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, false, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, false, (const SfxPoolItem**)&pSetBoxInfo) ) { pHori = pSetBoxInfo->GetHori(); @@ -591,7 +591,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) bRightValid = pSetBoxInfo->IsValid(VALID_RIGHT); } - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, false, + if( SfxItemState::SET == rSet.GetItemState( RES_BOX, false, (const SfxPoolItem**)&pSetBox) ) { pLeft = pSetBox->GetLeft(); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index cc73f02836f7..00f82acf58dd 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -150,7 +150,7 @@ bool Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rN // #i76273# Robust SfxItemSet* pStyleNames = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) ) + if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) ) { pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME ); pStyleNames->Put( aNewSet ); @@ -198,7 +198,7 @@ bool Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, // #i76273# Robust SfxItemSet* pStyleNames = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) ) + if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) ) { pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME ); pStyleNames->Put( aNewSet ); @@ -981,7 +981,7 @@ void SwCntntNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewV case RES_ATTRSET_CHG: if (GetNodes().IsDocNodes() && IsTxtNode() && pOldValue) { - if( SFX_ITEM_SET == ((SwAttrSetChg*)pOldValue)->GetChgSet()->GetItemState( + if( SfxItemState::SET == ((SwAttrSetChg*)pOldValue)->GetChgSet()->GetItemState( RES_CHRATR_HIDDEN, false ) ) { ((SwTxtNode*)this)->SetCalcHiddenCharFlags(); @@ -1379,7 +1379,7 @@ bool SwCntntNode::SetAttr( const SfxItemSet& rSet ) } const SfxPoolItem* pFnd = 0; - if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, false, &pFnd ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_AUTO_STYLE, false, &pFnd ) ) { OSL_ENSURE( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" ); const SwFmtAutoFmt* pTmp = static_cast<const SwFmtAutoFmt*>(pFnd); @@ -1408,7 +1408,7 @@ bool SwCntntNode::SetAttr( const SfxItemSet& rSet ) // the string is empty. const SfxPoolItem* pNameItem = 0; if ( 0 != GetCondFmtColl() || - SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, false, &pNameItem ) || + SfxItemState::SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, false, &pNameItem ) || static_cast<const SfxStringItem*>(pNameItem)->GetValue().isEmpty() ) AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFmtColl(), GetFmtColl() ); else @@ -1425,7 +1425,7 @@ bool SwCntntNode::SetAttr( const SfxItemSet& rSet ) // If Modify is locked, do not send any Modifys if ( IsModifyLocked() || ( !GetDepends() && - SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, false ) ) ) + SfxItemState::SET != rSet.GetItemState( RES_PARATR_NUMRULE, false ) ) ) { // Some special treatment for Attributes bRet = AttrSetHandleHelper::Put( mpAttrSet, *this, rSet ); @@ -1612,7 +1612,7 @@ const SfxPoolItem* SwCntntNode::GetNoCondAttr( sal_uInt16 nWhich, const SfxPoolItem* pFnd = 0; if( pCondColl && pCondColl->GetRegisteredIn() ) { - if( !GetpSwAttrSet() || ( SFX_ITEM_SET != GetpSwAttrSet()->GetItemState( + if( !GetpSwAttrSet() || ( SfxItemState::SET != GetpSwAttrSet()->GetItemState( nWhich, false, &pFnd ) && bInParents )) ((SwFmt*)GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd ); } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 683c2d27976e..a4e829d5ee31 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -425,7 +425,7 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) SfxItemSet* pOldSet = ((SwAttrSetChg*)pOld)->GetChgSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pNewSet->GetItemState( + if( SfxItemState::SET == pNewSet->GetItemState( RES_PROTECT, false, &pItem ) ) { m_Data.SetProtectFlag( static_cast<SvxProtectItem const*>(pItem) @@ -435,7 +435,7 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } // --> edit in readonly sections - if( SFX_ITEM_SET == pNewSet->GetItemState( + if( SfxItemState::SET == pNewSet->GetItemState( RES_EDIT_IN_READONLY, false, &pItem ) ) { m_Data.SetEditInReadonlyFlag( @@ -444,9 +444,9 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) pOldSet->ClearItem( RES_EDIT_IN_READONLY ); } - if( SFX_ITEM_SET == pNewSet->GetItemState( + if( SfxItemState::SET == pNewSet->GetItemState( RES_FTN_AT_TXTEND, false, &pItem ) || - SFX_ITEM_SET == pNewSet->GetItemState( + SfxItemState::SET == pNewSet->GetItemState( RES_END_AT_TXTEND, false, &pItem )) { bUpdateFtn = true; @@ -749,7 +749,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) SfxItemSet* pNewSet = ((SwAttrSetChg*)pNew)->GetChgSet(); SfxItemSet* pOldSet = ((SwAttrSetChg*)pOld)->GetChgSet(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pNewSet->GetItemState( + if( SfxItemState::SET == pNewSet->GetItemState( RES_PROTECT, false, &pItem )) { ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem ); @@ -758,7 +758,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } // --> edit in readonly sections - if( SFX_ITEM_SET == pNewSet->GetItemState( + if( SfxItemState::SET == pNewSet->GetItemState( RES_EDIT_IN_READONLY, false, &pItem ) ) { ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem ); @@ -766,14 +766,14 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) pOldSet->ClearItem( RES_EDIT_IN_READONLY ); } - if( SFX_ITEM_SET == pNewSet->GetItemState( + if( SfxItemState::SET == pNewSet->GetItemState( RES_FTN_AT_TXTEND, false, &pItem )) { ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_FTN_AT_TXTEND ), (SfxPoolItem*)pItem ); pNewSet->ClearItem( RES_FTN_AT_TXTEND ); pOldSet->ClearItem( RES_FTN_AT_TXTEND ); } - if( SFX_ITEM_SET == pNewSet->GetItemState( + if( SfxItemState::SET == pNewSet->GetItemState( RES_END_AT_TXTEND, false, &pItem )) { ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_END_AT_TXTEND ), (SfxPoolItem*)pItem ); @@ -1284,7 +1284,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) rSection.GetLinkFilePassword().isEmpty() ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == xDocSh->GetMedium()->GetItemSet()-> + if( SfxItemState::SET == xDocSh->GetMedium()->GetItemSet()-> GetItemState( SID_PASSWORD, false, &pItem ) ) rSection.SetLinkFilePassword( ((SfxStringItem*)pItem)->GetValue() ); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 47d1a8de2591..d9c9af706e65 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1452,7 +1452,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if ( pNewAnchorFmt ) { // Do not respond to a Reset Anchor !!!!! - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == GetFmt()->GetAttrSet().GetItemState( RES_ANCHOR, false ) ) { // no connect to layout during disconnection @@ -1503,11 +1503,11 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) RES_OPAQUE == nWhich || RES_WRAP_INFLUENCE_ON_OBJPOS == nWhich || ( RES_ATTRSET_CHG == nWhich && - ( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + ( SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_SURROUND, false ) || - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_OPAQUE, false ) || - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_WRAP_INFLUENCE_ON_OBJPOS, false ) ) ) ) { lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L ); @@ -1519,15 +1519,15 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) // #i28701# - add attribute 'Follow text flow' RES_FOLLOW_TEXT_FLOW == nWhich || ( RES_ATTRSET_CHG == nWhich && - ( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + ( SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_LR_SPACE, false ) || - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_UL_SPACE, false ) || - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_HORI_ORIENT, false ) || - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_VERT_ORIENT, false ) || - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FOLLOW_TEXT_FLOW, false ) ) ) ) { lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L ); diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 916a22c7aa50..5d828e1db39c 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -502,7 +502,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos ) ( nAttrStart == *pAttrEnd || !nStart ))) ) { const SfxPoolItem* pItem; - if( !pDontExpItems || SFX_ITEM_SET != pDontExpItems-> + if( !pDontExpItems || SfxItemState::SET != pDontExpItems-> GetItemState( pHt->Which(), false, &pItem ) || *pItem != pHt->GetAttr() ) { diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 110ab73b4f21..c1088a245897 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -978,7 +978,7 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText ) aSet.Put( *m_pCurTxtNd->GetpSwAttrSet() ); // take HeaderLine/TextBody only if centered or right aligned, otherwise only justification SvxAdjustItem* pAdj; - if( SFX_ITEM_SET == aSet.GetItemState( RES_PARATR_ADJUST, + if( SfxItemState::SET == aSet.GetItemState( RES_PARATR_ADJUST, false, (const SfxPoolItem**)&pAdj )) { SvxAdjust eAdj = pAdj->GetAdjust(); @@ -1023,11 +1023,11 @@ bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const return false; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pItem ) + if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) && SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() ) return true; - if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) + if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) && ((SwFmtPageDesc*)pItem)->GetPageDesc() && nsUseOnPage::PD_NONE != ((SwFmtPageDesc*)pItem)->GetPageDesc()->GetUseOn() ) return true; @@ -2239,7 +2239,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, { short nSz; SvxLRSpaceItem* pLRSpace; - if( SFX_ITEM_SET == m_pCurTxtNd->GetSwAttrSet(). + if( SfxItemState::SET == m_pCurTxtNd->GetSwAttrSet(). GetItemState( RES_LR_SPACE, true, (const SfxPoolItem**)&pLRSpace ) && ( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) || @@ -2477,7 +2477,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, short nSz; SvxLRSpaceItem* pLRSpace; if( bReplaceStyles && - SFX_ITEM_SET == m_pCurTxtNd->GetSwAttrSet(). + SfxItemState::SET == m_pCurTxtNd->GetSwAttrSet(). GetItemState( RES_LR_SPACE, false, (const SfxPoolItem**)&pLRSpace ) && ( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) || diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 1a02d9fd0715..4d703e939120 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -103,9 +103,9 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, bool bReset) // Do NOT copy AutoNumRules into the template const SfxPoolItem* pItem; const SwNumRule* pRule = 0; - if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false ) || - SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,false ) || - ( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE, + if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false ) || + SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC,false ) || + ( SfxItemState::SET == pSet->GetItemState( RES_PARATR_NUMRULE, false, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr( ((SwNumRuleItem*)pItem)->GetValue() )) && pRule && pRule->IsAutoRule() ) @@ -115,7 +115,7 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, bool bReset) aSet.ClearItem( RES_BREAK ); aSet.ClearItem( RES_PAGEDESC ); - if( pRule || (SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE, + if( pRule || (SfxItemState::SET == pSet->GetItemState( RES_PARATR_NUMRULE, false, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr( ((SwNumRuleItem*)pItem)->GetValue() )) && pRule && pRule->IsAutoRule() )) diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index e0ec77c66725..96324535832d 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -45,7 +45,7 @@ SwCharFmt* SwEditShell::GetCurCharFmt() const SfxItemSet aSet( GetDoc()->GetAttrPool(), RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT ); const SfxPoolItem* pItem; - if( GetCurAttr( aSet ) && SFX_ITEM_SET == + if( GetCurAttr( aSet ) && SfxItemState::SET == aSet.GetItemState( RES_TXTATR_CHARFMT, false, &pItem ) ) pFmt = ((SwFmtCharFmt*)pItem)->GetCharFmt(); diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index f401746614a2..d874c567d525 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -232,7 +232,7 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet ) { StartAllAction(); - if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, false)) + if(SfxItemState::SET == rSet.GetItemState(RES_CNTNT, false)) { SfxItemSet aSet(rSet); aSet.ClearItem(RES_CNTNT); diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 511d9563fabe..d4066b4591d9 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -353,7 +353,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet ) } // When setting a formula, do not check further! - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA )) + if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMULA )) ClearTblBoxCntnt(); StartAllAction(); @@ -386,7 +386,7 @@ bool SwEditShell::IsTableBoxTextFormat() const sal_uInt32 nFmt = 0; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet().GetItemState( + if( SfxItemState::SET == pBox->GetFrmFmt()->GetAttrSet().GetItemState( RES_BOXATR_FORMAT, true, &pItem )) { nFmt = ((SwTblBoxNumFormat*)pItem)->GetValue(); diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 2bead09c28ab..a9a01d8362af 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -103,7 +103,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const SwDoc* pDoc = GetFrmFmt()->GetDoc(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( + if( SfxItemState::SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, false, &pItem ) ) { rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // reset status @@ -120,7 +120,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const SfxItemSet aTmp( pDoc->GetAttrPool(), RES_BOXATR_BEGIN,RES_BOXATR_END-1 ); aTmp.Put( SwTblBoxValue( nRet ) ); - if( SFX_ITEM_SET != pFmt->GetItemState( RES_BOXATR_FORMAT )) + if( SfxItemState::SET != pFmt->GetItemState( RES_BOXATR_FORMAT )) aTmp.Put( SwTblBoxNumFormat( 0 )); pFmt->SetFmtAttr( aTmp ); } @@ -130,7 +130,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const nRet = GetFrmFmt()->GetTblBoxValue().GetValue(); break; } - else if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState( + else if( SfxItemState::SET == pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false, &pItem ) ) { rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // reset status diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index a542f43f9d67..0f77236214fa 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -652,14 +652,14 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchValid, const_cast<SfxItemSet&>(rSet).Put( SwFmtAnchor( FLY_AT_PAGE, 1 ) ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_HORI_ORIENT, false, &pItem ) + if( SfxItemState::SET == rSet.GetItemState( RES_HORI_ORIENT, false, &pItem ) && text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient() ) { bHOriChgd = true; aOldH = *((SwFmtHoriOrient*)pItem); ((SfxItemSet&)rSet).Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT ) ); } - if( SFX_ITEM_SET == rSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) + if( SfxItemState::SET == rSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) && text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient() ) { bVOriChgd = true; @@ -760,7 +760,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, if( pFlyAttrSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pFlyAttrSet->GetItemState( RES_ANCHOR, false, + if( SfxItemState::SET == pFlyAttrSet->GetItemState( RES_ANCHOR, false, &pItem ) ) { SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem; @@ -993,7 +993,7 @@ bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const // now examine all attributes. Remove forbidden attributes, then // get all remaining attributes and enter them const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false, &pItem ) ) { SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem; RndStdIds eType = pAnchor->GetAnchorId(); @@ -1038,7 +1038,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) StartAllAction(); const Point aPt( pFly->Frm().Pos() ); - if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false )) + if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) sw_ChkAndSetNewAnchor( *this, *pFly, rSet ); SwFlyFrmFmt* pFlyFmt = (SwFlyFrmFmt*)pFly->GetFmt(); @@ -1074,7 +1074,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); SwFrmFmt *pFmt = FindFrmFmt( pObj ); StartAllAction(); - if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, false )) + if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) { RndStdIds nNew = ((SwFmtAnchor&)rSet.Get( RES_ANCHOR )).GetAnchorId(); if ( nNew != pFmt->GetAnchor().GetAnchorId() ) @@ -1176,7 +1176,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, bool bKeepOrient, Point* pDocPos ) SfxItemSet* pSet = 0; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pNewFmt->GetItemState( RES_ANCHOR, false, &pItem )) + if( SfxItemState::SET == pNewFmt->GetItemState( RES_ANCHOR, false, &pItem )) { pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange ); pSet->Put( *pItem ); @@ -1772,10 +1772,10 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam std::max( nWidth, long(MINFLY) ), std::max( nHeight, long(MINFLY) ))); - if( SFX_ITEM_SET != aFrmSet.GetItemState( RES_HORI_ORIENT )) + if( SfxItemState::SET != aFrmSet.GetItemState( RES_HORI_ORIENT )) aFrmSet.Put( SwFmtHoriOrient( aRelPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME )); - if( SFX_ITEM_SET != aFrmSet.GetItemState( RES_VERT_ORIENT )) + if( SfxItemState::SET != aFrmSet.GetItemState( RES_VERT_ORIENT )) aFrmSet.Put( SwFmtVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME )); } diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index d64686fd187d..6c4a84ab8ef7 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -1028,7 +1028,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet() + if( SfxItemState::SET == pBox->GetFrmFmt()->GetAttrSet() .GetItemState( RES_BOX, false, &pItem )) { SvxBoxItem aBox( *(SvxBoxItem*)pItem ); diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index a79b7a0bf29d..7b06f096c689 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -61,7 +61,7 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) sal_uInt16 nWhich = pNew ? pNew->Which() : 0; const SwFmtAnchor *pAnch = 0; - if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET == + if( RES_ATTRSET_CHG == nWhich && SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false, (const SfxPoolItem**)&pAnch )) ; // The anchor pointer is set at GetItemState! diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 14e0ad9698c8..ebd6a6963f3b 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -87,9 +87,9 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if (RES_ATTRSET_CHG == nWhich && pNew) { if(pOld && - (SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()-> + (SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()-> GetItemState(RES_SURROUND, false) || - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()-> + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()-> GetItemState(RES_FRMMACRO, false)) ) { SwAttrSetChg aOld( *(SwAttrSetChg*)pOld ); diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 0119113cc566..4ece4e32bdc8 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -470,7 +470,7 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) sal_uInt16 nWhich = pNew ? pNew->Which() : 0; SwFmtAnchor *pAnch = 0; - if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET == + if( RES_ATTRSET_CHG == nWhich && SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false, (const SfxPoolItem**)&pAnch )) ; // GetItemState sets the anchor pointer! diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index c031e55d0aef..4196995663a0 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -7562,7 +7562,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap ) pGlobalShell = pSh; bool bNoteURL = pMap && - SFX_ITEM_SET != GetAttrSet().GetItemState( RES_URL, true ); + SfxItemState::SET != GetAttrSet().GetItemState( RES_URL, true ); if( bNoteURL ) { OSL_ENSURE( !pNoteURL, "MakeGraphic: pNoteURL already used? " ); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 612525d8227c..06f38c7f6605 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4923,7 +4923,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } if ( ( bAttrSetChg && pNew && - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) || + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) || ( pNew && RES_PROTECT == pNew->Which()) ) { SwViewShell *pSh = getRootFrm()->GetCurrShell(); @@ -4932,7 +4932,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } if ( bAttrSetChg && pNew && - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, false, &pItem ) ) + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, false, &pItem ) ) { SetDerivedVert( false ); CheckDirChange(); @@ -4940,7 +4940,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) // #i29550# if ( bAttrSetChg && pNew && - SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) ) + SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) ) { SwFrm* pTmpUpper = GetUpper(); while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrm() ) diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 84faf97c682c..fed406ad330b 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -212,7 +212,7 @@ void SwCellFrm::CheckDirection( bool bVert ) // Check if the item is set, before actually // using it. Otherwise the dynamic pool default is used, which may be set // to LTR in case of OOo 1.0 documents. - if( pFmt && SFX_ITEM_SET == pFmt->GetItemState( RES_FRAMEDIR, true, &pItem ) ) + if( pFmt && SfxItemState::SET == pFmt->GetItemState( RES_FRAMEDIR, true, &pItem ) ) { const SvxFrameDirectionItem* pFrmDirItem = static_cast<const SvxFrameDirectionItem*>(pItem); const SwViewShell *pSh = getRootFrm()->GetCurrShell(); diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 2237de6e5fd0..d45402cbe1c2 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -386,7 +386,7 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( RES_ATTRSET_CHG == nWhich ) { - if (pOld && pNew && SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + if (pOld && pNew && SfxItemState::SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRM_SIZE, false, (const SfxPoolItem**)&pNewSize)) { pOldSize = &((SwAttrSetChg*)pOld)->GetChgSet()->GetFrmSize(); @@ -1718,8 +1718,8 @@ SwTableBoxFmt* SwTableBox::CheckBoxFmt( SwTableBoxFmt* pFmt ) { // We might need to create a new format here, because the box must be // added to the format solely if pFmt has a value or formular. - if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) || - SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false ) ) + if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) || + SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false ) ) { SwTableBox* pOther = SwIterator<SwTableBox,SwFmt>::FirstElement( *pFmt ); if( pOther ) @@ -1985,7 +1985,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rTxt, const Color* pCol, } // assign color or save "user color" - if( !pTNd->GetpSwAttrSet() || SFX_ITEM_SET != pTNd->GetpSwAttrSet()-> + if( !pTNd->GetpSwAttrSet() || SfxItemState::SET != pTNd->GetpSwAttrSet()-> GetItemState( RES_CHRATR_COLOR, false, &pItem )) pItem = 0; @@ -2062,7 +2062,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rTxt, const Color* pCol, // assign vertical orientation if( bChgAlign && - ( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState( + ( SfxItemState::SET != rBox.GetFrmFmt()->GetItemState( RES_VERT_ORIENT, true, &pItem ) || text::VertOrientation::TOP == ((SwFmtVertOrient*)pItem)->GetVertOrient() )) { @@ -2105,7 +2105,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt ) const SfxItemSet* pAttrSet = pTNd->GetpSwAttrSet(); // assign adjustment - if( bChgAlign && pAttrSet && SFX_ITEM_SET == pAttrSet->GetItemState( + if( bChgAlign && pAttrSet && SfxItemState::SET == pAttrSet->GetItemState( RES_PARATR_ADJUST, false, &pItem ) && SVX_ADJUST_RIGHT == ((SvxAdjustItem*)pItem)->GetAdjust() ) { @@ -2113,7 +2113,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt ) } // assign color or save "user color" - if( !pAttrSet || SFX_ITEM_SET != pAttrSet-> + if( !pAttrSet || SfxItemState::SET != pAttrSet-> GetItemState( RES_CHRATR_COLOR, false, &pItem )) pItem = 0; @@ -2151,7 +2151,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt ) // assign vertical orientation if( bChgAlign && - SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( + SfxItemState::SET == rBox.GetFrmFmt()->GetItemState( RES_VERT_ORIENT, false, &pItem ) && text::VertOrientation::BOTTOM == ((SwFmtVertOrient*)pItem)->GetVertOrient() ) { @@ -2175,7 +2175,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) case RES_ATTRSET_CHG: { const SfxItemSet& rSet = *((SwAttrSetChg*)pNew)->GetChgSet(); - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, + if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, false, (const SfxPoolItem**)&pNewFmt ) ) nOldFmt = ((SwTblBoxNumFormat&)((SwAttrSetChg*)pOld)-> GetChgSet()->Get( RES_BOXATR_FORMAT )).GetValue(); @@ -2203,9 +2203,9 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty(true, NULL, 0); - if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMAT, false ) || - SFX_ITEM_SET == GetItemState( RES_BOXATR_VALUE, false ) || - SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, false ) ) + if( SfxItemState::SET == GetItemState( RES_BOXATR_FORMAT, false ) || + SfxItemState::SET == GetItemState( RES_BOXATR_VALUE, false ) || + SfxItemState::SET == GetItemState( RES_BOXATR_FORMULA, false ) ) { // fetch the box SwIterator<SwTableBox,SwFmt> aIter( *this ); @@ -2220,7 +2220,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) nNewFmt = pNewFmt->GetValue(); // new formatting // is it newer or has the current been removed? - if( SFX_ITEM_SET != GetItemState( RES_BOXATR_VALUE, false )) + if( SfxItemState::SET != GetItemState( RES_BOXATR_VALUE, false )) pNewFmt = 0; } else @@ -2237,7 +2237,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { if( NUMBERFORMAT_TEXT != nNewFmt ) { - if( SFX_ITEM_SET == GetItemState( + if( SfxItemState::SET == GetItemState( RES_BOXATR_VALUE, false )) nOldFmt = NUMBERFORMAT_TEXT; else @@ -2265,7 +2265,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { bool bChgTxt = true; double fVal = 0; - if( !pNewVal && SFX_ITEM_SET != GetItemState( + if( !pNewVal && SfxItemState::SET != GetItemState( RES_BOXATR_VALUE, false, (const SfxPoolItem**)&pNewVal )) { // so far, no value has been set, so try to evaluate the content @@ -2368,7 +2368,7 @@ bool SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex, SvNumberFormatter* pNumFmtr = GetFrmFmt()->GetDoc()->GetNumberFormatter(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, + if( SfxItemState::SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, false, &pItem )) { rFmtIndex = ((SwTblBoxNumFormat*)pItem)->GetValue(); @@ -2396,15 +2396,15 @@ bool SwTableBox::IsNumberChanged() const { bool bRet = true; - if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, false )) + if( SfxItemState::SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, false )) { const SwTblBoxNumFormat *pNumFmt; const SwTblBoxValue *pValue; - if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false, + if( SfxItemState::SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false, (const SfxPoolItem**)&pValue )) pValue = 0; - if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, false, + if( SfxItemState::SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, false, (const SfxPoolItem**)&pNumFmt )) pNumFmt = 0; @@ -2512,9 +2512,9 @@ sal_uInt16 SwTableBox::IsFormulaOrValueBox() const sal_uInt16 nWhich = 0; const SwTxtNode* pTNd; SwFrmFmt* pFmt = GetFrmFmt(); - if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false )) + if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false )) nWhich = RES_BOXATR_FORMULA; - else if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) && + else if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) && !pFmt->GetDoc()->GetNumberFormatter()->IsTextFormat( pFmt->GetTblBoxNumFmt().GetValue() )) nWhich = RES_BOXATR_VALUE; @@ -2530,8 +2530,8 @@ void SwTableBox::ActualiseValueBox() { const SfxPoolItem *pFmtItem, *pValItem; SwFrmFmt* pFmt = GetFrmFmt(); - if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT, true, &pFmtItem ) - && SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, true, &pValItem )) + if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMAT, true, &pFmtItem ) + && SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE, true, &pValItem )) { const sal_uLong nFmtId = ((SwTblBoxNumFormat*)pFmtItem)->GetValue(); sal_uLong nNdPos = ULONG_MAX; diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 83767a709d70..68b8d4c3c866 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1745,7 +1745,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() const SwFrmFmt* pFrmFmt = (*pTbl)[n]; const SfxPoolItem* pItem; if ( RES_DRAWFRMFMT != pFrmFmt->Which() && - SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, true, &pItem ) ) + SfxItemState::SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, true, &pItem ) ) { const SwPageFrm* pCurrPage = static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 14e671798046..8590ecfd93cb 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -167,7 +167,7 @@ const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich ) bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which(); const SfxPoolItem* pItem; - bool bRet = SFX_ITEM_SET == pSet->GetItemState( nWhich, bInParent, &pItem ); + bool bRet = SfxItemState::SET == pSet->GetItemState( nWhich, bInParent, &pItem ); return bRet ? pItem : 0; } @@ -182,7 +182,7 @@ bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr ) const SfxItemSet* pItemSet = CharFmt::GetItemSet( pAttr->GetAttr() ); if ( pItemSet ) - bRet = SFX_ITEM_SET == pItemSet->GetItemState( nWhich, true ); + bRet = SfxItemState::SET == pItemSet->GetItemState( nWhich, true ); return bRet; } @@ -427,7 +427,7 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt ) for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++) { const SfxPoolItem* pItem; - bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem ); + bool bRet = SfxItemState::SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem ); if ( bRet ) { @@ -503,7 +503,7 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt ) for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++) { const SfxPoolItem* pItem; - bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem ); + bool bRet = SfxItemState::SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem ); if ( bRet ) { // we remove rAttr from the appropriate stack diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 94156d55a581..6866cada566d 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1411,7 +1411,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf ) const SfxPoolItem* pItem; sal_uInt16 nDir = 0; - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ROTATE, + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE, true, &pItem )) nDir = ((SvxCharRotateItem*)pItem)->GetValue(); diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index f861a0b810fa..8870f5810d1f 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -2057,7 +2057,7 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTxtNode& rNode, MultiSelecti || (rNode.GetTxt().getLength() == rHiddenMulti.GetTotalRange().Len())); const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) && + if( SfxItemState::SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) && ((SvxCharHiddenItem*)pItem)->GetValue() ) { rHiddenMulti.SelectAll(); diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 8aa72f74f382..eb569db84723 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -833,7 +833,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos, const SvxCharRotateItem* pRotate = NULL; const SfxPoolItem* pRotItem; - if( SFX_ITEM_SET == m_pFrm->GetTxtNode()->GetSwAttrSet(). + if( SfxItemState::SET == m_pFrm->GetTxtNode()->GetSwAttrSet(). GetItemState( RES_CHRATR_ROTATE, true, &pRotItem ) && ((SvxCharRotateItem*)pRotItem)->GetValue() ) pRotate = (SvxCharRotateItem*)pRotItem; @@ -844,7 +844,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos, if( !pLclTxtNode ) return NULL; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pLclTxtNode->GetSwAttrSet(). + if( SfxItemState::SET == pLclTxtNode->GetSwAttrSet(). GetItemState( RES_CHRATR_TWO_LINES, true, &pItem ) && ((SvxTwoLinesItem*)pItem)->GetValue() ) p2Lines = (SvxTwoLinesItem*)pItem; diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index 8427364d38e7..3a3155424bac 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -253,7 +253,7 @@ short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld) { const SfxPoolItem* pItem; if( ( nWhich < RES_CHRATR_END ) && - ( SFX_ITEM_SET == pSet->GetItemState( nWhich, true, &pItem ) ) ) + ( SfxItemState::SET == pSet->GetItemState( nWhich, true, &pItem ) ) ) { SwTxtAttr* pAttr = MakeRedlineTxtAttr( const_cast<SwDoc&>(rDoc), diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 0c0e311a8aaf..fc7aeb00bece 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1085,7 +1085,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) int nClear = 0; sal_uInt16 nCount = rNewSet.Count(); - if( SFX_ITEM_SET == rNewSet.GetItemState( RES_TXTATR_FTN, false, &pItem )) + if( SfxItemState::SET == rNewSet.GetItemState( RES_TXTATR_FTN, false, &pItem )) { nPos = ((SwFmtFtn*)pItem)->GetTxtFtn()->GetStart(); if( IsIdxInside( nPos, 1 ) ) @@ -1094,7 +1094,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) --nCount; } - if( SFX_ITEM_SET == rNewSet.GetItemState( RES_TXTATR_FIELD, false, &pItem )) + if( SfxItemState::SET == rNewSet.GetItemState( RES_TXTATR_FIELD, false, &pItem )) { nPos = ((SwFmtFld*)pItem)->GetTxtFld()->GetStart(); if( IsIdxInside( nPos, 1 ) ) @@ -1112,9 +1112,9 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) nClear |= 0x02; --nCount; } - bool bLineSpace = SFX_ITEM_SET == rNewSet.GetItemState( + bool bLineSpace = SfxItemState::SET == rNewSet.GetItemState( RES_PARATR_LINESPACING, false ), - bRegister = SFX_ITEM_SET == rNewSet.GetItemState( + bRegister = SfxItemState::SET == rNewSet.GetItemState( RES_PARATR_REGISTER, false ); if ( bLineSpace || bRegister ) { @@ -1144,7 +1144,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if ( bRegister ) --nCount; } - if ( SFX_ITEM_SET == rNewSet.GetItemState( RES_PARATR_SPLIT, + if ( SfxItemState::SET == rNewSet.GetItemState( RES_PARATR_SPLIT, false )) { if ( GetPrev() ) @@ -1155,7 +1155,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) --nCount; } - if( SFX_ITEM_SET == rNewSet.GetItemState( RES_BACKGROUND, false) + if( SfxItemState::SET == rNewSet.GetItemState( RES_BACKGROUND, false) && !IsFollow() && GetDrawObjs() ) { SwSortedObjs *pObjs = GetDrawObjs(); @@ -1188,27 +1188,27 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) } } - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == rNewSet.GetItemState( RES_TXTATR_CHARFMT, false ) ) { lcl_SetWrong( *this, 0, COMPLETE_STRING, false ); lcl_SetScriptInval( *this, 0 ); } - else if ( SFX_ITEM_SET == + else if ( SfxItemState::SET == rNewSet.GetItemState( RES_CHRATR_LANGUAGE, false ) || - SFX_ITEM_SET == + SfxItemState::SET == rNewSet.GetItemState( RES_CHRATR_CJK_LANGUAGE, false ) || - SFX_ITEM_SET == + SfxItemState::SET == rNewSet.GetItemState( RES_CHRATR_CTL_LANGUAGE, false ) ) lcl_SetWrong( *this, 0, COMPLETE_STRING, false ); - else if ( SFX_ITEM_SET == + else if ( SfxItemState::SET == rNewSet.GetItemState( RES_CHRATR_FONT, false ) || - SFX_ITEM_SET == + SfxItemState::SET == rNewSet.GetItemState( RES_CHRATR_CJK_FONT, false ) || - SFX_ITEM_SET == + SfxItemState::SET == rNewSet.GetItemState( RES_CHRATR_CTL_FONT, false ) ) lcl_SetScriptInval( *this, 0 ); - else if ( SFX_ITEM_SET == + else if ( SfxItemState::SET == rNewSet.GetItemState( RES_FRAMEDIR, false ) ) { SetDerivedR2L( false ); diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index d9cf3dcc6784..e9ae8e28b4bd 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -1279,14 +1279,14 @@ SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf, // set the correct rotation at the footnote font const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ROTATE, + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE, true, &pItem )) pFnt->SetVertical( ((SvxCharRotateItem*)pItem)->GetValue(), rInf.GetTxtFrm()->IsVertical() ); pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() ); - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, true, &pItem )) pFnt->SetBackColor( new Color( ((SvxBrushItem*)pItem)->GetColor() ) ); } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index c05bc4e908ff..83f6c9864927 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -591,7 +591,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) //zu weiteren Folgefehlern, die mit Laufzeitkosten geloest werden //muesten. #56977# #55001# #56135# const SfxPoolItem *pItem; - if( GetDepends() && SFX_ITEM_SET == pNode->GetSwAttrSet(). + if( GetDepends() && SfxItemState::SET == pNode->GetSwAttrSet(). GetItemState( RES_PAGEDESC, true, &pItem ) ) { pNode->ModifyNotification( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem ); @@ -2488,7 +2488,7 @@ SwNumRule* SwTxtNode::_GetNumRule(bool bInParent) const { if ( pRet && pRet == GetDoc()->GetOutlineNumRule() && ( !HasSwAttrSet() || - SFX_ITEM_SET != + SfxItemState::SET != GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, false ) ) ) { SwTxtFmtColl* pColl = GetTxtColl(); @@ -2585,7 +2585,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, else aClearWhichIds.push_back( RES_PAGEDESC ); - if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_BREAK, false ) ) + if( SfxItemState::SET == pTmpSet->GetItemState( RES_BREAK, false ) ) { if ( bNext ) pNewAttrSet->ClearItem( RES_BREAK ); @@ -2593,7 +2593,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, aClearWhichIds.push_back( RES_BREAK ); bRemoveFromCache = true; } - if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_KEEP, false ) ) + if( SfxItemState::SET == pTmpSet->GetItemState( RES_KEEP, false ) ) { if ( bNext ) pNewAttrSet->ClearItem( RES_KEEP ); @@ -2601,7 +2601,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, aClearWhichIds.push_back( RES_KEEP ); bRemoveFromCache = true; } - if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, false ) ) + if( SfxItemState::SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, false ) ) { if ( bNext ) pNewAttrSet->ClearItem( RES_PARATR_SPLIT ); @@ -2609,7 +2609,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext, aClearWhichIds.push_back( RES_PARATR_SPLIT ); bRemoveFromCache = true; } - if(SFX_ITEM_SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, false)) + if(SfxItemState::SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, false)) { SwNumRule * pRule = GetNumRule(); @@ -3508,7 +3508,7 @@ namespace { const SwAttrSetChg* pSet = dynamic_cast<const SwAttrSetChg*>(pNewValue); if ( pSet && pSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, false, &pItem ) == - SFX_ITEM_SET ) + SfxItemState::SET ) { // #i70748# rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); @@ -3810,7 +3810,7 @@ void SwTxtNode::SetAttrListLevel( int nLevel ) bool SwTxtNode::HasAttrListLevel() const { return GetpSwAttrSet() && - GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, false ) == SFX_ITEM_SET; + GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, false ) == SfxItemState::SET; } int SwTxtNode::GetAttrListLevel() const @@ -3897,7 +3897,7 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber bool SwTxtNode::HasAttrListRestartValue() const { return GetpSwAttrSet() && - GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, false ) == SFX_ITEM_SET; + GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, false ) == SfxItemState::SET; } SwNumberTree::tSwNumTreeNumber SwTxtNode::GetAttrListRestartValue() const { @@ -4096,13 +4096,13 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const bAreListLevelIndentsApplicable = false; } else if ( HasSwAttrSet() && - GetpSwAttrSet()->GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET ) + GetpSwAttrSet()->GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET ) { // paragraph has hard-set indent attributes bAreListLevelIndentsApplicable = false; } else if ( HasSwAttrSet() && - GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET ) + GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET ) { // list style is directly applied to paragraph and paragraph has no // hard-set indent attributes @@ -4117,14 +4117,14 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const const SwTxtFmtColl* pColl = GetTxtColl(); while ( pColl ) { - if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SFX_ITEM_SET ) + if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, false ) == SfxItemState::SET ) { // indent attributes found in the paragraph style hierarchy. bAreListLevelIndentsApplicable = false; break; } - if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SFX_ITEM_SET ) + if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, false ) == SfxItemState::SET ) { // paragraph style with the list style found and until now no // indent attributes are found in the paragraph style hierarchy. @@ -4414,7 +4414,7 @@ namespace { { const SfxPoolItem* pItem = 0; // handle RES_PARATR_NUMRULE - if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, false, &pItem ) == SFX_ITEM_SET ) + if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, false, &pItem ) == SfxItemState::SET ) { mrTxtNode.RemoveFromList(); @@ -4429,7 +4429,7 @@ namespace { } // handle RES_PARATR_LIST_ID - if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SFX_ITEM_SET ) + if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, false, &pItem ) == SfxItemState::SET ) { const SfxStringItem* pListIdItem = dynamic_cast<const SfxStringItem*>(pItem); @@ -4446,7 +4446,7 @@ namespace { } // handle RES_PARATR_LIST_LEVEL - if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, false, &pItem ) == SFX_ITEM_SET ) + if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, false, &pItem ) == SfxItemState::SET ) { const SfxInt16Item* pListLevelItem = dynamic_cast<const SfxInt16Item*>(pItem); @@ -4457,7 +4457,7 @@ namespace { } // handle RES_PARATR_LIST_ISRESTART - if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, false, &pItem ) == SFX_ITEM_SET ) + if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, false, &pItem ) == SfxItemState::SET ) { const SfxBoolItem* pListIsRestartItem = dynamic_cast<const SfxBoolItem*>(pItem); @@ -4468,7 +4468,7 @@ namespace { } // handle RES_PARATR_LIST_RESTARTVALUE - if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, false, &pItem ) == SFX_ITEM_SET ) + if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, false, &pItem ) == SfxItemState::SET ) { const SfxInt16Item* pListRestartValueItem = dynamic_cast<const SfxInt16Item*>(pItem); @@ -4480,7 +4480,7 @@ namespace { } // handle RES_PARATR_LIST_ISCOUNTED - if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, false, &pItem ) == SFX_ITEM_SET ) + if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, false, &pItem ) == SfxItemState::SET ) { const SfxBoolItem* pIsCountedInListItem = dynamic_cast<const SfxBoolItem*>(pItem); @@ -4493,7 +4493,7 @@ namespace { // #i70748# // handle RES_PARATR_OUTLINELEVEL - if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, false, &pItem ) == SFX_ITEM_SET ) + if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, false, &pItem ) == SfxItemState::SET ) { const SfxUInt16Item* pOutlineLevelItem = dynamic_cast<const SfxUInt16Item*>(pItem); @@ -4549,7 +4549,7 @@ namespace { const SfxPoolItem* pItem = 0; if ( mrTxtNode.GetSwAttrSet().GetItemState( RES_PARATR_NUMRULE, true, &pItem ) - != SFX_ITEM_SET ) + != SfxItemState::SET ) { mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); } @@ -4645,7 +4645,7 @@ namespace { else if ( nWhich1 <= RES_PARATR_LIST_ID && RES_PARATR_LIST_ID <= nWhich2 ) { bRemoveFromList = mrTxtNode.GetpSwAttrSet() && - mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SFX_ITEM_SET; + mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET; // #i92898# mbListStyleOrIdReset = true; } @@ -4688,7 +4688,7 @@ namespace { else if ( nWhich1 == RES_PARATR_LIST_ID ) { bRemoveFromList = mrTxtNode.GetpSwAttrSet() && - mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SFX_ITEM_SET; + mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET; // #i92898# mbListStyleOrIdReset = true; } @@ -4747,7 +4747,7 @@ namespace { { bRemoveFromList = bRemoveFromList || ( mrTxtNode.GetpSwAttrSet() && - mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SFX_ITEM_SET ); + mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, false ) == SfxItemState::SET ); // #i92898# mbListStyleOrIdReset = true; } diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index d7c57b72db2f..e38abb92a43c 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -487,7 +487,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, if( pAttrSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONT, true, &pItem )) { const SvxFontItem *pFont = (const SvxFontItem *)pItem; @@ -497,7 +497,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, aSub[SW_LATIN].Font::SetPitch( pFont->GetPitch() ); aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE, true, &pItem )) { const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem; @@ -507,17 +507,17 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, aTmpSize.Height() = pHeight->GetHeight(); aSub[SW_LATIN].SetSize( aTmpSize ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE, true, &pItem )) aSub[SW_LATIN].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT, true, &pItem )) aSub[SW_LATIN].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE, true, &pItem )) aSub[SW_LATIN].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT, true, &pItem )) { const SvxFontItem *pFont = (const SvxFontItem *)pItem; @@ -527,7 +527,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, aSub[SW_CJK].Font::SetPitch( pFont->GetPitch() ); aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE, true, &pItem )) { const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem; @@ -537,13 +537,13 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, aTmpSize.Height() = pHeight->GetHeight(); aSub[SW_CJK].SetSize( aTmpSize ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE, true, &pItem )) aSub[SW_CJK].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT, true, &pItem )) aSub[SW_CJK].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE, true, &pItem )) { LanguageType eNewLang = ((SvxLanguageItem*)pItem)->GetLanguage(); @@ -553,7 +553,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, aSub[SW_CTL].SetCJKContextLanguage( eNewLang ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT, true, &pItem )) { const SvxFontItem *pFont = (const SvxFontItem *)pItem; @@ -563,7 +563,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, aSub[SW_CTL].Font::SetPitch( pFont->GetPitch() ); aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE, true, &pItem )) { const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem; @@ -573,53 +573,53 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, aTmpSize.Height() = pHeight->GetHeight(); aSub[SW_CTL].SetSize( aTmpSize ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE, true, &pItem )) aSub[SW_CTL].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT, true, &pItem )) aSub[SW_CTL].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE, true, &pItem )) aSub[SW_CTL].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE, true, &pItem )) { SetUnderline( ((SvxUnderlineItem*)pItem)->GetLineStyle() ); SetUnderColor( ((SvxUnderlineItem*)pItem)->GetColor() ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE, true, &pItem )) { SetOverline( ((SvxOverlineItem*)pItem)->GetLineStyle() ); SetOverColor( ((SvxOverlineItem*)pItem)->GetColor() ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT, true, &pItem )) SetStrikeout( ((SvxCrossedOutItem*)pItem)->GetStrikeout() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_COLOR, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_COLOR, true, &pItem )) SetColor( ((SvxColorItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK, true, &pItem )) SetEmphasisMark( ((SvxEmphasisMarkItem*)pItem)->GetEmphasisMark() ); SetTransparent( true ); SetAlign( ALIGN_BASELINE ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR, true, &pItem )) SetOutline( ((SvxContourItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED, true, &pItem )) SetShadow( ((SvxShadowedItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF, true, &pItem )) SetRelief( (FontRelief)((SvxCharReliefItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED, true, &pItem )) SetPropWidth(((SvxShadowedItem*)pItem)->GetValue() ? 50 : 100 ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN, true, &pItem )) { if( ((SvxAutoKernItem*)pItem)->GetValue() ) @@ -632,11 +632,11 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, else SetAutoKern( 0 ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE, true, &pItem )) SetWordLineMode( ((SvxWordLineModeItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT, true, &pItem )) { const SvxEscapementItem *pEsc = (const SvxEscapementItem *)pItem; @@ -644,28 +644,28 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, if( aSub[SW_LATIN].IsEsc() ) SetProportion( pEsc->GetProp() ); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP, true, &pItem )) SetCaseMap( ((SvxCaseMapItem*)pItem)->GetCaseMap() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_KERNING, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_KERNING, true, &pItem )) SetFixKerning( ((SvxKerningItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN, true, &pItem )) SetNoHyph( ((SvxNoHyphenItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BLINK, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BLINK, true, &pItem )) SetBlink( ((SvxBlinkItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE, true, &pItem )) SetVertical( ((SvxCharRotateItem*)pItem)->GetValue() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND, true, &pItem )) pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() ); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT, true, &pItem )) SetHighlightColor(((SvxBrushItem*)pItem)->GetColor()); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX, true, &pItem )) { const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem); @@ -678,7 +678,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, SetRightBorderDist(pBoxItem->GetDistance(BOX_LINE_RIGHT)); SetLeftBorderDist(pBoxItem->GetDistance(BOX_LINE_LEFT)); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW, true, &pItem )) { const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem); @@ -687,7 +687,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, SetShadowLocation(pShadowItem->GetLocation()); } const SfxPoolItem* pTwoLinesItem = 0; - if( SFX_ITEM_SET == + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, true, &pTwoLinesItem )) if ( ((SvxTwoLinesItem*)pTwoLinesItem)->GetValue() ) SetVertical( 0 ); @@ -839,17 +839,17 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, SetCaseMap( pAttrSet->GetCaseMap().GetCaseMap() ); SetFixKerning( pAttrSet->GetKerning().GetValue() ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND, true, &pItem )) pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() ); else pBackColor = NULL; - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT, true, &pItem )) SetHighlightColor(((SvxBrushItem*)pItem)->GetColor()); else SetHighlightColor(COL_TRANSPARENT); - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BOX, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX, true, &pItem )) { const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem); @@ -874,7 +874,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, SetLeftBorderDist(0); } - if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW, + if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW, true, &pItem )) { const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem); diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 54546f2e8c8d..12d93c369ab7 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -844,7 +844,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, do { const SfxPoolItem* pTmpItem = 0; - if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) && + if ( SfxItemState::SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) && pTmpItem == pItem ) { // Do not clear item if the attribute is set in a character format: @@ -881,7 +881,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, do { const SfxPoolItem* pTmpItem = 0; - if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) && + if ( SfxItemState::SET == rWholeParaAttrSet.GetItemState( pItem->Which(), false, &pTmpItem ) && pTmpItem == pItem ) { // Do not clear item if the attribute is set in a character format: @@ -1699,7 +1699,7 @@ void SwTxtNode::DeleteAttributes( // Check if character format contains hidden attribute: const SwCharFmt* pFmt = pTxtHt->GetCharFmt().GetCharFmt(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) + if ( SfxItemState::SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) SetCalcHiddenCharFlags(); } // #i75430# Recalc hidden flags if necessary @@ -1820,7 +1820,7 @@ bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet) return bRet; SwCharFmt* pCurrCharFmt =pCurrNumFmt->GetCharFmt(); - if (pCurrCharFmt && pCurrCharFmt->GetItemState(nWhich,false) != SFX_ITEM_SET) + if (pCurrCharFmt && pCurrCharFmt->GetItemState(nWhich,false) != SfxItemState::SET) { pCurrCharFmt->SetFmtAttr(*pItem); SwNumFmt aNewNumFmt(*pCurrNumFmt); @@ -1882,7 +1882,7 @@ bool SwTxtNode::SetAttr( // check for auto style: const SfxPoolItem* pItem; - const bool bAutoStyle = SFX_ITEM_SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, false, &pItem ); + const bool bAutoStyle = SfxItemState::SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, false, &pItem ); if ( bAutoStyle ) { boost::shared_ptr<SfxItemSet> pAutoStyleSet = static_cast<const SwFmtAutoFmt*>(pItem)->GetStyleHandle(); @@ -1981,7 +1981,7 @@ static void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr ) { if( ( nWhich < RES_CHRATR_END || RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) && - ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, true ) ) ) + ( SfxItemState::SET == pCFSet->GetItemState( nWhich, true ) ) ) rSet.Put( pCFSet->Get( nWhich ) ); nWhich = aIter.NextWhich(); } @@ -2006,7 +2006,7 @@ static void lcl_MergeAttr_ExpandChrFmt( SfxItemSet& rSet, const SfxPoolItem& rAt { if( ( nWhich < RES_CHRATR_END || ( RES_TXTATR_AUTOFMT == rAttr.Which() && RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) ) && - ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, true ) ) ) + ( SfxItemState::SET == pCFSet->GetItemState( nWhich, true ) ) ) rSet.Put( pCFSet->Get( nWhich ) ); nWhich = aIter.NextWhich(); } @@ -2511,7 +2511,7 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) while( true ) { - if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), false, &pNdItem ) ) + if( SfxItemState::SET == aNdSet.GetItemState( pItem->Which(), false, &pNdItem ) ) { if (*pItem == *pNdItem) // 4 { @@ -2965,7 +2965,7 @@ bool SwpHints::TryInsertHint( // Check if character format contains hidden attribute: const SwCharFmt* pFmt = pHint->GetCharFmt().GetCharFmt(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) + if ( SfxItemState::SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, true, &pItem ) ) rNode.SetCalcHiddenCharFlags(); ((SwTxtCharFmt*)pHint)->ChgTxtNode( &rNode ); diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 188639476e7f..4788055aa38e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -311,7 +311,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess, if ( !pSet1 ) { OSL_ENSURE( nWhichId, "lcl_HaveCommonAttributes not used correctly" ); - if ( SFX_ITEM_SET == rSet2.GetItemState( nWhichId, false ) ) + if ( SfxItemState::SET == rSet2.GetItemState( nWhichId, false ) ) { pNewSet = rSet2.Clone( true ); pNewSet->ClearItem( nWhichId ); @@ -323,7 +323,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess, const SfxPoolItem* pItem = aIter.GetCurItem(); while( true ) { - if ( SFX_ITEM_SET == rSet2.GetItemState( pItem->Which(), false ) ) + if ( SfxItemState::SET == rSet2.GetItemState( pItem->Which(), false ) ) { if ( !pNewSet ) pNewSet = rSet2.Clone( true ); @@ -455,7 +455,7 @@ void SwTxtNode::RstTxtAttr( // 1. case: We want to reset only the attributes listed in pSet: if ( pSet ) { - bSkipAttr = SFX_ITEM_SET != pSet->GetItemState( pHt->Which(), false ); + bSkipAttr = SfxItemState::SET != pSet->GetItemState( pHt->Which(), false ); if ( bSkipAttr && RES_TXTATR_AUTOFMT == pHt->Which() ) { // if the current attribute is an autostyle, we have to check if the autostyle diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index d5c38bca2721..a8f0f3a57f7c 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1092,7 +1092,7 @@ void SwHistory::Add( SwFlyFrmFmt& rFmt, sal_uInt16& rSetPos ) m_SwpHstry.push_back( pHint ); const SwFmtChain* pChainItem; - if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, false, + if( SfxItemState::SET == rFmt.GetItemState( RES_CHAIN, false, (const SfxPoolItem**)&pChainItem )) { if( pChainItem->GetNext() || pChainItem->GetPrev() ) diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 23ac2228f692..6621c69a09fb 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -140,7 +140,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt, void SwUndoFmtAttr::Init() { // treat change of anchor specially - if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) + if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) { SaveFlyAnchor( m_bSaveDrawPt ); } @@ -188,7 +188,7 @@ void SwUndoFmtAttr::UndoImpl(::sw::UndoRedoContext & rContext) // restored, all other attributes are also restored. // Thus, keep track of its restoration bool bAnchorAttrRestored( false ); - if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) + if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) { bAnchorAttrRestored = RestoreFlyAnchor(rContext); if ( bAnchorAttrRestored ) @@ -359,7 +359,7 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext) if( pFly ) { // Bug 43672: do not set all attributes! - if (SFX_ITEM_SET == + if (SfxItemState::SET == m_pFmt->GetAttrSet().GetItemState( RES_CNTNT )) { SfxItemSet aTmpSet( m_pFmt->GetAttrSet() ); @@ -592,7 +592,7 @@ SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat, , m_pOldItem( 0 ) { const SfxPoolItem* pItem = 0; - if (rChangedFormat.GetItemState( nWhichId, false, &pItem ) == SFX_ITEM_SET) + if (rChangedFormat.GetItemState( nWhichId, false, &pItem ) == SfxItemState::SET) { m_pOldItem.reset( pItem->Clone() ); } @@ -842,7 +842,7 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext) void SwUndoAttr::RepeatImpl(::sw::RepeatContext & rContext) { // RefMarks are not repeat capable - if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, false ) ) + if ( SfxItemState::SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, false ) ) { rContext.GetDoc().getIDocumentContentOperations().InsertItemSet( rContext.GetRepeatPaM(), m_AttrSet, m_nInsertFlags ); @@ -894,7 +894,7 @@ void SwUndoAttr::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoAttr::RemoveIdx( SwDoc& rDoc ) { - if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, false )) + if ( SfxItemState::SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, false )) return ; SwHistoryHint* pHstHnt; @@ -967,7 +967,7 @@ SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet ) , m_pTabStop( 0 ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) ) { // store separately, because it may change! m_pTabStop.reset( static_cast<SvxTabStopItem*>(pItem->Clone()) ); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 272cf9fc2fc4..f39361e35723 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -190,11 +190,11 @@ SwUndoDelete::SwUndoDelete( if( pEndTxtNd->HasSwAttrSet() ) { SwRegHistory aRegHist( *pEndTxtNd, pHistory ); - if( SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState( + if( SfxItemState::SET == pEndTxtNd->GetpSwAttrSet()->GetItemState( RES_BREAK, false ) ) pEndTxtNd->ResetAttr( RES_BREAK ); if( pEndTxtNd->HasSwAttrSet() && - SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState( + SfxItemState::SET == pEndTxtNd->GetpSwAttrSet()->GetItemState( RES_PAGEDESC, false ) ) pEndTxtNd->ResetAttr( RES_PAGEDESC ); } @@ -1031,11 +1031,11 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext) SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC, false, &pItem ) ) pNextNd->SetAttr( *pItem ); - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK, false, &pItem ) ) pNextNd->SetAttr( *pItem ); } diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 402094a318d8..7d7c8f350558 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -345,8 +345,8 @@ void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext) SwSectionNode* pInsertedSectNd = rDoc.GetNodes().InsertTextSection( aStt, *pFmt, *m_pSectionData, 0, & aEnd); - if( SFX_ITEM_SET == pFmt->GetItemState( RES_FTN_AT_TXTEND ) || - SFX_ITEM_SET == pFmt->GetItemState( RES_END_AT_TXTEND )) + if( SfxItemState::SET == pFmt->GetItemState( RES_FTN_AT_TXTEND ) || + SfxItemState::SET == pFmt->GetItemState( RES_END_AT_TXTEND )) { rDoc.GetFtnIdxs().UpdateFtn( aStt ); } @@ -444,7 +444,7 @@ void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext) // The Content and Protect items must persist const SfxPoolItem* pItem; m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT )); - if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, true, &pItem )) + if( SfxItemState::SET == pFmt->GetItemState( RES_PROTECT, true, &pItem )) { m_pAttrSet->Put( *pItem ); } diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 7aada6f5d2e9..e02e87a9d697 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -89,11 +89,11 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext) if( pNdSet ) { const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, false, + if( SfxItemState::SET == pNdSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) pTableFmt->SetFmtAttr( *pItem ); - if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, false, + if( SfxItemState::SET == pNdSet->GetItemState( RES_BREAK, false, &pItem ) ) pTableFmt->SetFmtAttr( *pItem ); } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index e583f07c9449..5172236397cf 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -276,11 +276,11 @@ void SwUndoInsTbl::UndoImpl(::sw::UndoRedoContext & rContext) SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC, false, &pItem ) ) pNextNd->SetAttr( *pItem ); - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK, false, &pItem ) ) pNextNd->SetAttr( *pItem ); } @@ -903,7 +903,7 @@ sal_uInt16 _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine ) // recalculated. // Save formulas always in plain text. const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, true, &pItem )) + if( SfxItemState::SET == pSet->GetItemState( RES_BOXATR_FORMULA, true, &pItem )) { pSet->ClearItem( RES_BOXATR_VALUE ); if( pSwTable && bSaveFormula ) @@ -2188,19 +2188,19 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox, if( pNewSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMAT, + if( SfxItemState::SET == pNewSet->GetItemState( RES_BOXATR_FORMAT, false, &pItem )) { bNewFmt = true; nNewFmtIdx = ((SwTblBoxNumFormat*)pItem)->GetValue(); } - if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMULA, + if( SfxItemState::SET == pNewSet->GetItemState( RES_BOXATR_FORMULA, false, &pItem )) { bNewFml = true; aNewFml = ((SwTblBoxFormula*)pItem)->GetFormula(); } - if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_VALUE, + if( SfxItemState::SET == pNewSet->GetItemState( RES_BOXATR_VALUE, false, &pItem )) { bNewValue = true; @@ -2838,11 +2838,11 @@ void SwUndoCpyTbl::UndoImpl(::sw::UndoRedoContext & rContext) SwFrmFmt* pTableFmt = pTNd->GetTable().GetFrmFmt(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_PAGEDESC, false, &pItem ) ) pNextNd->SetAttr( *pItem ); - if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, + if( SfxItemState::SET == pTableFmt->GetItemState( RES_BREAK, false, &pItem ) ) pNextNd->SetAttr( *pItem ); } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 891bc28b5b1e..366c5a2d0f20 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1825,9 +1825,9 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates( const SwAttrSet& rSet = pFmt->GetAttrSet(); SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, false); - if(SFX_ITEM_SET == eItemState) + if(SfxItemState::SET == eItemState) pRet[nProperty] = beans::PropertyState_DIRECT_VALUE; - else if(SFX_ITEM_DEFAULT == eItemState) + else if(SfxItemState::DEFAULT == eItemState) pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE; else pRet[nProperty] = beans::PropertyState_AMBIGUOUS_VALUE; diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 4560afba8d80..d3e0fbe1ec87 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1524,7 +1524,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: if ( pFly ) { const :: SfxPoolItem* pItem; - if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_ANCHOR, false, &pItem )) + if( SfxItemState::SET == pFrmFmt->GetItemState( RES_ANCHOR, false, &pItem )) { pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrmFmtSetRange ); pSet->Put( *pItem ); @@ -1911,7 +1911,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: if (pFly) { const :: SfxPoolItem* pItem; - if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, false, &pItem )) + if( SfxItemState::SET == aSet.GetItemState( RES_ANCHOR, false, &pItem )) { aSet.Put( *pItem ); if ( pFmt->GetDoc()->GetEditShell() != NULL ) @@ -2407,8 +2407,8 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates( else if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID) { //UUUU - if(SFX_ITEM_SET == rFmtSet.GetItemState(XATTR_FILLBMP_STRETCH, false) - || SFX_ITEM_SET == rFmtSet.GetItemState(XATTR_FILLBMP_TILE, false)) + if(SfxItemState::SET == rFmtSet.GetItemState(XATTR_FILLBMP_STRETCH, false) + || SfxItemState::SET == rFmtSet.GetItemState(XATTR_FILLBMP_TILE, false)) { pStates[i] = beans::PropertyState_DIRECT_VALUE; } @@ -2437,13 +2437,13 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates( SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); SfxItemSet aSet(pNoTxt->GetSwAttrSet()); aSet.GetItemState(pEntry->nWID); - if(SFX_ITEM_SET == aSet.GetItemState( pEntry->nWID, false )) + if(SfxItemState::SET == aSet.GetItemState( pEntry->nWID, false )) pStates[i] = beans::PropertyState_DIRECT_VALUE; } } else { - if(SFX_ITEM_SET == rFmtSet.GetItemState( pEntry->nWID, false )) + if(SfxItemState::SET == rFmtSet.GetItemState( pEntry->nWID, false )) pStates[i] = beans::PropertyState_DIRECT_VALUE; else pStates[i] = beans::PropertyState_DEFAULT_VALUE; @@ -2739,7 +2739,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan const SfxPoolItem* pItem; RndStdIds eAnchorId = FLY_AT_PARA; - if(SFX_ITEM_SET == aFrmSet.GetItemState(RES_ANCHOR, false, &pItem) ) + if(SfxItemState::SET == aFrmSet.GetItemState(RES_ANCHOR, false, &pItem) ) { eAnchorId = ((const SwFmtAnchor*)pItem)->GetAnchorId(); if( FLY_AT_FLY == eAnchorId && diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 595237813705..892d430474b8 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -302,7 +302,7 @@ SwUnoCursorHelper::SetPageDesc( ::std::auto_ptr<SwFmtPageDesc> pNewDesc; SAL_WNODEPRECATED_DECLARATIONS_POP const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) + if(SfxItemState::SET == rSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { pNewDesc.reset(new SwFmtPageDesc( *static_cast<const SwFmtPageDesc*>(pItem))); @@ -425,7 +425,7 @@ lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet, ::std::auto_ptr<SwFmtDrop> pDrop; SAL_WNODEPRECATED_DECLARATIONS_POP SfxPoolItem const* pItem(0); - if (SFX_ITEM_SET == + if (SfxItemState::SET == rItemSet.GetItemState(RES_PARATR_DROP, true, &pItem)) { pDrop.reset(new SwFmtDrop(*static_cast<const SwFmtDrop*>(pItem))); @@ -452,7 +452,7 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue) ::std::auto_ptr<SwFmtRuby> pRuby; SAL_WNODEPRECATED_DECLARATIONS_POP const SfxPoolItem* pItem; - if (SFX_ITEM_SET == + if (SfxItemState::SET == rItemSet.GetItemState(RES_TXTATR_CJK_RUBY, true, &pItem)) { pRuby.reset(new SwFmtRuby(*static_cast<const SwFmtRuby*>(pItem))); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index e2bad0b9a95b..baf1ee9bbd94 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -330,7 +330,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, pDoc->getIDocumentContentOperations().InsertItemSet( rPam, rSet, nFlags ); } - if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SFX_ITEM_DEFAULT ) + if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SfxItemState::DEFAULT ) { SwTxtNode * pTmpNode = rPam.GetNode().GetTxtNode(); if ( pTmpNode ) @@ -1108,7 +1108,7 @@ lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode *const pSttNode, bool bRet = false; const SfxItemSet& rSet = pFrmFmt->GetAttrSet(); const SfxPoolItem* pItem; - if (SFX_ITEM_SET == rSet.GetItemState( + if (SfxItemState::SET == rSet.GetItemState( static_cast<sal_uInt16>(bHeader ? RES_HEADER : RES_FOOTER), true, &pItem)) { diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index d83a19a3a159..cb2e42ed70de 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -1013,8 +1013,8 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState( { if(*ppSet) { - if(SFX_ITEM_SET == (*ppSet)->GetItemState(XATTR_FILLBMP_STRETCH, false) - || SFX_ITEM_SET == (*ppSet)->GetItemState(XATTR_FILLBMP_TILE, false)) + if(SfxItemState::SET == (*ppSet)->GetItemState(XATTR_FILLBMP_STRETCH, false) + || SfxItemState::SET == (*ppSet)->GetItemState(XATTR_FILLBMP_TILE, false)) { eRet = beans::PropertyState_DIRECT_VALUE; } @@ -1043,7 +1043,7 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState( if(!bDone) { - if((*ppSet) && SFX_ITEM_SET == (*ppSet)->GetItemState(rEntry.nWID, false)) + if((*ppSet) && SfxItemState::SET == (*ppSet)->GetItemState(rEntry.nWID, false)) { eRet = beans::PropertyState_DIRECT_VALUE; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index f9d7fb4773b1..705911d53b05 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1930,7 +1930,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, SwFmtPageDesc* pNewDesc = 0; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rStyleSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) + if(SfxItemState::SET == rStyleSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { pNewDesc = new SwFmtPageDesc(*((SwFmtPageDesc*)pItem)); } @@ -2093,7 +2093,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, SfxItemSet& rStyleSet = rBase.GetItemSet(); SwFmtRuby* pRuby = 0; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rStyleSet.GetItemState( RES_TXTATR_CJK_RUBY, true, &pItem ) ) + if(SfxItemState::SET == rStyleSet.GetItemState( RES_TXTATR_CJK_RUBY, true, &pItem ) ) pRuby = new SwFmtRuby(*((SwFmtRuby*)pItem)); if(!pRuby) pRuby = new SwFmtRuby(OUString()); @@ -2124,7 +2124,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, SwFmtDrop* pDrop = 0; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rStyleSet.GetItemState( RES_PARATR_DROP, true, &pItem ) ) + if(SfxItemState::SET == rStyleSet.GetItemState( RES_PARATR_DROP, true, &pItem ) ) pDrop = new SwFmtDrop(*((SwFmtDrop*)pItem)); if(!pDrop) pDrop = new SwFmtDrop(); @@ -2392,7 +2392,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, break; // special handling for RES_PAGEDESC const SfxPoolItem* pItem; - if (SFX_ITEM_SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem)) + if (SfxItemState::SET == rBase.GetItemSet().GetItemState(RES_PAGEDESC, true, &pItem)) { const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc(); if(pDesc) @@ -2867,7 +2867,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates( { const SvxSetItem* pSetItem; - if(SFX_ITEM_SET == rSet.GetItemState( + if(SfxItemState::SET == rSet.GetItemState( bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) @@ -2887,8 +2887,8 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates( if(!bDone && OWN_ATTR_FILLBMP_MODE == pEntry->nWID) { //UUUU - if(SFX_ITEM_SET == pSourceSet->GetItemState(XATTR_FILLBMP_STRETCH, false) - || SFX_ITEM_SET == pSourceSet->GetItemState(XATTR_FILLBMP_TILE, false)) + if(SfxItemState::SET == pSourceSet->GetItemState(XATTR_FILLBMP_STRETCH, false) + || SfxItemState::SET == pSourceSet->GetItemState(XATTR_FILLBMP_TILE, false)) { pStates[i] = beans::PropertyState_DIRECT_VALUE; } @@ -3421,7 +3421,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( // it is a Header/Footer entry, access the SvxSetItem containing it's information const SvxSetItem* pSetItem = 0; - if (SFX_ITEM_SET == aBaseImpl.GetItemSet().GetItemState( + if (SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState( bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) { @@ -3430,7 +3430,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( if (pEntry->nWID == SID_ATTR_PAGE_SHARED_FIRST) { // Need to add this to the other as well - if (SFX_ITEM_SET == aBaseImpl.GetItemSet().GetItemState( + if (SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState( bFooter ? SID_ATTR_PAGE_HEADERSET : SID_ATTR_PAGE_FOOTERSET, false, (const SfxPoolItem**)&pSetItem)) { @@ -3528,7 +3528,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( { const SvxSetItem* pSetItem = 0; - if(SFX_ITEM_SET == aBaseImpl.GetItemSet().GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) + if(SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) { // create a new SvxSetItem and get it's ItemSet as new target SvxSetItem* pNewSetItem = static_cast< SvxSetItem* >(pSetItem->Clone()); @@ -3645,7 +3645,7 @@ lcl_makeHeaderFooter( const SfxItemSet& rSet = pFrmFmt->GetAttrSet(); const SfxPoolItem* pItem; - if (SFX_ITEM_SET == rSet.GetItemState(nRes, true, &pItem)) + if (SfxItemState::SET == rSet.GetItemState(nRes, true, &pItem)) { SwFrmFmt *const pHeadFootFmt = (bHeader) ? static_cast<SwFmtHeader*>(const_cast<SfxPoolItem*>(pItem))-> @@ -3728,7 +3728,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( const SfxItemSet& rSet = xStyle->GetItemSet(); const SvxSetItem* pSetItem; - if(SFX_ITEM_SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) + if(SfxItemState::SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) { // get from SfxItemSet of the corresponding SfxSetItem const SfxItemSet& rSetSet = pSetItem->GetItemSet(); @@ -3800,7 +3800,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) ); const SfxItemSet& rSet = xStyle->GetItemSet(); const SvxSetItem* pSetItem; - if(SFX_ITEM_SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) + if(SfxItemState::SET == rSet.GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, (const SfxPoolItem**)&pSetItem)) { // set at SfxItemSet of the corresponding SfxSetItem const SfxItemSet& rSetSet = pSetItem->GetItemSet(); @@ -4841,8 +4841,8 @@ uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates( { case OWN_ATTR_FILLBMP_MODE: { - if(SFX_ITEM_SET == mpSet->GetItemState(XATTR_FILLBMP_STRETCH, false) - || SFX_ITEM_SET == mpSet->GetItemState(XATTR_FILLBMP_TILE, false)) + if(SfxItemState::SET == mpSet->GetItemState(XATTR_FILLBMP_STRETCH, false) + || SfxItemState::SET == mpSet->GetItemState(XATTR_FILLBMP_TILE, false)) { pStates[i] = beans::PropertyState_DIRECT_VALUE; } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index f709c22022a0..feb975fc0c7a 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -272,7 +272,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp const SfxItemSet& rSet = pFmt->GetAttrSet(); const SfxPoolItem* pItem; OUString sPDesc; - if(SFX_ITEM_SET == rSet.GetItemState(RES_PAGEDESC, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(RES_PAGEDESC, false, &pItem)) { const SwPageDesc* pDsc = ((const SwFmtPageDesc*)pItem)->GetPageDesc(); if(pDsc) @@ -756,7 +756,7 @@ void sw_setValue( SwXCell &rCell, double nVal ) // - there is no current number format // - the current number format is not a number format according to the number formatter, but rather a text format // - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format - if(SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem) + if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem) || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue()) || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT) { @@ -938,7 +938,7 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException, SfxItemSet aSet(pMyDoc->GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMULA); const SfxPoolItem* pItem; SwFrmFmt* pBoxFmt = pBox->GetFrmFmt(); - if(SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem) + if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem) || pMyDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())) { aSet.Put(SwTblBoxNumFormat(0)); @@ -2644,7 +2644,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray() { // check if table box value item is set SwFrmFmt* pBoxFmt = pBox->GetFrmFmt(); - bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SFX_ITEM_SET; + bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET; if(!bIsNum) pColArray[nCol] <<= lcl_getString(*pXCell); else @@ -4200,7 +4200,7 @@ void SwXCellRange::GetDataSequence( if (pAnyData) { // check if table box value item is set - bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false ) == SFX_ITEM_SET; + bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET; if (!bIsNum) pAnyData[nDtaCnt++] <<= lcl_getString(*pXCell); else @@ -4229,7 +4229,7 @@ void SwXCellRange::GetDataSequence( SwFrmFmt *pBoxFmt = pXCell->GetTblBox()->GetFrmFmt(); SfxItemState eState = pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) { // please note that the language of the numberformat // is implicitly coded into the below value as well @@ -4317,7 +4317,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray() { // check if table box value item is set SwFrmFmt* pBoxFmt = pBox->GetFrmFmt(); - bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SFX_ITEM_SET; + bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, false ) == SfxItemState::SET; if(!bIsNum) pColArray[nCol] <<= lcl_getString(*pXCell); else diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 721028902ebc..43ae47367356 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -209,7 +209,7 @@ sal_uLong SwASCIIParser::CallParser() while (*pWhichIds) { const SfxPoolItem *pItem; - if (SFX_ITEM_SET == pItemSet->GetItemState(*pWhichIds, + if (SfxItemState::SET == pItemSet->GetItemState(*pWhichIds, false, &pItem)) { pColl->SetFmtAttr( *pItem ); diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index a1be84f8ad46..3433bdad2875 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -316,7 +316,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, SwTwips nPageWidth) { const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) || + if( SfxItemState::SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) || MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() ) { SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, true)); diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 4251557efde9..8d6a9caffaa9 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -443,19 +443,19 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet, if( !IsCSS1Source(CSS1_OUTMODE_HINT) ) { const SvxUnderlineItem *pUnderlineItem = 0; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_UNDERLINE, bDeep, &pItem )) + if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_UNDERLINE, bDeep, &pItem )) pUnderlineItem = (const SvxUnderlineItem *)pItem; const SvxOverlineItem *pOverlineItem = 0; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_OVERLINE, bDeep, &pItem )) + if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_OVERLINE, bDeep, &pItem )) pOverlineItem = (const SvxOverlineItem *)pItem; const SvxCrossedOutItem *pCrossedOutItem = 0; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, bDeep, &pItem )) + if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, bDeep, &pItem )) pCrossedOutItem = (const SvxCrossedOutItem *)pItem; const SvxBlinkItem *pBlinkItem = 0; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_BLINK, bDeep, &pItem )) + if( SfxItemState::SET==rItemSet.GetItemState( RES_CHRATR_BLINK, bDeep, &pItem )) pBlinkItem = (const SvxBlinkItem *)pItem; if( pUnderlineItem || pOverlineItem || pCrossedOutItem || pBlinkItem ) @@ -1012,7 +1012,7 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet, while( nWhich ) { const SfxPoolItem *pRefItem, *pItem; - bool bItemSet = ( SFX_ITEM_SET == + bool bItemSet = ( SfxItemState::SET == rItemSet.GetItemState( nWhich, false, &pItem) ); bool bRefItemSet; @@ -1035,18 +1035,18 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet, case RES_CHRATR_CTL_LANGUAGE: case RES_CHRATR_CTL_POSTURE: case RES_CHRATR_CTL_WEIGHT: - bRefItemSet = ( SFX_ITEM_SET == + bRefItemSet = ( SfxItemState::SET == pRefScriptItemSet->GetItemState( nWhich, true, &pRefItem) ); break; default: - bRefItemSet = ( SFX_ITEM_SET == + bRefItemSet = ( SfxItemState::SET == aRefItemSet.GetItemState( nWhich, false, &pRefItem) ); break; } } else { - bRefItemSet = ( SFX_ITEM_SET == + bRefItemSet = ( SfxItemState::SET == aRefItemSet.GetItemState( nWhich, false, &pRefItem) ); } @@ -1173,19 +1173,19 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet, { const SfxPoolItem *pItem = 0, *pItemCJK = 0, *pItemCTL = 0, *pTmp; sal_uInt16 nItemCount = 0; - if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false, + if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false, &pTmp ) ) { pItem = pTmp; nItemCount++; } - if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i+1], false, + if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i+1], false, &pTmp ) ) { pItemCJK = pTmp; nItemCount++; } - if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i+2], false, + if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i+2], false, &pTmp ) ) { pItemCTL = pTmp; @@ -1221,7 +1221,7 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet, const SfxPoolItem *pItem; if( bCheckDropCap && - SFX_ITEM_SET == rItemSet.GetItemState( RES_PARATR_DROP, true, + SfxItemState::SET == rItemSet.GetItemState( RES_PARATR_DROP, true, &pItem ) ) { const SwFmtDrop *pDrop = (const SwFmtDrop *)pItem; @@ -1618,7 +1618,7 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, // export Drop-Caps const SfxPoolItem *pItem; - if( SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, false, &pItem )) + if( SfxItemState::SET==aItemSet.GetItemState( RES_PARATR_DROP, false, &pItem )) { OUString sOut( aSelector ); sOut += ":" + OStringToOUString( sCSS1_first_letter, RTL_TEXTENCODING_ASCII_US ); @@ -1796,13 +1796,13 @@ Writer& OutCSS1_BodyTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet ) // considered already when exporting the paragraph template. const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { OutCSS1_SvxBrush( rWrt, *pItem, CSS1_BACKGROUND_PAGE ); } - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, false, + if( SfxItemState::SET == rItemSet.GetItemState( RES_BOX, false, &pItem )) { OutCSS1_SvxBox( rWrt, *pItem ); @@ -2077,9 +2077,9 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, { const SvxLRSpaceItem *pLRItem = 0; const SvxULSpaceItem *pULItem = 0; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, true ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, true ) ) pLRItem = &aLRItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, true ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, true ) ) pULItem = &aULItem; if( pLRItem || pULItem ) OutCSS1_SvxULSpace_SvxLRSpace( *this, pULItem, pLRItem ); @@ -2091,7 +2091,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, const SfxPoolItem* pItem; if( nFrmOpts & HTML_FRMOPT_S_NOBORDER ) OutCSS1_SvxBox( *this, rFrmFmt.GetBox() ); - else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) ) + else if( SfxItemState::SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) ) OutCSS1_SvxBox( *this, *pItem ); } @@ -2114,13 +2114,13 @@ void SwHTMLWriter::OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt ) const SfxPoolItem *pItem; const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) + if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_TABLE ); if( IsHTMLMode( HTMLMODE_PRINT_EXT ) ) OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, false ); - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, false, &pItem ) ) + if( SfxItemState::SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, false, &pItem ) ) OutCSS1_SwFmtLayoutSplit( *this, *pItem ); if( !bFirstCSS1Property ) @@ -2146,7 +2146,7 @@ void SwHTMLWriter::OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt, const SwF const SfxPoolItem *pItem; const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) + if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_SECTION ); if (pCol) @@ -3030,10 +3030,10 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt, const SvxULSpaceItem *pULSpace = 0; const SvxLRSpaceItem *pLRSpace = 0; const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, bDeep, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, bDeep, &pItem ) ) pLRSpace = (const SvxLRSpaceItem *)pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, bDeep, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, bDeep, &pItem ) ) pULSpace = (const SvxULSpaceItem *)pItem; if( pLRSpace || pULSpace ) @@ -3116,7 +3116,7 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt, SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt; const SfxPoolItem *pItem; const SvxFmtBreakItem *pBreakItem = 0; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BREAK, bDeep, &pItem )) + if( SfxItemState::SET==rItemSet.GetItemState( RES_BREAK, bDeep, &pItem )) pBreakItem = (const SvxFmtBreakItem *)pItem; const SwFmtPageDesc *pPDescItem = 0; @@ -3124,11 +3124,11 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt, !rHTMLWrt.bCSS1IgnoreFirstPageDesc || rHTMLWrt.pStartNdIdx->GetIndex() != rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() ) && - SFX_ITEM_SET==rItemSet.GetItemState( RES_PAGEDESC, bDeep, &pItem )) + SfxItemState::SET==rItemSet.GetItemState( RES_PAGEDESC, bDeep, &pItem )) pPDescItem = (const SwFmtPageDesc*)pItem; const SvxFmtKeepItem *pKeepItem = 0; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_KEEP, bDeep, &pItem )) + if( SfxItemState::SET==rItemSet.GetItemState( RES_KEEP, bDeep, &pItem )) pKeepItem = (const SvxFmtKeepItem *)pItem; if( pBreakItem || pPDescItem || pKeepItem ) diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 3bf58a5c4b22..a6f507a4e921 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -377,7 +377,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, if( bOutStyles && bHardDrop && nDeep != 0 ) { const SfxPoolItem *pItem; - if( SFX_ITEM_SET==pFmt->GetAttrSet().GetItemState( + if( SfxItemState::SET==pFmt->GetAttrSet().GetItemState( RES_PARATR_DROP, true, &pItem ) ) { bool bPut = true; @@ -386,7 +386,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); const SfxPoolItem *pRefItem; bool bRefItemSet = - SFX_ITEM_SET==pReferenceFmt->GetAttrSet().GetItemState( + SfxItemState::SET==pReferenceFmt->GetAttrSet().GetItemState( RES_PARATR_DROP, true, &pRefItem ); bPut = !bRefItemSet || *pItem!=*pRefItem; } @@ -653,7 +653,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, const SfxPoolItem* pItem; if( rInfo.pItemSet && - SFX_ITEM_SET == rInfo.pItemSet->GetItemState( RES_PARATR_ADJUST, + SfxItemState::SET == rInfo.pItemSet->GetItemState( RES_PARATR_ADJUST, false, &pItem ) ) { pAdjItem = pItem; @@ -856,7 +856,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, { // export language if it differs from the default language only. const SfxPoolItem *pTmpItem; - if( SFX_ITEM_SET == rInfo.pItemSet->GetItemState( aWhichIds[i], + if( SfxItemState::SET == rInfo.pItemSet->GetItemState( aWhichIds[i], true, &pTmpItem ) && ((const SvxLanguageItem *)pTmpItem)->GetLanguage() == eLang ) rInfo.pItemSet->ClearItem( aWhichIds[i] ); @@ -1878,7 +1878,7 @@ void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet, while( nWhich ) { const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( nWhich, bDeep, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( nWhich, bDeep, &pItem ) ) { Insert( *pItem, nStart, nEnd, rFmtInfos, bParaAttrs ); } @@ -2085,7 +2085,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) return rHTMLWrt; } const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, false, &pItem )) + if( SfxItemState::SET == pItemSet->GetItemState( RES_LR_SPACE, false, &pItem )) { sal_Int32 nLeft = ((SvxLRSpaceItem*)pItem)->GetLeft(); sal_Int32 nRight = ((SvxLRSpaceItem*)pItem)->GetRight(); @@ -2124,7 +2124,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) } } - if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, false, &pItem )) + if( SfxItemState::SET == pItemSet->GetItemState( RES_BOX, false, &pItem )) { const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem; const editeng::SvxBorderLine* pBorderLine = pBoxItem->GetBottom(); @@ -2162,7 +2162,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) const SfxPoolItem* pItem; const SfxItemSet* pItemSet = pNd->GetpSwAttrSet(); if( pItemSet && pItemSet->Count() && - SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) && + SfxItemState::SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) && 40 == ((const SvxFontHeightItem *)pItem)->GetHeight() ) { // ... ausserdem ist die 2pt Schrift eingestellt ... @@ -2201,12 +2201,12 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) if( pItemSet ) { - if( SFX_ITEM_SET == pItemSet->GetItemState( RES_PAGEDESC, true, &pItem ) && + if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, true, &pItem ) && ((SwFmtPageDesc *)pItem)->GetPageDesc() ) { bPageBreakBefore = true; } - else if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BREAK, true, &pItem ) ) + else if( SfxItemState::SET == pItemSet->GetItemState( RES_BREAK, true, &pItem ) ) { switch( ((SvxFmtBreakItem *)pItem)->GetBreak() ) { diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 7a1c0fe9bac1..d333b6df580d 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -196,7 +196,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet ) RES_CHRATR_CTL_FONTSIZE }; for( sal_uInt16 i=0; i<3; i++ ) { - if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false, + if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false, &pItem ) && ((const SvxFontHeightItem *)pItem)->GetProp() != 100) { @@ -207,7 +207,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet ) pCharFmt->SetFmtAttr( rItemSet ); - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { // Ein Brush-Item mit RES_BACKGROUND muss noch in eines mit // RES_CHRATR_BACKGROUND gewandelt werden @@ -217,7 +217,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet ) pCharFmt->SetFmtAttr( aBrushItem ); } - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) ) { SvxBoxItem aBoxItem( *(const SvxBoxItem *)pItem ); aBoxItem.SetWhich( RES_CHRATR_BOX ); @@ -235,7 +235,7 @@ void SwCSS1Parser::SetLinkCharFmts() if( pStyleEntry ) { SfxItemSet& rItemSet = pStyleEntry->GetItemSet(); - bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR, + bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR, false)); pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL ); SetCharFmtAttrs( pUnvisited, rItemSet ); @@ -252,7 +252,7 @@ void SwCSS1Parser::SetLinkCharFmts() if( pStyleEntry ) { SfxItemSet& rItemSet = pStyleEntry->GetItemSet(); - bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR, + bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR, false)); if( !pUnvisited ) pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL ); @@ -266,7 +266,7 @@ void SwCSS1Parser::SetLinkCharFmts() if( pStyleEntry ) { SfxItemSet& rItemSet = pStyleEntry->GetItemSet(); - bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR, + bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR, false)); if( !pVisited ) pVisited = GetCharFmtFromPool( RES_POOLCHR_INET_VISIT ); @@ -289,8 +289,8 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet, rPropInfo.bTextIndent) && (!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin || !rPropInfo.bTextIndent) && - SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,true,&pCollItem) && - SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) ) + SfxItemState::SET == rCollItemSet.GetItemState(RES_LR_SPACE,true,&pCollItem) && + SfxItemState::SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) ) { const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem; @@ -308,9 +308,9 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet, // oberer und unterer Rand if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) && (!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) && - SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,true, + SfxItemState::SET == rCollItemSet.GetItemState(RES_UL_SPACE,true, &pCollItem) && - SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) ) + SfxItemState::SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) ) { const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem; @@ -327,7 +327,7 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet, RES_CHRATR_CTL_FONTSIZE }; for( sal_uInt16 i=0; i<3; i++ ) { - if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false, + if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false, &pItem ) && ((const SvxFontHeightItem *)pItem)->GetProp() != 100) { @@ -401,7 +401,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, if( pItemSet2 ) { const SfxPoolItem *pItem = 0; - if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == pItemSet2->GetItemState( RES_BACKGROUND, false, &pItem ) ) { // ein Hintergrund wird gesetzt @@ -410,7 +410,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, bSetBrush = true; } - if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, false, &pItem ) ) + if( SfxItemState::SET == pItemSet2->GetItemState( RES_BOX, false, &pItem ) ) { // eine Umrandung wird gesetzt aBoxItem = *((const SvxBoxItem *)pItem); @@ -418,7 +418,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, bSetBox = true; } - if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, false, &pItem ) ) + if( SfxItemState::SET == pItemSet2->GetItemState( RES_FRAMEDIR, false, &pItem ) ) { // eine Umrandung wird gesetzt aFrmDirItem = *static_cast< const SvxFrameDirectionItem *>( pItem ); @@ -467,10 +467,10 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, // linker, rechter Rand und Erstzeilen-Einzug if( (rPropInfo.bLeftMargin || rPropInfo.bRightMargin) && - SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) ) + SfxItemState::SET == rItemSet.GetItemState(RES_LR_SPACE,false,&pItem) ) { if( (!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin) && - SFX_ITEM_SET == rPageItemSet.GetItemState(RES_LR_SPACE, + SfxItemState::SET == rPageItemSet.GetItemState(RES_LR_SPACE, true,&pPageItem) ) { const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem; @@ -492,10 +492,10 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, // oberer und unterer Rand if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) && - SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) ) + SfxItemState::SET == rItemSet.GetItemState(RES_UL_SPACE,false,&pItem) ) { if( (!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) && - SFX_ITEM_SET == rPageItemSet.GetItemState(RES_UL_SPACE, + SfxItemState::SET == rPageItemSet.GetItemState(RES_UL_SPACE, true,&pPageItem) ) { const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem; @@ -548,7 +548,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, } // Geht das wirklich? - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { // eine Umrandung wird gesetzt rMaster.SetFmtAttr( *pItem ); @@ -688,7 +688,7 @@ static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript, const SfxPoolItem *pItem; if( aClearItems[j] || (pParentItemSet && - SFX_ITEM_SET == rItemSet.GetItemState( nWhich, false, &pItem ) && + SfxItemState::SET == rItemSet.GetItemState( nWhich, false, &pItem ) && (0==i ? swhtml_css1atr_equalFontItems( *pItem, pParentItemSet->Get(nWhich, true ) ) : *pItem == pParentItemSet->Get(nWhich, true ) ) ) ) { @@ -817,7 +817,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, // Den Hintergrund muessen wir vor dem Setzen abfragen, // denn in SetPageDescAttrs wird er geloescht. const SfxPoolItem *pItem; - if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,false,&pItem) ) + if( SfxItemState::SET==rItemSet.GetItemState(RES_BACKGROUND,false,&pItem) ) { const SvxBrushItem *pBrushItem = (const SvxBrushItem *)pItem; @@ -838,7 +838,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, // alle noch uebrigen Optionen koennen an der Standard-Vorlage // gesetzt werden und gelten dann automatisch als defaults - if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,false) ) + if( SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR,false) ) bBodyTextSet = true; SetTxtCollAttrs( GetTxtCollFromPool( RES_POOLCOLL_STANDARD ), @@ -1011,7 +1011,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, // nur die Attribute an der Vorlage setzen const SfxPoolItem *pItem; const SvxBoxItem *pBoxItem = 0; - if( SFX_ITEM_SET == + if( SfxItemState::SET == pColl->GetAttrSet().GetItemState(RES_BOX,true,&pItem) ) pBoxItem = (const SvxBoxItem *)pItem; rPropInfo.SetBoxItem( rItemSet, MIN_BORDER_DIST, pBoxItem ); @@ -1481,7 +1481,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop, // fuer die Hoehe (was passiert mit absoluten Hoehen???) sal_uInt8 nLines = rDrop.GetLines(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, false, &pItem ) ) { sal_uInt16 nProp = ((const SvxFontHeightItem *)pItem)->GetProp(); nLines = (sal_uInt8)((nProp + 50) / 100); @@ -1508,7 +1508,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop, rDrop.GetLines() = nLines; // ein rechter Rand wird der Abstand zum Text! - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, false, &pItem ) ) { rDrop.GetDistance() = static_cast< sal_uInt16 >( ((const SvxLRSpaceItem *)pItem)->GetRight() ); @@ -2104,7 +2104,7 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet, { const SfxPoolItem *pItem; if( (nFlags & HTML_FF_BOX) != 0 && - SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) ) + SfxItemState::SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) ) { if( (nFlags & HTML_FF_PADDING) == 0 ) { @@ -2121,14 +2121,14 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet, } if( (nFlags & HTML_FF_BACKGROUND) != 0 && - SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, true, &pItem ) ) + SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, true, &pItem ) ) { rFrmItemSet.Put( *pItem ); rItemSet.ClearItem( RES_BACKGROUND ); } if( (nFlags & HTML_FF_DIRECTION) != 0 && - SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) + SfxItemState::SET==rItemSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) { rFrmItemSet.Put( *pItem ); rItemSet.ClearItem( RES_FRAMEDIR ); @@ -2316,7 +2316,7 @@ static void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc ) const SfxPoolItem *pItem; for( sal_uInt16 i=0; i<3; i++ ) { - if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], false,&pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( aWhichIds[i], false,&pItem ) ) { const SvxFontItem& rFont = *(const SvxFontItem *)pItem; if( RTL_TEXTENCODING_SYMBOL != rFont.GetCharSet() ) diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 3aa6a05a6e0e..b680b5e94f05 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -101,7 +101,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, // linken/rechten Rand setzen const SfxPoolItem *pItem; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) ) + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) ) { // Ggf. den Erstzeilen-Einzug noch plaetten const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem; @@ -128,7 +128,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, } // oberen/unteren Rand setzen - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) ) + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) ) { // Ggf. den Erstzeilen-Einzug noch plaetten const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem; @@ -426,7 +426,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) const SfxPoolItem *pItem; for( sal_uInt16 i=0; nWhichIds[i]; i++ ) { - if( SFX_ITEM_SET == rItemSet.GetItemState( nWhichIds[i], true, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( nWhichIds[i], true, &pItem ) ) PutEEPoolItem( aItemSet, *pItem ); } } diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index 79e1e96b000f..db80f953c5f4 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -83,7 +83,7 @@ void SwHTMLWriter::GetEEAttrsFromDrwObj( SfxItemSet& rItemSet, while( nEEWhich ) { const SfxPoolItem *pEEItem; - bool bSet = SFX_ITEM_SET == rObjItemSet.GetItemState( nEEWhich, false, + bool bSet = SfxItemState::SET == rObjItemSet.GetItemState( nEEWhich, false, &pEEItem ); if( bSet || bSetDefaults ) diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 5568aec6bd92..725ba97b80bd 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -211,7 +211,7 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt, const SfxPoolItem* pItem; const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_COL, + if( SfxItemState::SET == rItemSet.GetItemState( RES_COL, true, &pItem ) && ((const SwFmtCol *)pItem)->GetNumCols() > 1 ) { @@ -580,7 +580,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr && ( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 || (FLY_AS_CHAR == eAnchorId) ) && - SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, true, &pItem )) + SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, true, &pItem )) { switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() ) { @@ -605,7 +605,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, // HSPACE und VSPACE Size aTwipSpc( 0, 0 ); if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) && - SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, true, &pItem )) + SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, true, &pItem )) { aTwipSpc.Width() = ( ((SvxLRSpaceItem*)pItem)->GetLeft() + @@ -613,7 +613,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, nDfltLeftMargin = nDfltRightMargin = aTwipSpc.Width(); } if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) && - SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, true, &pItem )) + SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, true, &pItem )) { aTwipSpc.Height() = ( ((SvxULSpaceItem*)pItem)->GetUpper() + @@ -660,7 +660,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, } if( !(nFrmOpts & HTML_FRMOPT_ABSSIZE) && - SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, true, &pItem )) + SfxItemState::SET == rItemSet.GetItemState( RES_BOX, true, &pItem )) { const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem; @@ -673,7 +673,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, // WIDTH und/oder HEIGHT // ATT_VAR_SIZE/ATT_MIN_SIZE nur ausgeben, wenn ANYSIZE gesezut ist if( (nFrmOpts & HTML_FRMOPT_SIZE) && - SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) && + SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) && ( (nFrmOpts & HTML_FRMOPT_ANYSIZE) || ATT_FIX_SIZE == ((const SwFmtFrmSize *)pItem)->GetHeightSizeType()) ) { @@ -740,7 +740,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) && ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) || (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) && - SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem )) + SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem )) { const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem; sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient(); @@ -829,7 +829,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, // das URL-Attribut nur beruecksichtigen, wenn keine Image-Map // uebergeben wurde if( !pAltImgMap && - SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, true, &pItem )) + SfxItemState::SET == rItemSet.GetItemState( RES_URL, true, &pItem )) { pURLItem = (const SwFmtURL *)pItem; } @@ -966,7 +966,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, // URL -> <A>...<IMG ... >...</A> const SvxMacroItem *pMacItem = 0; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem )) + if( SfxItemState::SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem )) pMacItem = (const SvxMacroItem *)pItem; if( pURLItem || pMacItem ) @@ -1041,7 +1041,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, // Umrandung -> <FONT COLOR = ...>...<IMG ... >...</FONT> sal_uInt16 nBorderWidth = 0; if( (nFrmOpts & HTML_FRMOPT_BORDER) && - SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, true, &pItem )) + SfxItemState::SET == rItemSet.GetItemState( RES_BOX, true, &pItem )) { Size aTwipBorder( 0, 0 ); const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem; @@ -1127,7 +1127,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, HTMLOutFuncs::Out_String( rWrt.Strm(), aGraphicInBase64, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ).WriteChar( '\"' ); // Events - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem )) + if( SfxItemState::SET == rItemSet.GetItemState( RES_FRMMACRO, true, &pItem )) { const SvxMacroTableDtor& rMacTable = ((const SvxMacroItem *)pItem)->GetMacroTable(); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index a6555ccb8a68..24b17f0298d5 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -909,7 +909,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( // linken/rechten Rand setzen const SfxPoolItem *pItem; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) ) { // Ggf. den Erstzeilen-Einzug noch plaetten @@ -939,7 +939,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } // oberen/unteren Rand setzen - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) ) { // Ggf. den Erstzeilen-Einzug noch plaetten @@ -970,7 +970,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( uno::Reference< beans::XPropertySetInfo > xPropSetInfo = rFCompPropSet->getPropertySetInfo(); OUString sPropName = "BackgroundColor"; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_BACKGROUND, true, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_BACKGROUND, true, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { @@ -986,7 +986,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } sPropName = "TextColor"; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_COLOR, true, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_COLOR, true, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { @@ -996,7 +996,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } sPropName = "FontHeight"; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONTSIZE, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONTSIZE, true, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { @@ -1006,7 +1006,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONT, true, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONT, true, &pItem ) ) { const SvxFontItem *pFontItem = (SvxFontItem *)pItem; @@ -1043,7 +1043,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } sPropName = "FontWeight"; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_WEIGHT, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_WEIGHT, true, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { @@ -1054,7 +1054,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } sPropName = "FontSlant"; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_POSTURE, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_POSTURE, true, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { @@ -1063,7 +1063,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } sPropName = "FontUnderline"; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_UNDERLINE, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_UNDERLINE, true, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { @@ -1072,7 +1072,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } sPropName = "FontStrikeout"; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, true, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index e4f76c4bd9f4..19d11dae7804 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -974,7 +974,7 @@ void SwHTMLParser::InsertBodyOptions() RES_CHRATR_CTL_FONTSIZE }; for( sal_uInt16 i=0; i<3; i++ ) { - if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], false, + if( SfxItemState::SET == aItemSet.GetItemState( aWhichIds[i], false, &pItem ) && static_cast <const SvxFontHeightItem * >(pItem)->GetProp() != 100) { diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index e4cf7d9a6bb1..a33737b5171b 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -221,7 +221,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace, // linken/rechten Rand setzen const SfxPoolItem *pItem; - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) ) + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) ) { // Ggf. den Erstzeilen-Einzug noch plaetten const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem; @@ -259,7 +259,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace, } // oberen/unteren Rand setzen - if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) ) + if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) ) { // Ggf. den Erstzeilen-Einzug noch plaetten const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem; diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 99760e29b5e6..65c924abc2fc 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -318,13 +318,13 @@ void SwHTMLParser::NewDivision( int nToken ) Reader::ResetFrmFmtAttrs(aFrmItemSet ); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == aItemSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { aFrmItemSet.Put( *pItem ); aItemSet.ClearItem( RES_BACKGROUND ); } - if( SFX_ITEM_SET == aItemSet.GetItemState( RES_FRAMEDIR, false, + if( SfxItemState::SET == aItemSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) { aFrmItemSet.Put( *pItem ); @@ -708,13 +708,13 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) aFrmItemSet.Put( aFmtCol ); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == aItemSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { aFrmItemSet.Put( *pItem ); aItemSet.ClearItem( RES_BACKGROUND ); } - if( SFX_ITEM_SET == aItemSet.GetItemState( RES_FRAMEDIR, false, + if( SfxItemState::SET == aItemSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) { aFrmItemSet.Put( *pItem ); @@ -802,14 +802,14 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd, SwCntntNode* pSrcCntntNd = pSrcNd->GetCntntNode(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pSrcCntntNd->GetSwAttrSet() + if( SfxItemState::SET == pSrcCntntNd->GetSwAttrSet() .GetItemState( RES_PAGEDESC, false, &pItem ) && ((SwFmtPageDesc *)pItem)->GetPageDesc() ) { pDestCntntNd->SetAttr( *pItem ); pSrcCntntNd->ResetAttr( RES_PAGEDESC ); } - if( SFX_ITEM_SET == pSrcCntntNd->GetSwAttrSet() + if( SfxItemState::SET == pSrcCntntNd->GetSwAttrSet() .GetItemState( RES_BREAK, false, &pItem ) ) { switch( ((SvxFmtBreakItem *)pItem)->GetBreak() ) @@ -830,7 +830,7 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd, SwFrmFmt *pFrmFmt = pSrcNd->GetTableNode()->GetTable().GetFrmFmt(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pFrmFmt->GetAttrSet(). + if( SfxItemState::SET == pFrmFmt->GetAttrSet(). GetItemState( RES_PAGEDESC, false, &pItem ) ) { pDestCntntNd->SetAttr( *pItem ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 928fb3d41b88..4b352c7e1852 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -1505,7 +1505,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, ->GetCntntNode(); const SfxPoolItem *pItem; if( pCNd && pCNd->HasSwAttrSet() && - SFX_ITEM_SET==pCNd->GetpSwAttrSet()->GetItemState( + SfxItemState::SET==pCNd->GetpSwAttrSet()->GetItemState( RES_PARATR_ADJUST, false, &pItem ) ) { eAdjust = ((const SvxAdjustItem *)pItem) @@ -1552,7 +1552,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, else { OSL_ENSURE( pBox->GetSttNd() || - SFX_ITEM_SET!=pFrmFmt->GetAttrSet().GetItemState( + SfxItemState::SET!=pFrmFmt->GetAttrSet().GetItemState( RES_VERT_ORIENT, false ), "Box ohne Inhalt hat vertikale Ausrichtung" ); pBox->ChgFrmFmt( (SwTableBoxFmt*)pFrmFmt ); @@ -1617,7 +1617,7 @@ static void ResetLineFrmFmtAttrs( SwFrmFmt *pFrmFmt ) { pFrmFmt->ResetFmtAttr( RES_FRM_SIZE ); pFrmFmt->ResetFmtAttr( RES_BACKGROUND ); - OSL_ENSURE( SFX_ITEM_SET!=pFrmFmt->GetAttrSet().GetItemState( + OSL_ENSURE( SfxItemState::SET!=pFrmFmt->GetAttrSet().GetItemState( RES_VERT_ORIENT, false ), "Zeile hat vertikale Ausrichtung" ); } @@ -2958,7 +2958,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor, pCSS1Parser->ParseStyleOption( rStyle, aItemSet, aPropInfo ); const SfxPoolItem *pItem = 0; - if( SFX_ITEM_SET == aItemSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { pBrushItem = new SvxBrushItem( *((const SvxBrushItem *)pItem) ); @@ -3251,7 +3251,7 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, aPropInfo, &aLang, &aDir ) ) { SfxPoolItem const* pItem; - if (SFX_ITEM_SET == aItemSet.GetItemState(RES_BOX, false, &pItem)) + if (SfxItemState::SET == aItemSet.GetItemState(RES_BOX, false, &pItem)) { // fdo#41796: steal box item to set it in FixFrameFmt later! m_pBoxItem.reset(dynamic_cast<SvxBoxItem *>(pItem->Clone())); aItemSet.ClearItem(RES_BOX); @@ -3494,13 +3494,13 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, const SfxPoolItem *pItem = 0; if( bStyleParsed ) { - if( SFX_ITEM_SET == aItemSet.GetItemState( + if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { pCurTable->SetBGBrush( *(const SvxBrushItem *)pItem ); aItemSet.ClearItem( RES_BACKGROUND ); } - if( SFX_ITEM_SET == aItemSet.GetItemState( + if( SfxItemState::SET == aItemSet.GetItemState( RES_PARATR_SPLIT, false, &pItem ) ) { aItemSet.Put( @@ -3753,14 +3753,14 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt(); const SfxPoolItem* pItem2; - if( SFX_ITEM_SET == pOldTxtNd->GetSwAttrSet() + if( SfxItemState::SET == pOldTxtNd->GetSwAttrSet() .GetItemState( RES_PAGEDESC, false, &pItem2 ) && ((SwFmtPageDesc *)pItem2)->GetPageDesc() ) { pFrmFmt->SetFmtAttr( *pItem2 ); pOldTxtNd->ResetAttr( RES_PAGEDESC ); } - if( SFX_ITEM_SET == pOldTxtNd->GetSwAttrSet() + if( SfxItemState::SET == pOldTxtNd->GetSwAttrSet() .GetItemState( RES_BREAK, true, &pItem2 ) ) { switch( ((SvxFmtBreakItem *)pItem2)->GetBreak() ) diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index c7357e11ee38..e40d612a6f26 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -415,7 +415,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, rWrt.bTxtAttr = false; rWrt.bOutOpts = true; const SvxBrushItem *pBrushItem = 0; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) + if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { pBrushItem = (const SvxBrushItem *)pItem; } @@ -436,12 +436,12 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, sal_uInt32 nNumFmt = 0; double nValue = 0.0; bool bNumFmt = false, bValue = false; - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) + if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { nNumFmt = ((const SwTblBoxNumFormat *)pItem)->GetValue(); bNumFmt = true; } - if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOXATR_VALUE, false, &pItem ) ) + if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_VALUE, false, &pItem ) ) { nValue = ((const SwTblBoxValue *)pItem)->GetValue(); bValue = true; diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 1c1e04091189..efd63865d8e0 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1998,7 +1998,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr, if( bSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, + if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, &pItem ) ) { SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) ); @@ -2053,7 +2053,7 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr, if( nLeft < 0 ) nLeft = 0; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, + if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, &pItem ) ) { SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) ); @@ -2108,7 +2108,7 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr, if( nRight < 0 ) nRight = 0; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, + if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, &pItem ) ) { SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) ); @@ -2166,7 +2166,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr, if( bSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, false, + if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false, &pItem ) ) { SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) ); @@ -2224,7 +2224,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr, if( bSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, false, + if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false, &pItem ) ) { SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) ); @@ -2327,7 +2327,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr, } const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, + if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false, &pItem ) ) { SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) ); @@ -2356,7 +2356,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr, nMargins[2] = 0; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, false, + if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false, &pItem ) ) { SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) ); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 2fb5df48cb07..ead053964fbe 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -4663,7 +4663,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) pCSS1Parser->GetTxtFmtColl( nTopColl, rTopClass ); const SfxItemSet& rItemSet = pTopColl->GetAttrSet(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,true, &pItem) ) + if( SfxItemState::SET == rItemSet.GetItemState(RES_LR_SPACE,true, &pItem) ) { const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem; @@ -4695,7 +4695,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) pContext->SetMargins( nLeftMargin, nRightMargin, nFirstLineIndent ); } - if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,true, &pItem) ) + if( SfxItemState::SET == rItemSet.GetItemState(RES_UL_SPACE,true, &pItem) ) { const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem; diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index e7c94be70009..a6f138ba33a0 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -169,7 +169,7 @@ void SwHTMLWriter::SetupFilterOptions(SfxMedium& rMedium) return; const SfxPoolItem* pItem; - if (pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) != SFX_ITEM_SET) + if (pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) != SfxItemState::SET) return; @@ -393,7 +393,7 @@ sal_uLong SwHTMLWriter::WriteStream() if( !bWriteClipboardDoc && pDoc->GetDocShell() && (!pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) && !pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::BROWSE_MODE)) && - SFX_ITEM_SET == rPageItemSet.GetItemState( RES_HEADER, true, &pItem) ) + SfxItemState::SET == rPageItemSet.GetItemState( RES_HEADER, true, &pItem) ) { const SwFrmFmt *pHeaderFmt = ((const SwFmtHeader *)pItem)->GetHeaderFmt(); @@ -413,7 +413,7 @@ sal_uLong SwHTMLWriter::WriteStream() if( !bWriteClipboardDoc && pDoc->GetDocShell() && (!pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) && !pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::BROWSE_MODE)) && - SFX_ITEM_SET == rPageItemSet.GetItemState( RES_FOOTER, true, &pItem) ) + SfxItemState::SET == rPageItemSet.GetItemState( RES_FOOTER, true, &pItem) ) { const SwFrmFmt *pFooterFmt = ((const SwFmtFooter *)pItem)->GetFooterFmt(); @@ -521,7 +521,7 @@ static const SwFmtCol *lcl_html_GetFmtCol( const SwSection& rSection, const SfxPoolItem* pItem; if( FILE_LINK_SECTION != rSection.GetType() && - SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState(RES_COL,false,&pItem) && + SfxItemState::SET == rFmt.GetAttrSet().GetItemState(RES_COL,false,&pItem) && ((const SwFmtCol *)pItem)->GetNumCols() > 1 ) { pCol = (const SwFmtCol *)pItem; @@ -838,10 +838,10 @@ static void OutBodyColor( const sal_Char* pTag, const SwFmt *pFmt, const SfxItemSet& rItemSet = pFmt->GetAttrSet(); const SfxPoolItem *pRefItem = 0, *pItem = 0; - bool bItemSet = SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_COLOR, + bool bItemSet = SfxItemState::SET == rItemSet.GetItemState( RES_CHRATR_COLOR, true, &pItem); bool bRefItemSet = pRefFmt && - SFX_ITEM_SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR, + SfxItemState::SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR, true, &pRefItem); if( bItemSet ) { @@ -1233,7 +1233,7 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem, bool bGraphic void SwHTMLWriter::OutBackground( const SfxItemSet& rItemSet, bool bGraphic ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem )) { OutBackground( ((const SvxBrushItem*)pItem), bGraphic ); diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx index 07dca7fbe282..979a3cc1bfb9 100644 --- a/sw/source/filter/writer/wrt_fn.cxx +++ b/sw/source/filter/writer/wrt_fn.cxx @@ -71,7 +71,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt, sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { - if( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) && + if( SfxItemState::SET == pSet->GetItemState( nWhich, bDeep, &pItem ) && ( !bTstForDefault || ( *pItem != rPool.GetDefaultItem( nWhich ) || ( pSet->GetParent() && diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 7416dc1d0677..cfa1781afff8 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -39,7 +39,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const { const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) ) { sal_Int16 eBoxVertOri = ((const SwFmtVertOrient *)pItem)->GetVertOrient(); @@ -153,7 +153,7 @@ long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) const const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet(); long nHeight = 0; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) + if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) nHeight = ((SwFmtFrmSize*)pItem)->GetHeight(); return nHeight; @@ -170,7 +170,7 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox, const SfxPoolItem* pItem; const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet(); - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { if( !pLine->GetUpper() ) @@ -589,11 +589,11 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow, const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet(); long nHeight = 0; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) + if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) nHeight = ((SwFmtFrmSize*)pItem)->GetHeight(); const SvxBrushItem *pBrushItem, *pLineBrush = pParentBrush; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { pLineBrush = (const SvxBrushItem *)pItem; diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index b59f30915253..6e97e7c19911 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -609,13 +609,13 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, if( pSet ) { if( !pTOXAttr->HadBreakItem() - && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pItem ) ) + && SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) ) { aBkSet.Put( *pItem ); pNd->ResetAttr( RES_BREAK ); } if( !pTOXAttr->HadPageDescItem() - && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) + && SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) { aBkSet.Put( *pItem ); pNd->ResetAttr( RES_PAGEDESC ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index dd242027ecf6..eaa85bef3d61 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -911,7 +911,7 @@ void DocxAttributeOutput::EndParagraphProperties( const SfxItemSet* pParagraphMa const SfxPoolItem* pItem = 0; while( nWhichId ) { - if( SFX_ITEM_SET == pParagraphMarkerProperties->GetItemState( nWhichId, true, &pItem )) + if( SfxItemState::SET == pParagraphMarkerProperties->GetItemState( nWhichId, true, &pItem )) { SAL_INFO( "sw.ww8", "nWhichId " << nWhichId); if (isCHRATR( nWhichId )) diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 065368dd01ec..d15e4d274a7c 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -214,7 +214,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) { bool bRet( false ); - if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) + if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) { if (const SwFmt *pParent = rFmt.DerivedFrom()) { @@ -1287,7 +1287,7 @@ boost::optional<SvxBrushItem> DocxExport::getBackground() SvxBrushItem aBrush(RES_BACKGROUND); SfxItemState eState = rFmt.GetBackgroundState(aBrush); - if (SFX_ITEM_SET == eState) + if (SfxItemState::SET == eState) { // The 'color' is set for the first page style - take it and use it as the background color of the entire DOCX if (aBrush.GetColor().GetColor() != COL_AUTO) diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 8e855e0575ba..bf677269283e 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1659,7 +1659,7 @@ bool DocxSdrExport::checkFrameBtlr(SwNode* pStartNode, sax_fastparser::FastAttri if (pTxtNode->HasSwAttrSet()) { const SwAttrSet& rAttrSet = pTxtNode->GetSwAttrSet(); - bItemSet = rAttrSet.GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SFX_ITEM_SET; + bItemSet = rAttrSet.GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SfxItemState::SET; } if (!bItemSet) @@ -1673,7 +1673,7 @@ bool DocxSdrExport::checkFrameBtlr(SwNode* pStartNode, sax_fastparser::FastAttri return false; boost::shared_ptr<SfxItemSet> pItemSet = pTxtAttr->GetAutoFmt().GetStyleHandle(); - bItemSet = pItemSet->GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SFX_ITEM_SET; + bItemSet = pItemSet->GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SfxItemState::SET; } if (bItemSet) diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 4de7cca2f684..aa47fed5baaa 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -762,7 +762,7 @@ bool RtfExport::DisallowInheritingOutlineNumbering(const SwFmt& rFmt) { bool bRet(false); - if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) + if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) { if (const SwFmt* pParent = rFmt.DerivedFrom()) { @@ -1112,10 +1112,10 @@ void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bWriteReset, b // normal header / footer (without a style) const SfxPoolItem* pItem; if (pAktPageDesc->GetLeft().GetAttrSet().GetItemState(RES_HEADER, false, - &pItem) == SFX_ITEM_SET) + &pItem) == SfxItemState::SET) WriteHeaderFooter(*pItem, true); if (pAktPageDesc->GetLeft().GetAttrSet().GetItemState(RES_FOOTER, false, - &pItem) == SFX_ITEM_SET) + &pItem) == SfxItemState::SET) WriteHeaderFooter(*pItem, false); // title page @@ -1124,10 +1124,10 @@ void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bWriteReset, b Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_TITLEPG); pAktPageDesc = &rPgDsc; if (pAktPageDesc->GetMaster().GetAttrSet().GetItemState(RES_HEADER, - false, &pItem) == SFX_ITEM_SET) + false, &pItem) == SfxItemState::SET) WriteHeaderFooter(*pItem, true); if (pAktPageDesc->GetMaster().GetAttrSet().GetItemState(RES_FOOTER, - false, &pItem) == SFX_ITEM_SET) + false, &pItem) == SfxItemState::SET) WriteHeaderFooter(*pItem, false); } diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 2122e14d56d1..40519c663a26 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -423,7 +423,7 @@ namespace sw for( sal_uInt16 nItem =0; nItem < nTotal; ++nItem ) { const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) ) { rItems[pItem->Which()] = pItem; } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index ad8cd7af6c36..79a32b00b58a 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -286,7 +286,7 @@ void SwBasicEscherEx::PreWriteHyperlinkWithinFly(const SwFrmFmt& rFmt,EscherProp { const SfxPoolItem* pItem; const SwAttrSet& rAttrSet = rFmt.GetAttrSet(); - if (SFX_ITEM_SET == rAttrSet.GetItemState(RES_URL, true, &pItem)) + if (SfxItemState::SET == rAttrSet.GetItemState(RES_URL, true, &pItem)) { const SwFmtURL *pINetFmt = dynamic_cast<const SwFmtURL*>(pItem); if (pINetFmt && !pINetFmt->GetURL().isEmpty()) @@ -1436,7 +1436,7 @@ void WW8Export::CreateEscher() { SfxItemState eBackSet = pDoc->GetPageDesc(0).GetMaster(). GetItemState(RES_BACKGROUND); - if (pHFSdrObjs->size() || pSdrObjs->size() || SFX_ITEM_SET == eBackSet) + if (pHFSdrObjs->size() || pSdrObjs->size() || SfxItemState::SET == eBackSet) { OSL_ENSURE( !pEscher, "wer hat den Pointer nicht geloescht?" ); SvMemoryStream* pEscherStrm = new SvMemoryStream; @@ -1685,19 +1685,19 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd, sal_Int32 nContrast = 0; sal_Int16 nBrightness = 0; - if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CONTRAST, + if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CONTRAST, true, &pItem)) { nContrast = ((SfxInt16Item*)pItem)->GetValue(); } - if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_LUMINANCE, + if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_LUMINANCE, true, &pItem)) { nBrightness = ((SfxInt16Item*)pItem)->GetValue(); } - if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_DRAWMODE, + if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_DRAWMODE, true, &pItem)) { nMode = ((SfxEnumItem*)pItem)->GetValue(); @@ -1748,7 +1748,7 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd, if (nBrightness != 0) rPropOpt.AddOpt( ESCHER_Prop_pictureBrightness, nBrightness * 327 ); - if (SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CROPGRF, + if (SfxItemState::SET == rNd.GetSwAttrSet().GetItemState(RES_GRFATR_CROPGRF, true, &pItem)) { const Size aSz( rNd.GetTwipSize() ); @@ -1901,7 +1901,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, sal_Int32 nLineWidth=0; const SfxPoolItem* pItem; bool bFirstLine = true; - if (SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem)) + if (SfxItemState::SET == rFmt.GetItemState(RES_BOX, true, &pItem)) { static const sal_uInt16 aExhperProp[4] = { @@ -1981,13 +1981,13 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, rPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 ); } const SwAttrSet& rAttrSet = rFmt.GetAttrSet(); - if (SFX_ITEM_SET == rAttrSet.GetItemState(RES_BOX, false, &pItem)) + if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem)) { const SvxBoxItem* pBox = (const SvxBoxItem*)pItem; if( pBox ) { const SfxPoolItem* pShadItem; - if (SFX_ITEM_SET + if (SfxItemState::SET == rAttrSet.GetItemState(RES_SHADOW, true, &pShadItem)) { const SvxShadowItem* pSI = (const SvxShadowItem*)pShadItem; @@ -2078,7 +2078,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType are exporting! */ const SfxPoolItem* pItem; - if (SFX_ITEM_SET == rFmt.GetItemState(RES_LR_SPACE, true, &pItem)) + if (SfxItemState::SET == rFmt.GetItemState(RES_LR_SPACE, true, &pItem)) { rPropOpt.AddOpt( ESCHER_Prop_dxWrapDistLeft, DrawModelToEmu( ((SvxLRSpaceItem*)pItem)->GetLeft() ) ); @@ -2091,7 +2091,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType rPropOpt.AddOpt( ESCHER_Prop_dxWrapDistRight, 0 ); } - if (SFX_ITEM_SET == rFmt.GetItemState(RES_UL_SPACE, true, &pItem)) + if (SfxItemState::SET == rFmt.GetItemState(RES_UL_SPACE, true, &pItem)) { rPropOpt.AddOpt( ESCHER_Prop_dyWrapDistTop, DrawModelToEmu( ((SvxULSpaceItem*)pItem)->GetUpper() ) ); @@ -2318,7 +2318,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) const SfxPoolItem* pItem = 0; SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true, &pItem); - if (SFX_ITEM_SET == eState && pItem) + if (SfxItemState::SET == eState && pItem) { const SvxBrushItem* pBrush = (const SvxBrushItem*)pItem; WriteBrushAttr(*pBrush, aPropOpt); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 8889d0f04401..5bb95bcc27dc 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -435,7 +435,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) sal_uInt16 nWhichId = aIter.FirstWhich(); while( nWhichId ) { - if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, false, &pItem )) + if( SfxItemState::SET == pSet->GetItemState( nWhichId, false, &pItem )) { if (nWhichId == nFontId) pFont = &(item_cast<SvxFontItem>(*pItem)); @@ -690,7 +690,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const const SfxItemSet* pSet = CharFmt::GetItemSet( pHt->GetAttr() ); const SfxPoolItem* pCharItem; if ( pSet && - SFX_ITEM_SET == pSet->GetItemState( nWhich, pHt->Which() != RES_TXTATR_AUTOFMT, &pCharItem ) ) + SfxItemState::SET == pSet->GetItemState( nWhich, pHt->Which() != RES_TXTATR_AUTOFMT, &pCharItem ) ) { pRet = pCharItem; // found it break; @@ -1470,7 +1470,7 @@ const SvxBrushItem* WW8Export::GetCurrentPageBgBrush() const SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true, &pItem); const SvxBrushItem* pRet = (const SvxBrushItem*)pItem; - if (SFX_ITEM_SET != eState || (!pRet->GetGraphic() && + if (SfxItemState::SET != eState || (!pRet->GetGraphic() && pRet->GetColor() == COL_TRANSPARENT)) { pRet = &(DefaultItemGet<SvxBrushItem>(*pDoc,RES_BACKGROUND)); @@ -1490,7 +1490,7 @@ SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const SfxItemState eState = pFlyFmt->GetItemState(RES_BACKGROUND, true, &pItem); pRet = (const SvxBrushItem*)pItem; - if (SFX_ITEM_SET != eState || (!pRet->GetGraphic() && + if (SfxItemState::SET != eState || (!pRet->GetGraphic() && pRet->GetColor() == COL_TRANSPARENT)) { pRet = 0; @@ -2379,7 +2379,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if( (ND_HAS_PREV_LAYNODE|ND_HAS_NEXT_LAYNODE ) != nPrvNxtNd ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState( + if( SfxItemState::SET == rNode.GetSwAttrSet().GetItemState( RES_UL_SPACE, true, &pItem ) && ( ( !( ND_HAS_PREV_LAYNODE & nPrvNxtNd ) && ((SvxULSpaceItem*)pItem)->GetUpper()) || @@ -2441,7 +2441,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } // correct fix for issue i94187 - if (SFX_ITEM_SET != + if (SfxItemState::SET != pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) ) { // List style set via paragraph style - then put it into the itemset. @@ -2551,7 +2551,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } // assure that numbering rule is in <pTmpSet> - if (SFX_ITEM_SET != pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) ) + if (SfxItemState::SET != pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) ) { pTmpSet->Put( SwNumRuleItem( pRule->GetName() )); } @@ -2562,7 +2562,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) // If page break attribute at the text node exist, an existing page // break after at the paragraph style hasn't got to be considered. if ( !rNode.GetpSwAttrSet() || - SFX_ITEM_SET != rNode.GetpSwAttrSet()->GetItemState(RES_BREAK, false) ) + SfxItemState::SET != rNode.GetpSwAttrSet()->GetItemState(RES_BREAK, false) ) { const SvxFmtBreakItem* pBreakAtParaStyle = &(ItemGet<SvxFmtBreakItem>(rNode.GetSwAttrSet(), RES_BREAK)); @@ -2740,7 +2740,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet ) if( pSet) { bool bNoPageBreak = false; - if ( SFX_ITEM_SET != pSet->GetItemState(RES_PAGEDESC, true, &pI) + if ( SfxItemState::SET != pSet->GetItemState(RES_PAGEDESC, true, &pI) || 0 == ((SwFmtPageDesc*)pI)->GetPageDesc() ) { bNoPageBreak = true; @@ -2748,7 +2748,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet ) if (bNoPageBreak) { - if (SFX_ITEM_SET != pSet->GetItemState(RES_BREAK, true, &pI)) + if (SfxItemState::SET != pSet->GetItemState(RES_BREAK, true, &pI)) bNoPageBreak = true; else { diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 307463885aea..41407d2afd9b 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -471,7 +471,7 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap ) for ( n = nStt; n < nEnd; ++n, ++pFlags ) { if ( *pFlags && !m_rExport.ignoreAttributeForStyles( n ) - && SFX_ITEM_SET != rFmt.GetItemState(n, false)) + && SfxItemState::SET != rFmt.GetItemState(n, false)) { //If we are a character property then see if it is one of the //western/asian ones that must be collapsed together for export to @@ -1071,7 +1071,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) // Hole evtl. Pagedesc des 1. Nodes if ( pSet && - SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, true, &pI ) && + SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, true, &pI ) && ( (SwFmtPageDesc*)pI )->GetPageDesc() ) { AppendSection( *(SwFmtPageDesc*)pI, *pNd, pFmt, nRstLnNum ); @@ -1272,7 +1272,7 @@ void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt sal_uInt8 nFlag ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rFmt.GetItemState(RES_HEADER, true, &pItem) + if( SfxItemState::SET == rFmt.GetItemState(RES_HEADER, true, &pItem) && ((SwFmtHeader*)pItem)->IsActive() && ((SwFmtHeader*)pItem)->GetHeaderFmt() ) rHeadFootFlags |= nFlag; @@ -1282,7 +1282,7 @@ void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt sal_uInt8 nFlag ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rFmt.GetItemState(RES_FOOTER, true, &pItem) + if( SfxItemState::SET == rFmt.GetItemState(RES_FOOTER, true, &pItem) && ((SwFmtFooter*)pItem)->IsActive() && ((SwFmtFooter*)pItem)->GetFooterFmt() ) rHeadFootFlags |= nFlag; @@ -1390,7 +1390,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const bool MSWordSections::HasBorderItem( const SwFmt& rFmt ) { const SfxPoolItem* pItem; - return SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem) && + return SfxItemState::SET == rFmt.GetItemState(RES_BOX, true, &pItem) && ( ((SvxBoxItem*)pItem)->GetTop() || ((SvxBoxItem*)pItem)->GetBottom() || ((SvxBoxItem*)pItem)->GetLeft() || @@ -1756,7 +1756,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt const SfxItemSet* pOldI = pISet; const SfxPoolItem* pItem; - if ( titlePage && SFX_ITEM_SET == + if ( titlePage && SfxItemState::SET == pPdFirstPgFmt->GetItemState( RES_PAPER_BIN, true, &pItem ) ) { pISet = &pPdFirstPgFmt->GetAttrSet(); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 65ba9570e32b..fa6100237ea2 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -647,7 +647,7 @@ const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const // ourer own Ids. So the Id have to translate from our into the // EditEngine Range nWhich = sw::hack::GetSetWhichFromSwDocWhich(*pISet, *pDoc, nWhich); - if (nWhich && SFX_ITEM_SET != pISet->GetItemState(nWhich, true, &pItem)) + if (nWhich && SfxItemState::SET != pISet->GetItemState(nWhich, true, &pItem)) pItem = 0; } else if( pChpIter ) @@ -1994,7 +1994,7 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR ((SwTxtNode*)pCNd)->GetAttr( aCoreSet, 0, ((SwTxtNode*)pCNd)->GetTxt().getLength()); const SvxCharRotateItem * pRotate = NULL; const SfxPoolItem * pRotItem; - if ( SFX_ITEM_SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem)) + if ( SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem)) { pRotate = (SvxCharRotateItem*)pRotItem; if(pRotate && pRotate->GetValue() == 900) @@ -2473,7 +2473,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t const SfxPoolItem * pI = NULL; Color aColor; - if ( SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) + if ( SfxItemState::SET == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) { aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor(); } @@ -2505,7 +2505,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t const SfxPoolItem * pI = NULL; Color aColor; - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == pFrmFmt->GetAttrSet(). GetItemState( RES_BACKGROUND, false, &pI ) ) { @@ -2592,7 +2592,7 @@ void MSWordExportBase::WriteText() if ( pTempNext ) { const SfxPoolItem * pTempItem = NULL; - if (pTempNext->GetpSwAttrSet() && SFX_ITEM_SET == pTempNext->GetpSwAttrSet()->GetItemState(RES_PAGEDESC, false, &pTempItem) + if (pTempNext->GetpSwAttrSet() && SfxItemState::SET == pTempNext->GetpSwAttrSet()->GetItemState(RES_PAGEDESC, false, &pTempItem) && pTempItem && ((SwFmtPageDesc*)pTempItem)->GetRegisteredIn()) { //Next node has a new page style which means this node is a section end. Do not insert another page/section break here @@ -3219,7 +3219,7 @@ void WW8Export::ExportDocument_Impl() const SfxPoolItem* pItem; SwTxtFmtColl* pStdTxtFmtColl = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false); - if (pStdTxtFmtColl && SFX_ITEM_SET == pStdTxtFmtColl->GetItemState( + if (pStdTxtFmtColl && SfxItemState::SET == pStdTxtFmtColl->GetItemState( RES_PARATR_HYPHENZONE, false, &pItem)) { pDop->fAutoHyphen = ((const SvxHyphenZoneItem*)pItem)->IsHyphen(); diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 1baf2e94bde9..9d47d5daa638 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -539,7 +539,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, // write Crop-Attribut content in Header ( if available ) const SfxPoolItem* pItem; - if (pAttrSet && (SFX_ITEM_SET + if (pAttrSet && (SfxItemState::SET == pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem))) { const SwCropGrf& rCr = *(SwCropGrf*)pItem; @@ -560,7 +560,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, sal_uInt8* pArr = aArr + 0x2E; // Do borders first const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet(); - if (SFX_ITEM_SET == rAttrSet.GetItemState(RES_BOX, false, &pItem)) + if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem)) { const SvxBoxItem* pBox = (const SvxBoxItem*)pItem; if( pBox ) diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 82f8ea053b91..684e00e1be86 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -261,10 +261,10 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool pISet = &rSet; // fuer Doppel-Attribute // If frame dir is set, but not adjust, then force adjust as well - if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, bExportParentItemSet ) ) + if ( bPapFmt && SfxItemState::SET == rSet.GetItemState( RES_FRAMEDIR, bExportParentItemSet ) ) { // No explicit adjust set ? - if ( SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_ADJUST, bExportParentItemSet ) ) + if ( SfxItemState::SET != rSet.GetItemState( RES_PARATR_ADJUST, bExportParentItemSet ) ) { if ( 0 != ( pItem = rSet.GetItem( RES_PARATR_ADJUST, bExportParentItemSet ) ) ) { @@ -274,14 +274,14 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool } } - if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, bExportParentItemSet, &pItem ) ) + if ( bPapFmt && SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, bExportParentItemSet, &pItem ) ) { AttrOutput().OutputItem( *pItem ); // switch off the numerbering? if ( ( (SwNumRuleItem*)pItem )->GetValue().isEmpty() && - SFX_ITEM_SET != rSet.GetItemState( RES_LR_SPACE, false) && - SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, true, &pItem ) ) + SfxItemState::SET != rSet.GetItemState( RES_LR_SPACE, false) && + SfxItemState::SET == rSet.GetItemState( RES_LR_SPACE, true, &pItem ) ) { // the set the LR-Space of the parentformat! AttrOutput().OutputItem( *pItem ); @@ -455,7 +455,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode if ( pSet && pSet->Count() ) { - if ( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) && + if ( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) && static_cast<const SwFmtPageDesc*>(pItem)->GetRegisteredIn() != NULL) { bBreakSet = true; @@ -463,7 +463,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode pPgDesc = static_cast<const SwFmtPageDesc*>(pItem); pAktPageDesc = pPgDesc->GetPageDesc(); } - else if ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pItem ) ) + else if ( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) ) { // Word does not like hard break attributes in some table cells bool bRemoveHardBreakInsideTable = false; @@ -732,7 +732,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt) //numbered, then in writer this is no inheritied, but in word it would //be, so we must export "no numbering" and "body level" to make word //behave like writer (see #i25755) - if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) + if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) { if (const SwFmt *pParent = rFmt.DerivedFrom()) { @@ -847,7 +847,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF aSet.Put(aAnchor); } - if (SFX_ITEM_SET != aSet.GetItemState(RES_SURROUND)) + if (SfxItemState::SET != aSet.GetItemState(RES_SURROUND)) aSet.Put(SwFmtSurround(SURROUND_NONE)); const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rFrmFmt.GetAttrSet().GetItem(XATTR_FILLSTYLE))); @@ -3708,7 +3708,7 @@ void AttributeOutputBase::FormatPageDescription( const SwFmtPageDesc& rPageDesc if ( GetExport().bStyDef && GetExport().pOutFmtNode && GetExport().pOutFmtNode->ISA( SwTxtFmtColl ) ) { const SwTxtFmtColl* pC = (SwTxtFmtColl*)GetExport().pOutFmtNode; - if ( (SFX_ITEM_SET != pC->GetItemState( RES_BREAK, false ) ) && rPageDesc.KnowsPageDesc() ) + if ( (SfxItemState::SET != pC->GetItemState( RES_BREAK, false ) ) && rPageDesc.KnowsPageDesc() ) FormatBreak( SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) ); } } @@ -5520,7 +5520,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, bool bDeep sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - if ( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) && + if ( SfxItemState::SET == pSet->GetItemState( nWhich, bDeep, &pItem ) && ( !bTestForDefault || *pItem != rPool.GetDefaultItem( nWhich ) || ( pSet->GetParent() && *pItem != pSet->GetParent()->Get( nWhich ) ) ) ) diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index a810e7143965..1283d9a2caee 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -502,7 +502,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl ) { // If we are set in the source and not set in the destination // then add it in. - if ( SFX_ITEM_SET == pStyInf->pFmt->GetItemState( + if ( SfxItemState::SET == pStyInf->pFmt->GetItemState( i, true, &pItem ) ) { SfxItemPool *pEditPool = rS.GetPool(); @@ -512,7 +512,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl ) nSlotId && nWhich != nSlotId && 0 != (nWhich = pEditPool->GetWhich(nSlotId)) && nWhich != nSlotId && - ( SFX_ITEM_SET != rS.GetItemState(nWhich, false) ) + ( SfxItemState::SET != rS.GetItemState(nWhich, false) ) ) { SfxPoolItem* pCopy = pItem->Clone(); @@ -1583,7 +1583,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, }; const SfxPoolItem* pPoolItem; for(sal_uInt16 nItem = 0; nItem < nDirectMatch; ++nItem) - if( SFX_ITEM_SET == rOldSet.GetItemState( + if( SfxItemState::SET == rOldSet.GetItemState( static_cast< sal_uInt16 >(aDirectMatch[ nItem ]), false, &pPoolItem) ) { rFlySet.Put( *pPoolItem ); @@ -1600,7 +1600,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, const SfxPoolItem* pItem; SfxItemState eState = rOldSet.GetItemState(XATTR_LINESTYLE,true,&pItem); - if( eState == SFX_ITEM_SET ) + if( eState == SfxItemState::SET ) { // Now, that we know there is a line style we will make use the // parameter given to us when calling the method... :-) @@ -1655,7 +1655,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SdrOnOffItem)); // Size: SwFmtFrmSize - if( SFX_ITEM_SET != rFlySet.GetItemState(RES_FRM_SIZE, false) ) + if( SfxItemState::SET != rFlySet.GetItemState(RES_FRM_SIZE, false) ) { const Rectangle& rSnapRect = pSdrObj->GetSnapRect(); // if necessary adapt width and position of the framework: The @@ -1736,7 +1736,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, // Separate transparency eState = rOldSet.GetItemState(XATTR_FILLTRANSPARENCE, true, &pItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) { sal_uInt16 nRes = WW8ITEMVALUE(rOldSet, XATTR_FILLTRANSPARENCE, XFillTransparenceItem); @@ -1747,7 +1747,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, // Hintergrund: SvxBrushItem eState = rOldSet.GetItemState(XATTR_FILLSTYLE, true, &pItem); - if (eState == SFX_ITEM_SET) + if (eState == SfxItemState::SET) { const drawing::FillStyle eFill = ((const XFillStyleItem*)pItem)->GetValue(); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 07627fbef13a..552104f2c5d1 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1007,7 +1007,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, const SfxPoolItem* pPoolItem=NULL; SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR, false, &pPoolItem ); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) aSet.Put( XFillColorItem( OUString(), Color( mnDefaultColor ) ) ); pObj->SetMergedItemSet(aSet); @@ -1513,10 +1513,10 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos, */ if (nWhich == RES_LR_SPACE) { - SfxItemState eState = SFX_ITEM_DEFAULT; + SfxItemState eState = SfxItemState::DEFAULT; if (const SfxItemSet *pSet = pNd->GetpSwAttrSet()) eState = pSet->GetItemState(RES_LR_SPACE, false); - if (eState != SFX_ITEM_SET && rReader.nAktColl < rReader.vColl.size()) + if (eState != SfxItemState::SET && rReader.nAktColl < rReader.vColl.size()) pItem = &(rReader.vColl[rReader.nAktColl].maWordLR); } @@ -1714,7 +1714,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen) { const SfxPoolItem* pTabs; bFound = pSty->GetAttrSet().GetItemState(RES_PARATR_TABSTOP, false, - &pTabs) == SFX_ITEM_SET; + &pTabs) == SfxItemState::SET; if( bFound ) aAttr = *((const SvxTabStopItem*)pTabs); else @@ -5496,7 +5496,7 @@ namespace const SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem *pPasswordItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, true, &pPasswordItem)) + if(pSet && SfxItemState::SET == pSet->GetItemState(SID_PASSWORD, true, &pPasswordItem)) aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue(); else { diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 8ba8fb3f4e23..90d7add71af3 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2356,7 +2356,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) { SfxPoolItem *pSetAttr = 0; const SfxPoolItem* pItem; - if (SFX_ITEM_SET == pSet->GetItemState(RES_BREAK, false, &pItem)) + if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false, &pItem)) { pSetAttr = new SvxFmtBreakItem( *(SvxFmtBreakItem*)pItem ); pNd->ResetAttr( RES_BREAK ); @@ -4413,7 +4413,7 @@ void WW8RStyle::Import() if (pIo->mbNewDoc && pIo->pStandardFmtColl) { if (pIo->pWDop->fAutoHyphen - && SFX_ITEM_SET != pIo->pStandardFmtColl->GetItemState( + && SfxItemState::SET != pIo->pStandardFmtColl->GetItemState( RES_PARATR_HYPHENZONE, false) ) { SvxHyphenZoneItem aAttr(true, RES_PARATR_HYPHENZONE); @@ -4429,7 +4429,7 @@ void WW8RStyle::Import() the page/sections rtl setting the standard style lack of rtl still means ltr */ - if (SFX_ITEM_SET != pIo->pStandardFmtColl->GetItemState(RES_FRAMEDIR, + if (SfxItemState::SET != pIo->pStandardFmtColl->GetItemState(RES_FRAMEDIR, false)) { pIo->pStandardFmtColl->SetFmtAttr( diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 9c4a9a0b958a..c81eb9c57cb1 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -976,7 +976,7 @@ void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule, while (true) { if( // ggfs. passenden pItem im pLowerLevelItemSet finden - (SFX_ITEM_SET != pLowerLevelItemSet->GetItemState( + (SfxItemState::SET != pLowerLevelItemSet->GetItemState( nWhich, false, &pItem ) ) || // virtuellen "!=" Operator anwenden (*pItem != *aIter.GetCurItem() ) ) diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index a7fd92c33839..40c6fee0cfa3 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -3266,9 +3266,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) const SfxItemSet* pSet = pNd->GetpSwAttrSet(); if( pSet ) { - if (SFX_ITEM_SET == pSet->GetItemState(RES_BREAK, false)) + if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false)) aFltTOX.SetHadBreakItem(true); - if (SFX_ITEM_SET == pSet->GetItemState(RES_PAGEDESC, false)) + if (SfxItemState::SET == pSet->GetItemState(RES_PAGEDESC, false)) aFltTOX.SetHadPageDescItem(true); } } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index d25b5a24ad69..3f3fd8f27ea5 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3354,7 +3354,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh { if ( pAktColl ) //importing style { - if( SFX_ITEM_SET == pAktColl->GetItemState( RES_CHRATR_UNDERLINE, false ) ) + if( SfxItemState::SET == pAktColl->GetItemState( RES_CHRATR_UNDERLINE, false ) ) { const SwAttrSet& aSet = pAktColl->GetAttrSet(); SvxUnderlineItem *pUnderline @@ -3368,7 +3368,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh } else if ( pAktItemSet ) { - if ( SFX_ITEM_SET == pAktItemSet->GetItemState( RES_CHRATR_UNDERLINE, false ) ) + if ( SfxItemState::SET == pAktItemSet->GetItemState( RES_CHRATR_UNDERLINE, false ) ) { SvxUnderlineItem *pUnderline = (SvxUnderlineItem *)(pAktItemSet->Get( RES_CHRATR_UNDERLINE, false ) .Clone()); diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 0ce5f74e1f0f..cdd9cd0d0f19 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -262,7 +262,7 @@ const SfxPoolItem* SvXMLExportItemMapper::GetItem( const SfxItemSet& rSet, ( nFlags & XML_EXPORT_FLAG_DEEP ) != 0, &pItem ); - if( SFX_ITEM_SET == eState ) + if( SfxItemState::SET == eState ) { return pItem; } diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 06f27fae5038..a23576148b86 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -654,7 +654,7 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc() const SfxPoolItem *pItem; SwFmtPageDesc *pFmtPageDesc = 0; - if( SFX_ITEM_SET == pItemSet->GetItemState( RES_PAGEDESC, false, + if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) { if( ((SwFmtPageDesc *)pItem)->GetPageDesc() != pPageDesc ) diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index 5f7118640a73..d13df377e6e9 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -82,7 +82,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily ) if( RES_FRMFMT == rFmt.Which() && XML_TABLE == eFamily ) { const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == rFmt.GetAttrSet().GetItemState( RES_PAGEDESC, false, &pItem ) ) { OUString sName; @@ -104,7 +104,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily ) OSL_ENSURE(RES_FRMFMT == rFmt.Which(), "only frame format"); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == + if( SfxItemState::SET == rFmt.GetAttrSet().GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 5a6a947e0152..5dde34b5e661 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -110,11 +110,11 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet, &pItem ); // if its not set, try the pool - if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > pEntry->nWhichId ) + if(SfxItemState::SET != eState && SFX_WHICH_MAX > pEntry->nWhichId ) pItem = &rSet.GetPool()->GetDefaultItem(pEntry->nWhichId); // do we have an item? - if(eState >= SFX_ITEM_DEFAULT && pItem) + if(eState >= SfxItemState::DEFAULT && pItem) { SfxPoolItem *pNewItem = pItem->Clone(); bool bPut = false; @@ -154,7 +154,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet, if( !pUnknownItem ) { const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, true, + if( SfxItemState::SET == rSet.GetItemState( nUnknownWhich, true, &pItem ) ) { SfxPoolItem *pNew = pItem->Clone(); diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index c2d13b9ef330..254129b4a8d5 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -126,7 +126,7 @@ void SwXMLTableItemMapper_Impl::handleSpecialItem( { const SfxPoolItem *pItem; if( pSet && - SFX_ITEM_SET == pSet->GetItemState( RES_HORI_ORIENT, true, + SfxItemState::SET == pSet->GetItemState( RES_HORI_ORIENT, true, &pItem ) ) { sal_Int16 eHoriOrient = diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index d3a425fe6fe6..6554cc496256 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -163,7 +163,7 @@ bool SwXMLImportTableItemMapper_Impl::handleSpecialItem( case MID_FRMSIZE_COL_WIDTH: // If the item is existing already, a relative value has been set // already that must be preserved. - if( SFX_ITEM_SET != rItemSet.GetItemState( RES_FRM_SIZE, + if( SfxItemState::SET != rItemSet.GetItemState( RES_FRM_SIZE, false ) ) bRet = SvXMLImportItemMapper::PutXMLValue( rItem, rValue, nMemberId, rUnitConv ); @@ -217,13 +217,13 @@ void SwXMLImportTableItemMapper_Impl::finished( rSet.GetItemState(Ids[i][0], true, &pItem); // if not set, try the pool - if ((SFX_ITEM_SET != eState) && (SFX_WHICH_MAX > Ids[i][0])) + if ((SfxItemState::SET != eState) && (SFX_WHICH_MAX > Ids[i][0])) { pItem = &rSet.GetPool()->GetDefaultItem(Ids[i][0]); } // do we have an item? - if (eState >= SFX_ITEM_DEFAULT && pItem) + if (eState >= SfxItemState::DEFAULT && pItem) { SfxPoolItem *const pNewItem = pItem->Clone(); bool const bPut = PutXMLValue( @@ -301,7 +301,7 @@ SvXMLImportContext *SwXMLItemSetContext_Impl::CreateChildContext( case RES_BACKGROUND: { const SfxPoolItem *pItem; - if( SFX_ITEM_SET == _rItemSet.GetItemState( RES_BACKGROUND, + if( SfxItemState::SET == _rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { pContext = new SwXMLBrushItemImportContext( diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 2065d98cefa5..6e4b8006a76b 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -197,13 +197,13 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, false, &pItem ) ) pFrmSize = (const SwFmtFrmSize *)pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_ROW_SPLIT, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_ROW_SPLIT, false, &pItem ) ) pRowSplit = (const SwFmtRowSplit *)pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) pBrush = (const SvxBrushItem *)pItem; // empty styles have not to be exported @@ -220,7 +220,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, const SvxBrushItem *pTestBrush = 0; const SwFrmFmt *pTestFmt = *i; const SfxItemSet& rTestSet = pTestFmt->GetAttrSet(); - if( SFX_ITEM_SET == rTestSet.GetItemState( RES_FRM_SIZE, false, + if( SfxItemState::SET == rTestSet.GetItemState( RES_FRM_SIZE, false, &pItem ) ) { if( !pFrmSize ) @@ -234,7 +234,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, continue; } - if( SFX_ITEM_SET == rTestSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == rTestSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { if( !pBrush ) @@ -248,7 +248,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, continue; } - if( SFX_ITEM_SET == rTestSet.GetItemState( RES_ROW_SPLIT, false, + if( SfxItemState::SET == rTestSet.GetItemState( RES_ROW_SPLIT, false, &pItem ) ) { if( !pRowSplit ) @@ -315,20 +315,20 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, + if( SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) ) pVertOrient = (const SwFmtVertOrient *)pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) pBrush = (const SvxBrushItem *)pItem; - if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) ) + if( SfxItemState::SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) ) pBox = (const SvxBoxItem *)pItem; - if ( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOXATR_FORMAT, + if ( SfxItemState::SET == rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) pNumFmt = (const SwTblBoxNumFormat *)pItem; - if ( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRAMEDIR, + if ( SfxItemState::SET == rItemSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) pFrameDir = (const SvxFrameDirectionItem *)pItem; @@ -353,7 +353,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, const SvxFrameDirectionItem *pTestFrameDir = 0; const SwFrmFmt* pTestFmt = *i; const SfxItemSet& rTestSet = pTestFmt->GetAttrSet(); - if( SFX_ITEM_SET == rTestSet.GetItemState( RES_VERT_ORIENT, false, + if( SfxItemState::SET == rTestSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) ) { if( !pVertOrient ) @@ -367,7 +367,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, continue; } - if( SFX_ITEM_SET == rTestSet.GetItemState( RES_BACKGROUND, false, + if( SfxItemState::SET == rTestSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { if( !pBrush ) @@ -381,7 +381,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, continue; } - if( SFX_ITEM_SET == rTestSet.GetItemState( RES_BOX, false, &pItem ) ) + if( SfxItemState::SET == rTestSet.GetItemState( RES_BOX, false, &pItem ) ) { if( !pBox ) break; @@ -394,7 +394,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, continue; } - if ( SFX_ITEM_SET == rTestSet.GetItemState( RES_BOXATR_FORMAT, + if ( SfxItemState::SET == rTestSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { if( !pNumFmt ) @@ -409,7 +409,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, } - if ( SFX_ITEM_SET == rTestSet.GetItemState( RES_FRAMEDIR, + if ( SfxItemState::SET == rTestSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) { if( !pFrameDir ) diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index a05ca718a053..0b0bd94126f9 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -795,7 +795,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl( XML_STYLE_FAMILY_TABLE_COLUMN, aStyleName, &pAutoItemSet ) && pAutoItemSet && - SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, + SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, &pItem ) ) { const SwFmtFrmSize *pSize = ((const SwFmtFrmSize *)pItem); @@ -2080,7 +2080,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( // default num format? const SfxPoolItem* pItem = NULL; if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, false, &pItem ) - == SFX_ITEM_SET ) + == SfxItemState::SET ) { const SwTblBoxNumFormat* pNumFormat = static_cast<const SwTblBoxNumFormat*>( pItem ); @@ -2135,7 +2135,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( // the cell gets the default text format. const SfxPoolItem* pItem = NULL; if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, false, &pItem ) - == SFX_ITEM_SET ) + == SfxItemState::SET ) { const SwDoc* pDoc = pBoxFmt->GetDoc(); const SvNumberFormatter* pNumberFormatter = pDoc ? @@ -2670,11 +2670,11 @@ void SwXMLTableContext::MakeTable() { const SfxPoolItem *pItem; const SvxLRSpaceItem *pLRSpace = 0; - if( SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_LR_SPACE, false, + if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_LR_SPACE, false, &pItem ) ) pLRSpace = (const SvxLRSpaceItem *)pItem; - if( SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_HORI_ORIENT, false, + if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_HORI_ORIENT, false, &pItem ) ) { eHoriOrient = ((const SwFmtHoriOrient *)pItem)->GetHoriOrient(); @@ -2704,7 +2704,7 @@ void SwXMLTableContext::MakeTable() } const SwFmtFrmSize *pSize = 0; - if( SFX_ITEM_SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, + if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, &pItem ) ) pSize = (const SwFmtFrmSize *)pItem; diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 5bc41d8206e6..44ea050e3b31 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -152,7 +152,7 @@ SwCharURLPage::SwCharURLPage(Window* pParent, const SfxItemSet& rCoreSet) const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem) || + if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { @@ -191,7 +191,7 @@ SwCharURLPage::~SwCharURLPage() void SwCharURLPage::Reset(const SfxItemSet* rSet) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, &pItem ) ) + if ( SfxItemState::SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, &pItem ) ) { const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*) pItem; m_pURLED->SetText(INetURLObject::decode(pINetFmt->GetValue(), @@ -225,7 +225,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) if( pINetFmt->GetMacroTbl() ) pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() ); } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_SELECTION, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_SELECTION, false, &pItem)) { m_pTextED->SetText(((const SfxStringItem*)pItem)->GetValue()); m_pTextFT->Enable( false ); diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 4585686cc3e3..251d905e9f29 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -69,7 +69,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& const SfxPoolItem* pItem; SfxObjectShell* pObjSh; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) || + if(SfxItemState::SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != ( pObjSh = SfxObjectShell::Current()) && 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE)))) { @@ -165,7 +165,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) SfxItemState eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ); sal_Int16 nOutlineLv; - if( eItemState >= SFX_ITEM_DEFAULT ) + if( eItemState >= SfxItemState::DEFAULT ) { nOutlineLv = ((const SfxUInt16Item &)rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue(); m_pOutlineLvLB->SelectEntryPos( nOutlineLv ) ; @@ -178,7 +178,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_NUMRULE) ); - if( eItemState >= SFX_ITEM_DEFAULT ) + if( eItemState >= SfxItemState::DEFAULT ) { OUString aStyle = ((const SfxStringItem &)rSet->Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue(); if(aStyle.isEmpty()) @@ -204,7 +204,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNumberStyleLB->SaveValue(); eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART ); - if(eItemState > SFX_ITEM_DEFAULT ) + if(eItemState > SfxItemState::DEFAULT ) { bCurNumrule = true; const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(FN_NUMBER_NEWSTART); @@ -219,7 +219,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartCB->SaveValue(); eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART_AT); - if( eItemState > SFX_ITEM_DEFAULT ) + if( eItemState > SfxItemState::DEFAULT ) { const sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); const bool bNotMax = USHRT_MAX != nNewStart; @@ -233,7 +233,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) m_pNewStartNF->SaveValue(); m_pNewStartNumberCB->SaveValue(); StyleHdl_Impl(m_pNumberStyleLB); - if( SFX_ITEM_DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) + if( SfxItemState::DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) { SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet->Get(RES_LINENUMBER); sal_uLong nStartValue = rNum.GetStartValue(); diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 96f0d295e589..76106d3adeb3 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -112,7 +112,7 @@ SwParaDlg::SwParaDlg(Window *pParent, RemoveTabPage("labelTP_PARA_ASIAN"); const sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE)); - bool bLRValid = SFX_ITEM_DEFAULT <= rCoreSet.GetItemState(nWhich); + bool bLRValid = SfxItemState::DEFAULT <= rCoreSet.GetItemState(nWhich); if(bHtmlMode || !bLRValid) RemoveTabPage("labelTP_TABULATOR"); else diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index effc5551d3b8..93b740343b65 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -191,7 +191,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) OUString sDocTitle; const SfxPoolItem* pItem = NULL; SfxObjectShell* pObjShell = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) ) m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue(); if ( m_pWrtShell ) { diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index bb9803872653..4444efccbdb5 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -107,7 +107,7 @@ SwLoadOptPage::SwLoadOptPage(Window* pParent, const SfxItemSet& rSet) m_pMetricLB->SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl)); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { m_pTabFT->Hide(); @@ -251,7 +251,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(false); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) m_pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING; @@ -279,7 +279,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pAutoUpdateFields->SaveValue(); m_pAutoUpdateCharts->SaveValue(); m_pMetricLB->SetNoSelection(); - if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); @@ -295,7 +295,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) ::SetFieldUnit(*m_pTabMF, eFieldUnit); } m_pMetricLB->SaveValue(); - if(SFX_ITEM_SET == rSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) { m_nLastTab = ((SfxUInt16Item*)pItem)->GetValue(); m_pTabMF->SetValue(m_pTabMF->Normalize(m_nLastTab), FUNIT_TWIP); @@ -310,7 +310,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pUseSquaredPageMode->SaveValue(); } - if(SFX_ITEM_SET == rSet->GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem)) { bool bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue(); m_pUseCharUnit->Check(bUseCharUnit); @@ -556,7 +556,7 @@ bool SwCaptionOptPage::FillItemSet( SfxItemSet* ) void SwCaptionOptPage::Reset( const SfxItemSet* rSet) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 8e53f3904943..b642e6a5228f 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -101,7 +101,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, /* This part is visible only with Writer/Web->View dialogue. */ const SfxPoolItem* pItem; - if (! (SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if (! (SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)) { m_pSettingsFrame->Hide(); @@ -167,7 +167,7 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if( rSet.GetItemState( nSID, false, &pItem ) >= SFX_ITEM_DEFAULT ) + if( rSet.GetItemState( nSID, false, &pItem ) >= SfxItemState::DEFAULT ) { FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); for ( sal_Int32 i = 0; i < rMetric->GetEntryCount(); ++i ) @@ -338,7 +338,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(Window* pParent, m_pFaxLB->SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) ); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { m_pLeftPageCB->Hide(); @@ -413,7 +413,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet* ) const SfxItemSet& rSet = GetItemSet(); const SwAddPrinterItem* pAddPrinterAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , false, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , false, (const SfxPoolItem**)&pAddPrinterAttr )) { m_pGrfCB->Check(pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw); @@ -751,7 +751,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) const sal_uInt16 nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE : FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE; - if( SFX_ITEM_SET == rSet->GetItemState(nLangSlot, false, &pLang)) + if( SfxItemState::SET == rSet->GetItemState(nLangSlot, false, &pLang)) eLanguage = ((const SvxLanguageItem*)pLang)->GetValue(); OUString sToReplace = sScriptWestern; @@ -768,7 +768,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) delete pPrt; } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem)) { pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue(); } @@ -805,12 +805,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) pIdxBox->InsertEntry( *it ); } } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_STDFONTS, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_STDFONTS, false, &pItem)) { pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) { pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); } @@ -877,30 +877,30 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE); const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); - bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bListDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); sShellList = sListBackup = rFontLS.GetFamilyName(); const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nListHeight = (sal_Int32)rFontHeightList.GetHeight(); - bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bListHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL); - bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bLabelDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellLabel = sCapBackup = rFontCP.GetFamilyName(); const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight(); - bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bLabelHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE); - bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bIdxDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellIndex = sIdxBackup = rFontIDX.GetFamilyName(); const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight(); - bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); + bIndexHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); } pStandardBox->SetText(sStdBackup ); pTitleBox->SetText(sOutBackup ); @@ -1187,7 +1187,7 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* ) void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) { const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT ) { const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); @@ -1209,7 +1209,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) case TBLVAR_CHGABS: pVarRB->Check(); break; } const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -1291,7 +1291,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, const SfxPoolItem* pItem = 0; SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; m_pOnOffCB->Check( aOpt.IsOn() ); @@ -1301,7 +1301,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, m_pFillTabRB->Check( FILL_TAB == eMode ); m_pFillSpaceRB->Check( FILL_SPACE == eMode ); - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) + if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { m_pTabCB->Hide(); @@ -1355,7 +1355,7 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) bool bRet = false; const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ) + if( SfxItemState::SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ) || ((SwShadowCursorItem&)*pItem) != aOpt ) { rSet->Put( aOpt ); @@ -1403,7 +1403,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem = 0; SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) + if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; m_pOnOffCB->Check( aOpt.IsOn() ); @@ -1420,7 +1420,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) m_pMathBaselineAlignmentCB->Hide(); } - if( SFX_ITEM_SET == rSet->GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem )) + if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem )) m_pCrsrInProtCB->Check(((const SfxBoolItem*)pItem)->GetValue()); m_pCrsrInProtCB->SaveValue(); @@ -2384,7 +2384,7 @@ void SwTestTabPage::Reset( const SfxItemSet* ) const SfxItemSet& rSet = GetItemSet(); const SwTestItem* pTestAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , false, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SWTEST , false, (const SfxPoolItem**)&pTestAttr )) { m_pTest1CBox->Check(pTestAttr->bTest1); diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index b29556d85faf..a2eb4d63339a 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1432,12 +1432,12 @@ void SwInsertDBColAutoPilot::SetTabSet() static const sal_uInt16 aIds[3] = { RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE }; for( int i = 0; i < 3; ++i ) - if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ], + if( SfxItemState::SET == pTblSet->GetItemState( aIds[ i ], false, &pItem ) && *pItem == aBrush ) pTblSet->ClearItem( aIds[ i ] ); } - if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, false, + if( SfxItemState::SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, false, &pItem ) && ((const SfxStringItem*)pItem)->GetValue() == rSh.GetTableFmt()->GetName() ) pTblSet->ClearItem( FN_PARAM_TABLE_NAME ); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 0adc59500e23..2938f272f2b9 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -128,7 +128,7 @@ bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, { const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, false, &pItem )) + if( SfxItemState::SET == pOutSet->GetItemState( RES_FRMMACRO, false, &pItem )) { rpINetItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() ); bRet = true; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 9ddfdfe1b572..22fbf2220657 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1077,31 +1077,31 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) SfxItemState eLRState = pOutSet->GetItemState( RES_LR_SPACE, false, &pLRSpaceItem); - if( SFX_ITEM_SET == eColState || - SFX_ITEM_SET == eBrushState || - SFX_ITEM_SET == eFtnState || - SFX_ITEM_SET == eEndState || - SFX_ITEM_SET == eBalanceState|| - SFX_ITEM_SET == eFrmDirState|| - SFX_ITEM_SET == eLRState) + if( SfxItemState::SET == eColState || + SfxItemState::SET == eBrushState || + SfxItemState::SET == eFtnState || + SfxItemState::SET == eEndState || + SfxItemState::SET == eBalanceState|| + SfxItemState::SET == eFrmDirState|| + SfxItemState::SET == eLRState) { SvTreeListEntry* pSelEntry = m_pTree->FirstSelected(); while( pSelEntry ) { SectReprPtr pRepr = (SectReprPtr)pSelEntry->GetUserData(); - if( SFX_ITEM_SET == eColState ) + if( SfxItemState::SET == eColState ) pRepr->GetCol() = *(SwFmtCol*)pColItem; - if( SFX_ITEM_SET == eBrushState ) + if( SfxItemState::SET == eBrushState ) pRepr->GetBackground() = *(SvxBrushItem*)pBrushItem; - if( SFX_ITEM_SET == eFtnState ) + if( SfxItemState::SET == eFtnState ) pRepr->GetFtnNtAtEnd() = *(SwFmtFtnAtTxtEnd*)pFtnItem; - if( SFX_ITEM_SET == eEndState ) + if( SfxItemState::SET == eEndState ) pRepr->GetEndNtAtEnd() = *(SwFmtEndAtTxtEnd*)pEndItem; - if( SFX_ITEM_SET == eBalanceState ) + if( SfxItemState::SET == eBalanceState ) pRepr->GetBalance().SetValue(((SwFmtNoBalancedColumns*)pBalanceItem)->GetValue()); - if( SFX_ITEM_SET == eFrmDirState ) + if( SfxItemState::SET == eFrmDirState ) pRepr->GetFrmDir().SetValue(((SvxFrameDirectionItem*)pFrmDirItem)->GetValue()); - if( SFX_ITEM_SET == eLRState ) + if( SfxItemState::SET == eLRState ) pRepr->GetLRSpace() = *(SvxLRSpaceItem*)pLRSpaceItem; pSelEntry = m_pTree->NextSelected(pSelEntry); @@ -1314,7 +1314,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) + if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) sPassword = ( (SfxStringItem*)pItem )->GetValue(); ::lcl_ReadSections(*pMedium, *m_pSubRegionED); } @@ -1462,7 +1462,7 @@ short SwInsertSectionTabDialog::Ok() { SfxRequest aRequest( pViewFrm, FN_INSERT_REGION); const SfxPoolItem* pCol; - if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, false, &pCol)) + if(SfxItemState::SET == pOutputItemSet->GetItemState(RES_COL, false, &pCol)) { aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS, ((const SwFmtCol*)pCol)->GetColumns().size())); @@ -1780,7 +1780,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); m_sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) + if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue(); m_pFileNameED->SetText( INetURLObject::decode( m_sFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) ); @@ -2120,7 +2120,7 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet) SetMetric(*m_pAfterMF , aMetric); SfxItemState eItemState = rSet->GetItemState( RES_LR_SPACE ); - if ( eItemState >= SFX_ITEM_DEFAULT ) + if ( eItemState >= SfxItemState::DEFAULT ) { const SvxLRSpaceItem& rSpace = (const SvxLRSpaceItem&)rSet->Get( RES_LR_SPACE ); diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 4ac2e1063e0d..3250894abcd8 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -305,7 +305,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet(); sal_uInt16 nNewDist; - if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, + if( SfxItemState::SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, false, &pItem ) && nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) { diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 5ddb5ce8859d..5c1fb3ded31c 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -343,10 +343,10 @@ short SwTemplateDlg::Ok() if( RET_OK == nRet ) { const SfxPoolItem *pOutItem, *pExItem; - if( SFX_ITEM_SET == pExampleSet->GetItemState( + if( SfxItemState::SET == pExampleSet->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pExItem ) && ( !GetOutputItemSet() || - SFX_ITEM_SET != GetOutputItemSet()->GetItemState( + SfxItemState::SET != GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pOutItem ) || *pExItem != *pOutItem )) { diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index a05f16b4a88d..d7f5ad88759c 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -311,7 +311,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) } pTabPage->FillItemSet(pSet); - if(pSelectionSet && SFX_ITEM_SET == pSelectionSet->GetItemState(RES_COL)) + if(pSelectionSet && SfxItemState::SET == pSelectionSet->GetItemState(RES_COL)) { //insert region with columns const SwFmtCol& rColItem = (const SwFmtCol&)pSelectionSet->Get(RES_COL); @@ -335,7 +335,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) rWrtShell.SetSectionAttr( *pSectionSet ); } - if(pPageSet && SFX_ITEM_SET == pPageSet->GetItemState(RES_COL) && bPageChanged) + if(pPageSet && SfxItemState::SET == pPageSet->GetItemState(RES_COL) && bPageChanged) { // deterine current PageDescriptor and fill the Set with it const sal_uInt16 nCurIdx = rWrtShell.GetCurPageDesc(); @@ -344,7 +344,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) rFmt.SetFmtAttr(pPageSet->Get(RES_COL)); rWrtShell.ChgPageDesc(nCurIdx, aPageDesc); } - if(pFrameSet && SFX_ITEM_SET == pFrameSet->GetItemState(RES_COL) && bFrameChanged) + if(pFrameSet && SfxItemState::SET == pFrameSet->GetItemState(RES_COL) && bFrameChanged) { SfxItemSet aTmp(*pFrameSet->GetPool(), RES_COL, RES_COL); aTmp.Put(*pFrameSet); @@ -601,14 +601,14 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) if(m_pBalanceColsCB->IsVisible()) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet->GetItemState( RES_COLUMNBALANCE, false, &pItem )) + if( SfxItemState::SET == rSet->GetItemState( RES_COLUMNBALANCE, false, &pItem )) m_pBalanceColsCB->Check(!((const SwFmtNoBalancedColumns*)pItem)->GetValue()); else m_pBalanceColsCB->Check( true ); } //text direction - if( SFX_ITEM_DEFAULT <= rSet->GetItemState( RES_FRAMEDIR ) ) + if( SfxItemState::DEFAULT <= rSet->GetItemState( RES_FRAMEDIR ) ) { const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet->Get(RES_FRAMEDIR); sal_uIntPtr nVal = rItem.GetValue(); @@ -1156,7 +1156,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) { if(!bFrm) { - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) { const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( SID_ATTR_PAGE_SIZE); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index b1c6c5705891..3ad6d4a6f1ee 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -865,9 +865,9 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) const SfxPoolItem* pItem = NULL; const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet->Get(RES_ANCHOR); - if (SFX_ITEM_SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem)) + if (SfxItemState::SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem)) m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue(); - if (SFX_ITEM_SET == rSet->GetItemState(FN_MATH_BASELINE_ALIGNMENT, false, &pItem)) + if (SfxItemState::SET == rSet->GetItemState(FN_MATH_BASELINE_ALIGNMENT, false, &pItem)) m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue(); EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); @@ -897,7 +897,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) { OSL_ENSURE(pSh , "shell not found"); //OS: only for the variant Insert/Graphic/Properties - if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_GRF_REALSIZE, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_GRF_REALSIZE, false, &pItem)) aGrfSize = ((const SvxSizeItem*)pItem)->GetSize(); else pSh->GetGrfSize( aGrfSize ); @@ -1822,7 +1822,7 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl) // all columns have to be correct if(GetTabDialog()->GetExampleSet() && - SFX_ITEM_DEFAULT <= GetTabDialog()->GetExampleSet()->GetItemState(RES_COL)) + SfxItemState::DEFAULT <= GetTabDialog()->GetExampleSet()->GetItemState(RES_COL)) { const SwFmtCol& rCol = (const SwFmtCol&)GetTabDialog()->GetExampleSet()->Get(RES_COL); if ( rCol.GetColumns().size() > 1 ) @@ -2232,7 +2232,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) nUpperBorder = rUL.GetUpper(); nLowerBorder = rUL.GetLower(); - if(SFX_ITEM_SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO)) + if(SfxItemState::SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO)) { m_pFixedRatioCB->Check(((const SfxBoolItem&)rSet.Get(FN_KEEP_ASPECT_RATIO)).GetValue()); m_pFixedRatioCB->SaveValue(); @@ -2387,7 +2387,7 @@ void SwGrfExtPage::Reset(const SfxItemSet *rSet) const sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; - if( SFX_ITEM_SET == rSet->GetItemState( FN_PARAM_GRF_CONNECT, true, &pItem) + if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_GRF_CONNECT, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue() ) { m_pBrowseBT->Enable(); @@ -2407,9 +2407,9 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) bool bEnableMirrorRB = false; SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, true, &pItem); - if( SFX_ITEM_UNKNOWN != eState && !bProtCntnt && !bHtmlMode ) + if( SfxItemState::UNKNOWN != eState && !bProtCntnt && !bHtmlMode ) { - if( SFX_ITEM_SET != eState ) + if( SfxItemState::SET != eState ) pItem = &rSet.Get( RES_GRFATR_MIRRORGRF ); bEnable = true; @@ -2450,7 +2450,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) } } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, false, &pItem ) ) { const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem; if( !rBrush.GetGraphicLink().isEmpty() ) @@ -2719,7 +2719,7 @@ SwFrmURLPage::~SwFrmURLPage() void SwFrmURLPage::Reset( const SfxItemSet *rSet ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rSet->GetItemState( SID_DOCFRAME, true, &pItem)) + if ( SfxItemState::SET == rSet->GetItemState( SID_DOCFRAME, true, &pItem)) { boost::scoped_ptr<TargetList> pList(new TargetList); ((const SfxFrameItem*)pItem)->GetFrame()->GetTargetList(*pList); @@ -2733,7 +2733,7 @@ void SwFrmURLPage::Reset( const SfxItemSet *rSet ) } } - if ( SFX_ITEM_SET == rSet->GetItemState( RES_URL, true, &pItem ) ) + if ( SfxItemState::SET == rSet->GetItemState( RES_URL, true, &pItem ) ) { const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem; pURLED->SetText( INetURLObject::decode( pFmtURL->GetURL(), @@ -2885,7 +2885,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) m_pContentAlignFrame->Hide(); } - if(SFX_ITEM_SET == rSet->GetItemState(FN_SET_FRM_ALT_NAME, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_SET_FRM_ALT_NAME, false, &pItem)) { pAltNameED->SetText(((const SfxStringItem*)pItem)->GetValue()); pAltNameED->SaveValue(); @@ -2896,7 +2896,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) // insert graphic - properties // bNew is not set, so recognise by selection OUString aTmpName1; - if(SFX_ITEM_SET == rSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) + if(SfxItemState::SET == rSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) { aTmpName1 = ((const SfxStringItem*)pItem)->GetValue(); } @@ -3004,7 +3004,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) SfxItemState eState; if( (!bHtmlMode || (0 != (nHtmlMode&HTMLMODE_SOME_STYLES))) && sDlgType != "PictureDialog" && sDlgType != "ObjectDialog" && - SFX_ITEM_UNKNOWN != ( eState = rSet->GetItemState( + SfxItemState::UNKNOWN != ( eState = rSet->GetItemState( RES_FRAMEDIR, true )) ) { pTextFlowFT->Show(); @@ -3031,7 +3031,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) } // Content alignment - if ( rSet->GetItemState(RES_TEXT_VERT_ADJUST) > SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState(RES_TEXT_VERT_ADJUST) > SfxItemState::DEFAULT ) { SdrTextVertAdjust nAdjust = ((const SdrTextVertAdjustItem&)rSet->Get(RES_TEXT_VERT_ADJUST)).GetValue(); sal_Int32 nPos = 0; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 33d898490f21..58659f1a623f 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -528,7 +528,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) boost::scoped_ptr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG )); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK && - SFX_ITEM_SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) ) + SfxItemState::SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) ) { const SvxMacroTableDtor& rTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); pGlossaryHdl->SetMacros( m_pShortNameEdit->GetText(), diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 3cde10f07f5e..08362914a24e 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -366,7 +366,7 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) sal_uInt16 nTmpNumLvl = pOutlineDlg ? SwOutlineTabDialog::GetActNumLevel() : 0; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); - if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SFX_ITEM_UNKNOWN) + if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SfxItemState::UNKNOWN) { bPreset = ((const SfxBoolItem*)pItem)->GetValue(); } @@ -428,7 +428,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet* rSet ) pSaveNum = pOutlineDlg->GetNumRule(); m_pLevelLB->EnableMultiSelection(false); } - else if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_ACT_NUMBER, false, &pItem)) + else if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_ACT_NUMBER, false, &pItem)) pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule(); nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index ac5b3ee5e5e5..ee077af26f8e 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -308,7 +308,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) lMaxHeight = rSize.GetSize().Height(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -322,7 +322,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } } - if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET), + if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET), false, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -337,7 +337,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } } - if ( rSet.GetItemState( RES_UL_SPACE , false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( RES_UL_SPACE , false ) == SfxItemState::SET ) { const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE ); lMaxHeight -= rUL.GetUpper() + rUL.GetLower(); diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index dd656f2da1c7..f3cc570b0c23 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -189,7 +189,7 @@ bool SwTextGridPage::FillItemSet(SfxItemSet *rSet) void SwTextGridPage::Reset(const SfxItemSet *rSet) { - if(SFX_ITEM_DEFAULT <= rSet->GetItemState(RES_TEXTGRID, true)) + if(SfxItemState::DEFAULT <= rSet->GetItemState(RES_TEXTGRID, true)) { const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet->Get(RES_TEXTGRID); RadioButton* pButton = 0; @@ -278,7 +278,7 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet) void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) { - if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, true )) + if( SfxItemState::UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, true )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); @@ -286,7 +286,7 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT; } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) { const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( SID_ATTR_PAGE_SIZE); diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index b31cba9504b5..232c9e25672b 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -36,7 +36,7 @@ namespace if (pSh->GetCurAttr( aSet )) { const SfxPoolItem* pItem(0); - if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem) + if (SfxItemState::SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem) { ::boost::optional<sal_uInt16> oNumOffset = ((const SwFmtPageDesc *)pItem)->GetNumOffset(); if (oNumOffset) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 68c2b34a54e3..2252272406e0 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -96,7 +96,7 @@ SwFormatTablePage::SwFormatTablePage(Window* pParent, const SfxItemSet& rSet) SetExchangeSupport(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem)) bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled(); @@ -445,13 +445,13 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) SetMetric(*m_pBottomMF, aMetric); //Name - if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) { m_pNameED->SetText(((const SfxStringItem*)pItem)->GetValue()); m_pNameED->SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nMinTableWidth = pTblData->GetColCount() * MINLAY; @@ -542,7 +542,7 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) } //Margins - if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, false,&pItem )) + if(SfxItemState::SET == rSet.GetItemState( RES_UL_SPACE, false,&pItem )) { m_pTopMF->SetValue(m_pTopMF->Normalize( ((const SvxULSpaceItem*)pItem)->GetUpper()), FUNIT_TWIP); @@ -553,7 +553,7 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) } //Text direction - if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) { sal_uIntPtr nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); const sal_Int32 nPos = m_pTextDirectionLB->GetEntryPos( (void*) nVal ); @@ -571,7 +571,7 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet ) { OSL_ENSURE(pTblData, "table data not available?"); - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP )) { SwTwips nCurWidth = text::HoriOrientation::FULL != pTblData->GetAlign() ? pTblData->GetWidth() : @@ -745,7 +745,7 @@ SwTableColumnPage::SwTableColumnPage(Window* pParent, const SfxItemSet& rSet) SetExchangeSupport(); const SfxPoolItem* pItem; - Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) + Init((SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)); } @@ -765,7 +765,7 @@ void SwTableColumnPage::Reset( const SfxItemSet* ) const SfxItemSet& rSet = GetItemSet(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nNoOfVisibleCols = pTblData->GetColCount(); @@ -1299,7 +1299,7 @@ SwTextFlowPage::SwTextFlowPage(Window* pParent, const SfxItemSet& rSet) #ifndef SW_FILEFORMAT_40 const SfxPoolItem *pItem; - if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) + if(SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) #endif { @@ -1457,12 +1457,12 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) m_pPageCollLB->InsertEntry( aFmtName ); - if(SFX_ITEM_SET == rSet->GetItemState( RES_KEEP, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_KEEP, false, &pItem )) { m_pKeepCB->Check( ((const SvxFmtKeepItem*)pItem)->GetValue() ); m_pKeepCB->SaveValue(); } - if(SFX_ITEM_SET == rSet->GetItemState( RES_LAYOUT_SPLIT, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_LAYOUT_SPLIT, false, &pItem )) { m_pSplitCB->Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() ); } @@ -1472,7 +1472,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pSplitCB->SaveValue(); SplitHdl_Impl(m_pSplitCB); - if(SFX_ITEM_SET == rSet->GetItemState( RES_ROW_SPLIT, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_ROW_SPLIT, false, &pItem )) { m_pSplitRowCB->Check( ((const SwFmtRowSplit*)pItem)->GetValue() ); } @@ -1482,7 +1482,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) if(bPageBreak) { - if(SFX_ITEM_SET == rSet->GetItemState( RES_PAGEDESC, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_PAGEDESC, false, &pItem )) { OUString sPageDesc; const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc(); @@ -1522,7 +1522,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) } } - if(SFX_ITEM_SET == rSet->GetItemState( RES_BREAK, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( RES_BREAK, false, &pItem )) { const SvxFmtBreakItem* pPageBreak = (const SvxFmtBreakItem*)pItem; SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue(); @@ -1585,7 +1585,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pPageCollLB->Enable(false); } - if(SFX_ITEM_SET == rSet->GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem )) + if(SfxItemState::SET == rSet->GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem )) { sal_uInt16 nRep = ((const SfxUInt16Item*)pItem)->GetValue(); m_pHeadLineCB->Check( nRep > 0 ); @@ -1594,13 +1594,13 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pRepeatHeaderNF->SetMin( 1 ); m_pRepeatHeaderNF->SaveValue(); } - if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SfxItemState::DEFAULT ) { sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet->Get(FN_TABLE_BOX_TEXTORIENTATION)).GetValue(); m_pTextDirectionLB->SelectEntryPos(m_pTextDirectionLB->GetEntryPos( (const void*)nDirection )); } - if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_DEFAULT ) + if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SfxItemState::DEFAULT ) { sal_uInt16 nVert = ((const SfxUInt16Item&)rSet->Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); sal_uInt16 nPos = 0; diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 6bc7f33a1683..3a96259ee8df 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -316,7 +316,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs //set the first used database as default source on the config item const SfxPoolItem* pItem = 0; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( + if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_DATABASE_PROPERTIES, false, &pItem)) { //mailmerge has been called from the database beamer @@ -603,7 +603,7 @@ void SwModule::ExecOther(SfxRequest& rReq) break; case SID_ATTR_METRIC: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nWhich, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(nWhich, false, &pItem)) { FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue(); switch( eUnit ) @@ -629,7 +629,7 @@ void SwModule::ExecOther(SfxRequest& rReq) bool bWebView = 0 != PTR_CAST(SwWebView, ::GetActiveView() ), bSet; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich, false, &pItem )) bSet = ((SfxBoolItem*)pItem)->GetValue(); else @@ -707,7 +707,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } else if(dynamic_cast<const SfxItemSetHint*>(&rHint)) { - if( SFX_ITEM_SET == ((SfxItemSetHint&)rHint).GetItemSet().GetItemState(SID_ATTR_PATHNAME)) + if( SfxItemState::SET == ((SfxItemSetHint&)rHint).GetItemSet().GetItemState(SID_ATTR_PATHNAME)) { ::GetGlossaries()->UpdateGlosPath( false ); SwGlossaryList* pList = ::GetGlossaryList(); diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx index c78c16389aff..cbf9093b5f03 100644 --- a/sw/source/uibase/app/appopt.cxx +++ b/sw/source/uibase/app/appopt.cxx @@ -258,7 +258,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) : NULL; // Interpret the page Documentview - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_DOCDISP, false, &pItem )) { const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem; @@ -284,21 +284,21 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Elements - interpret Item - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ELEM, false, &pItem ) ) { const SwElemItem* pElemItem = (const SwElemItem*)pItem; pElemItem->FillViewOptions( aViewOpt ); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(SID_ATTR_METRIC, false, &pItem ) ) { SfxGetpApp()->SetOptions(rSet); PutItem(*pItem); const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; ::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, + if( SfxItemState::SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem ) ) { SfxGetpApp()->SetOptions(rSet); @@ -306,7 +306,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) ::SetApplyCharUnit(pCharItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(FN_HSCROLL_METRIC, false, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -315,7 +315,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) pAppView->ChangeTabMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(FN_VSCROLL_METRIC, false, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -324,7 +324,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) pAppView->ChangeVRulerMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem ) ) + if( SfxItemState::SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem ) ) { sal_uInt16 nTabDist = ((const SfxUInt16Item*)pItem)->GetValue(); pPref->SetDefTab(nTabDist); @@ -337,7 +337,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Background only in WebDialog - if(SFX_ITEM_SET == rSet.GetItemState(RES_BACKGROUND)) + if(SfxItemState::SET == rSet.GetItemState(RES_BACKGROUND)) { const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rSet.Get( RES_BACKGROUND); @@ -345,7 +345,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Interpret page Grid Settings - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, false, &pItem )) { const SvxGridItem* pGridItem = (const SvxGridItem*)pItem; @@ -372,7 +372,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } // Interpret Writer Printer Options - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, &pItem )) { SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog); if (pOpt) @@ -386,7 +386,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) { ((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt ); if(pBindings) @@ -404,7 +404,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) rWrtSh.AlignAllFormulasToBaseline(); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem )) { aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue()); } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 9cecce991bd6..2a1f7e2d7ecd 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -157,7 +157,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, bool bAPICall = false; const SfxPoolItem* pApiItem; const SfxItemSet* pMedSet; - if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SFX_ITEM_SET == + if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SfxItemState::SET == pMedSet->GetItemState( FN_API_CALL, true, &pApiItem ) ) bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue(); @@ -202,7 +202,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { const SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem *pPassItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, true, &pPassItem)) + if(pSet && SfxItemState::SET == pSet->GetItemState(SID_PASSWORD, true, &pPassItem)) aPasswd = ((const SfxStringItem *)pPassItem)->GetValue(); } @@ -227,7 +227,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, SwAsciiOptions aOpt; const SfxItemSet* pSet; const SfxPoolItem* pItem; - if( 0 != ( pSet = rMedium.GetItemSet() ) && SFX_ITEM_SET == + if( 0 != ( pSet = rMedium.GetItemSet() ) && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() ); @@ -699,7 +699,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) const SfxPoolItem* pItem; if( 0 != ( pSet = rMedium.GetItemSet() ) ) { - if( SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, + if( SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) sItemOpt = ((const SfxStringItem*)pItem)->GetValue(); } @@ -1291,7 +1291,7 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword ) IDocumentRedlineAccess* pIDRA = mpWrtShell->getIDocumentRedlineAccess(); Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword(); - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0)) return false; @@ -1326,7 +1326,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal IDocumentRedlineAccess* pIDRA = mpWrtShell->getIDocumentRedlineAccess(); Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() ); - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) + if (pArgs && SfxItemState::SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0)) return false; rPasswordHash = aPasswdHash; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 5caaaf7dc655..4da0bb889835 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -362,7 +362,7 @@ void SwDocShell::Execute(SfxRequest& rReq) aSet.Put( aSwOptions ); const SfxPoolItem* pOpenSmartTagOptionsItem = 0; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, false, &pOpenSmartTagOptionsItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, false, &pOpenSmartTagOptionsItem ) ) aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) ); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -425,7 +425,7 @@ void SwDocShell::Execute(SfxRequest& rReq) pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this); } - if( pArgs && SFX_ITEM_SET == + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_PRINTPREVIEW, false, &pItem )) bSet = ((SfxBoolItem*)pItem)->GetValue(); else @@ -858,7 +858,7 @@ void SwDocShell::Execute(SfxRequest& rReq) sal_Int32 nTemplateOutlineLevel = 0; OUString aFileName, aTemplateName; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, false, &pItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich, false, &pItem ) ) { aFileName = ((const SfxStringItem*)pItem)->GetValue(); SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, false ); @@ -1095,7 +1095,7 @@ void SwDocShell::Execute(SfxRequest& rReq) break; case SID_ATTR_YEAR2000: - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , false, &pItem )) + if ( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich , false, &pItem )) { OSL_ENSURE(pItem->ISA(SfxUInt16Item), "wrong Item"); sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue(); @@ -1529,7 +1529,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh, if( pMed && pMed->GetURLObject() == aTmpObj ) { const SfxPoolItem* pItem; - if( ( SFX_ITEM_SET == pMed->GetItemSet()->GetItemState( + if( ( SfxItemState::SET == pMed->GetItemSet()->GetItemState( SID_VERSION, false, &pItem ) ) ? (nVersion == ((SfxInt16Item*)pItem)->GetValue()) : !nVersion ) diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 9f29674aad81..a04d1ff949c0 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -270,7 +270,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) pColl = mpDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); if( !bHTMLTemplSet || - SFX_ITEM_SET != pColl->GetAttrSet().GetItemState( + SfxItemState::SET != pColl->GetAttrSet().GetItemState( nFontWhich, false ) ) { pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index d6cc65467c6c..77ac35ee8120 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -276,21 +276,21 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) switch (nSlot) { case SID_STYLE_NEW: - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, false, &pItem )) { const sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); OUString sName; sal_uInt16 nMask = 0; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW, + if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_NEW, false, &pItem )) sName = ((const SfxStringItem*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK, + if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_MASK, false, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); OUString sParent; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, + if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_REFERENCE, false, &pItem )) sParent = ((const SfxStringItem*)pItem)->GetValue(); @@ -384,14 +384,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) SAL_WARN_IF( !pArgs->Count(), "sw.ui", "SfxBug ItemSet is empty" ); SwWrtShell* pShell = GetWrtShell(); - if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem )) aParam = ((const SfxStringItem*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY, + if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_FAMILY, false, &pItem )) nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, false, &pItem )) { OUString aFamily = ((const SfxStringItem*)pItem)->GetValue(); if(aFamily.equalsAscii("CharacterStyles")) @@ -410,10 +410,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) nFamily = SFX_STYLE_FAMILY_PSEUDO; } - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK, + if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_MASK, false, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL, + if( SfxItemState::SET == pArgs->GetItemState(FN_PARAM_WRTSHELL, false, &pItem )) pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue(); @@ -443,7 +443,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) } break; case SFX_STYLE_FAMILY_PSEUDO: - if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, false, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, false, &pItem)) { aParam = ((const SfxStringItem*)pItem)->GetValue(); } @@ -587,7 +587,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl) if( SFX_STYLE_FAMILY_PAGE == m_nFamily && SvtLanguageOptions().IsCTLFontEnabled() ) { const SfxPoolItem *pItem = NULL; - if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false ) , true, &pItem ) == SFX_ITEM_SET ) + if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false ) , true, &pItem ) == SfxItemState::SET ) SwChartHelper::DoUpdateAllCharts( pDoc ); } } diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 3da6a018c318..bd515dd98731 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -1272,7 +1272,7 @@ void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet ) OSL_ENSURE( pColl, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style"); if ( pColl->AreListLevelIndentsApplicable() ) { - OSL_ENSURE( pColl->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET, + OSL_ENSURE( pColl->GetItemState( RES_PARATR_NUMRULE ) == SfxItemState::SET, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect -> please inform OD." ); const OUString sNumRule = pColl->GetNumRule().GetValue(); if (!sNumRule.isEmpty()) @@ -1329,13 +1329,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { OSL_ENSURE(pColl, "Where's Collection"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) + if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) { pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } const SwCondCollItem* pCondItem; - if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, false, + if( SfxItemState::SET != rSet.GetItemState( FN_COND_COLL, false, (const SfxPoolItem**)&pCondItem )) pCondItem = 0; @@ -1393,9 +1393,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, pColl = pCColl; } if ( bResetIndentAttrsAtParagraphStyle && - rSet.GetItemState( RES_PARATR_NUMRULE, false, 0 ) == SFX_ITEM_SET && - rSet.GetItemState( RES_LR_SPACE, false, 0 ) != SFX_ITEM_SET && - pColl->GetItemState( RES_LR_SPACE, false, 0 ) == SFX_ITEM_SET ) + rSet.GetItemState( RES_PARATR_NUMRULE, false, 0 ) == SfxItemState::SET && + rSet.GetItemState( RES_LR_SPACE, false, 0 ) != SfxItemState::SET && + pColl->GetItemState( RES_LR_SPACE, false, 0 ) == SfxItemState::SET ) { rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl ); } @@ -1405,7 +1405,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, // neither the paragraph style nor the numbering style is used in the document // the numbering style will not be saved with the document and the assignment got lost. const SfxPoolItem* pNumRuleItem = 0; - if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, false, &pNumRuleItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, false, &pNumRuleItem ) ) { // Setting a numbering rule? const OUString sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue(); if (!sNumRule.isEmpty()) @@ -1454,7 +1454,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { OSL_ENSURE(pFrmFmt, "Where's FrmFmt"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) + if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate )) { pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } @@ -1489,7 +1489,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, const SfxPoolItem* pItem; switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem )) { - case SFX_ITEM_SET: + case SfxItemState::SET: { SvxNumRule* pSetRule = ((SvxNumBulletItem*)pItem)->GetNumRule(); pSetRule->UnLinkGraphics(); @@ -1498,7 +1498,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, rDoc.ChgNumRuleFmts( aSetRule ); } break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: // set NumRule to default values // what are the default values? { diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 91c0752d4b3c..72aa8c63c840 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -93,7 +93,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) { const SfxPoolItem *pItem = 0; OUString aTmpStr; - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_NAME, true, &pItem) ) { const OUString sRemoveWhenUniStringIsGone = ((const SfxStringItem *)pItem)->GetValue(); @@ -106,8 +106,8 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr)); aSet.Put( *pSet ); - if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, false, &pItem)|| - SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, false, &pItem)) + if(SfxItemState::SET == pSet->GetItemState(SID_ATTR_COLUMNS, false, &pItem)|| + SfxItemState::SET == pSet->GetItemState(FN_INSERT_REGION, false, &pItem)) { SwFmtCol aCol; SwRect aRect; @@ -121,17 +121,17 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) aSet.Put(aCol); } } - else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, false, &pItem)) + else if(SfxItemState::SET == pSet->GetItemState(RES_COL, false, &pItem)) { aSet.Put(*pItem); } - const bool bHidden = SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_REGION_HIDDEN, true, &pItem) && + const bool bHidden = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_HIDDEN, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue(); - const bool bProtect = SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_REGION_PROTECT, true, &pItem) && + const bool bProtect = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_PROTECT, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue(); // #114856# edit in readonly sections - const bool bEditInReadonly = SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, true, &pItem) && + const bool bEditInReadonly = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, true, &pItem) && ((const SfxBoolItem *)pItem)->GetValue(); aSection.SetProtectFlag(bProtect); @@ -139,16 +139,16 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) // #114856# edit in readonly sections aSection.SetEditInReadonlyFlag(bEditInReadonly); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_CONDITION, true, &pItem)) aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue()); OUString aFile, aSub; - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_1, true, &pItem)) aFile = ((const SfxStringItem *)pItem)->GetValue(); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_3, true, &pItem)) aSub = ((const SfxStringItem *)pItem)->GetValue(); @@ -158,7 +158,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) sLinkFileName += OUString(sfx2::cTokenSeparator); sLinkFileName = comphelper::string::setToken(sLinkFileName, 0, sfx2::cTokenSeparator, aFile); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pSet->GetItemState(FN_PARAM_2, true, &pItem)) { sLinkFileName = comphelper::string::setToken(sLinkFileName, 1, sfx2::cTokenSeparator, diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index d16fb4ee5072..6bb20f076d42 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -439,7 +439,7 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot ) // Create a box info item... needed by the dialog SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; - if ( SFX_ITEM_SET == pHFFmt->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER, + if ( SfxItemState::SET == pHFFmt->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo) ) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; @@ -453,17 +453,17 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot ) if ( svx::ShowBorderBackgroundDlg( this, &aSet, true ) ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == aSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { + if ( SfxItemState::SET == aSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { pHFFmt->SetFmtAttr( *pItem ); rView.GetDocShell()->SetModified(true); } - if ( SFX_ITEM_SET == aSet.GetItemState( RES_BOX, false, &pItem ) ) { + if ( SfxItemState::SET == aSet.GetItemState( RES_BOX, false, &pItem ) ) { pHFFmt->SetFmtAttr( *pItem ); rView.GetDocShell()->SetModified(true); } - if ( SFX_ITEM_SET == aSet.GetItemState( RES_SHADOW, false, &pItem ) ) { + if ( SfxItemState::SET == aSet.GetItemState( RES_SHADOW, false, &pItem ) ) { pHFFmt->SetFmtAttr( *pItem ); rView.GetDocShell()->SetModified(true); } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 5030a4a2c272..debc067ebbb3 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -770,7 +770,7 @@ static sal_uInt16 lcl_isNonDefaultLanguage(LanguageType eBufferLanguage, SwView& SfxItemSet aLangSet(rView.GetPool(), nWhich, nWhich); SwWrtShell& rSh = rView.GetWrtShell(); rSh.GetCurAttr(aLangSet); - if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, true)) + if(SfxItemState::DEFAULT <= aLangSet.GetItemState(nWhich, true)) { LanguageType eLang = static_cast<const SvxLanguageItem&>(aLangSet.Get(nWhich)).GetLanguage(); if ( eLang == eBufferLanguage ) @@ -2205,7 +2205,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { SfxItemSet aSet(rSh.GetAttrPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, false)) + if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false)) { const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, true); bNormalChar = false; diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index fa3c14755b4b..bd9470517eaa 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -61,7 +61,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD { SfxPoolItem *_pItem = 0; SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem ); - if (eState >= SFX_ITEM_DEFAULT) + if (eState >= SfxItemState::DEFAULT) { EnableItem( nMID, true ); if (_pItem) @@ -115,7 +115,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : aGraphic = *pGrf; const SwFrmFmt* pGrfFmt = rSh.GetFmtFromObj( rDocPos ); const SfxPoolItem* pURLItem; - if( pGrfFmt && SFX_ITEM_SET == pGrfFmt->GetItemState( + if( pGrfFmt && SfxItemState::SET == pGrfFmt->GetItemState( RES_URL, true, &pURLItem )) { const SwFmtURL& rURL = *(SwFmtURL*)pURLItem; @@ -202,14 +202,14 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState ); Check( MN_READONLY_COPY, SID_COPY, rDis ); - if(eState < SFX_ITEM_DEFAULT) + if(eState < SfxItemState::DEFAULT) EnableItem( MN_READONLY_COPY, false ); delete pState; pState = NULL; eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState ); if ( - eState < SFX_ITEM_DEFAULT || + eState < SfxItemState::DEFAULT || (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) ) { diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index c8f0d2004a58..7e68f4cb45ce 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -44,7 +44,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) { SfxItemPool* pPool = rSet.GetPool(); sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE ); - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // alignment const SvxPageItem* pPage = (const SvxPageItem*)&rSet.Get( nWhich ); @@ -55,14 +55,14 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) nWhich = pPool->GetWhich( SID_ATTR_PAGE_SIZE ); - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // orientation and size from PageItem const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich ); SetSize( rSize.GetSize() ); } nWhich = RES_LR_SPACE; - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // set left and right border const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( nWhich ); @@ -78,7 +78,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) nWhich = RES_UL_SPACE; - if ( rSet.GetItemState( nWhich, false ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET ) { // set upper and lower border const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( nWhich ); @@ -94,7 +94,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) // evaluate header-attributes const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET), + if( SfxItemState::SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -117,7 +117,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetHdRight( rLR.GetRight() ); SetHeader( true ); - if(SFX_ITEM_SET == rHeaderSet.GetItemState(RES_BACKGROUND)) + if(SfxItemState::SET == rHeaderSet.GetItemState(RES_BACKGROUND)) { //UUUU create FillAttributes from SvxBrushItem //SetHdColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(RES_BACKGROUND)); @@ -130,7 +130,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) aTempSet))); } - if ( rHeaderSet.GetItemState( RES_BOX ) == SFX_ITEM_SET ) + if ( rHeaderSet.GetItemState( RES_BOX ) == SfxItemState::SET ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rHeaderSet.Get( RES_BOX ); @@ -141,7 +141,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetHeader( false ); } - if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET), + if( SfxItemState::SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET), false, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -164,7 +164,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetFtRight( rLR.GetRight() ); SetFooter( true ); - if( rFooterSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET ) + if( rFooterSet.GetItemState( RES_BACKGROUND ) == SfxItemState::SET ) { //UUUU create FillAttributes from SvxBrushItem //SetFtColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rFooterSet.Get(RES_BACKGROUND)); @@ -177,7 +177,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) aTempSet))); } - if( rFooterSet.GetItemState( RES_BOX ) == SFX_ITEM_SET ) + if( rFooterSet.GetItemState( RES_BOX ) == SfxItemState::SET ) { const SvxBoxItem& rItem = (const SvxBoxItem&)rFooterSet.Get( RES_BOX ); @@ -188,7 +188,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetFooter( false ); } - if(SFX_ITEM_SET == rSet.GetItemState(RES_BACKGROUND, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(RES_BACKGROUND, false, &pItem)) { //UUUU create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(*pItem); @@ -595,9 +595,9 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet ) { DELETEZ(pGridItem); //get the grid information - if(SFX_ITEM_DEFAULT <= rSet.GetItemState(RES_TEXTGRID, true)) + if(SfxItemState::DEFAULT <= rSet.GetItemState(RES_TEXTGRID, true)) pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone(); - if( SFX_ITEM_DEFAULT <= rSet.GetItemState( RES_FRAMEDIR, true )) + if( SfxItemState::DEFAULT <= rSet.GetItemState( RES_FRAMEDIR, true )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index b054d13ba610..241cf8c03c85 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -115,7 +115,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm() { const SfxPoolItem* pItem = 0; - if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SFX_ITEM_SET) + if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SfxItemState::SET) m_pOwnSh->SetFlyName(((SfxStringItem *)pItem)->GetValue()); m_pOwnSh->SetModified(); @@ -137,11 +137,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm() { //JP 6.8.2001: set never an invalid anchor into the core. const SfxPoolItem *pGItem, *pItem; - if( SFX_ITEM_SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem )) + if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem )) { SfxItemSet aGetSet( *m_aSet.GetPool(), RES_ANCHOR, RES_ANCHOR ); if( m_pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() && - SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem ) + SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem ) && ((SwFmtAnchor*)pGItem)->GetAnchorId() == ((SwFmtAnchor*)pItem)->GetAnchorId() ) m_aSet.ClearItem( RES_ANCHOR ); diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 6fa877697c3d..99194aeda233 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -92,7 +92,7 @@ static void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq ) static void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) { - if( SFX_ITEM_DEFAULT >= rSet.GetItemState( SID_SAVEDOC, false )) + if( SfxItemState::DEFAULT >= rSet.GetItemState( SID_SAVEDOC, false )) { if( !rSh.GetDoc()->getIDocumentState().IsModified() ) rSet.DisableItem( SID_SAVEDOC ); diff --git a/sw/source/uibase/ribbar/tbxanchr.cxx b/sw/source/uibase/ribbar/tbxanchr.cxx index d111348b1d97..1a2d9661d6b2 100644 --- a/sw/source/uibase/ribbar/tbxanchr.cxx +++ b/sw/source/uibase/ribbar/tbxanchr.cxx @@ -51,9 +51,9 @@ SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { const SfxUInt16Item* pItem = PTR_CAST( SfxUInt16Item, pState ); if(pItem) diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 9fd4c0cb4375..aed90d456adf 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -93,9 +93,9 @@ void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, const SfxPoolItem* pState ) { sal_uInt16 nId = GetId(); - GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( nId, (GetItemState(pState) != SfxItemState::DISABLED) ); - if( eState == SFX_ITEM_DEFAULT ) + if( eState == SfxItemState::DEFAULT ) { const SfxImageItem* pItem = PTR_CAST( SfxImageItem, pState ); if(pItem) @@ -238,7 +238,7 @@ void SwTbxAutoTextCtrl::StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); } IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) @@ -344,8 +344,8 @@ void SwTbxFieldCtrl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); - if (eState >= SFX_ITEM_DEFAULT) + GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); + if (eState >= SfxItemState::DEFAULT) { GetToolBox().CheckItem( GetId(), ((SfxBoolItem*)pState)->GetValue() ); } @@ -739,9 +739,9 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/, const SfxPoolItem* pState ) { sal_uInt16 nId = GetId(); - GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); + GetToolBox().EnableItem( nId, (GetItemState(pState) != SfxItemState::DISABLED) ); SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() ); - if(SFX_ITEM_DEFAULT <= eState) + if(SfxItemState::DEFAULT <= eState) { OUString sZoom(unicode::formatPercent(((const SfxUInt16Item*)pState)->GetValue(), Application::GetSettings().GetUILanguageTag())); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index a691a2b246cd..29016e619d9a 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -566,7 +566,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; const SfxPoolItem* pPoolItem; - if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) + if( pNewAttrs && SfxItemState::SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) { if( !( (SfxBoolItem*)pPoolItem)->GetValue() ) bLeftToRight = !bLeftToRight; @@ -577,7 +577,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) 0 ); sal_uInt16 nAdjust = SVX_ADJUST_LEFT; - if( SFX_ITEM_SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) + if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue(); if( bLeftToRight ) @@ -636,7 +636,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) case SID_ATTR_PARA_LRSPACE: { SfxItemState eState = aEditAttr.GetItemState( EE_PARA_LRSPACE ); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE ) ); aLR.SetWhich(SID_ATTR_PARA_LRSPACE); @@ -649,7 +649,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) case SID_ATTR_PARA_LINESPACE: { SfxItemState eState = aEditAttr.GetItemState( EE_PARA_SBL ); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLineSpacingItem aLR = ( (const SvxLineSpacingItem&) aEditAttr.Get( EE_PARA_SBL ) ); rSet.Put(aLR); @@ -661,7 +661,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) case SID_ATTR_PARA_ULSPACE: { SfxItemState eState = aEditAttr.GetItemState( EE_PARA_ULSPACE ); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxULSpaceItem aULSpace = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); aULSpace.SetWhich(SID_ATTR_PARA_ULSPACE); @@ -839,7 +839,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) if(nEEWhich == EE_CHAR_KERNING) { SfxItemState eState = aEditAttr.GetItemState( EE_CHAR_KERNING, true ); - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { rSet.InvalidateItem(EE_CHAR_KERNING); } @@ -917,7 +917,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) { sal_uLong nFormat = 0; const SfxPoolItem* pItem; - if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET && + if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -1455,7 +1455,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq) sal_uInt16 nId = rReq.GetSlot(); sal_uInt16 nCnt = 1; const SfxPoolItem* pItem=0; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem ) ) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); switch( nId ) { diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 49869f4988ae..d531e7209acb 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -287,7 +287,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pFmt; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pFmt ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pFmt ) ) { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( @@ -462,7 +462,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq) sal_uInt16 nId = rReq.GetSlot(), nCnt = 1; const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem )) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem )) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); // #i106349#: save pointer: undo/redo may delete the shell, i.e., this! @@ -740,7 +740,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwFmtCol aFmtCol = rFmt.GetCol(); sal_uInt16 nCount; - if(SFX_ITEM_SET == pArgs->GetItemState(nSlot)) + if(SfxItemState::SET == pArgs->GetItemState(nSlot)) nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue(); else nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue(); @@ -771,7 +771,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwTableAutoFmt const* pTAFmt = 0; boost::scoped_ptr<SwTableAutoFmtTbl> pAutoFmtTbl; bool bDeleteFormat = true; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem)) { aInsTblOpts.mnInsMode = 0; // Delimiter @@ -779,7 +779,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) if(!sDelim.isEmpty()) cDelim = sDelim[0]; // AutoFormat - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_2, true, &pItem)) { OUString sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue(); @@ -798,19 +798,19 @@ void SwBaseShell::Execute(SfxRequest &rReq) } } //WithHeader - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, true, &pItem) && + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, true, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) aInsTblOpts.mnInsMode |= tabopts::HEADLINE; // RepeatHeaderLines - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_4, true, &pItem)) aInsTblOpts.mnRowsToRepeat = (sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue(); //WithBorder - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, true, &pItem) && + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_5, true, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER; //DontSplitTable - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, true, &pItem) && + if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_6, true, &pItem) && !static_cast< const SfxBoolItem* >(pItem)->GetValue() ) aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT; } @@ -1108,7 +1108,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_XFORMS_DESIGN_MODE: if( pArgs != NULL - && pArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET + && pArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET && pItem != NULL && pItem->ISA( SfxBoolItem ) ) { diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 3a2e4ffb7381..991a46ba88ed 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -158,7 +158,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { const SfxPoolItem* pWrapItem; const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, false, &pWrapItem)) + if(SfxItemState::SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, false, &pWrapItem)) { short nLayer = ((const SfxInt16Item*)pWrapItem)->GetValue(); if (nLayer == 1) @@ -266,9 +266,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) pSdrView->SetAttributes(*pOutSet); bool bPosCorr = - SFX_ITEM_SET != pOutSet->GetItemState( + SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_TRANSFORM_POS_X, false ) && - SFX_ITEM_SET != pOutSet->GetItemState( + SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_TRANSFORM_POS_Y, false ); SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1); @@ -276,7 +276,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) bool bSingleSelection = rMarkList.GetMarkCount() == 1; const SfxPoolItem* pAnchorItem; - if(SFX_ITEM_SET == pOutSet->GetItemState( + if(SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_TRANSFORM_ANCHOR, false, &pAnchorItem)) { if(!bSingleSelection) diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index a1084394b5c3..6d040ebe94f2 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -525,7 +525,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; const SfxPoolItem* pPoolItem; - if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) + if( pNewAttrs && SfxItemState::SET == pNewAttrs->GetItemState( nSlot, true, &pPoolItem ) ) { if( !( (SfxBoolItem*)pPoolItem)->GetValue() ) bLeftToRight = !bLeftToRight; @@ -536,7 +536,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) 0 ); sal_uInt16 nAdjust = SVX_ADJUST_LEFT; - if( SFX_ITEM_SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) + if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) ) nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue(); if( bLeftToRight ) @@ -671,7 +671,7 @@ ASK_ADJUST: case SID_ATTR_PARA_LRSPACE: { SfxItemState eState = aEditAttr.GetItemState(EE_PARA_LRSPACE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLRSpaceItem aLR = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE ); aLR.SetWhich(SID_ATTR_PARA_LRSPACE); @@ -685,7 +685,7 @@ ASK_ADJUST: case SID_ATTR_PARA_LINESPACE: { SfxItemState eState = aEditAttr.GetItemState(EE_PARA_SBL); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLineSpacingItem aLR = (const SvxLineSpacingItem&) aEditAttr.Get( EE_PARA_SBL ); rSet.Put(aLR); @@ -698,7 +698,7 @@ ASK_ADJUST: case SID_ATTR_PARA_ULSPACE: { SfxItemState eState = aEditAttr.GetItemState(EE_PARA_ULSPACE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxULSpaceItem aULSpace = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); aULSpace.SetWhich(SID_ATTR_PARA_ULSPACE); diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index ddd535fa58fe..3088248459e8 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -525,7 +525,7 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq) { case SID_UNDO: case SID_REDO: - if( SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem ) && + if( SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem ) && 1 < (nCnt = ((SfxUInt16Item*)pItem)->GetValue()) ) { // then we make by ourself. @@ -847,7 +847,7 @@ void SwDrawTextShell::GetStatePropPanelAttr(SfxItemSet &rSet) case SID_TABLE_VERT_BOTTOM: bool bContour = false; SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ); - if( eConState != SFX_ITEM_DONTCARE ) + if( eConState != SfxItemState::DONTCARE ) { bContour = ( ( const SdrOnOffItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); } @@ -856,8 +856,8 @@ void SwDrawTextShell::GetStatePropPanelAttr(SfxItemSet &rSet) SfxItemState eVState = aAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ); //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ); - //if(SFX_ITEM_DONTCARE != eVState && SFX_ITEM_DONTCARE != eHState) - if(SFX_ITEM_DONTCARE != eVState) + //if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) + if(SfxItemState::DONTCARE != eVState) { SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 02d3c031717f..d501908e2218 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -164,7 +164,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) { // Frame already exists, only the number of columns will be changed. sal_uInt16 nCols = 1; - if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET) nCols = ((SfxUInt16Item *)pItem)->GetValue(); SfxItemSet aSet(GetPool(),RES_COL,RES_COL); @@ -196,7 +196,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) case SID_HYPERLINK_SETLINK: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, false, &pItem)) { const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem; const OUString& rURL = rHLinkItem.GetURL(); @@ -367,7 +367,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) case SID_ATTR_ULSPACE: case SID_ATTR_LRSPACE: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem)) { aMgr.SetAttrSet( *pArgs ); bCopyToFmt = true; @@ -380,13 +380,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) bool bApplyNewSize = false; Size aNewSize = aMgr.GetSize(); - if ( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_WIDTH, false, &pItem ) ) + if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_WIDTH, false, &pItem ) ) { aNewSize.setWidth( static_cast< const SfxUInt32Item* >(pItem)->GetValue() ); bApplyNewSize = true; } - if ( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_HEIGHT, false, &pItem ) ) + if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_HEIGHT, false, &pItem ) ) { aNewSize.setHeight( static_cast< const SfxUInt32Item* >(pItem)->GetValue() ); bApplyNewSize = true; @@ -490,7 +490,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) ); OString sDefPage; - if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, false, &pItem) == SFX_ITEM_SET) + if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, false, &pItem) == SfxItemState::SET) sDefPage = OUStringToOString(((SfxStringItem *)pItem)->GetValue(), RTL_TEXTENCODING_UTF8); aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); @@ -521,13 +521,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) { rReq.Done(*pOutSet); if(nSel & nsSelectionType::SEL_OLE && - SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, true, &pItem)) + SfxItemState::SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, true, &pItem)) { SwViewOption aUsrPref( *pVOpt ); aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue()); SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); } - if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, true, &pItem)) + if (SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, true, &pItem)) { // #i73249# rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue()); @@ -538,7 +538,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) { rSh.AutoUpdateFrame(pFmt, *pOutSet); // Anything which is not supported by the format must be set hard. - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) + if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, RES_SURROUND, RES_SURROUND, @@ -547,14 +547,14 @@ void SwFrameShell::Execute(SfxRequest &rReq) 0); aShellSet.Put(*pOutSet); aMgr.SetAttrSet(aShellSet); - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) + if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem)) rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); } else aMgr.SetAttrSet( *pOutSet ); const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt(); - if(SFX_ITEM_SET == + if(SfxItemState::SET == pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS, false, &pItem)) { @@ -589,7 +589,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } rSh.SetChainMarker(); } - if(SFX_ITEM_SET == + if(SfxItemState::SET == pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, false, &pItem)) { @@ -838,7 +838,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL); rSh.GetFlyFrmAttr( aURLSet ); - if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, true, &pItem)) + if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem)) { const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem; aHLinkItem.SetURL(pFmtURL->GetURL()); @@ -1010,7 +1010,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) { case SID_ATTR_BORDER: { - if (pArgs->GetItemState(RES_BOX, true, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(RES_BOX, true, &pItem) == SfxItemState::SET) { SvxBoxItem aNewBox(*((SvxBoxItem *)pItem)); const SvxBorderLine* pBorderLine; @@ -1056,7 +1056,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) case SID_FRAME_LINESTYLE: { - if (pArgs->GetItemState(SID_FRAME_LINESTYLE, false, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_FRAME_LINESTYLE, false, &pItem) == SfxItemState::SET) { const SvxLineItem* pLineItem = (const SvxLineItem*)pItem; @@ -1110,7 +1110,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) case SID_FRAME_LINECOLOR: { - if (pArgs->GetItemState(SID_FRAME_LINECOLOR, false, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_FRAME_LINECOLOR, false, &pItem) == SfxItemState::SET) { const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue(); diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 0e13b3801730..e9e651036b84 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -354,7 +354,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SfxItemSet* pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); rReq.Done(*pSet); // change the 2 frmsize SizeItems to the correct SwFrmSizeItem - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_FRMSIZE, false, &pItem )) { SwFmtFrmSize aSize; @@ -362,7 +362,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSize.SetWidth( rSz.Width() ); aSize.SetHeight( rSz.Height() ); - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_FRMSIZE_PERCENT, false, &pItem )) { const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize(); @@ -392,14 +392,14 @@ void SwGrfShell::Execute(SfxRequest &rReq) aMgr.UpdateFlyFrm(); bool bApplyUsrPref = false; - if (SFX_ITEM_SET == pSet->GetItemState( + if (SfxItemState::SET == pSet->GetItemState( FN_KEEP_ASPECT_RATIO, true, &pItem )) { aUsrPref.SetKeepRatio( ((const SfxBoolItem*)pItem)->GetValue() ); bApplyUsrPref = true; } - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_KEEP_ZOOM, true, &pItem )) { aUsrPref.SetGrfKeepZoom( @@ -411,7 +411,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); // and now set all the graphic attributes and other stuff - if( SFX_ITEM_SET == pSet->GetItemState( + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_GRAPHIC, true, &pItem )) { if( !((SvxBrushItem*)pItem)->GetGraphicLink().isEmpty() ) @@ -438,7 +438,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) sFilterNm, 0 ); } } - if ( SFX_ITEM_SET == pSet->GetItemState( + if ( SfxItemState::SET == pSet->GetItemState( FN_SET_FRM_ALT_NAME, true, &pItem )) { // #i73249# @@ -485,7 +485,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; sal_uInt16 nSlot = rReq.GetSlot(); - if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, false, &pItem )) + if( !pArgs || SfxItemState::SET != pArgs->GetItemState( nSlot, false, &pItem )) pItem = 0; switch( nSlot ) diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 17e332f82904..52276bb85888 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -420,17 +420,17 @@ namespace SwLangHelper const SfxPoolItem *pItem = 0; SfxItemState nState = aSet.GetItemState( nLangWhichId, true, &pItem ); - if (nState > SFX_ITEM_DEFAULT && pItem) + if (nState > SfxItemState::DEFAULT && pItem) { // the item is set and can be used nLang = (dynamic_cast<const SvxLanguageItem&>(*pItem)).GetLanguage(); } - else if (nState == SFX_ITEM_DEFAULT) + else if (nState == SfxItemState::DEFAULT) { // since the attribute is not set: retrieve the default value nLang = (dynamic_cast<const SvxLanguageItem&>(aSet.GetPool()->GetDefaultItem( nLangWhichId ))).GetLanguage(); } - else if (nState == SFX_ITEM_DONTCARE) + else if (nState == SfxItemState::DONTCARE) { // there is more than one language... nLang = LANGUAGE_DONTKNOW; diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx index b249289a338e..3f0ee0006150 100644 --- a/sw/source/uibase/shells/mediash.cxx +++ b/sw/source/uibase/shells/mediash.cxx @@ -113,7 +113,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) { const SfxPoolItem* pItem; - if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) + if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) pItem = NULL; if( pItem ) diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index d5c9ecaf8fb1..1cdd584b1d6b 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -276,23 +276,23 @@ void ItemSetToTableParam( const SfxItemSet& rSet, rSh.StartUndo( UNDO_TABLE_ATTR ); const SfxPoolItem* pItem = 0; - if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem)) { SwViewOption aUsrPref( *rSh.GetViewOptions() ); aUsrPref.SetTblDest((sal_uInt8)((SfxUInt16Item*)pItem)->GetValue()); SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView()); } - bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || - SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); + bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) || + SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); pItem = 0; - bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); + bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); const SfxPoolItem* pSplit = 0; - bool bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pSplit ); + bool bRowSplit = SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pSplit ); const SfxPoolItem* pBoxDirection = 0; - bool bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pBoxDirection ); + bool bBoxDirection = SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pBoxDirection ); if( bBackground || bBorder || bRowSplit || bBoxDirection) { // The border will be applied to the present selection. @@ -357,7 +357,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, SwTableRep* pRep = 0; SwFrmFmt *pFmt = rSh.GetTableFmt(); SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) + if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue(); @@ -397,13 +397,13 @@ void ItemSetToTableParam( const SfxItemSet& rSet, } } - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem)) rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() ); - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue()); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem )) rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() ); // Copy the chosen attributes in the ItemSet. @@ -422,7 +422,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, 0 }; for( const sal_uInt16* pIds = aIds; *pIds; ++pIds ) - if( SFX_ITEM_SET == rSet.GetItemState( *pIds, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( *pIds, false, &pItem)) aSet.Put( *pItem ); if( aSet.Count() ) @@ -478,7 +478,7 @@ void SwTableShell::Execute(SfxRequest &rReq) const SvxBoxItem& rCoreBox = (const SvxBoxItem&) aCoreSet.Get(RES_BOX); const SfxPoolItem *pBoxItem = 0; - if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == SFX_ITEM_SET ) + if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == SfxItemState::SET ) { aBox = *(SvxBoxItem*)pBoxItem; if ( !rReq.IsAPI() ) @@ -491,9 +491,9 @@ void SwTableShell::Execute(SfxRequest &rReq) //since the drawing layer also supports borders the which id might be a different one SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER ); - if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, true, &pBoxItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, true, &pBoxItem) == SfxItemState::SET) aInfo = *(SvxBoxInfoItem*)pBoxItem; - else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, true, &pBoxItem) == SFX_ITEM_SET ) + else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, true, &pBoxItem) == SfxItemState::SET ) { aInfo = *(SvxBoxInfoItem*)pBoxItem; aInfo.SetWhich(SID_ATTR_BORDER_INNER); @@ -629,7 +629,7 @@ void SwTableShell::Execute(SfxRequest &rReq) rSh.GetTblBoxFormulaAttrs( aBoxSet ); SfxItemState eState = aBoxSet.GetItemState(RES_BOXATR_FORMAT); - if(eState == SFX_ITEM_DEFAULT) + if(eState == SfxItemState::DEFAULT) { aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, pFormatter->GetFormatIndex(NF_TEXT, LANGUAGE_SYSTEM))); @@ -668,7 +668,7 @@ void SwTableShell::Execute(SfxRequest &rReq) GetNumberFormatter()->DeleteEntry( pDelArr[i] ); } - if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( + if( SfxItemState::SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, false, &pNumberFormatItem )) { SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(), @@ -827,7 +827,7 @@ void SwTableShell::Execute(SfxRequest &rReq) if (pItem) { nCount = ((const SfxInt16Item* )pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, true, &pItem)) bAfter = ((const SfxBoolItem* )pItem)->GetValue(); } else if( !rReq.IsAPI() ) diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index d7d17a7ffa4b..291f21696e66 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -228,30 +228,30 @@ void SwTextShell::ExecField(SfxRequest &rReq) OUString aPar2; sal_Int32 nCommand = 0; - if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, false, &pItem )) nType = ((SfxUInt16Item *)pItem)->GetValue(); aPar1 += OUString(DB_DELIM); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, false, &pItem )) { aPar1 += ((SfxStringItem *)pItem)->GetValue(); } - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, false, &pItem )) nCommand = ((SfxInt32Item*)pItem)->GetValue(); aPar1 += OUString(DB_DELIM); aPar1 += OUString::number(nCommand); aPar1 += OUString(DB_DELIM); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_2, false, &pItem )) { aPar1 += ((SfxStringItem *)pItem)->GetValue(); } - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_CONTENT, false, &pItem )) aPar2 = ((SfxStringItem *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_FORMAT, false, &pItem )) nFormat = ((SfxUInt32Item *)pItem)->GetValue(); OSL_FAIL("Command is not yet used"); @@ -275,19 +275,19 @@ void SwTextShell::ExecField(SfxRequest &rReq) OUString aPar2; sal_Unicode cSeparator = ' '; - if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, false, &pItem )) nType = ((SfxUInt16Item *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE, + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE, false, &pItem )) nSubType = ((SfxUInt16Item *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_CONTENT, false, &pItem )) aPar2 = ((SfxStringItem *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_FORMAT, false, &pItem )) nFormat = ((SfxUInt32Item *)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( + if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, false, &pItem )) { OUString sTmp = ((SfxStringItem *)pItem)->GetValue(); @@ -798,7 +798,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) rSh.GetCurAttr( aSet ); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) + if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { // Select links rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, false); diff --git a/sw/source/uibase/shells/textglos.cxx b/sw/source/uibase/shells/textglos.cxx index 1987c36ceb3d..80f4c3a461d9 100644 --- a/sw/source/uibase/shells/textglos.cxx +++ b/sw/source/uibase/shells/textglos.cxx @@ -65,10 +65,10 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) { OUString aGroup = (( const SfxStringItem *)pItem)->GetValue(); OUString aName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) aName = (( const SfxStringItem *)pItem)->GetValue(); OUString aShortName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, false, &pItem )) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_2, false, &pItem )) aShortName = (( const SfxStringItem *)pItem)->GetValue(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); @@ -101,7 +101,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) { OUString aGroup = (( const SfxStringItem *)pItem)->GetValue(); OUString aName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem )) aName = (( const SfxStringItem *)pItem)->GetValue(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index a0dc80b7f231..2a8210002f33 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -489,9 +489,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if(pArgs) { if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot && - pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SFX_ITEM_SET) + pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET) nCols = ((SfxUInt16Item *)pItem)->GetValue(); - if(pArgs->GetItemState(SID_MODIFIER, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_MODIFIER, false, &pItem) == SfxItemState::SET) bModifier1 |= KEY_MOD1 == ((SfxUInt16Item *)pItem)->GetValue(); } if(bModifier1 ) @@ -543,13 +543,13 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width(); Point aPos = aMgr.GetPos(); RndStdIds eAnchor = FLY_AT_PARA; - if(pArgs->GetItemState(nSlot, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(nSlot, false, &pItem) == SfxItemState::SET) eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue(); - if(pArgs->GetItemState(FN_PARAM_1, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(FN_PARAM_1, false, &pItem) == SfxItemState::SET) aPos = ((SfxPointItem *)pItem)->GetValue(); - if(pArgs->GetItemState(FN_PARAM_2, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(FN_PARAM_2, false, &pItem) == SfxItemState::SET) aSize = ((SvxSizeItem *)pItem)->GetSize(); - if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET) { const sal_uInt16 nCols = ((SfxUInt16Item *)pItem)->GetValue(); if( !bSingleCol && 1 < nCols ) @@ -771,7 +771,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) SvxHyperlinkItem aHLinkItem; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) + if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem; aHLinkItem.SetURL(pINetFmt->GetValue()); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 6a9a0b05b3ae..97f9053f01eb 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -212,7 +212,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const sal_Int32 nInsert = 0; // The old item is for unknown reasons back in the set again. - if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, false, &pSelectionItem) ) + if( !bSelectionPut && SfxItemState::SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, false, &pSelectionItem) ) { OUString sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue(); bInsert = !sInsert.isEmpty(); @@ -837,7 +837,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_INSERT_HYPERLINK: { const sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); - if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState( nWhich ) == SfxItemState::SET ) bUseDialog = false; // intentionally no break } @@ -870,7 +870,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case SID_ATTR_PARA_LRSPACE: { const sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); - if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState( nWhich ) == SfxItemState::SET ) bUseDialog = false; // intentionally no break @@ -1005,7 +1005,7 @@ void SwTextShell::Execute(SfxRequest &rReq) // Apply defaults if nessecary. pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); sal_uInt16 nNewDist; - if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, false, &pItem ) && + if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, false, &pItem ) && nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); @@ -1014,13 +1014,13 @@ void SwTextShell::Execute(SfxRequest &rReq) pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS ); } - if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,false,&pItem) ) + if ( SfxItemState::SET == pSet->GetItemState(FN_PARAM_1,false,&pItem) ) { pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue())); pSet->ClearItem(FN_PARAM_1); } - if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, false, &pItem )) + if( SfxItemState::SET == pSet->GetItemState( RES_PARATR_DROP, false, &pItem )) { OUString sCharStyleName; if(((const SwFmtDrop*)pItem)->GetCharFmt()) @@ -1037,8 +1037,8 @@ void SwTextShell::Execute(SfxRequest &rReq) // enclose all undos. // Thus, check conditions, if actions will be performed. const bool bUndoNeeded( pSet->Count() || - SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) || - SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ); + SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART) || + SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ); if ( bUndoNeeded ) { rWrtSh.StartUndo( UNDO_INSATTR ); @@ -1046,7 +1046,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if( pSet->Count() ) { rWrtSh.StartAction(); - if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, false, &pItem) ) + if ( SfxItemState::SET == pSet->GetItemState(FN_DROP_TEXT, false, &pItem) ) { if ( !((SfxStringItem*)pItem)->GetValue().isEmpty() ) rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue(), pPaM); @@ -1060,7 +1060,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } } - if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) ) + if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART) ) { //SetNumRuleStart(sal_True) restarts the numbering at the value //that is defined at the starting point of the numbering level @@ -1073,14 +1073,14 @@ void SwTextShell::Execute(SfxRequest &rReq) // in order to indicate that the restart value of the list // style has to be used on restart. sal_uInt16 nNumStart = USHRT_MAX; - if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) + if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); } rWrtSh.SetNumRuleStart(bStart, pPaM); rWrtSh.SetNodeNumStart(nNumStart); } - else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) + else if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { rWrtSh.SetNodeNumStart(((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue()); rWrtSh.SetNumRuleStart(false, pPaM); @@ -1268,7 +1268,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if(pItem) sStyleName = ((const SfxStringItem*)pItem)->GetValue(); bool bOn = true; - if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem)) + if( SfxItemState::SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem)) bOn = ((const SfxBoolItem*)pItem)->GetValue(); rWrtSh.ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI()); rReq.Done(); @@ -1286,7 +1286,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_SELECTION_MODE_BLOCK : { bool bSetBlockMode = !rWrtSh.IsBlockMode(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem)) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem)) bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue(); if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) != bSetBlockMode ) rWrtSh.EnterBlockMode(); @@ -1304,7 +1304,7 @@ void SwTextShell::Execute(SfxRequest &rReq) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rWrtSh.GetCurAttr(aSet); - if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, true )) + if(SfxItemState::SET <= aSet.GetItemState( RES_TXTATR_INETFMT, true )) { const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, true) ); if( nSlot == FN_COPY_HYPERLINK_LOCATION ) @@ -1660,7 +1660,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, true ) || rSh.HasReadonlySel()) + if(SfxItemState::SET > aSet.GetItemState( RES_TXTATR_INETFMT, true ) || rSh.HasReadonlySel()) { rSet.DisableItem(nWhich); } @@ -1674,7 +1674,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSh.GetCurAttr(aSet); // If a hyperlink is selected, either alone or along with other text... - if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != SFX_ITEM_DONTCARE || rSh.HasReadonlySel()) + if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != SfxItemState::DONTCARE || rSh.HasReadonlySel()) { rSet.DisableItem(nWhich); } @@ -1713,7 +1713,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, false )) + if(SfxItemState::SET > aSet.GetItemState( RES_TXTATR_INETFMT, false )) rSet.DisableItem(nWhich); } break; diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index cda3f3b4e225..22b658379c71 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -275,7 +275,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq) { case SID_ATTR_PARA_ADJUST: { - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_PARATR_ADJUST) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(RES_PARATR_ADJUST) ) { const SvxAdjustItem& rAdj = (const SvxAdjustItem&) pArgs->Get(RES_PARATR_ADJUST); SvxAdjustItem aAdj( rAdj.GetAdjust(), RES_PARATR_ADJUST ); @@ -301,7 +301,7 @@ SET_ADJUST: break; case SID_ATTR_PARA_LINESPACE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( GetPool().GetWhich(nSlot) )) + if(pArgs && SfxItemState::SET == pArgs->GetItemState( GetPool().GetWhich(nSlot) )) { SvxLineSpacingItem aLineSpace = (const SvxLineSpacingItem&)pArgs->Get( GetPool().GetWhich(nSlot)); @@ -333,7 +333,7 @@ SET_LINESPACE: GetShell().GetCurAttr(aAdjustSet); bool bChgAdjust = false; SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, false); - if(eAdjustState >= SFX_ITEM_DEFAULT) + if(eAdjustState >= SfxItemState::DEFAULT) { int eAdjust = (int)(( const SvxAdjustItem& ) aAdjustSet.Get(RES_PARATR_ADJUST)).GetAdjust(); @@ -447,7 +447,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) { rSh.StartAction(); rSh.StartUndo( UNDO_START ); - if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,false,&pItem) ) + if ( SfxItemState::SET == aSet.GetItemState(HINT_END,false,&pItem) ) { if ( !((SfxStringItem*)pItem)->GetValue().isEmpty() ) rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue()); @@ -505,23 +505,23 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) int eAdjust = -1; // Illegal value to recognize DONTCARE. SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, false, &pItem); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST); - if( SFX_ITEM_DEFAULT <= eState ) + if( SfxItemState::DEFAULT <= eState ) eAdjust = (int)(( SvxAdjustItem* ) pItem)->GetAdjust(); short nEsc = 0; eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, false, &pItem); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) nEsc = ((SvxEscapementItem* )pItem)->GetEsc(); sal_uInt16 nLineSpace = 0; eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, false, &pItem); - if( SFX_ITEM_DEFAULT == eState ) + if( SfxItemState::DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING); - if( SFX_ITEM_DEFAULT <= eState && + if( SfxItemState::DEFAULT <= eState && ((SvxLineSpacingItem* )pItem)->GetLineSpaceRule() == SVX_LINE_SPACE_AUTO ) { if(SVX_INTER_LINE_SPACE_OFF == @@ -621,7 +621,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) case FN_UNDERLINE_DOUBLE: { eState = aCoreSet.GetItemState(RES_CHRATR_UNDERLINE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { FontUnderline eUnderline = ((const SvxUnderlineItem&) aCoreSet.Get(RES_CHRATR_UNDERLINE)).GetLineStyle(); @@ -642,7 +642,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) case SID_ATTR_PARA_LRSPACE: { eState = aCoreSet.GetItemState(RES_LR_SPACE); - if( eState >= SFX_ITEM_DEFAULT ) + if( eState >= SfxItemState::DEFAULT ) { SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aCoreSet.Get( RES_LR_SPACE ) ); aLR.SetWhich(SID_ATTR_PARA_LRSPACE); @@ -667,7 +667,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) // is the item set? sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) && - aCoreSet.GetItemState( RES_FRAMEDIR, false ) >= SFX_ITEM_DEFAULT) + aCoreSet.GetItemState( RES_FRAMEDIR, false ) >= SfxItemState::DEFAULT) { SvxFrameDirection eFrmDir = (SvxFrameDirection) ((const SvxFrameDirectionItem& )aCoreSet.Get(RES_FRAMEDIR)).GetValue(); diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 50bc83f3751f..6b9fb2fb69b9 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -54,9 +54,9 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq) if(pArgs) { const SfxPoolItem *pItem; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, true, &pItem)) nCount = ((const SfxInt32Item *)pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, true, &pItem)) bSelect = ((const SfxBoolItem *)pItem)->GetValue(); } switch(rReq.GetSlot()) diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 2e71deff6df6..663927ece749 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -191,7 +191,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) const SfxPoolItem* pItem; if ( RET_OK == nRet ) { - if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem )) + if( SfxItemState::SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem )) { rReq.AppendItem( *pItem ); rReq.Done(); @@ -211,7 +211,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) // If the Dialog was leaved with OK but nothing was chosen then the // numbering must be at least activated, if it is not already. else if ( pNumRuleAtCurrentSelection == NULL - && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem ) ) + && SfxItemState::SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem ) ) { rReq.AppendItem( *pItem ); rReq.Done(); diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx index 2db942542b5c..39f13a54f445 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -464,7 +464,7 @@ void PagePropertyPanel::NotifyItemUpdate( { case SID_ATTR_PAGE_COLUMN: { - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxInt16Item) ) { mpPageColumnTypeItem.reset( static_cast<SfxInt16Item*>(pState->Clone()) ); @@ -473,7 +473,7 @@ void PagePropertyPanel::NotifyItemUpdate( } break; case SID_ATTR_PAGE_LRSPACE: - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxLongLRSpaceItem) ) { mpPageLRMarginItem.reset( static_cast<SvxLongLRSpaceItem*>(pState->Clone()) ); @@ -482,7 +482,7 @@ void PagePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_PAGE_ULSPACE: - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxLongULSpaceItem) ) { mpPageULMarginItem.reset( static_cast<SvxLongULSpaceItem*>(pState->Clone()) ); @@ -491,7 +491,7 @@ void PagePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_PAGE: - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxPageItem) ) { const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION); @@ -515,7 +515,7 @@ void PagePropertyPanel::NotifyItemUpdate( { mpBindings->Invalidate( SID_ATTR_PAGE, true, false ); } - if ( eState >= SFX_ITEM_DEFAULT && + if ( eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxSizeItem) ) { mpPageSizeItem.reset( static_cast<SvxSizeItem*>(pState->Clone()) ); @@ -531,7 +531,7 @@ void PagePropertyPanel::NotifyItemUpdate( void PagePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pState ) { meFUnit = FUNIT_NONE; - if ( pState && eState >= SFX_ITEM_DEFAULT ) + if ( pState && eState >= SfxItemState::DEFAULT ) { meFUnit = (FieldUnit)( (const SfxUInt16Item*)pState )->GetValue(); } diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 540042aa9d02..afac9912ae1e 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -185,7 +185,7 @@ void WrapPropertyPanel::NotifyItemUpdate( { (void)bIsEnabled; - if ( eState == SFX_ITEM_DEFAULT && + if ( eState == SfxItemState::DEFAULT && pState->ISA(SfxBoolItem) ) { //Set Radio Button enable diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index cf81558ba8b5..4815149ebdd9 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -131,12 +131,12 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh ) void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) { const SfxPoolItem* pItem = 0; - bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || - SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); - bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); + bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) || + SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); + bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem ); + bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem ); if(bBackground) { @@ -158,7 +158,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) if(bBorder) rSh.SetTabBorders( rSet ); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem) ) + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem) ) rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() ); SwFrmFmt* pFrmFmt = rSh.GetTableFmt(); @@ -201,17 +201,17 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) pFrmFmt->SetFmtAttr( *pItem ); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pItem) ) + if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pItem) ) { SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ); aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue()); rSh.SetBoxDirection(aDirection); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) + if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem)) rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue()); - if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pItem) ) + if( SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pItem) ) rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem)); } }//end anonymous namespace @@ -424,7 +424,7 @@ static void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyl for ( sal_uInt16 nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rStyleAttrSet.GetItemState( nWhich, false, &pItem ) ) + if( SfxItemState::SET == rStyleAttrSet.GetItemState( nWhich, false, &pItem ) ) { rItemVector.push_back( SfxPoolItemSharedPtr( pItem->Clone() ) ); } @@ -440,7 +440,7 @@ static void lcl_RemoveEqualItems( SfxItemSet& rTemplateItemSet, const ItemVector while( aIter != aEnd ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rTemplateItemSet.GetItemState( (*aIter)->Which(), true, &pItem ) && + if( SfxItemState::SET == rTemplateItemSet.GetItemState( (*aIter)->Which(), true, &pItem ) && *pItem == *(*aIter) ) { rTemplateItemSet.ClearItem( (*aIter)->Which() ); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 5ab8185eebf5..56430f459528 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -705,7 +705,7 @@ void SwPagePreview::Execute( SfxRequest &rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; bool bBookPreview = GetViewShell()->GetViewOptions()->IsPagePrevBookview(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, false, &pItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, false, &pItem ) ) { bBookPreview = static_cast< const SfxBoolItem* >( pItem )->GetValue(); ( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview ); @@ -773,12 +773,12 @@ void SwPagePreview::Execute( SfxRequest &rReq ) { enum SvxZoomType eType = SVX_ZOOM_PERCENT; sal_uInt16 nZoomFactor = USHRT_MAX; - if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, true, &pItem)) + if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOM, true, &pItem)) { eType = ((const SvxZoomItem *)pItem)->GetType(); nZoomFactor = ((const SvxZoomItem *)pItem)->GetValue(); } - else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, true, &pItem)) + else if(SfxItemState::SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, true, &pItem)) nZoomFactor = ((const SfxUInt16Item *)pItem)->GetValue(); if(USHRT_MAX != nZoomFactor) SetZoom(eType, nZoomFactor); @@ -790,7 +790,7 @@ void SwPagePreview::Execute( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) ) + if ( pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) ) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); @@ -1046,10 +1046,10 @@ void SwPagePreview::GetState( SfxItemSet& rSet ) const SfxPoolItem* pItem; SfxItemSet aSet( *rSet.GetPool(), SID_PRINTDOC, SID_PRINTDOC ); GetSlotState( SID_PRINTDOC, SfxViewShell::GetInterface(), &aSet ); - if( SFX_ITEM_DISABLED == aSet.GetItemState( SID_PRINTDOC, + if( SfxItemState::DISABLED == aSet.GetItemState( SID_PRINTDOC, false, &pItem )) rSet.DisableItem( nWhich ); - else if( SFX_ITEM_SET == aSet.GetItemState( SID_PRINTDOC, + else if( SfxItemState::SET == aSet.GetItemState( SID_PRINTDOC, false, &pItem )) { ((SfxPoolItem*)pItem)->SetWhich( FN_PRINT_PAGEPREVIEW ); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 452d8329d4a7..993b26bed8d7 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -496,7 +496,7 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify) m_aTimer.Start(); const SfxPoolItem *pItem; - if ( SFX_ITEM_SET != GetObjectShell()->GetMedium()->GetItemSet()-> + if ( SfxItemState::SET != GetObjectShell()->GetMedium()->GetItemSet()-> GetItemState( SID_HIDDEN, false, &pItem ) || !((SfxBoolItem*)pItem)->GetValue() ) { @@ -603,7 +603,7 @@ void SwView::_CheckReadonlyState() qsort( (void*)aROIds, sizeof(aROIds)/sizeof(sal_uInt16), sizeof(sal_uInt16), lcl_CmpIds ); bFirst = false; } - if ( SFX_ITEM_DISABLED == eStateRO ) + if ( SfxItemState::DISABLED == eStateRO ) { rDis.SetSlotFilter( SFX_SLOT_FILTER_ENABLED_READONLY, sizeof(aROIds)/sizeof(sal_uInt16), aROIds ); bChgd = true; @@ -611,7 +611,7 @@ void SwView::_CheckReadonlyState() } else if( m_pWrtShell->IsAllProtect() ) { - if ( SFX_ITEM_DISABLED == eStateProtAll ) + if ( SfxItemState::DISABLED == eStateProtAll ) { static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC, FN_EDIT_REGION }; static bool bAllProtFirst = true; @@ -626,8 +626,8 @@ void SwView::_CheckReadonlyState() bChgd = true; } } - else if ( SFX_ITEM_DISABLED != eStateRO || - SFX_ITEM_DISABLED != eStateProtAll ) + else if ( SfxItemState::DISABLED != eStateRO || + SfxItemState::DISABLED != eStateProtAll ) { bChgd = true; rDis.SetSlotFilter(); diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index b4667ae9692f..6359ae839c20 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -361,7 +361,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) sal_uInt16 nSlot = rReq.GetSlot(); const SfxPoolItem* pAttr=NULL; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlot , false, &pAttr )) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr )) { bSet = ((SfxBoolItem*)pAttr)->GetValue(); eState = bSet ? STATE_ON : STATE_OFF; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 6c875c933c31..9e0fc75da0db 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -573,7 +573,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_ON: { if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem )) + SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem )) { IDocumentRedlineAccess* pIDRA = m_pWrtShell->getIDocumentRedlineAccess(); Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword(); @@ -583,7 +583,7 @@ void SwView::Execute(SfxRequest &rReq) // xmlsec05: new password dialog Window* pParent; const SfxPoolItem* pParentItem; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) + if( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); @@ -613,7 +613,7 @@ void SwView::Execute(SfxRequest &rReq) { IDocumentRedlineAccess* pIDRA = m_pWrtShell->getIDocumentRedlineAccess(); Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == ( aPasswd.getLength() != 0 ) ) break; @@ -621,7 +621,7 @@ void SwView::Execute(SfxRequest &rReq) // message box for wrong password Window* pParent; const SfxPoolItem* pParentItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) + if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); @@ -656,7 +656,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_SHOW: if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem)) + SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem)) { sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) & m_pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT; @@ -756,19 +756,19 @@ void SwView::Execute(SfxRequest &rReq) if( pArgs ) { - if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_FILE_NAME, false, &pItem )) sFileName = ((const SfxStringItem*)pItem)->GetValue(); bHasFileName = !sFileName.isEmpty(); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_FILTER_NAME, false, &pItem )) sFilterName = ((const SfxStringItem*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_VERSION, false, &pItem )) { nVersion = ((const SfxInt16Item *)pItem)->GetValue(); m_pViewImpl->SetParam( nVersion ); } - if( SFX_ITEM_SET == pArgs->GetItemState( SID_NO_ACCEPT_DIALOG, false, &pItem )) + if( SfxItemState::SET == pArgs->GetItemState( SID_NO_ACCEPT_DIALOG, false, &pItem )) { bNoAcceptDialog = ((const SfxBoolItem *)pItem)->GetValue(); } @@ -968,7 +968,7 @@ void SwView::Execute(SfxRequest &rReq) break; case SID_ATTR_BRUSH: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(RES_BACKGROUND, false, &pItem)) { const sal_uInt16 nCurIdx = m_pWrtShell->GetCurPageDesc(); SwPageDesc aDesc( m_pWrtShell->GetPageDesc( nCurIdx )); @@ -991,7 +991,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_INSERT_CTRL: case FN_INSERT_OBJ_CTRL: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem)) { const sal_uInt16 nValue = ((SfxUInt16Item*)pItem)->GetValue(); switch ( nSlot ) @@ -1021,7 +1021,7 @@ void SwView::Execute(SfxRequest &rReq) case SID_ATTR_DEFTABSTOP: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); const sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue(); @@ -1031,7 +1031,7 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_ATTR_LANGUAGE : - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, false, &pItem)) { SvxLanguageItem aLang(((SvxLanguageItem*)pItem)->GetLanguage(), RES_CHRATR_LANGUAGE); m_pWrtShell->SetDefault( aLang ); @@ -1039,14 +1039,14 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_ATTR_CHAR_CTL_LANGUAGE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, false, &pItem)) { m_pWrtShell->SetDefault( *pItem ); lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CTL_LANGUAGE ); } break; case SID_ATTR_CHAR_CJK_LANGUAGE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, false, &pItem)) { m_pWrtShell->SetDefault( *pItem ); lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CJK_LANGUAGE ); @@ -1077,7 +1077,7 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_JUMPTOMARK: - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, false, &pItem)) + if( pArgs && SfxItemState::SET == pArgs->GetItemState(SID_JUMPTOMARK, false, &pItem)) JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() ); break; case SID_GALLERY : @@ -1106,7 +1106,7 @@ void SwView::Execute(SfxRequest &rReq) { bool bShow = false; if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, false, &pItem )) + SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem )) bShow = ((const SfxBoolItem*)pItem)->GetValue(); if((bShow && m_bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot)) GetViewFrame()->ToggleChildWindow(nSlot); @@ -1143,7 +1143,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_QRY_MERGE: { bool bUseCurrentDocument = true; - bool bQuery = !pArgs || SFX_ITEM_SET != pArgs->GetItemState(nSlot); + bool bQuery = !pArgs || SfxItemState::SET != pArgs->GetItemState(nSlot); if(bQuery) { SfxViewFrame* pTmpFrame = GetViewFrame(); @@ -1556,7 +1556,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) SfxItemSet aSet(GetPool(), RES_PARATR_NUMRULE, RES_PARATR_NUMRULE); rShell.GetCurAttr(aSet); - if(SFX_ITEM_DEFAULT <= + if(SfxItemState::DEFAULT <= aSet.GetItemState(RES_PARATR_NUMRULE, true)) { const OUString& rNumStyle = @@ -1658,7 +1658,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) case FN_STAT_BOOKMARK: if ( pArgs ) { - if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, true, &pItem)) + if (SfxItemState::SET == pArgs->GetItemState( nWhich, true, &pItem)) { const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess(); const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); @@ -1728,14 +1728,14 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } const SfxPoolItem* pViewLayoutItem = 0; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem)) + if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem)) { const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue(); const bool bBookMode = ((const SvxViewLayoutItem *)pViewLayoutItem)->IsBookMode(); SetViewLayout( nColumns, bBookMode ); } - if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, true, &pItem)) + if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_ZOOM, true, &pItem)) { enum SvxZoomType eType = ((const SvxZoomItem *)pItem)->GetType(); SetZoom( eType, ((const SvxZoomItem *)pItem)->GetValue() ); @@ -1753,7 +1753,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) if ( pArgs && !rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) ) { - if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pItem )) + if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pItem )) { const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue(); const bool bBookMode = (0 == nColumns || 0 != (nColumns % 2)) ? @@ -1775,7 +1775,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) { if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) ) { - if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem )) + if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem )) { const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); @@ -1824,7 +1824,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) { if ( pArgs ) { - if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, true, &pItem)) + if (SfxItemState::SET == pArgs->GetItemState( nWhich, true, &pItem)) { switch ( ((const SfxUInt16Item *)pItem)->GetValue() ) { @@ -2071,9 +2071,9 @@ static sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc ) const SwPageDesc& rPageDesc = rDoc.GetPageDesc( i ); const SwFrmFmt& rMaster = rPageDesc.GetMaster(); const SfxPoolItem* pItem; - if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, false, &pItem ) && + if( ( SfxItemState::SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, false, &pItem ) && ((SwFmtHeader*)pItem)->IsActive() ) || - ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, false, &pItem ) && + ( SfxItemState::SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, false, &pItem ) && ((SwFmtFooter*)pItem)->IsActive()) ) ++nRet; } @@ -2095,7 +2095,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ) { OUString sFile, sFilter; sFile = ( (const SfxStringItem *)pItem )->GetValue(); - if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, true, &pItem ) ) + if ( SfxItemState::SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, true, &pItem ) ) sFilter = ( (const SfxStringItem *)pItem )->GetValue(); bool bHasFileName = !sFile.isEmpty(); diff --git a/sw/source/uibase/uiview/viewcoll.cxx b/sw/source/uibase/uiview/viewcoll.cxx index 0f155a47d89e..15cc3e47b47c 100644 --- a/sw/source/uibase/uiview/viewcoll.cxx +++ b/sw/source/uibase/uiview/viewcoll.cxx @@ -46,7 +46,7 @@ void SwView::ExecColl(SfxRequest &rReq) if( pArgs ) { if (pArgs && - SFX_ITEM_SET == pArgs->GetItemState( nWhich , true, &pItem )) + SfxItemState::SET == pArgs->GetItemState( nWhich , true, &pItem )) { if( ((SfxStringItem*)pItem)->GetValue() != GetWrtShell().GetCurPageStyle(false) ) diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 0ec9e5c40c41..73d0106b3a5d 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -83,7 +83,7 @@ void SwView::ExecDraw(SfxRequest& rReq) bool bDeselect = false; sal_uInt16 nSlotId = rReq.GetSlot(); - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlotId), false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(GetPool().GetWhich(nSlotId), false, &pItem)) { pEItem = dynamic_cast< const SfxAllEnumItem*>(pItem); pStringItem = dynamic_cast< const SfxStringItem*>(pItem); @@ -751,7 +751,7 @@ bool SwView::IsDrawTextHyphenate() SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE ); if( pSdrView->GetAttributes( aNewAttr ) && - aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_DEFAULT ) + aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT ) bHyphenate = ((const SfxBoolItem&)aNewAttr.Get( EE_PARA_HYPHENATE )). GetValue(); diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index f136f3331d72..d5e83bc2d173 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -94,7 +94,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, bool bWeb ) const SfxItemSet& rSet = pNew->GetOptions(); const SwAddPrinterItem* pAddPrinterAttr; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false, (const SfxPoolItem**)&pAddPrinterAttr ) ) { if( pIDDA ) diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 94e6dc6b91c7..d2ecd16bb983 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -88,7 +88,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; bool bQuiet = false; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem)) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem)) bQuiet = ((const SfxBoolItem*) pItem)->GetValue(); bool bApi = bQuiet || bNoMessage; diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 88b7238c2a32..452e720a79ea 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -926,7 +926,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } bool bSingleLine = false; const SfxPoolItem* pSingleLine; - if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, false, &pSingleLine)) + if( SfxItemState::SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, false, &pSingleLine)) bSingleLine = ((const SfxBoolItem*)pSingleLine)->GetValue(); if ( m_bSetTabRowFromDoc ) { @@ -1189,7 +1189,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) ( nSelType & nsSelectionType::SEL_GRF ) || ( nSelType & nsSelectionType::SEL_FRM ) || ( nSelType & nsSelectionType::SEL_OLE ) || - ( SFX_ITEM_DEFAULT > aCoreSet.GetItemState(RES_LR_SPACE) ) || + ( SfxItemState::DEFAULT > aCoreSet.GetItemState(RES_LR_SPACE) ) || (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich) ) || ( bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)) ) @@ -1258,7 +1258,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aUL.SetWhich(nWhich); SfxItemState e = aCoreSet.GetItemState(RES_UL_SPACE); - if( e >= SFX_ITEM_DEFAULT ) + if( e >= SfxItemState::DEFAULT ) rSet.Put( aUL ); else rSet.InvalidateItem(nWhich); diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index 15db91a8a88d..f64ae4eb702e 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -72,7 +72,7 @@ SwBookmarkControl::~SwBookmarkControl() void SwBookmarkControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_DEFAULT || pState->ISA( SfxVoidItem ) ) + if( eState != SfxItemState::DEFAULT || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else if ( pState->ISA( SfxStringItem ) ) { diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 05648f09230f..abbc71a6c7aa 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -415,7 +415,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) } const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); - if( SFX_ITEM_SET == pOutSet->GetItemState( + if( SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, false, &pItem )) { sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue(); @@ -426,7 +426,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) // SetDefFormat uses eCurLanguage to look for if this format already in the list SetDefFormat(nNumberFormat); } - if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState( + if( bShowLanguageControl && SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_NUMBERFORMAT_ADD_AUTO, false, &pItem )) { bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue(); diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 1a6574ff4334..29a3f0c0283d 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -72,7 +72,7 @@ SwTemplateControl::~SwTemplateControl() void SwTemplateControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if( eState != SFX_ITEM_DEFAULT || pState->ISA( SfxVoidItem ) ) + if( eState != SfxItemState::DEFAULT || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else if ( pState->ISA( SfxStringItem ) ) { diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 8299564d46b9..b354bb2af5d2 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -101,7 +101,7 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh) { SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo)) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; @@ -125,7 +125,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode) // Background { const SfxPoolItem *pTmpBrush; - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, true, &pTmpBrush ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, true, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_BACKGROUND ); @@ -139,7 +139,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode) { // Border const SfxPoolItem *pTmpItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BOX, true, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BOX, true, &pTmpItem ) ) { SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpItem) ); aTmpBox.SetWhich( RES_BOX ); @@ -149,7 +149,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode) rSet.ClearItem(RES_BOX); // Border shadow - if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_SHADOW, false, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_SHADOW, false, &pTmpItem ) ) { SvxShadowItem aTmpShadow( *((SvxShadowItem*)pTmpItem) ); aTmpShadow.SetWhich( RES_SHADOW ); @@ -165,7 +165,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode) // Background { const SfxPoolItem *pTmpBrush; - if( SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, false, &pTmpBrush ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -178,7 +178,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode) { // Border const SfxPoolItem *pTmpItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, false, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_BOX, false, &pTmpItem ) ) { SvxBoxItem aTmpBox( *((SvxBoxItem*)pTmpItem) ); aTmpBox.SetWhich( RES_CHRATR_BOX ); @@ -187,7 +187,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode) rSet.ClearItem( RES_BOX ); // Border shadow - if( SFX_ITEM_SET == rSet.GetItemState( RES_SHADOW, false, &pTmpItem ) ) + if( SfxItemState::SET == rSet.GetItemState( RES_SHADOW, false, &pTmpItem ) ) { SvxShadowItem aTmpShadow( *((SvxShadowItem*)pTmpItem) ); aTmpShadow.SetWhich( RES_CHRATR_SHADOW ); @@ -256,7 +256,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) rMaster.SetFmtAttr(rSet); // PageData - if(rSet.GetItemState(SID_ATTR_PAGE) == SFX_ITEM_SET) + if(rSet.GetItemState(SID_ATTR_PAGE) == SfxItemState::SET) { const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE); @@ -269,7 +269,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) rPageDesc.SetNumType(aNumType); } // Size - if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SFX_ITEM_SET) + if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET) { const SvxSizeItem& rSizeItem = (const SvxSizeItem&)rSet.Get(SID_ATTR_PAGE_SIZE); SwFmtFrmSize aSize(ATT_FIX_SIZE); @@ -278,7 +278,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) } // Evaluate header attributes const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET, false, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -318,7 +318,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) } // Evaluate footer attributes - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET, + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET, false, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); @@ -359,7 +359,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Footnotes - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_FTN_INFO, + if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_FTN_INFO, false, &pItem ) ) rPageDesc.SetFtnInfo( ((SwPageFtnInfoItem*)pItem)->GetPageFtnInfo() ); @@ -367,13 +367,13 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Register compliant - if(SFX_ITEM_SET == rSet.GetItemState( + if(SfxItemState::SET == rSet.GetItemState( SID_SWREGISTER_MODE, false, &pItem)) { bool bSet = ((const SfxBoolItem*)pItem)->GetValue(); if(!bSet) rPageDesc.SetRegisterFmtColl(0); - else if(SFX_ITEM_SET == rSet.GetItemState( + else if(SfxItemState::SET == rSet.GetItemState( SID_SWREGISTER_COLLECTION, false, &pItem)) { const OUString& rColl = ((const SfxStringItem*)pItem)->GetValue(); @@ -421,7 +421,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo) ) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; @@ -585,12 +585,12 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) bool bChanged = false; // Page number - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, false, &pItem)) + if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, false, &pItem)) { aPgDesc.SetNumOffset(((SfxUInt16Item*)pItem)->GetValue()); bChanged = true; } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, false, &pItem )) + if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, false, &pItem )) { const OUString& rDescName = ((SvxPageModelItem*)pItem)->GetValue(); if( !rDescName.isEmpty() ) // No name -> disable PageDesc! @@ -609,7 +609,7 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) { SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC ); rShell.GetCurAttr( aCoreSet ); - if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) + if(SfxItemState::SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { if( ((SwFmtPageDesc*)pItem)->GetPageDesc() ) { @@ -631,7 +631,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) bool bPut = true; switch( rCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { - case SFX_ITEM_SET: + case SfxItemState::SET: { if( ((SwFmtPageDesc*)pItem)->GetPageDesc() ) { @@ -643,7 +643,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) } break; - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: break; default: diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx index b81fa35dfdf7..bc58ff865d91 100644 --- a/sw/source/uibase/utlui/viewlayoutctrl.cxx +++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx @@ -85,7 +85,7 @@ SwViewLayoutControl::~SwViewLayoutControl() void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if ( SFX_ITEM_DEFAULT != eState || pState->ISA( SfxVoidItem ) ) + if ( SfxItemState::DEFAULT != eState || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), OUString() ); else { diff --git a/sw/source/uibase/utlui/zoomctrl.cxx b/sw/source/uibase/utlui/zoomctrl.cxx index 3c7fbc81cb10..50640d89611c 100644 --- a/sw/source/uibase/utlui/zoomctrl.cxx +++ b/sw/source/uibase/utlui/zoomctrl.cxx @@ -43,7 +43,7 @@ SwZoomControl::~SwZoomControl() void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if(SFX_ITEM_DEFAULT == eState && pState->ISA( SfxStringItem )) + if(SfxItemState::DEFAULT == eState && pState->ISA( SfxStringItem )) { sPreviewZoom = ((const SfxStringItem*)pState)->GetValue(); GetStatusBar().SetItemText( GetId(), sPreviewZoom ); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 92262cbd237a..1284f10a9d7a 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1537,8 +1537,8 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet if(!IsInvalidItem(pParaItem)) { sal_uInt16 nWhich = pParaItem->Which(); - if(SFX_ITEM_SET == aCoreSet.GetItemState(nWhich) && - SFX_ITEM_SET == rStyleSet.GetItemState(nWhich)) + if(SfxItemState::SET == aCoreSet.GetItemState(nWhich) && + SfxItemState::SET == rStyleSet.GetItemState(nWhich)) { aCoreSet.ClearItem(nWhich); bReset = true; |