diff options
Diffstat (limited to 'chart2/source/controller/dialogs/res_ErrorBar.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/res_ErrorBar.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 1e5078a301fc..ae8e7cd28e2e 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -22,12 +22,11 @@ #include <RangeSelectionHelper.hxx> #include <helpids.h> #include <chartview/ChartSfxItemIds.hxx> -#include <com/sun/star/chart2/XChartDocument.hpp> #include <vcl/weld.hxx> #include <ChartModel.hxx> #include <rtl/math.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <osl/diagnose.h> #include <svl/stritem.hxx> @@ -476,7 +475,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // category m_eErrorKind = SvxChartKindError::NONE; SfxItemState aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem ); - m_bErrorKindUnique = ( aState != SfxItemState::DONTCARE ); + m_bErrorKindUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET ) m_eErrorKind = static_cast<const SvxChartKindErrorItem*>(pPoolItem)->GetValue(); @@ -516,16 +515,14 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } // parameters - aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, true, &pPoolItem ); - if( aState == SfxItemState::SET ) + if( const SvxDoubleItem* pDoubleItem = rInAttrs.GetItemIfSet( SCHATTR_STAT_CONSTPLUS ) ) { - m_fPlusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue(); + m_fPlusValue = pDoubleItem->GetValue(); } - aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, true, &pPoolItem ); - if( aState == SfxItemState::SET ) + if( const SvxDoubleItem* pStatItem = rInAttrs.GetItemIfSet( SCHATTR_STAT_CONSTMINUS ) ) { - m_fMinusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue(); + m_fMinusValue = pStatItem->GetValue(); if( m_eErrorKind != SvxChartKindError::Range && m_fPlusValue == m_fMinusValue ) @@ -534,7 +531,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // indicator aState = rInAttrs.GetItemState( SCHATTR_STAT_INDICATE, true, &pPoolItem ); - m_bIndicatorUnique = ( aState != SfxItemState::DONTCARE ); + m_bIndicatorUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET) m_eIndicate = static_cast<const SvxChartIndicateItem *>(pPoolItem)->GetValue(); @@ -563,7 +560,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // ranges aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_POS, true, &pPoolItem ); - m_bRangePosUnique = ( aState != SfxItemState::DONTCARE ); + m_bRangePosUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET ) { OUString sRangePositive = static_cast< const SfxStringItem * >( pPoolItem )->GetValue(); @@ -571,7 +568,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_NEG, true, &pPoolItem ); - m_bRangeNegUnique = ( aState != SfxItemState::DONTCARE ); + m_bRangeNegUnique = ( aState != SfxItemState::INVALID ); if( aState == SfxItemState::SET ) { OUString sRangeNegative = static_cast< const SfxStringItem * >( pPoolItem )->GetValue(); |