diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 12:25:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 12:27:32 +0100 |
commit | 33740b7d5abb8aca34692fbdaa787b26a60652a9 (patch) | |
tree | ad2574a7850e2aa8ac18eaff89f4a85567896692 /chart2 | |
parent | 43d7f4e3640c5e370fd1204739c2b0c7eb5f40e4 (diff) |
Replace exisiting TriState, AutoState with more generic TriState
Change-Id: Ida05478aae5a379775c671e0c2f2851d820d78be
Diffstat (limited to 'chart2')
5 files changed, 43 insertions, 43 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index ca29b4d13700..a6e995a51ccb 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -85,7 +85,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId, else { rCheckbox.EnableTriState( true ); - rCheckbox.SetState( STATE_DONTKNOW ); + rCheckbox.SetState( TRISTATE_INDET ); } } @@ -251,11 +251,11 @@ void DataLabelResources::EnableControls() // box states. Note that the check boxes are tri-state. { long nNumberOfCheckedLabelParts = 0; - if (m_pCBNumber->GetState() != STATE_NOCHECK) + if (m_pCBNumber->GetState() != TRISTATE_FALSE) ++nNumberOfCheckedLabelParts; - if (m_pCBPercent->GetState() != STATE_NOCHECK && m_pCBPercent->IsEnabled()) + if (m_pCBPercent->GetState() != TRISTATE_FALSE && m_pCBPercent->IsEnabled()) ++nNumberOfCheckedLabelParts; - if (m_pCBCategory->GetState() != STATE_NOCHECK) + if (m_pCBCategory->GetState() != TRISTATE_FALSE) ++nNumberOfCheckedLabelParts; m_pSeparatorResources->Enable( nNumberOfCheckedLabelParts > 1 ); @@ -290,13 +290,13 @@ sal_Bool DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const rOutAttrs.Put( SfxBoolItem( SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_bSourceFormatForPercent )); } - if( m_pCBNumber->GetState()!= STATE_DONTKNOW ) + if( m_pCBNumber->GetState()!= TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_NUMBER, m_pCBNumber->IsChecked() ) ); - if( m_pCBPercent->GetState()!= STATE_DONTKNOW ) + if( m_pCBPercent->GetState()!= TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_PERCENTAGE, m_pCBPercent->IsChecked() ) ); - if( m_pCBCategory->GetState()!= STATE_DONTKNOW ) + if( m_pCBCategory->GetState()!= TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_CATEGORY, m_pCBCategory->IsChecked() ) ); - if( m_pCBSymbol->GetState()!= STATE_DONTKNOW ) + if( m_pCBSymbol->GetState()!= TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYMBOL, m_pCBSymbol->IsChecked()) ); OUString aSep = m_aEntryMap[m_pLB_Separator->GetSelectEntryPos()]; diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index ae02ba08e4bd..1d2307adb4e1 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -179,7 +179,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) if( aState == SFX_ITEM_DONTCARE ) { m_pCB_SetIntercept->EnableTriState( true ); - m_pCB_SetIntercept->SetState( STATE_DONTKNOW ); + m_pCB_SetIntercept->SetState( TRISTATE_INDET ); } else { @@ -192,7 +192,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) if( aState == SFX_ITEM_DONTCARE ) { m_pCB_ShowEquation->EnableTriState( true ); - m_pCB_ShowEquation->SetState( STATE_DONTKNOW ); + m_pCB_ShowEquation->SetState( TRISTATE_INDET ); } else { @@ -205,7 +205,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) if( aState == SFX_ITEM_DONTCARE ) { m_pCB_ShowCorrelationCoeff->EnableTriState( true ); - m_pCB_ShowCorrelationCoeff->SetState( STATE_DONTKNOW ); + m_pCB_ShowCorrelationCoeff->SetState( TRISTATE_INDET ); } else { @@ -247,10 +247,10 @@ sal_Bool TrendlineResources::FillItemSet(SfxItemSet& rOutAttrs) const if( m_bTrendLineUnique ) rOutAttrs.Put( SvxChartRegressItem( m_eTrendLineType, SCHATTR_REGRESSION_TYPE )); - if( m_pCB_ShowEquation->GetState() != STATE_DONTKNOW ) + if( m_pCB_ShowEquation->GetState() != TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_REGRESSION_SHOW_EQUATION, m_pCB_ShowEquation->IsChecked() )); - if( m_pCB_ShowCorrelationCoeff->GetState() != STATE_DONTKNOW ) + if( m_pCB_ShowCorrelationCoeff->GetState() != TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_REGRESSION_SHOW_COEFF, m_pCB_ShowCorrelationCoeff->IsChecked() )); OUString aName = m_pEE_Name->GetText(); @@ -271,7 +271,7 @@ sal_Bool TrendlineResources::FillItemSet(SfxItemSet& rOutAttrs) const m_pNumFormatter->IsNumberFormat(m_pFmtFld_ExtrapolateBackward->GetText(),nIndex,aValue); rOutAttrs.Put(SvxDoubleItem( aValue, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD ) ); - if( m_pCB_SetIntercept->GetState() != STATE_DONTKNOW ) + if( m_pCB_SetIntercept->GetState() != TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_REGRESSION_SET_INTERCEPT, m_pCB_SetIntercept->IsChecked() )); aValue = 0.0; @@ -301,8 +301,8 @@ void TrendlineResources::UpdateControlStates() m_pFmtFld_InterceptValue->Enable( bInterceptAvailable ); if(bMovingAverage) { - m_pCB_ShowEquation->SetState( STATE_NOCHECK ); - m_pCB_ShowCorrelationCoeff->SetState( STATE_NOCHECK ); + m_pCB_ShowEquation->SetState( TRISTATE_FALSE ); + m_pCB_ShowCorrelationCoeff->SetState( TRISTATE_FALSE ); } m_pCB_ShowEquation->Enable(!bMovingAverage); m_pCB_ShowCorrelationCoeff->Enable(!bMovingAverage); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index abb672f58a4f..ea1c355e6f4e 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -141,13 +141,13 @@ void ThreeD_SceneAppearance_TabPage::applyRoundedEdgeAndObjectLinesToModel() switch( m_pCB_ObjectLines->GetState()) { - case STATE_NOCHECK: + case TRISTATE_FALSE: nObjectLines = 0; break; - case STATE_CHECK: + case TRISTATE_TRUE: nObjectLines = 1; break; - case STATE_DONTKNOW: + case TRISTATE_INDET: nObjectLines = -1; break; } @@ -155,13 +155,13 @@ void ThreeD_SceneAppearance_TabPage::applyRoundedEdgeAndObjectLinesToModel() sal_Int32 nCurrentRoundedEdges = -1; switch( m_pCB_RoundedEdge->GetState() ) { - case STATE_NOCHECK: + case TRISTATE_FALSE: nCurrentRoundedEdges = 0; break; - case STATE_CHECK: + case TRISTATE_TRUE: nCurrentRoundedEdges = 5; break; - case STATE_DONTKNOW: + case TRISTATE_INDET: nCurrentRoundedEdges = -1; break; } @@ -181,13 +181,13 @@ void ThreeD_SceneAppearance_TabPage::applyShadeModeToModel() switch( m_pCB_Shading->GetState()) { - case STATE_NOCHECK: + case TRISTATE_FALSE: aShadeMode = drawing::ShadeMode_FLAT; break; - case STATE_CHECK: + case TRISTATE_TRUE: aShadeMode = drawing::ShadeMode_SMOOTH; break; - case STATE_DONTKNOW: + case TRISTATE_INDET: // nothing break; } @@ -215,7 +215,7 @@ void ThreeD_SceneAppearance_TabPage::initControlsFromModel() else { m_pCB_Shading->EnableTriState( true ); - m_pCB_Shading->SetState( STATE_DONTKNOW ); + m_pCB_Shading->SetState( TRISTATE_INDET ); } if(aProps.m_nObjectLines == 0) @@ -231,7 +231,7 @@ void ThreeD_SceneAppearance_TabPage::initControlsFromModel() else { m_pCB_ObjectLines->EnableTriState( true ); - m_pCB_ObjectLines->SetState( STATE_DONTKNOW ); + m_pCB_ObjectLines->SetState( TRISTATE_INDET ); } if(aProps.m_nRoundedEdges >= 5) @@ -242,7 +242,7 @@ void ThreeD_SceneAppearance_TabPage::initControlsFromModel() else if(aProps.m_nRoundedEdges<0) { m_pCB_RoundedEdge->EnableTriState( false ); - m_pCB_RoundedEdge->SetState( STATE_DONTKNOW ); + m_pCB_RoundedEdge->SetState( TRISTATE_INDET ); } else { diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 3389bf869af4..f1126e5a56f8 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -69,7 +69,7 @@ SchAxisLabelTabPage::SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rIn m_pCbStacked->EnableTriState( false ); m_pOrientHlp->AddDependentWindow( *m_pFlOrient ); - m_pOrientHlp->AddDependentWindow( *m_pFtRotate, STATE_CHECK ); + m_pOrientHlp->AddDependentWindow( *m_pFtRotate, TRISTATE_TRUE ); m_pCbShowDescription->SetClickHdl( LINK( this, SchAxisLabelTabPage, ToggleShowLabel ) ); @@ -91,9 +91,9 @@ SfxTabPage* SchAxisLabelTabPage::Create( Window* pParent, const SfxItemSet& rAtt sal_Bool SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { bool bStacked = false; - if( m_pOrientHlp->GetStackedState() != STATE_DONTKNOW ) + if( m_pOrientHlp->GetStackedState() != TRISTATE_INDET ) { - bStacked = m_pOrientHlp->GetStackedState() == STATE_CHECK; + bStacked = m_pOrientHlp->GetStackedState() == TRISTATE_TRUE; if( !m_bHasInitialStacking || (bStacked != m_bInitialStacking) ) rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bStacked ) ); } @@ -125,11 +125,11 @@ sal_Bool SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) rOutAttrs.Put( SvxChartTextOrderItem( eOrder, SCHATTR_AXIS_LABEL_ORDER )); } - if( m_pCbTextOverlap->GetState() != STATE_DONTKNOW ) + if( m_pCbTextOverlap->GetState() != TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_AXIS_LABEL_OVERLAP, m_pCbTextOverlap->IsChecked() ) ); - if( m_pCbTextBreak->GetState() != STATE_DONTKNOW ) + if( m_pCbTextBreak->GetState() != TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_AXIS_LABEL_BREAK, m_pCbTextBreak->IsChecked() ) ); - if( m_pCbShowDescription->GetState() != STATE_DONTKNOW ) + if( m_pCbShowDescription->GetState() != TRISTATE_INDET ) rOutAttrs.Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_pCbShowDescription->IsChecked() ) ); if( m_pLbTextDirection->GetSelectEntryCount() > 0 ) @@ -147,7 +147,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) if( aState == SFX_ITEM_DONTCARE ) { m_pCbShowDescription->EnableTriState( true ); - m_pCbShowDescription->SetState( STATE_DONTKNOW ); + m_pCbShowDescription->SetState( TRISTATE_INDET ); } else { @@ -183,9 +183,9 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) m_bHasInitialStacking = aState != SFX_ITEM_DONTCARE; if( m_bHasInitialDegrees ) - m_pOrientHlp->SetStackedState( m_bInitialStacking ? STATE_CHECK : STATE_NOCHECK ); + m_pOrientHlp->SetStackedState( m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE ); else - m_pOrientHlp->SetStackedState( STATE_DONTKNOW ); + m_pOrientHlp->SetStackedState( TRISTATE_INDET ); if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SFX_ITEM_SET ) m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); @@ -195,7 +195,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) if( aState == SFX_ITEM_DONTCARE ) { m_pCbTextOverlap->EnableTriState( true ); - m_pCbTextOverlap->SetState( STATE_DONTKNOW ); + m_pCbTextOverlap->SetState( TRISTATE_INDET ); } else { @@ -214,7 +214,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) if( aState == SFX_ITEM_DONTCARE ) { m_pCbTextBreak->EnableTriState( true ); - m_pCbTextBreak->SetState( STATE_DONTKNOW ); + m_pCbTextBreak->SetState( TRISTATE_INDET ); } else { @@ -284,7 +284,7 @@ void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories ) IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel) { - sal_Bool bEnable = ( m_pCbShowDescription->GetState() != STATE_NOCHECK ); + sal_Bool bEnable = ( m_pCbShowDescription->GetState() != TRISTATE_FALSE ); m_pOrientHlp->Enable( bEnable ); m_pFlOrder->Enable( bEnable ); diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 8e94ae18276f..0bf20291f50d 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -48,7 +48,7 @@ SchAlignmentTabPage::SchAlignmentTabPage(Window* pWindow, m_pCbStacked->EnableTriState( false ); m_pOrientHlp->Enable( true ); - m_pOrientHlp->AddDependentWindow( *m_pFtRotate, STATE_CHECK ); + m_pOrientHlp->AddDependentWindow( *m_pFtRotate, TRISTATE_TRUE ); if( !bWithRotation ) { @@ -76,7 +76,7 @@ SfxTabPage* SchAlignmentTabPage::CreateWithoutRotation(Window* pParent, sal_Bool SchAlignmentTabPage::FillItemSet(SfxItemSet& rOutAttrs) { //Since 04/1998 text can be rotated by an arbitrary angle: SCHATTR_TEXT_DEGREES - bool bStacked = m_pOrientHlp->GetStackedState() == STATE_CHECK; + bool bStacked = m_pOrientHlp->GetStackedState() == TRISTATE_TRUE; rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bStacked ) ); sal_Int32 nDegrees = bStacked ? 0 : m_pCtrlDial->GetRotation(); @@ -97,7 +97,7 @@ void SchAlignmentTabPage::Reset(const SfxItemSet& rInAttrs) pItem = GetItem( rInAttrs, SCHATTR_TEXT_STACKED ); bool bStacked = pItem && ((const SfxBoolItem*)pItem)->GetValue(); - m_pOrientHlp->SetStackedState( bStacked ? STATE_CHECK : STATE_NOCHECK ); + m_pOrientHlp->SetStackedState( bStacked ? TRISTATE_TRUE : TRISTATE_FALSE ); if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pItem) == SFX_ITEM_SET) m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pItem)->GetValue()) ); |