summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx10
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx2
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx16
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.cxx16
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx6
-rw-r--r--cui/source/options/optgdlg.cxx2
-rw-r--r--cui/source/tabpages/align.cxx10
-rw-r--r--cui/source/tabpages/chardlg.cxx20
-rw-r--r--cui/source/tabpages/measure.cxx50
-rw-r--r--cui/source/tabpages/paragrph.cxx106
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx16
-rw-r--r--cui/source/tabpages/textanim.cxx50
-rw-r--r--cui/source/tabpages/textattr.cxx62
-rw-r--r--cui/source/tabpages/tparea.cxx76
-rw-r--r--cui/source/tabpages/tpline.cxx20
-rw-r--r--cui/source/tabpages/tpshadow.cxx10
-rw-r--r--cui/source/tabpages/transfrm.cxx44
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx6
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx10
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx6
-rw-r--r--forms/source/component/Button.cxx6
-rw-r--r--forms/source/component/CheckBox.cxx12
-rw-r--r--forms/source/component/Filter.cxx20
-rw-r--r--forms/source/component/RadioButton.cxx8
-rw-r--r--forms/source/component/refvaluecomponent.cxx28
-rw-r--r--forms/source/inc/togglestate.hxx2
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx6
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx8
-rw-r--r--framework/source/uielement/toolbarmanager.cxx2
-rw-r--r--framework/source/uielement/toolbarmerger.cxx2
-rw-r--r--include/sfx2/controlwrapper.hxx12
-rw-r--r--include/svx/orienthelper.hxx8
-rw-r--r--include/toolkit/controls/unocontrols.hxx3
-rw-r--r--include/tools/gen.hxx2
-rw-r--r--include/tools/wintypes.hxx5
-rw-r--r--include/vcl/button.hxx8
-rw-r--r--include/vcl/settings.hxx10
-rw-r--r--include/vcl/toolbox.hxx4
-rw-r--r--rsc/source/parser/rscibas.cxx7
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx22
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx32
-rw-r--r--sc/source/ui/dbgui/validate.cxx12
-rw-r--r--sc/source/ui/navipi/navipi.cxx2
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx10
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx32
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx10
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--sd/source/ui/dlg/paragr.cxx10
-rw-r--r--sd/source/ui/view/drviews7.cxx22
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx8
-rw-r--r--sfx2/source/dialog/itemconnect.cxx6
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx8
-rw-r--r--svtools/source/contnr/svtabbx.cxx4
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx6
-rw-r--r--svx/source/dialog/orienthelper.cxx20
-rw-r--r--svx/source/engine3d/float3d.cxx122
-rw-r--r--svx/source/fmcomp/gridcell.cxx20
-rw-r--r--svx/source/fmcomp/gridctrl.cxx8
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/fmsrcimp.cxx4
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx4
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx2
-rw-r--r--svx/source/tbxctrls/layctrl.cxx2
-rw-r--r--svx/source/tbxctrls/linectrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx24
-rw-r--r--sw/source/filter/html/htmlform.cxx4
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx28
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx70
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx16
-rw-r--r--toolkit/source/controls/unocontrols.cxx8
-rw-r--r--vcl/source/app/settings.cxx42
-rw-r--r--vcl/source/control/button.cxx52
-rw-r--r--vcl/source/window/builder.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx38
-rw-r--r--vcl/source/window/toolbox2.cxx20
-rw-r--r--xmloff/source/forms/elementexport.cxx6
-rw-r--r--xmloff/source/forms/formenums.cxx8
-rw-r--r--xmloff/source/forms/layerimport.cxx6
89 files changed, 731 insertions, 736 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
index f23f472e1e53..966def8fa9d2 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
@@ -58,7 +58,7 @@ namespace accessibility
{
mpBrowseBox->FillAccessibleStateSetForCell(
*pStateSetHelper, getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) );
- if ( m_eState == STATE_CHECK )
+ if ( m_eState == TRISTATE_TRUE )
pStateSetHelper->AddState( AccessibleStateType::CHECKED );
}
return pStateSetHelper;
@@ -73,13 +73,13 @@ namespace accessibility
sal_Int32 nValue = 0;
switch( m_eState )
{
- case STATE_NOCHECK:
+ case TRISTATE_FALSE:
nValue = 0;
break;
- case STATE_CHECK:
+ case TRISTATE_TRUE:
nValue = 1;
break;
- case STATE_DONTKNOW:
+ case TRISTATE_INDET:
nValue = 2;
break;
}
@@ -139,7 +139,7 @@ namespace accessibility
void AccessibleCheckBoxCell::SetChecked( sal_Bool _bChecked )
{
- m_eState = _bChecked ? STATE_CHECK : STATE_NOCHECK;
+ m_eState = _bChecked ? TRISTATE_TRUE : TRISTATE_FALSE;
Any aOldValue, aNewValue;
if ( _bChecked )
aNewValue <<= AccessibleStateType::CHECKED;
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index b316a4a39d17..c6511356b4e5 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -108,7 +108,7 @@ namespace accessibility
if ( m_pTabListBox->IsTransientChildrenDisabled() )
{
aNewValue <<= AccessibleStateType::FOCUSED;
- TriState eState = STATE_DONTKNOW;
+ TriState eState = TRISTATE_INDET;
if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) )
{
AccessibleCheckBoxCell* pCell =
@@ -153,7 +153,7 @@ namespace accessibility
{
sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry );
Reference< XAccessible > xChild = m_pTabListBox->CreateAccessibleCell( nRow, m_pTabListBox->GetCurrColumn() );
- TriState eState = STATE_DONTKNOW;
+ TriState eState = TRISTATE_INDET;
if ( m_pTabListBox->IsCellCheckBox( nRow, m_pTabListBox->GetCurrColumn(), eState ) )
{
AccessibleCheckBoxCell* pCell = static_cast< AccessibleCheckBoxCell* >( xChild.get() );
@@ -198,7 +198,7 @@ namespace accessibility
{
sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry );
sal_uInt16 nCol = m_pTabListBox->GetCurrColumn();
- TriState eState = STATE_DONTKNOW;
+ TriState eState = TRISTATE_INDET;
if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) )
{
Reference< XAccessible > xChild =
@@ -229,7 +229,7 @@ namespace accessibility
aOldValue <<= OUString( pData->m_sOldText );
OUString sNewText( m_pTabListBox->GetCellText( nRow, nCol ) );
aNewValue <<= sNewText;
- TriState eState = STATE_DONTKNOW;
+ TriState eState = TRISTATE_INDET;
if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) )
{
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 9bf3b8169647..a4d0e2fde6c3 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -66,7 +66,7 @@ void VCLXAccessibleButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowE
Any aNewValue;
PushButton* pButton = (PushButton*) GetWindow();
- if ( pButton && pButton->GetState() == STATE_CHECK )
+ if ( pButton && pButton->GetState() == TRISTATE_TRUE )
aNewValue <<= AccessibleStateType::CHECKED;
else
aOldValue <<= AccessibleStateType::CHECKED;
@@ -90,7 +90,7 @@ void VCLXAccessibleButton::FillAccessibleStateSet( utl::AccessibleStateSetHelper
{
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
- if ( pButton->GetState() == STATE_CHECK )
+ if ( pButton->GetState() == TRISTATE_TRUE )
rStateSet.AddState( AccessibleStateType::CHECKED );
if ( pButton->IsPressed() )
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index a748f7319093..3fa03182091c 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -302,7 +302,7 @@ void VCLXAccessibleToolBox::UpdateIndeterminate_Impl( sal_Int32 _nPos )
VCLXAccessibleToolBoxItem* pItem =
static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() );
if ( pItem )
- pItem->SetIndeterminate( pToolBox->GetItemState( nItemId ) == STATE_DONTKNOW );
+ pItem->SetIndeterminate( pToolBox->GetItemState( nItemId ) == TRISTATE_INDET );
}
}
}
@@ -738,7 +738,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal
pChild->SetFocus( sal_True );
if ( pToolBox->IsItemChecked( nItemId ) )
pChild->SetChecked( sal_True );
- if ( pToolBox->GetItemState( nItemId ) == STATE_DONTKNOW )
+ if ( pToolBox->GetItemState( nItemId ) == TRISTATE_INDET )
pChild->SetIndeterminate( true );
m_aAccessibleChildren.insert( ToolBoxItemsMap::value_type( i, xChild ) );
}
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 2ec93928f258..6ff821c457b3 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -76,7 +76,7 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
m_nItemId = m_pToolBox->GetItemId( (sal_uInt16)m_nIndexInParent );
m_sOldName = GetText( true );
m_bIsChecked = m_pToolBox->IsItemChecked( m_nItemId );
- m_bIndeterminate = ( m_pToolBox->GetItemState( m_nItemId ) == STATE_DONTKNOW );
+ m_bIndeterminate = ( m_pToolBox->GetItemState( m_nItemId ) == TRISTATE_INDET );
ToolBoxItemType eType = m_pToolBox->GetItemType( (sal_uInt16)m_nIndexInParent );
switch ( eType )
{
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()) );
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 83bb0eeb8436..47f83734bebc 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1193,7 +1193,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
*/
if (
m_pCTLSupportCB->IsChecked() &&
- (m_pCTLSupportCB->GetSavedValue() != STATE_CHECK ||
+ (m_pCTLSupportCB->GetSavedValue() != TRISTATE_TRUE ||
m_pComplexLanguageLB->GetSavedValue() != m_pComplexLanguageLB->GetSelectEntryPos())
)
{
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 4c05ba49e1ed..e9fe995606b9 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -199,11 +199,11 @@ AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttr
InitVsRefEgde();
// windows to be disabled, if stacked text is turned ON
- m_pOrientHlp->AddDependentWindow( *m_pFtRotate, STATE_CHECK );
- m_pOrientHlp->AddDependentWindow( *m_pFtRefEdge, STATE_CHECK );
- m_pOrientHlp->AddDependentWindow( *m_pVsRefEdge, STATE_CHECK );
+ m_pOrientHlp->AddDependentWindow( *m_pFtRotate, TRISTATE_TRUE );
+ m_pOrientHlp->AddDependentWindow( *m_pFtRefEdge, TRISTATE_TRUE );
+ m_pOrientHlp->AddDependentWindow( *m_pVsRefEdge, TRISTATE_TRUE );
// windows to be disabled, if stacked text is turned OFF
- m_pOrientHlp->AddDependentWindow( *m_pCbAsianMode, STATE_NOCHECK );
+ m_pOrientHlp->AddDependentWindow( *m_pCbAsianMode, TRISTATE_FALSE );
Link aLink = LINK( this, AlignmentTabPage, UpdateEnableHdl );
@@ -375,7 +375,7 @@ void AlignmentTabPage::UpdateEnableControls()
m_pBtnHyphen->Enable( m_pBtnWrap->IsChecked() || bHorBlock );
// shrink only without automatic line break, and not for block, fill or distribute.
- m_pBtnShrink->Enable( (m_pBtnWrap->GetState() == STATE_NOCHECK) && !bHorBlock && !bHorFill && !bHorDist );
+ m_pBtnShrink->Enable( (m_pBtnWrap->GetState() == TRISTATE_FALSE) && !bHorBlock && !bHorFill && !bHorDist );
// visibility of frames
m_pAlignmentFrame->Show(m_pLbHorAlign->IsVisible() || m_pEdIndent->IsVisible() ||
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index b5b05ae0a7b3..ce3dedb44438 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -149,7 +149,7 @@ static sal_uInt16 pTwoLinesRanges[] =
inline bool StateToAttr( TriState aState )
{
- return ( STATE_CHECK == aState );
+ return ( TRISTATE_TRUE == aState );
}
// class SvxCharBasePage -------------------------------------------------
@@ -1886,7 +1886,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
break;
case SFX_ITEM_DONTCARE:
- m_pIndividualWordsBtn->SetState( STATE_DONTKNOW );
+ m_pIndividualWordsBtn->SetState( TRISTATE_INDET );
break;
case SFX_ITEM_DEFAULT:
@@ -2036,7 +2036,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
break;
case SFX_ITEM_DONTCARE:
- m_pOutlineBtn->SetState( STATE_DONTKNOW );
+ m_pOutlineBtn->SetState( TRISTATE_INDET );
break;
case SFX_ITEM_DEFAULT:
@@ -2065,7 +2065,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
break;
case SFX_ITEM_DONTCARE:
- m_pShadowBtn->SetState( STATE_DONTKNOW );
+ m_pShadowBtn->SetState( TRISTATE_INDET );
break;
case SFX_ITEM_DEFAULT:
@@ -2094,7 +2094,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
break;
case SFX_ITEM_DONTCARE:
- m_pBlinkingBtn->SetState( STATE_DONTKNOW );
+ m_pBlinkingBtn->SetState( TRISTATE_INDET );
break;
case SFX_ITEM_DEFAULT:
@@ -2122,7 +2122,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
break;
case SFX_ITEM_DONTCARE:
- m_pHiddenBtn->SetState( STATE_DONTKNOW );
+ m_pHiddenBtn->SetState( TRISTATE_INDET );
break;
case SFX_ITEM_DEFAULT:
@@ -2391,7 +2391,7 @@ sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
!StateToAttr( eState ) && ( (SvxContourItem*)pItem )->GetValue() )
bChanged = true;
- if ( bChanged && eState != STATE_DONTKNOW )
+ if ( bChanged && eState != TRISTATE_INDET )
{
rSet.Put( SvxContourItem( StateToAttr( eState ), nWhich ) );
bModified = sal_True;
@@ -2417,7 +2417,7 @@ sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
!StateToAttr( eState ) && ( (SvxShadowedItem*)pItem )->GetValue() )
bChanged = true;
- if ( bChanged && eState != STATE_DONTKNOW )
+ if ( bChanged && eState != TRISTATE_INDET )
{
rSet.Put( SvxShadowedItem( StateToAttr( eState ), nWhich ) );
bModified = sal_True;
@@ -2443,7 +2443,7 @@ sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
!StateToAttr( eState ) && ( (SvxBlinkItem*)pItem )->GetValue() )
bChanged = true;
- if ( bChanged && eState != STATE_DONTKNOW )
+ if ( bChanged && eState != TRISTATE_INDET )
{
rSet.Put( SvxBlinkItem( StateToAttr( eState ), nWhich ) );
bModified = true;
@@ -2468,7 +2468,7 @@ sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
!StateToAttr( eState ) && ( (SvxCharHiddenItem*)pItem )->GetValue() )
bChanged = true;
- if ( bChanged && eState != STATE_DONTKNOW )
+ if ( bChanged && eState != TRISTATE_INDET )
{
rSet.Put( SvxCharHiddenItem( StateToAttr( eState ), nWhich ) );
bModified = sal_True;
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 96b0d0e580be..bd92d55972f5 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -250,12 +250,12 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs )
if( rAttrs.GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != SFX_ITEM_DONTCARE )
{
m_pTsbBelowRefEdge->SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs.Get( SDRATTR_MEASUREBELOWREFEDGE ) ).
- GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbBelowRefEdge->EnableTriState( false );
}
else
{
- m_pTsbBelowRefEdge->SetState( STATE_DONTKNOW );
+ m_pTsbBelowRefEdge->SetState( TRISTATE_INDET );
}
m_pTsbBelowRefEdge->SaveValue();
@@ -279,12 +279,12 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs )
if( rAttrs.GetItemState( SDRATTR_MEASURETEXTROTA90 ) != SFX_ITEM_DONTCARE )
{
m_pTsbParallel->SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs.Get( SDRATTR_MEASURETEXTROTA90 ) ).
- GetValue() ? STATE_NOCHECK : STATE_CHECK );
+ GetValue() ? TRISTATE_FALSE : TRISTATE_TRUE );
m_pTsbParallel->EnableTriState( false );
}
else
{
- m_pTsbParallel->SetState( STATE_DONTKNOW );
+ m_pTsbParallel->SetState( TRISTATE_INDET );
}
m_pTsbParallel->SaveValue();
@@ -292,12 +292,12 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs )
if( rAttrs.GetItemState( SDRATTR_MEASURESHOWUNIT ) != SFX_ITEM_DONTCARE )
{
m_pTsbShowUnit->SetState( ( ( const SdrMeasureShowUnitItem& )rAttrs.Get( SDRATTR_MEASURESHOWUNIT ) ).
- GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbShowUnit->EnableTriState( false );
}
else
{
- m_pTsbShowUnit->SetState( STATE_DONTKNOW );
+ m_pTsbShowUnit->SetState( TRISTATE_INDET );
}
m_pTsbShowUnit->SaveValue();
@@ -381,13 +381,13 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs )
if( eHPos == SDRMEASURE_TEXTHAUTO )
{
- m_pTsbAutoPosH->SetState( STATE_CHECK );
+ m_pTsbAutoPosH->SetState( TRISTATE_TRUE );
nState = CS_NOHORZ;
}
if( eVPos == SDRMEASURE_TEXTVAUTO )
{
- m_pTsbAutoPosV->SetState( STATE_CHECK );
+ m_pTsbAutoPosV->SetState( TRISTATE_TRUE );
nState |= CS_NOVERT;
}
@@ -399,8 +399,8 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs )
else
{
m_pCtlPosition->Reset();
- m_pTsbAutoPosV->SetState( STATE_DONTKNOW );
- m_pTsbAutoPosH->SetState( STATE_DONTKNOW );
+ m_pTsbAutoPosV->SetState( TRISTATE_INDET );
+ m_pTsbAutoPosH->SetState( TRISTATE_INDET );
}
// put the attributes to the preview-control,
@@ -462,7 +462,7 @@ sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs)
eState = m_pTsbBelowRefEdge->GetState();
if( eState != m_pTsbBelowRefEdge->GetSavedValue() )
{
- rAttrs.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) TRISTATE_TRUE == eState ) );
bModified = sal_True;
}
@@ -478,14 +478,14 @@ sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs)
eState = m_pTsbParallel->GetState();
if( eState != m_pTsbParallel->GetSavedValue() )
{
- rAttrs.Put( SdrMeasureTextRota90Item( (sal_Bool) STATE_NOCHECK == eState ) );
+ rAttrs.Put( SdrMeasureTextRota90Item( (sal_Bool) TRISTATE_FALSE == eState ) );
bModified = sal_True;
}
eState = m_pTsbShowUnit->GetState();
if( eState != m_pTsbShowUnit->GetSavedValue() )
{
- rAttrs.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrMeasureShowUnitItem( (sal_Bool) TRISTATE_TRUE == eState ) );
bModified = sal_True;
}
@@ -530,10 +530,10 @@ sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs)
case RP_RB: eVPos = SDRMEASURE_BELOW;
eHPos = SDRMEASURE_TEXTRIGHTOUTSIDE; break;
}
- if( m_pTsbAutoPosH->GetState() == STATE_CHECK )
+ if( m_pTsbAutoPosH->GetState() == TRISTATE_TRUE )
eHPos = SDRMEASURE_TEXTHAUTO;
- if( m_pTsbAutoPosV->GetState() == STATE_CHECK )
+ if( m_pTsbAutoPosV->GetState() == TRISTATE_TRUE )
eVPos = SDRMEASURE_TEXTVAUTO;
if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTVPOS ) != SFX_ITEM_DONTCARE )
@@ -611,7 +611,7 @@ void SvxMeasurePage::PointChanged( Window* pWindow, RECT_POINT /*eRP*/ )
IMPL_LINK( SvxMeasurePage, ClickAutoPosHdl_Impl, void *, p )
{
- if( m_pTsbAutoPosH->GetState() == STATE_CHECK )
+ if( m_pTsbAutoPosH->GetState() == TRISTATE_TRUE )
{
switch( m_pCtlPosition->GetActualRP() )
{
@@ -632,7 +632,7 @@ IMPL_LINK( SvxMeasurePage, ClickAutoPosHdl_Impl, void *, p )
default: ;//prevent warning
}
}
- if( m_pTsbAutoPosV->GetState() == STATE_CHECK )
+ if( m_pTsbAutoPosV->GetState() == TRISTATE_TRUE )
{
switch( m_pCtlPosition->GetActualRP() )
{
@@ -694,8 +694,8 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p )
if( p == m_pTsbBelowRefEdge )
{
TriState eState = m_pTsbBelowRefEdge->GetState();
- if( eState != STATE_DONTKNOW )
- aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) );
+ if( eState != TRISTATE_INDET )
+ aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) TRISTATE_TRUE == eState ) );
}
if( p == m_pMtrFldDecimalPlaces )
@@ -708,15 +708,15 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p )
if( p == m_pTsbParallel )
{
TriState eState = m_pTsbParallel->GetState();
- if( eState != STATE_DONTKNOW )
- aAttrSet.Put( SdrMeasureTextRota90Item( (sal_Bool) STATE_NOCHECK == eState ) );
+ if( eState != TRISTATE_INDET )
+ aAttrSet.Put( SdrMeasureTextRota90Item( (sal_Bool) TRISTATE_FALSE == eState ) );
}
if( p == m_pTsbShowUnit )
{
TriState eState = m_pTsbShowUnit->GetState();
- if( eState != STATE_DONTKNOW )
- aAttrSet.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) );
+ if( eState != TRISTATE_INDET )
+ aAttrSet.Put( SdrMeasureShowUnitItem( (sal_Bool) TRISTATE_TRUE == eState ) );
}
if( p == m_pLbUnit )
@@ -764,13 +764,13 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p )
CTL_STATE nState = 0;
- if( m_pTsbAutoPosH->GetState() == STATE_CHECK )
+ if( m_pTsbAutoPosH->GetState() == TRISTATE_TRUE )
{
eHPos = SDRMEASURE_TEXTHAUTO;
nState = CS_NOHORZ;
}
- if( m_pTsbAutoPosV->GetState() == STATE_CHECK )
+ if( m_pTsbAutoPosV->GetState() == TRISTATE_TRUE )
{
eVPos = SDRMEASURE_TEXTVAUTO;
nState |= CS_NOVERT;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index e813985f278b..0df6735c1cd6 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1336,9 +1336,9 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
{
SvxHyphenZoneItem aHyphen(
(const SvxHyphenZoneItem&)GetItemSet().Get( _nWhich ) );
- aHyphen.SetHyphen( eHyphenState == STATE_CHECK );
+ aHyphen.SetHyphen( eHyphenState == TRISTATE_TRUE );
- if ( eHyphenState == STATE_CHECK )
+ if ( eHyphenState == TRISTATE_TRUE )
{
aHyphen.GetMinLead() = (sal_uInt8)m_pExtHyphenBeforeBox->GetValue();
aHyphen.GetMinTrail() = (sal_uInt8)m_pExtHyphenAfterBox->GetValue();
@@ -1376,10 +1376,10 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
_nWhich = GetWhich( SID_ATTR_PARA_MODEL );
OUString sPage;
if ( eState != m_pApplyCollBtn->GetSavedValue() ||
- ( STATE_CHECK == eState &&
+ ( TRISTATE_TRUE == eState &&
m_pApplyCollBox->GetSelectEntryPos() != m_pApplyCollBox->GetSavedValue() ) )
{
- if ( eState == STATE_CHECK )
+ if ( eState == TRISTATE_TRUE )
{
sPage = m_pApplyCollBox->GetSelectEntry();
bIsPageModel = !sPage.isEmpty();
@@ -1394,7 +1394,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
else
bIsPageModel = false;
}
- else if(STATE_CHECK == eState && m_pApplyCollBtn->IsEnabled())
+ else if(TRISTATE_TRUE == eState && m_pApplyCollBtn->IsEnabled())
bIsPageModel = true;
else
rOutSet.Put( SvxPageModelItem( sPage, sal_False, _nWhich ) );
@@ -1409,7 +1409,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
eState = m_pPageBreakBox->GetState();
SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, false);
- if ( (eModelState == SFX_ITEM_SET && STATE_CHECK == m_pPageBreakBox->GetState()) ||
+ if ( (eModelState == SFX_ITEM_SET && TRISTATE_TRUE == m_pPageBreakBox->GetState()) ||
eState != m_pPageBreakBox->GetSavedValue() ||
m_pBreakTypeLB->GetSelectEntryPos() != m_pBreakTypeLB->GetSavedValue() ||
m_pBreakPositionLB->GetSelectEntryPos() != m_pBreakPositionLB->GetSavedValue() )
@@ -1420,7 +1420,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
switch ( eState )
{
- case STATE_CHECK:
+ case TRISTATE_TRUE:
{
sal_Bool bBefore = m_pBreakPositionLB->GetSelectEntryPos() == 0;
@@ -1441,7 +1441,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
break;
}
- case STATE_NOCHECK:
+ case TRISTATE_FALSE:
aBreak.SetValue( SVX_BREAK_NONE );
break;
default: ; //prevent warning
@@ -1466,9 +1466,9 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
pOld = GetOldItem( rOutSet, SID_ATTR_PARA_SPLIT );
if ( !pOld || ( (const SvxFmtSplitItem*)pOld )->GetValue() !=
- ( eState == STATE_NOCHECK ) )
+ ( eState == TRISTATE_FALSE ) )
{
- rOutSet.Put( SvxFmtSplitItem( eState == STATE_NOCHECK, _nWhich ) );
+ rOutSet.Put( SvxFmtSplitItem( eState == TRISTATE_FALSE, _nWhich ) );
bModified = sal_True;
}
}
@@ -1482,7 +1482,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
pOld = GetOldItem( rOutSet, SID_ATTR_PARA_KEEP );
// if the status has changed, putting is necessary
- rOutSet.Put( SvxFmtKeepItem( eState == STATE_CHECK, _nWhich ) );
+ rOutSet.Put( SvxFmtKeepItem( eState == TRISTATE_TRUE, _nWhich ) );
bModified = sal_True;
}
@@ -1493,7 +1493,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
if ( eState != m_pWidowBox->GetSavedValue() ||
m_pWidowRowNo->IsValueModified() )
{
- SvxWidowsItem rItem( eState == STATE_CHECK ?
+ SvxWidowsItem rItem( eState == TRISTATE_TRUE ?
(sal_uInt8)m_pWidowRowNo->GetValue() : 0, _nWhich );
pOld = GetOldItem( rOutSet, SID_ATTR_PARA_WIDOWS );
@@ -1510,7 +1510,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
if ( eState != m_pOrphanBox->GetSavedValue() ||
m_pOrphanRowNo->IsValueModified() )
{
- SvxOrphansItem rItem( eState == STATE_CHECK ?
+ SvxOrphansItem rItem( eState == TRISTATE_TRUE ?
(sal_uInt8)m_pOrphanRowNo->GetValue() : 0, _nWhich );
pOld = GetOldItem( rOutSet, SID_ATTR_PARA_ORPHANS );
@@ -1540,7 +1540,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
m_pHyphenBox->EnableTriState( false );
bIsHyphen = rHyphen.IsHyphen();
- m_pHyphenBox->SetState( bIsHyphen ? STATE_CHECK : STATE_NOCHECK );
+ m_pHyphenBox->SetState( bIsHyphen ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pExtHyphenBeforeBox->SetValue( rHyphen.GetMinLead() );
m_pExtHyphenAfterBox->SetValue( rHyphen.GetMinTrail() );
@@ -1548,7 +1548,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
}
else
{
- m_pHyphenBox->SetState( STATE_DONTKNOW );
+ m_pHyphenBox->SetState( TRISTATE_INDET );
}
sal_Bool bEnable = bItemAvailable && bIsHyphen;
m_pExtHyphenBeforeBox->Enable(bEnable);
@@ -1586,7 +1586,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
m_pApplyCollBox->GetEntryPos( aStr ) != LISTBOX_ENTRY_NOTFOUND )
{
m_pApplyCollBox->SelectEntry( aStr );
- m_pApplyCollBtn->SetState( STATE_CHECK );
+ m_pApplyCollBtn->SetState( TRISTATE_TRUE );
bIsPageModel = sal_True;
m_pPageBreakBox->Enable();
@@ -1596,7 +1596,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
m_pBreakPositionFT->Enable();
m_pBreakPositionLB->Enable();
m_pApplyCollBtn->Enable();
- m_pPageBreakBox->SetState( STATE_CHECK );
+ m_pPageBreakBox->SetState( TRISTATE_TRUE );
//select page break
m_pBreakTypeLB->SelectEntryPos(0);
@@ -1606,13 +1606,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
else
{
m_pApplyCollBox->SetNoSelection();
- m_pApplyCollBtn->SetState( STATE_NOCHECK );
+ m_pApplyCollBtn->SetState( TRISTATE_FALSE );
}
}
else if ( SFX_ITEM_DONTCARE == eItemState )
{
m_pApplyCollBtn->EnableTriState( true );
- m_pApplyCollBtn->SetState( STATE_DONTKNOW );
+ m_pApplyCollBtn->SetState( TRISTATE_INDET );
m_pApplyCollBox->SetNoSelection();
}
else
@@ -1644,7 +1644,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
m_pBreakPositionFT->Enable();
m_pBreakPositionLB->Enable();
- m_pPageBreakBox->SetState( STATE_CHECK );
+ m_pPageBreakBox->SetState( TRISTATE_TRUE );
sal_Bool _bEnable = eBreak != SVX_BREAK_NONE &&
eBreak != SVX_BREAK_COLUMN_BEFORE &&
@@ -1657,7 +1657,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
}
if ( eBreak == SVX_BREAK_NONE )
- m_pPageBreakBox->SetState( STATE_NOCHECK );
+ m_pPageBreakBox->SetState( TRISTATE_FALSE );
sal_uInt16 nType = 0; // selection position in break type ListBox : Page
sal_uInt16 nPosition = 0; // selection position in break position ListBox : Before
@@ -1681,7 +1681,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
m_pBreakPositionLB->SelectEntryPos(nPosition);
}
else if ( SFX_ITEM_DONTCARE == eItemState )
- m_pPageBreakBox->SetState( STATE_DONTKNOW );
+ m_pPageBreakBox->SetState( TRISTATE_INDET );
else
{
m_pPageBreakBox->Enable(false);
@@ -1706,12 +1706,12 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
(const SvxFmtKeepItem&)rSet.Get( _nWhich );
if ( rKeep.GetValue() )
- m_pKeepParaBox->SetState( STATE_CHECK );
+ m_pKeepParaBox->SetState( TRISTATE_TRUE );
else
- m_pKeepParaBox->SetState( STATE_NOCHECK );
+ m_pKeepParaBox->SetState( TRISTATE_FALSE );
}
else if ( SFX_ITEM_DONTCARE == eItemState )
- m_pKeepParaBox->SetState( STATE_DONTKNOW );
+ m_pKeepParaBox->SetState( TRISTATE_INDET );
else
m_pKeepParaBox->Enable(false);
@@ -1725,10 +1725,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
m_pKeepTogetherBox->EnableTriState( false );
if ( !rSplit.GetValue() )
- m_pKeepTogetherBox->SetState( STATE_CHECK );
+ m_pKeepTogetherBox->SetState( TRISTATE_TRUE );
else
{
- m_pKeepTogetherBox->SetState( STATE_NOCHECK );
+ m_pKeepTogetherBox->SetState( TRISTATE_FALSE );
// widows and orphans
m_pWidowBox->Enable();
@@ -1744,13 +1744,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
sal_Bool _bEnable = nLines > 0;
m_pWidowRowNo->SetValue( m_pWidowRowNo->Normalize( nLines ) );
- m_pWidowBox->SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK);
+ m_pWidowBox->SetState( _bEnable ? TRISTATE_TRUE : TRISTATE_FALSE);
m_pWidowRowNo->Enable(_bEnable);
//m_pWidowRowLabel->Enable(_bEnable);
}
else if ( SFX_ITEM_DONTCARE == eTmpState )
- m_pWidowBox->SetState( STATE_DONTKNOW );
+ m_pWidowBox->SetState( TRISTATE_INDET );
else
m_pWidowBox->Enable(false);
@@ -1766,20 +1766,20 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
m_pOrphanBox->EnableTriState( false );
sal_Bool _bEnable = nLines > 0;
- m_pOrphanBox->SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK);
+ m_pOrphanBox->SetState( _bEnable ? TRISTATE_TRUE : TRISTATE_FALSE);
m_pOrphanRowNo->SetValue( m_pOrphanRowNo->Normalize( nLines ) );
m_pOrphanRowNo->Enable(_bEnable);
m_pOrphanRowLabel->Enable(_bEnable);
}
else if ( SFX_ITEM_DONTCARE == eTmpState )
- m_pOrphanBox->SetState( STATE_DONTKNOW );
+ m_pOrphanBox->SetState( TRISTATE_INDET );
else
m_pOrphanBox->Enable(false);
}
}
else if ( SFX_ITEM_DONTCARE == eItemState )
- m_pKeepTogetherBox->SetState( STATE_DONTKNOW );
+ m_pKeepTogetherBox->SetState( TRISTATE_INDET );
else
m_pKeepTogetherBox->Enable(false);
@@ -1930,7 +1930,7 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageBreakHdl_Impl)
{
switch ( m_pPageBreakBox->GetState() )
{
- case STATE_CHECK:
+ case TRISTATE_TRUE:
m_pBreakTypeFT->Enable();
m_pBreakTypeLB->Enable();
m_pBreakPositionFT->Enable();
@@ -1941,7 +1941,7 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageBreakHdl_Impl)
{
m_pApplyCollBtn->Enable();
- sal_Bool bEnable = STATE_CHECK == m_pApplyCollBtn->GetState() &&
+ sal_Bool bEnable = TRISTATE_TRUE == m_pApplyCollBtn->GetState() &&
m_pApplyCollBox->GetEntryCount();
m_pApplyCollBox->Enable(bEnable);
if(!bHtmlMode)
@@ -1952,9 +1952,9 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageBreakHdl_Impl)
}
break;
- case STATE_NOCHECK:
- case STATE_DONTKNOW:
- m_pApplyCollBtn->SetState( STATE_NOCHECK );
+ case TRISTATE_FALSE:
+ case TRISTATE_INDET:
+ m_pApplyCollBtn->SetState( TRISTATE_FALSE );
m_pApplyCollBtn->Enable(false);
m_pApplyCollBox->Enable(false);
m_pPagenumText->Enable(false);
@@ -1970,7 +1970,7 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageBreakHdl_Impl)
IMPL_LINK_NOARG(SvxExtParagraphTabPage, KeepTogetherHdl_Impl)
{
- sal_Bool bEnable = m_pKeepTogetherBox->GetState() == STATE_NOCHECK;
+ sal_Bool bEnable = m_pKeepTogetherBox->GetState() == TRISTATE_FALSE;
m_pWidowBox->Enable(bEnable);
m_pOrphanBox->Enable(bEnable);
@@ -1981,18 +1981,18 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, WidowHdl_Impl)
{
switch ( m_pWidowBox->GetState() )
{
- case STATE_CHECK:
+ case TRISTATE_TRUE:
m_pWidowRowNo->Enable();
m_pWidowRowLabel->Enable();
m_pKeepTogetherBox->Enable(false);
break;
- case STATE_NOCHECK:
- if ( m_pOrphanBox->GetState() == STATE_NOCHECK )
+ case TRISTATE_FALSE:
+ if ( m_pOrphanBox->GetState() == TRISTATE_FALSE )
m_pKeepTogetherBox->Enable();
// no break
- case STATE_DONTKNOW:
+ case TRISTATE_INDET:
m_pWidowRowNo->Enable(false);
m_pWidowRowLabel->Enable(false);
break;
@@ -2004,18 +2004,18 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, OrphanHdl_Impl)
{
switch( m_pOrphanBox->GetState() )
{
- case STATE_CHECK:
+ case TRISTATE_TRUE:
m_pOrphanRowNo->Enable();
m_pOrphanRowLabel->Enable();
m_pKeepTogetherBox->Enable(false);
break;
- case STATE_NOCHECK:
- if ( m_pWidowBox->GetState() == STATE_NOCHECK )
+ case TRISTATE_FALSE:
+ if ( m_pWidowBox->GetState() == TRISTATE_FALSE )
m_pKeepTogetherBox->Enable();
// no break
- case STATE_DONTKNOW:
+ case TRISTATE_INDET:
m_pOrphanRowNo->Enable(false);
m_pOrphanRowLabel->Enable(false);
break;
@@ -2026,14 +2026,14 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, OrphanHdl_Impl)
IMPL_LINK_NOARG(SvxExtParagraphTabPage, HyphenClickHdl_Impl)
{
- sal_Bool bEnable = m_pHyphenBox->GetState() == STATE_CHECK;
+ sal_Bool bEnable = m_pHyphenBox->GetState() == TRISTATE_TRUE;
m_pBeforeText->Enable(bEnable);
m_pExtHyphenBeforeBox->Enable(bEnable);
m_pAfterText->Enable(bEnable);
m_pExtHyphenAfterBox->Enable(bEnable);
m_pMaxHyphenLabel->Enable(bEnable);
m_pMaxHyphenEdit->Enable(bEnable);
- m_pHyphenBox->SetState( bEnable ? STATE_CHECK : STATE_NOCHECK);
+ m_pHyphenBox->SetState( bEnable ? TRISTATE_TRUE : TRISTATE_FALSE);
return 0;
}
@@ -2041,7 +2041,7 @@ IMPL_LINK_NOARG(SvxExtParagraphTabPage, HyphenClickHdl_Impl)
IMPL_LINK_NOARG(SvxExtParagraphTabPage, ApplyCollClickHdl_Impl)
{
sal_Bool bEnable = sal_False;
- if ( m_pApplyCollBtn->GetState() == STATE_CHECK &&
+ if ( m_pApplyCollBtn->GetState() == TRISTATE_TRUE &&
m_pApplyCollBox->GetEntryCount() )
{
bEnable = sal_True;
@@ -2066,7 +2066,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox )
{
m_pApplyCollBtn->Enable();
- sal_Bool bEnable = m_pApplyCollBtn->GetState() == STATE_CHECK &&
+ sal_Bool bEnable = m_pApplyCollBtn->GetState() == TRISTATE_TRUE &&
m_pApplyCollBox->GetEntryCount();
m_pApplyCollBox->Enable(bEnable);
@@ -2078,7 +2078,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox )
}
else if ( 1 == pListBox->GetSelectEntryPos() )
{
- m_pApplyCollBtn->SetState( STATE_NOCHECK );
+ m_pApplyCollBtn->SetState( TRISTATE_FALSE );
m_pApplyCollBtn->Enable(false);
m_pApplyCollBox->Enable(false);
m_pPagenumText->Enable(false);
@@ -2093,7 +2093,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, ListBox *, pListBox )
sal_uInt16 nBreakPos = m_pBreakPositionLB->GetSelectEntryPos();
if ( pListBox->GetSelectEntryPos() == 1 || 1 == nBreakPos)
{
- m_pApplyCollBtn->SetState( STATE_NOCHECK );
+ m_pApplyCollBtn->SetState( TRISTATE_FALSE );
m_pApplyCollBtn->Enable(false);
m_pApplyCollBox->Enable(false);
m_pPagenumText->Enable(false);
@@ -2193,7 +2193,7 @@ static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, CheckBox& rBo
rBox.Check(((const SfxBoolItem&)rSet.Get(_nWhich)).GetValue());
}
else
- rBox.SetState( STATE_DONTKNOW );
+ rBox.SetState( TRISTATE_INDET );
rBox.SaveValue();
}
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 263700c98d9f..d68046387806 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -738,23 +738,23 @@ sal_Bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet)
}
if ( m_pPositionCB->GetState() != m_pPositionCB->GetSavedValue() )
{
- if( m_pPositionCB->GetState() == STATE_DONTKNOW )
+ if( m_pPositionCB->GetState() == TRISTATE_INDET )
rSet.InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_POS );
else
rSet.Put(
SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ),
- m_pPositionCB->GetState() == STATE_CHECK ? sal_True : sal_False ) );
+ m_pPositionCB->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) );
bModified = true;
}
if ( m_pSizeCB->GetState() != m_pSizeCB->GetSavedValue() )
{
- if ( m_pSizeCB->GetState() == STATE_DONTKNOW )
+ if ( m_pSizeCB->GetState() == TRISTATE_INDET )
rSet.InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_SIZE );
else
rSet.Put(
SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ),
- m_pSizeCB->GetState() == STATE_CHECK ? sal_True : sal_False ) );
+ m_pSizeCB->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) );
bModified = true;
}
@@ -918,13 +918,13 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet)
if ( pItem )
{
sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue();
- m_pPositionCB->SetState( bProtected ? STATE_CHECK : STATE_NOCHECK );
+ m_pPositionCB->SetState( bProtected ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pPositionCB->EnableTriState( false );
m_pSizeCB->Enable( !bProtected );
}
else
{
- m_pPositionCB->SetState( STATE_DONTKNOW );
+ m_pPositionCB->SetState( TRISTATE_INDET );
}
m_pPositionCB->SaveValue();
@@ -934,11 +934,11 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet)
if ( pItem )
{
m_pSizeCB->SetState( ( (const SfxBoolItem*)pItem )->GetValue()
- ? STATE_CHECK : STATE_NOCHECK );
+ ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pSizeCB->EnableTriState( false );
}
else
- m_pSizeCB->SetState( STATE_DONTKNOW );
+ m_pSizeCB->SetState( TRISTATE_INDET );
m_pSizeCB->SaveValue();
pItem = GetItem( rSet, SID_HTML_MODE );
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index fe5c827c7438..3bdb1cd4c90f 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -187,12 +187,12 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
m_pTsbStartInside->EnableTriState( false );
sal_Bool bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue();
if( bValue )
- m_pTsbStartInside->SetState( STATE_CHECK );
+ m_pTsbStartInside->SetState( TRISTATE_TRUE );
else
- m_pTsbStartInside->SetState( STATE_NOCHECK );
+ m_pTsbStartInside->SetState( TRISTATE_FALSE );
}
else
- m_pTsbStartInside->SetState( STATE_DONTKNOW );
+ m_pTsbStartInside->SetState( TRISTATE_INDET );
m_pTsbStartInside->SaveValue();
// Stop inside
@@ -204,12 +204,12 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
m_pTsbStopInside->EnableTriState( false );
sal_Bool bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue();
if( bValue )
- m_pTsbStopInside->SetState( STATE_CHECK );
+ m_pTsbStopInside->SetState( TRISTATE_TRUE );
else
- m_pTsbStopInside->SetState( STATE_NOCHECK );
+ m_pTsbStopInside->SetState( TRISTATE_FALSE );
}
else
- m_pTsbStopInside->SetState( STATE_DONTKNOW );
+ m_pTsbStopInside->SetState( TRISTATE_INDET );
m_pTsbStopInside->SaveValue();
// quantity
@@ -225,22 +225,22 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
{
if( eAniKind == SDRTEXTANI_SLIDE )
{
- m_pTsbEndless->SetState( STATE_NOCHECK );
+ m_pTsbEndless->SetState( TRISTATE_FALSE );
m_pTsbEndless->Enable( false );
}
else
{
- m_pTsbEndless->SetState( STATE_CHECK );
+ m_pTsbEndless->SetState( TRISTATE_TRUE );
m_pNumFldCount->SetEmptyFieldValue();
}
}
else
- m_pTsbEndless->SetState( STATE_NOCHECK );
+ m_pTsbEndless->SetState( TRISTATE_FALSE );
}
else
{
m_pNumFldCount->SetEmptyFieldValue();
- m_pTsbEndless->SetState( STATE_DONTKNOW );
+ m_pTsbEndless->SetState( TRISTATE_INDET );
}
m_pTsbEndless->SaveValue();
m_pNumFldCount->SaveValue();
@@ -256,16 +256,16 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
m_pMtrFldDelay->SetValue( nValue );
if( nValue == 0 )
{
- m_pTsbAuto->SetState( STATE_CHECK );
+ m_pTsbAuto->SetState( TRISTATE_TRUE );
m_pMtrFldDelay->SetEmptyFieldValue();
}
else
- m_pTsbAuto->SetState( STATE_NOCHECK );
+ m_pTsbAuto->SetState( TRISTATE_FALSE );
}
else
{
m_pMtrFldDelay->SetEmptyFieldValue();
- m_pTsbAuto->SetState( STATE_DONTKNOW );
+ m_pTsbAuto->SetState( TRISTATE_INDET );
}
m_pTsbAuto->SaveValue();
m_pMtrFldDelay->SaveValue();
@@ -280,7 +280,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue();
if( nValue <= 0 )
{
- m_pTsbPixel->SetState( STATE_CHECK );
+ m_pTsbPixel->SetState( TRISTATE_TRUE );
nValue = -nValue;
if( nValue == 0 )
nValue++;
@@ -297,7 +297,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
}
else
{
- m_pTsbPixel->SetState( STATE_NOCHECK );
+ m_pTsbPixel->SetState( TRISTATE_FALSE );
m_pMtrFldAmount->SetUnit( eFUnit );
m_pMtrFldAmount->SetDecimalDigits( 2 );
@@ -314,7 +314,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
{
m_pMtrFldAmount->Disable();
m_pMtrFldAmount->SetEmptyFieldValue();
- m_pTsbPixel->SetState( STATE_DONTKNOW );
+ m_pTsbPixel->SetState( TRISTATE_INDET );
}
m_pTsbPixel->SaveValue();
m_pMtrFldAmount->SaveValue();
@@ -362,7 +362,7 @@ sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
eState = m_pTsbStartInside->GetState();
if( eState != m_pTsbStartInside->GetSavedValue() )
{
- rAttrs.Put( SdrTextAniStartInsideItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrTextAniStartInsideItem( (sal_Bool) TRISTATE_TRUE == eState ) );
bModified = sal_True;
}
@@ -370,7 +370,7 @@ sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
eState = m_pTsbStopInside->GetState();
if( eState != m_pTsbStopInside->GetSavedValue() )
{
- rAttrs.Put( SdrTextAniStopInsideItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrTextAniStopInsideItem( (sal_Bool) TRISTATE_TRUE == eState ) );
bModified = sal_True;
}
@@ -381,7 +381,7 @@ sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
aStr != m_pNumFldCount->GetSavedValue() )
{
sal_Int64 nValue = 0;
- if( eState == STATE_CHECK /*#89844#*/ && m_pTsbEndless->IsEnabled())
+ if( eState == TRISTATE_TRUE /*#89844#*/ && m_pTsbEndless->IsEnabled())
bModified = sal_True;
else
{
@@ -402,7 +402,7 @@ sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
aStr != m_pMtrFldDelay->GetSavedValue() )
{
sal_Int64 nValue = 0;
- if( eState == STATE_CHECK )
+ if( eState == TRISTATE_TRUE )
bModified = sal_True;
else
{
@@ -423,7 +423,7 @@ sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
aStr != m_pMtrFldAmount->GetSavedValue() )
{
sal_Int64 nValue = 0;
- if( eState == STATE_CHECK )
+ if( eState == TRISTATE_TRUE )
{
nValue = m_pMtrFldAmount->GetValue();
nValue = -nValue;
@@ -521,7 +521,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, ClickEndlessHdl_Impl)
if( eAniKind != SDRTEXTANI_SLIDE )
{
TriState eState = m_pTsbEndless->GetState();
- if( eState != STATE_NOCHECK )
+ if( eState != TRISTATE_FALSE )
{
m_pNumFldCount->Disable();
m_pNumFldCount->SetEmptyFieldValue();
@@ -538,7 +538,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, ClickEndlessHdl_Impl)
IMPL_LINK_NOARG(SvxTextAnimationPage, ClickAutoHdl_Impl)
{
TriState eState = m_pTsbAuto->GetState();
- if( eState != STATE_NOCHECK )
+ if( eState != TRISTATE_FALSE )
{
m_pMtrFldDelay->Disable();
m_pMtrFldDelay->SetEmptyFieldValue();
@@ -555,7 +555,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, ClickAutoHdl_Impl)
IMPL_LINK_NOARG(SvxTextAnimationPage, ClickPixelHdl_Impl)
{
TriState eState = m_pTsbPixel->GetState();
- if( eState == STATE_CHECK )
+ if( eState == TRISTATE_TRUE )
{
sal_Int64 nValue = m_pMtrFldAmount->GetValue() / 10;
m_pMtrFldAmount->Enable();
@@ -571,7 +571,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, ClickPixelHdl_Impl)
m_pMtrFldAmount->SetValue( nValue );
}
- else if( eState == STATE_NOCHECK )
+ else if( eState == TRISTATE_FALSE )
{
sal_Int64 nValue = m_pMtrFldAmount->GetValue() * 10;
m_pMtrFldAmount->Enable();
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 5384fb4ef6f4..33d576cf607f 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -169,44 +169,44 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs )
if ( rAttrs.GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SFX_ITEM_DONTCARE )
{
m_pTsbAutoGrowHeight->SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
- GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbAutoGrowHeight->EnableTriState( false );
}
else
- m_pTsbAutoGrowHeight->SetState( STATE_DONTKNOW );
+ m_pTsbAutoGrowHeight->SetState( TRISTATE_INDET );
m_pTsbAutoGrowHeight->SaveValue();
// adjust to width
if ( rAttrs.GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SFX_ITEM_DONTCARE )
{
m_pTsbAutoGrowWidth->SetState( ( ( const SdrTextAutoGrowWidthItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ).
- GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbAutoGrowWidth->EnableTriState( false );
}
else
- m_pTsbAutoGrowWidth->SetState( STATE_DONTKNOW );
+ m_pTsbAutoGrowWidth->SetState( TRISTATE_INDET );
m_pTsbAutoGrowWidth->SaveValue();
// autogrowsize
if ( rAttrs.GetItemState( SDRATTR_TEXT_AUTOGROWSIZE ) != SFX_ITEM_DONTCARE )
{
m_pTsbAutoGrowSize->SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
- GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbAutoGrowSize->EnableTriState( false );
}
else
- m_pTsbAutoGrowSize->SetState( STATE_DONTKNOW );
+ m_pTsbAutoGrowSize->SetState( TRISTATE_INDET );
m_pTsbAutoGrowSize->SaveValue();
// wordwrap text
if ( rAttrs.GetItemState( SDRATTR_TEXT_WORDWRAP ) != SFX_ITEM_DONTCARE )
{
m_pTsbWordWrapText->SetState( ( ( const SdrTextWordWrapItem& )rAttrs.Get( SDRATTR_TEXT_WORDWRAP ) ).
- GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbWordWrapText->EnableTriState( false );
}
else
- m_pTsbWordWrapText->SetState( STATE_DONTKNOW );
+ m_pTsbWordWrapText->SetState( TRISTATE_INDET );
m_pTsbWordWrapText->SaveValue();
@@ -272,7 +272,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs )
{
// Move anchor to valid position.
ClickFullWidthHdl_Impl(NULL);
- m_pTsbFullWidth->SetState(STATE_CHECK);
+ m_pTsbFullWidth->SetState(TRISTATE_TRUE);
}
m_pCtlPosition->SetActualRP( eRP );
@@ -282,10 +282,10 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs )
// VertAdjust or HorAdjust is not unequivocal
m_pCtlPosition->Reset();
- m_pCtlPosition->SetState(STATE_DONTKNOW);
+ m_pCtlPosition->SetState(TRISTATE_INDET);
m_pCtlPosition->DoCompletelyDisable(sal_True);
- m_pTsbFullWidth->SetState(STATE_DONTKNOW);
+ m_pTsbFullWidth->SetState(TRISTATE_INDET);
m_pFlPosition->Enable( false );
}
@@ -294,21 +294,21 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs )
{
SdrFitToSizeType eFTS = (SdrFitToSizeType)
( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
- m_pTsbFitToSize->SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK );
+ m_pTsbFitToSize->SetState( eFTS == SDRTEXTFIT_NONE ? TRISTATE_FALSE : TRISTATE_TRUE );
m_pTsbFitToSize->EnableTriState( false );
}
else
- m_pTsbFitToSize->SetState( STATE_DONTKNOW );
+ m_pTsbFitToSize->SetState( TRISTATE_INDET );
m_pTsbFitToSize->SaveValue();
if( rAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SFX_ITEM_DONTCARE )
{
sal_Bool bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
- m_pTsbContour->SetState( bContour ? STATE_CHECK : STATE_NOCHECK );
+ m_pTsbContour->SetState( bContour ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbContour->EnableTriState( false );
}
else
- m_pTsbContour->SetState( STATE_DONTKNOW );
+ m_pTsbContour->SetState( TRISTATE_INDET );
m_pTsbContour->SaveValue();
ClickHdl_Impl( NULL );
@@ -356,31 +356,31 @@ sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs)
eState = m_pTsbAutoGrowHeight->GetState();
if( eState != m_pTsbAutoGrowHeight->GetSavedValue() )
{
- rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) TRISTATE_TRUE == eState ) );
}
eState = m_pTsbAutoGrowWidth->GetState();
if( eState != m_pTsbAutoGrowWidth->GetSavedValue() )
{
- rAttrs.Put( SdrTextAutoGrowWidthItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrTextAutoGrowWidthItem( (sal_Bool) TRISTATE_TRUE == eState ) );
}
eState = m_pTsbAutoGrowSize->GetState();
if( eState != m_pTsbAutoGrowSize->GetSavedValue() )
{
- rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) TRISTATE_TRUE == eState ) );
}
eState = m_pTsbWordWrapText->GetState();
if( eState != m_pTsbWordWrapText->GetSavedValue() )
{
- rAttrs.Put( SdrTextWordWrapItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrTextWordWrapItem( (sal_Bool) TRISTATE_TRUE == eState ) );
}
eState = m_pTsbContour->GetState();
if( eState != m_pTsbContour->GetSavedValue() )
{
- rAttrs.Put( SdrTextContourFrameItem( (sal_Bool) STATE_CHECK == eState ) );
+ rAttrs.Put( SdrTextContourFrameItem( (sal_Bool) TRISTATE_TRUE == eState ) );
}
eState = m_pTsbFitToSize->GetState();
@@ -392,8 +392,8 @@ sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs)
default: ; //prevent warning
OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" );
/* Fall through */
- case STATE_NOCHECK: eFTS = SDRTEXTFIT_NONE; break;
- case STATE_CHECK: eFTS = SDRTEXTFIT_AUTOFIT; break;
+ case TRISTATE_FALSE: eFTS = SDRTEXTFIT_NONE; break;
+ case TRISTATE_TRUE: eFTS = SDRTEXTFIT_AUTOFIT; break;
}
rAttrs.Put( SdrTextFitToSizeTypeItem( eFTS ) );
}
@@ -431,7 +431,7 @@ sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs)
if(!bIsDisabled)
{
- if( m_pTsbFullWidth->GetState() == STATE_CHECK )
+ if( m_pTsbFullWidth->GetState() == TRISTATE_TRUE )
{
if (IsTextDirectionLeftToRight())
eTHA = SDRTEXTHORZADJUST_BLOCK;
@@ -534,7 +534,7 @@ sal_uInt16* SvxTextAttrPage::GetRanges()
*/
void SvxTextAttrPage::PointChanged( Window*, RECT_POINT eRP )
{
- if (m_pTsbFullWidth->GetState() == STATE_CHECK)
+ if (m_pTsbFullWidth->GetState() == TRISTATE_TRUE)
{
// Depending on write direction and currently checked anchor we have
// to uncheck the "full width" button.
@@ -547,7 +547,7 @@ void SvxTextAttrPage::PointChanged( Window*, RECT_POINT eRP )
case RP_RT:
case RP_RM:
case RP_RB:
- m_pTsbFullWidth->SetState( STATE_NOCHECK );
+ m_pTsbFullWidth->SetState( TRISTATE_FALSE );
break;
default: ;//prevent warning
}
@@ -560,7 +560,7 @@ void SvxTextAttrPage::PointChanged( Window*, RECT_POINT eRP )
case RP_LB:
case RP_MB:
case RP_RB:
- m_pTsbFullWidth->SetState( STATE_NOCHECK );
+ m_pTsbFullWidth->SetState( TRISTATE_FALSE );
break;
default: ;//prevent warning
}
@@ -579,7 +579,7 @@ void SvxTextAttrPage::PointChanged( Window*, RECT_POINT eRP )
*/
IMPL_LINK_NOARG(SvxTextAttrPage, ClickFullWidthHdl_Impl)
{
- if( m_pTsbFullWidth->GetState() == STATE_CHECK )
+ if( m_pTsbFullWidth->GetState() == TRISTATE_TRUE )
{
if (IsTextDirectionLeftToRight())
{
@@ -637,10 +637,10 @@ IMPL_LINK_NOARG(SvxTextAttrPage, ClickFullWidthHdl_Impl)
IMPL_LINK_NOARG(SvxTextAttrPage, ClickHdl_Impl)
{
- sal_Bool bAutoGrowWidth = m_pTsbAutoGrowWidth->GetState() == STATE_CHECK;
- sal_Bool bAutoGrowHeight = m_pTsbAutoGrowHeight->GetState() == STATE_CHECK;
- sal_Bool bFitToSize = m_pTsbFitToSize->GetState() == STATE_CHECK;
- sal_Bool bContour = m_pTsbContour->GetState() == STATE_CHECK;
+ sal_Bool bAutoGrowWidth = m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE;
+ sal_Bool bAutoGrowHeight = m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE;
+ sal_Bool bFitToSize = m_pTsbFitToSize->GetState() == TRISTATE_TRUE;
+ sal_Bool bContour = m_pTsbContour->GetState() == TRISTATE_TRUE;
m_pTsbContour->Enable( !bFitToSize &&
!( ( bAutoGrowWidth && bAutoGrowWidthEnabled ) || ( bAutoGrowHeight && bAutoGrowHeightEnabled ) ) &&
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 49beef783e04..1351bf3f3805 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -1138,7 +1138,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
sal_uInt16 nValue = 0;
sal_Bool bValueModified = sal_False;
TriState eState = m_pTsbStepCount->GetState();
- if( eState == STATE_CHECK )
+ if( eState == TRISTATE_TRUE )
{
if( eState != m_pTsbStepCount->GetSavedValue() )
bValueModified = sal_True;
@@ -1206,12 +1206,12 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
if( eState != m_pTsbScale->GetSavedValue() ||
( !m_pTsbScale->IsEnabled() &&
m_pTsbOriginal->IsEnabled() &&
- m_pTsbScale->GetSavedValue() != STATE_CHECK ) )
+ m_pTsbScale->GetSavedValue() != TRISTATE_TRUE ) )
{
XFillBmpSizeLogItem* pItem = NULL;
if( m_pTsbScale->IsEnabled() )
- pItem = new XFillBmpSizeLogItem( eState == STATE_NOCHECK );
- else if( m_pTsbOriginal->IsEnabled() && m_pTsbOriginal->GetState() == STATE_CHECK )
+ pItem = new XFillBmpSizeLogItem( eState == TRISTATE_FALSE );
+ else if( m_pTsbOriginal->IsEnabled() && m_pTsbOriginal->GetState() == TRISTATE_TRUE )
pItem = new XFillBmpSizeLogItem( sal_True );
if( pItem )
@@ -1236,7 +1236,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
!aStr.isEmpty() &&
aStr != m_pMtrFldXSize->GetSavedValue() )
{
- if( eScaleState == STATE_NOCHECK )
+ if( eScaleState == TRISTATE_FALSE )
pItem = new XFillBmpSizeXItem( GetCoreValue( *m_pMtrFldXSize, ePoolUnit ) );
else
{
@@ -1246,7 +1246,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
}
}
else if( m_pTsbOriginal->IsEnabled() &&
- m_pTsbOriginal->GetState() == STATE_CHECK &&
+ m_pTsbOriginal->GetState() == TRISTATE_TRUE &&
!m_pMtrFldXSize->GetSavedValue().isEmpty() )
pItem = new XFillBmpSizeXItem( 0 );
@@ -1272,7 +1272,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
!aStr.isEmpty() &&
aStr != m_pMtrFldYSize->GetSavedValue() )
{
- if( eScaleState == STATE_NOCHECK )
+ if( eScaleState == TRISTATE_FALSE )
pItem = new XFillBmpSizeYItem( GetCoreValue( *m_pMtrFldYSize, ePoolUnit ) );
else
{
@@ -1283,7 +1283,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
}
}
else if( m_pTsbOriginal->IsEnabled() &&
- m_pTsbOriginal->GetState() == STATE_CHECK &&
+ m_pTsbOriginal->GetState() == TRISTATE_TRUE &&
!m_pMtrFldYSize->GetSavedValue().isEmpty() )
pItem = new XFillBmpSizeYItem( 0 );
@@ -1519,19 +1519,19 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
sal_uInt16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue();
if( nValue == 0 )
{
- m_pTsbStepCount->SetState( STATE_CHECK );
+ m_pTsbStepCount->SetState( TRISTATE_TRUE );
m_pNumFldStepCount->SetText( "" );
}
else
{
- m_pTsbStepCount->SetState( STATE_NOCHECK );
+ m_pTsbStepCount->SetState( TRISTATE_FALSE );
m_pNumFldStepCount->SetValue( nValue );
}
ModifyStepCountHdl_Impl( m_pTsbStepCount );
}
else
{
- m_pTsbStepCount->SetState( STATE_DONTKNOW );
+ m_pTsbStepCount->SetState( TRISTATE_INDET );
m_pNumFldStepCount->SetText( "" );
}
@@ -1542,24 +1542,24 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
m_pTsbTile->EnableTriState( false );
if( ( ( const XFillBmpTileItem& ) rAttrs.Get( XATTR_FILLBMP_TILE ) ).GetValue() )
- m_pTsbTile->SetState( STATE_CHECK );
+ m_pTsbTile->SetState( TRISTATE_TRUE );
else
- m_pTsbTile->SetState( STATE_NOCHECK );
+ m_pTsbTile->SetState( TRISTATE_FALSE );
}
else
- m_pTsbTile->SetState( STATE_DONTKNOW );
+ m_pTsbTile->SetState( TRISTATE_INDET );
if( rAttrs.GetItemState( XATTR_FILLBMP_STRETCH ) != SFX_ITEM_DONTCARE )
{
m_pTsbStretch->EnableTriState( false );
if( ( ( const XFillBmpStretchItem& ) rAttrs.Get( XATTR_FILLBMP_STRETCH ) ).GetValue() )
- m_pTsbStretch->SetState( STATE_CHECK );
+ m_pTsbStretch->SetState( TRISTATE_TRUE );
else
- m_pTsbStretch->SetState( STATE_NOCHECK );
+ m_pTsbStretch->SetState( TRISTATE_FALSE );
}
else
- m_pTsbStretch->SetState( STATE_DONTKNOW );
+ m_pTsbStretch->SetState( TRISTATE_INDET );
//aTsbScale
@@ -1568,24 +1568,24 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
m_pTsbScale->EnableTriState( false );
if( ( ( const XFillBmpSizeLogItem& ) rAttrs.Get( XATTR_FILLBMP_SIZELOG ) ).GetValue() )
- m_pTsbScale->SetState( STATE_NOCHECK );
+ m_pTsbScale->SetState( TRISTATE_FALSE );
else
- m_pTsbScale->SetState( STATE_CHECK );
+ m_pTsbScale->SetState( TRISTATE_TRUE );
ClickScaleHdl_Impl( NULL );
}
else
- m_pTsbScale->SetState( STATE_DONTKNOW );
+ m_pTsbScale->SetState( TRISTATE_INDET );
// determine status for the original size
- TriState eOriginal = STATE_NOCHECK;
+ TriState eOriginal = TRISTATE_FALSE;
//aMtrFldXSize
if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEX ) != SFX_ITEM_DONTCARE )
{
sal_Int32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue();
- if( m_pTsbScale->GetState() == STATE_CHECK )
+ if( m_pTsbScale->GetState() == TRISTATE_TRUE )
{
// If there's a percentage value in the item,
// it is negative because of the MetricItems.
@@ -1597,7 +1597,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
if( nValue == 0 )
{
- eOriginal = STATE_CHECK;
+ eOriginal = TRISTATE_TRUE;
// value would be too small otherwise when turning off the original size
// (performance problem)
m_pMtrFldXSize->SetValue( 100 );
@@ -1613,7 +1613,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEY ) != SFX_ITEM_DONTCARE )
{
sal_Int32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue();
- if( m_pTsbScale->GetState() == STATE_CHECK )
+ if( m_pTsbScale->GetState() == TRISTATE_TRUE )
{
// If there's a percentage value in the item,
// it is negative because of the MetricItems.
@@ -1626,13 +1626,13 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
if( nValue == 0 )
m_pMtrFldYSize->SetValue( 100 ); //s.o.
else
- eOriginal = STATE_NOCHECK;
+ eOriginal = TRISTATE_FALSE;
}
else
{
m_pMtrFldYSize->SetText( "" );
m_pMtrFldYSize->SaveValue();
- eOriginal = STATE_NOCHECK;
+ eOriginal = TRISTATE_FALSE;
}
// aTsbOriginal
@@ -2114,7 +2114,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
{
if( p == m_pTsbStepCount )
{
- if( m_pTsbStepCount->GetState() == STATE_NOCHECK )
+ if( m_pTsbStepCount->GetState() == TRISTATE_FALSE )
{
if( m_pNumFldStepCount->GetText().isEmpty() )
m_pNumFldStepCount->SetText("64");
@@ -2126,7 +2126,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
}
sal_uInt16 nValue = 0;
- if( m_pTsbStepCount->GetState() != STATE_CHECK )
+ if( m_pTsbStepCount->GetState() != TRISTATE_TRUE )
{
// condition != Disabled ?
if( !m_pNumFldStepCount->GetText().isEmpty() )
@@ -2144,7 +2144,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
{
TriState eState = m_pTsbTile->GetState();
- if( eState == STATE_CHECK )
+ if( eState == TRISTATE_TRUE )
{
m_pTsbStretch->Disable();
m_pFlOffset->Enable();
@@ -2154,7 +2154,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
m_pFlSize->Enable();
}
- else if( eState == STATE_NOCHECK )
+ else if( eState == TRISTATE_FALSE )
{
m_pTsbStretch->Enable();
m_pFlOffset->Disable();
@@ -2162,7 +2162,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
m_pCtlPosition->Invalidate();
m_pFlPosition->Disable();
- if( m_pTsbStretch->GetState() != STATE_NOCHECK )
+ if( m_pTsbStretch->GetState() != TRISTATE_FALSE )
{
m_pFlSize->Disable();
@@ -2183,7 +2183,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
m_pFlSize->Disable();
}
- if( m_pTsbOriginal->GetState() == STATE_CHECK )
+ if( m_pTsbOriginal->GetState() == TRISTATE_TRUE )
{
m_pMtrFldXSize->SetText( "" );
m_pMtrFldYSize->SetText( "" );
@@ -2204,14 +2204,14 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
sal::static_int_cast< sal_Bool >( m_pTsbStretch->GetState() ) ) );
if( m_pTsbScale->IsEnabled() )
- rXFSet.Put( XFillBmpSizeLogItem( m_pTsbScale->GetState() == STATE_NOCHECK ) );
+ rXFSet.Put( XFillBmpSizeLogItem( m_pTsbScale->GetState() == TRISTATE_FALSE ) );
if( m_pMtrFldXSize->IsEnabled() )
{
XFillBmpSizeXItem* pItem = NULL;
TriState eScaleState = m_pTsbScale->GetState();
- if( eScaleState == STATE_NOCHECK )
+ if( eScaleState == TRISTATE_FALSE )
pItem = new XFillBmpSizeXItem( GetCoreValue( *m_pMtrFldXSize, ePoolUnit ) );
else
pItem = new XFillBmpSizeXItem( -labs( static_cast<long>(m_pMtrFldXSize->GetValue()) ) );
@@ -2220,7 +2220,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
delete pItem;
}
- else if( m_pTsbOriginal->IsEnabled() && m_pTsbOriginal->GetState() == STATE_CHECK )
+ else if( m_pTsbOriginal->IsEnabled() && m_pTsbOriginal->GetState() == TRISTATE_TRUE )
{
// original size -> size == 0
rXFSet.Put( XFillBmpSizeXItem( 0 ) );
@@ -2232,7 +2232,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
XFillBmpSizeYItem* pItem = NULL;
TriState eScaleState = m_pTsbScale->GetState();
- if( eScaleState == STATE_NOCHECK )
+ if( eScaleState == TRISTATE_FALSE )
pItem = new XFillBmpSizeYItem( GetCoreValue( *m_pMtrFldYSize, ePoolUnit ) );
else
pItem = new XFillBmpSizeYItem( -labs( static_cast<long>(m_pMtrFldYSize->GetValue()) ) );
@@ -2241,7 +2241,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
delete pItem;
}
- else if( m_pTsbOriginal->IsEnabled() && m_pTsbOriginal->GetState() == STATE_CHECK )
+ else if( m_pTsbOriginal->IsEnabled() && m_pTsbOriginal->GetState() == TRISTATE_TRUE )
{
// original size -> size == 0
rXFSet.Put( XFillBmpSizeYItem( 0 ) );
@@ -2282,7 +2282,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
IMPL_LINK_NOARG(SvxAreaTabPage, ClickScaleHdl_Impl)
{
- if( m_pTsbScale->GetState() == STATE_CHECK )
+ if( m_pTsbScale->GetState() == TRISTATE_TRUE )
{
m_pMtrFldXSize->SetDecimalDigits( 0 );
m_pMtrFldXSize->SetUnit(FUNIT_PERCENT);
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 238919cd3108..e6f886f0c536 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1062,14 +1062,14 @@ sal_Bool SvxLineTabPage::FillXLSet_Impl()
rXLSet.Put( XLineColorItem( m_pLbColor->GetSelectEntry(), m_pLbColor->GetSelectEntryColor() ) );
// Centered line end
- if( m_pTsbCenterStart->GetState() == STATE_CHECK )
+ if( m_pTsbCenterStart->GetState() == TRISTATE_TRUE )
rXLSet.Put( XLineStartCenterItem( sal_True ) );
- else if( m_pTsbCenterStart->GetState() == STATE_NOCHECK )
+ else if( m_pTsbCenterStart->GetState() == TRISTATE_FALSE )
rXLSet.Put( XLineStartCenterItem( sal_False ) );
- if( m_pTsbCenterEnd->GetState() == STATE_CHECK )
+ if( m_pTsbCenterEnd->GetState() == TRISTATE_TRUE )
rXLSet.Put( XLineEndCenterItem( sal_True ) );
- else if( m_pTsbCenterEnd->GetState() == STATE_NOCHECK )
+ else if( m_pTsbCenterEnd->GetState() == TRISTATE_FALSE )
rXLSet.Put( XLineEndCenterItem( sal_False ) );
// Transparency
@@ -1362,13 +1362,13 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
m_pTsbCenterStart->EnableTriState( false );
if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() )
- m_pTsbCenterStart->SetState( STATE_CHECK );
+ m_pTsbCenterStart->SetState( TRISTATE_TRUE );
else
- m_pTsbCenterStart->SetState( STATE_NOCHECK );
+ m_pTsbCenterStart->SetState( TRISTATE_FALSE );
}
else
{
- m_pTsbCenterStart->SetState( STATE_DONTKNOW );
+ m_pTsbCenterStart->SetState( TRISTATE_INDET );
}
// Centered line end (end)
@@ -1381,13 +1381,13 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
m_pTsbCenterEnd->EnableTriState( false );
if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() )
- m_pTsbCenterEnd->SetState( STATE_CHECK );
+ m_pTsbCenterEnd->SetState( TRISTATE_TRUE );
else
- m_pTsbCenterEnd->SetState( STATE_NOCHECK );
+ m_pTsbCenterEnd->SetState( TRISTATE_FALSE );
}
else
{
- m_pTsbCenterEnd->SetState( STATE_DONTKNOW );
+ m_pTsbCenterEnd->SetState( TRISTATE_INDET );
}
// Transparency
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 1da2af8ddbf5..1899cef2cc6c 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -366,14 +366,14 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs )
m_pTsbShowShadow->EnableTriState( false );
if( ( ( const SdrShadowItem& ) rAttrs.Get( SDRATTR_SHADOW ) ).GetValue() )
- m_pTsbShowShadow->SetState( STATE_CHECK );
+ m_pTsbShowShadow->SetState( TRISTATE_TRUE );
else
{
- m_pTsbShowShadow->SetState( STATE_NOCHECK );
+ m_pTsbShowShadow->SetState( TRISTATE_FALSE );
}
}
else
- m_pTsbShowShadow->SetState( STATE_DONTKNOW );
+ m_pTsbShowShadow->SetState( TRISTATE_INDET );
// distance (only 8 possible positions),
// so there is only one item evaluated
@@ -473,7 +473,7 @@ sal_uInt16* SvxShadowTabPage::GetRanges()
IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl)
{
- if( m_pTsbShowShadow->GetState() == STATE_NOCHECK )
+ if( m_pTsbShowShadow->GetState() == TRISTATE_FALSE )
{
m_pGridShadow->Disable();
}
@@ -492,7 +492,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl)
IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl)
{
- if( m_pTsbShowShadow->GetState() == STATE_CHECK )
+ if( m_pTsbShowShadow->GetState() == TRISTATE_TRUE )
rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
else
rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 7fd60dc65b6c..d74790a38847 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -628,7 +628,7 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage( Window* pParent, const SfxItemSe
, rInAttrs ),
mrOutAttrs ( rInAttrs ),
- mnProtectSizeState( STATE_NOCHECK ),
+ mnProtectSizeState( TRISTATE_FALSE ),
mbPageDisabled ( false ),
mbProtectDisabled( false ),
mbSizeDisabled( false ),
@@ -821,7 +821,7 @@ sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs )
if ( m_pTsbPosProtect->GetState() != m_pTsbPosProtect->GetSavedValue() )
{
- if( m_pTsbPosProtect->GetState() == STATE_DONTKNOW )
+ if( m_pTsbPosProtect->GetState() == TRISTATE_INDET )
{
rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_POS );
}
@@ -829,7 +829,7 @@ sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs )
{
rOutAttrs.Put(
SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ),
- m_pTsbPosProtect->GetState() == STATE_CHECK ? sal_True : sal_False ) );
+ m_pTsbPosProtect->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) );
}
bModified |= sal_True;
@@ -863,12 +863,12 @@ sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs )
if ( m_pTsbSizeProtect->GetState() != m_pTsbSizeProtect->GetSavedValue() )
{
- if ( m_pTsbSizeProtect->GetState() == STATE_DONTKNOW )
+ if ( m_pTsbSizeProtect->GetState() == TRISTATE_INDET )
rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_SIZE );
else
rOutAttrs.Put(
SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ),
- m_pTsbSizeProtect->GetState() == STATE_CHECK ? sal_True : sal_False ) );
+ m_pTsbSizeProtect->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) );
bModified |= sal_True;
}
@@ -876,12 +876,12 @@ sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs )
{
if ( !m_pTsbAutoGrowWidth->IsTriStateEnabled() )
{
- if( m_pTsbAutoGrowWidth->GetState() == STATE_DONTKNOW )
+ if( m_pTsbAutoGrowWidth->GetState() == TRISTATE_INDET )
rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_AUTOWIDTH );
else
rOutAttrs.Put(
SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ),
- m_pTsbAutoGrowWidth->GetState() == STATE_CHECK ? sal_True : sal_False ) );
+ m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) );
}
bModified |= sal_True;
}
@@ -890,12 +890,12 @@ sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs )
{
if ( !m_pTsbAutoGrowHeight->IsTriStateEnabled() )
{
- if( m_pTsbAutoGrowHeight->GetState() == STATE_DONTKNOW )
+ if( m_pTsbAutoGrowHeight->GetState() == TRISTATE_INDET )
rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_AUTOHEIGHT );
else
rOutAttrs.Put(
SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ),
- m_pTsbAutoGrowHeight->GetState() == STATE_CHECK ? sal_True : sal_False ) );
+ m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE ? sal_True : sal_False ) );
}
bModified |= sal_True;
}
@@ -931,12 +931,12 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& )
if ( pItem )
{
sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue();
- m_pTsbPosProtect->SetState( bProtected ? STATE_CHECK : STATE_NOCHECK );
+ m_pTsbPosProtect->SetState( bProtected ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbPosProtect->EnableTriState( false );
}
else
{
- m_pTsbPosProtect->SetState( STATE_DONTKNOW );
+ m_pTsbPosProtect->SetState( TRISTATE_INDET );
}
m_pTsbPosProtect->SaveValue();
@@ -974,29 +974,29 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& )
if ( pItem )
{
m_pTsbSizeProtect->SetState( ( (const SfxBoolItem*)pItem )->GetValue()
- ? STATE_CHECK : STATE_NOCHECK );
+ ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbSizeProtect->EnableTriState( false );
}
else
- m_pTsbSizeProtect->SetState( STATE_DONTKNOW );
+ m_pTsbSizeProtect->SetState( TRISTATE_INDET );
pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_AUTOWIDTH );
if ( pItem )
{
m_pTsbAutoGrowWidth->SetState( ( ( const SfxBoolItem* )pItem )->GetValue()
- ? STATE_CHECK : STATE_NOCHECK );
+ ? TRISTATE_TRUE : TRISTATE_FALSE );
}
else
- m_pTsbAutoGrowWidth->SetState( STATE_DONTKNOW );
+ m_pTsbAutoGrowWidth->SetState( TRISTATE_INDET );
pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_AUTOHEIGHT );
if ( pItem )
{
m_pTsbAutoGrowHeight->SetState( ( ( const SfxBoolItem* )pItem )->GetValue()
- ? STATE_CHECK : STATE_NOCHECK );
+ ? TRISTATE_TRUE : TRISTATE_FALSE );
}
else
- m_pTsbAutoGrowHeight->SetState( STATE_DONTKNOW );
+ m_pTsbAutoGrowHeight->SetState( TRISTATE_INDET );
// Is matching set?
OUString aStr = GetUserData();
@@ -1068,7 +1068,7 @@ int SvxPositionSizeTabPage::DeactivatePage( SfxItemSet* _pSet )
IMPL_LINK_NOARG(SvxPositionSizeTabPage, ChangePosProtectHdl)
{
// #106572# Remember user's last choice
- m_pTsbSizeProtect->SetState( m_pTsbPosProtect->GetState() == STATE_CHECK ? STATE_CHECK : mnProtectSizeState );
+ m_pTsbSizeProtect->SetState( m_pTsbPosProtect->GetState() == TRISTATE_TRUE ? TRISTATE_TRUE : mnProtectSizeState );
UpdateControlStates();
return( 0L );
}
@@ -1077,10 +1077,10 @@ IMPL_LINK_NOARG(SvxPositionSizeTabPage, ChangePosProtectHdl)
void SvxPositionSizeTabPage::UpdateControlStates()
{
- const bool bPosProtect = m_pTsbPosProtect->GetState() == STATE_CHECK;
- const bool bSizeProtect = m_pTsbSizeProtect->GetState() == STATE_CHECK;
- const bool bHeightChecked = !m_pTsbAutoGrowHeight->IsTriStateEnabled() && (m_pTsbAutoGrowHeight->GetState() == STATE_CHECK);
- const bool bWidthChecked = !m_pTsbAutoGrowWidth->IsTriStateEnabled() && (m_pTsbAutoGrowWidth->GetState() == STATE_CHECK);
+ const bool bPosProtect = m_pTsbPosProtect->GetState() == TRISTATE_TRUE;
+ const bool bSizeProtect = m_pTsbSizeProtect->GetState() == TRISTATE_TRUE;
+ const bool bHeightChecked = !m_pTsbAutoGrowHeight->IsTriStateEnabled() && (m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE);
+ const bool bWidthChecked = !m_pTsbAutoGrowWidth->IsTriStateEnabled() && (m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE);
m_pFlPosition->Enable( !bPosProtect && !mbPageDisabled );
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index c3b94448058d..01ffd81ee2b4 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -722,7 +722,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) )
) );
if ( ColumnValue::NO_NULLS == nNullable )
- aDefault <<= (sal_Int16)STATE_NOCHECK;
+ aDefault <<= (sal_Int16)TRISTATE_FALSE;
}
break;
@@ -771,9 +771,9 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
if ( nType == DataType::BIT || nType == DataType::BOOLEAN )
{
if ( aDefault.hasValue() )
- aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)STATE_NOCHECK : (sal_Int16)STATE_CHECK;
+ aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)TRISTATE_FALSE : (sal_Int16)TRISTATE_TRUE;
else
- aDefault <<= ((sal_Int16)STATE_DONTKNOW);
+ aDefault <<= ((sal_Int16)TRISTATE_INDET);
}
}
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index ef3d35738b64..9570d8f99b8f 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -394,9 +394,9 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
{
TTablePrivilegeMap::const_iterator aFind = findPrivilege(m_nDataPos);
if(aFind != m_aPrivMap.end())
- PaintTristate(rDev, rRect, isAllowed(nColumnId,aFind->second.nRights) ? STATE_CHECK : STATE_NOCHECK,isAllowed(nColumnId,aFind->second.nWithGrant));
+ PaintTristate(rDev, rRect, isAllowed(nColumnId,aFind->second.nRights) ? TRISTATE_TRUE : TRISTATE_FALSE,isAllowed(nColumnId,aFind->second.nWithGrant));
else
- PaintTristate(rDev, rRect, STATE_NOCHECK,sal_False);
+ PaintTristate(rDev, rRect, TRISTATE_FALSE,sal_False);
}
else
{
@@ -440,14 +440,14 @@ Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nR
sal_uInt16 nColumnId = GetColumnId( _nColumnPos );
if(nColumnId != COL_TABLE_NAME)
{
- TriState eState = STATE_NOCHECK;
+ TriState eState = TRISTATE_FALSE;
TTablePrivilegeMap::const_iterator aFind = findPrivilege(_nRow);
if(aFind != m_aPrivMap.end())
{
- eState = isAllowed(nColumnId,aFind->second.nRights) ? STATE_CHECK : STATE_NOCHECK;
+ eState = isAllowed(nColumnId,aFind->second.nRights) ? TRISTATE_TRUE : TRISTATE_FALSE;
}
else
- eState = STATE_NOCHECK;
+ eState = TRISTATE_FALSE;
return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eState );
}
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 3f2f40239218..36b4b659b23f 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -202,7 +202,7 @@ namespace dbaui
if ( _pCheckBox->IsTriStateEnabled() )
{
OptionalBoolItem aValue( _nID );
- if ( _pCheckBox->GetState() != STATE_DONTKNOW )
+ if ( _pCheckBox->GetState() != TRISTATE_INDET )
aValue.SetValue( bValue );
_rSet.Put( aValue );
}
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 62780d7d536b..55399ccf6279 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -237,7 +237,7 @@ namespace dbaui
if ( !aValue )
{
- (*setting->ppControl)->SetState( STATE_DONTKNOW );
+ (*setting->ppControl)->SetState( TRISTATE_INDET );
}
else
{
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 616be7a6bd60..8f8039056f0b 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -910,7 +910,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
case BROW_VIS_ROW:
{
- sal_Bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != STATE_NOCHECK;
+ sal_Bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != TRISTATE_FALSE;
strOldCellContents = bOldValue ? g_strOne : g_strZero;
sNewValue = !bOldValue ? g_strOne : g_strZero;
}
@@ -1234,7 +1234,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
long nRow = GetRealRow(m_nSeekRow);
if (nRow == BROW_VIS_ROW)
- PaintTristate(rDev, rRect, pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK);
+ PaintTristate(rDev, rRect, pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE);
else
rDev.DrawText(rRect, GetCellText(nRow, nColumnId),TEXT_DRAW_VCENTER);
@@ -2699,7 +2699,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n
pEntry = getFields()[_nColumnPos - 1];
if ( _nRow == BROW_VIS_ROW && pEntry.is() )
- return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK );
+ return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE );
return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos );
}
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 3a6b9534535d..59cdb0e4c5d6 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -63,7 +63,7 @@ OButtonModel::OButtonModel(const Reference<XComponentContext>& _rxFactory)
:OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_COMMANDBUTTON, FRM_SUN_CONTROL_COMMANDBUTTON )
// use the old control name for compatibility reasons
,m_aResetHelper( *this, m_aMutex )
- ,m_eDefaultState( STATE_NOCHECK )
+ ,m_eDefaultState( TRISTATE_FALSE )
{
m_nClassId = FormComponentType::COMMANDBUTTON;
}
@@ -270,7 +270,7 @@ void SAL_CALL OButtonModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle
{
case PROPERTY_ID_DEFAULT_STATE:
{
- sal_Int16 nDefaultState( (sal_Int16)STATE_NOCHECK );
+ sal_Int16 nDefaultState( (sal_Int16)TRISTATE_FALSE );
OSL_VERIFY( _rValue >>= nDefaultState );
m_eDefaultState = (ToggleState)nDefaultState;
impl_resetNoBroadcast_nothrow();
@@ -307,7 +307,7 @@ Any OButtonModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
switch ( _nHandle )
{
case PROPERTY_ID_DEFAULT_STATE:
- aDefault <<= (sal_Int16)STATE_NOCHECK;
+ aDefault <<= (sal_Int16)TRISTATE_FALSE;
break;
default:
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index 1a01ab8515d9..c6d712679122 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -233,7 +233,7 @@ Any OCheckBoxModel::translateDbColumnToControlValue()
sal_Bool bTriState = sal_True;
if ( m_xAggregateSet.is() )
m_xAggregateSet->getPropertyValue( PROPERTY_TRISTATE ) >>= bTriState;
- aValue <<= (sal_Int16)( bTriState ? STATE_DONTKNOW : getDefaultChecked() );
+ aValue <<= (sal_Int16)( bTriState ? TRISTATE_INDET : getDefaultChecked() );
}
else if ( !aValue.hasValue() )
{
@@ -241,7 +241,7 @@ Any OCheckBoxModel::translateDbColumnToControlValue()
// bValue cannot be used uninitialised here.
// But GCC does not see/understand that, which breaks -Werror builds,
// so we explicitly default-initialise it.
- aValue <<= (sal_Int16)( bValue ? STATE_CHECK : STATE_NOCHECK );
+ aValue <<= (sal_Int16)( bValue ? TRISTATE_TRUE : TRISTATE_FALSE );
}
return aValue;
@@ -256,20 +256,20 @@ sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
Any aControlValue( m_xAggregateSet->getPropertyValue( PROPERTY_STATE ) );
try
{
- sal_Int16 nValue = STATE_DONTKNOW;
+ sal_Int16 nValue = TRISTATE_INDET;
aControlValue >>= nValue;
switch (nValue)
{
- case STATE_DONTKNOW:
+ case TRISTATE_INDET:
m_xColumnUpdate->updateNull();
break;
- case STATE_CHECK:
+ case TRISTATE_TRUE:
if (DbUseBool())
m_xColumnUpdate->updateBoolean( sal_True );
else
m_xColumnUpdate->updateString( getReferenceValue() );
break;
- case STATE_NOCHECK:
+ case TRISTATE_FALSE:
if (DbUseBool())
m_xColumnUpdate->updateBoolean( sal_False );
else
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index b54fbb2c3f6a..cbe592cd47c3 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -202,7 +202,7 @@ namespace frm
{
// checkboxes always have a tristate-mode
xVclWindow->setProperty( PROPERTY_TRISTATE, makeAny( sal_Bool( sal_True ) ) );
- xVclWindow->setProperty( PROPERTY_STATE, makeAny( sal_Int32( STATE_DONTKNOW ) ) );
+ xVclWindow->setProperty( PROPERTY_STATE, makeAny( sal_Int32( TRISTATE_INDET ) ) );
Reference< XCheckBox > xBox( getPeer(), UNO_QUERY_THROW );
xBox->addItemListener( this );
@@ -212,7 +212,7 @@ namespace frm
case FormComponentType::RADIOBUTTON:
{
- xVclWindow->setProperty( PROPERTY_STATE, makeAny( sal_Int32( STATE_NOCHECK ) ) );
+ xVclWindow->setProperty( PROPERTY_STATE, makeAny( sal_Int32( TRISTATE_FALSE ) ) );
Reference< XRadioButton > xRadio( getPeer(), UNO_QUERY_THROW );
xRadio->addItemListener( this );
@@ -295,11 +295,11 @@ namespace frm
{
case FormComponentType::CHECKBOX:
{
- if ( ( rEvent.Selected == STATE_CHECK ) || ( rEvent.Selected == STATE_NOCHECK ) )
+ if ( ( rEvent.Selected == TRISTATE_TRUE ) || ( rEvent.Selected == TRISTATE_FALSE ) )
{
sal_Int32 nBooleanComparisonMode = ::dbtools::DatabaseMetaData( m_xConnection ).getBooleanComparisonMode();
- bool bSelected = ( rEvent.Selected == STATE_CHECK );
+ bool bSelected = ( rEvent.Selected == TRISTATE_TRUE );
OUString sExpressionMarker( "$expression$" );
::dbtools::getBoleanComparisonPredicate(
@@ -360,7 +360,7 @@ namespace frm
case FormComponentType::RADIOBUTTON:
{
- if ( rEvent.Selected == STATE_CHECK )
+ if ( rEvent.Selected == TRISTATE_TRUE )
aText.append( ::comphelper::getString( Reference< XPropertySet >( getModel(), UNO_QUERY )->getPropertyValue( PROPERTY_REFVALUE ) ) );
}
break;
@@ -585,14 +585,14 @@ namespace frm
|| aText.equalsIgnoreAsciiCase("IS TRUE")
)
{
- aValue <<= (sal_Int32)STATE_CHECK;
+ aValue <<= (sal_Int32)TRISTATE_TRUE;
}
else if ( aText == "0" || aText.equalsIgnoreAsciiCase("FALSE") )
{
- aValue <<= (sal_Int32)STATE_NOCHECK;
+ aValue <<= (sal_Int32)TRISTATE_FALSE;
}
else
- aValue <<= (sal_Int32)STATE_DONTKNOW;
+ aValue <<= (sal_Int32)TRISTATE_INDET;
m_aText = aText;
xVclWindow->setProperty( PROPERTY_STATE, aValue );
@@ -606,9 +606,9 @@ namespace frm
OUString aRefText = ::comphelper::getString(com::sun::star::uno::Reference< XPropertySet > (getModel(), UNO_QUERY)->getPropertyValue(PROPERTY_REFVALUE));
Any aValue;
if (aText == aRefText)
- aValue <<= (sal_Int32)STATE_CHECK;
+ aValue <<= (sal_Int32)TRISTATE_TRUE;
else
- aValue <<= (sal_Int32)STATE_NOCHECK;
+ aValue <<= (sal_Int32)TRISTATE_FALSE;
m_aText = aText;
xVclWindow->setProperty(PROPERTY_STATE, aValue);
}
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 991df45662b8..e649403305ec 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -377,7 +377,7 @@ void ORadioButtonModel::_propertyChanged(const PropertyChangeEvent& _rEvent) thr
Any ORadioButtonModel::translateDbColumnToControlValue()
{
return makeAny( (sal_Int16)
- ( ( m_xColumn->getString() == getReferenceValue() ) ? STATE_CHECK : STATE_NOCHECK )
+ ( ( m_xColumn->getString() == getReferenceValue() ) ? TRISTATE_TRUE : TRISTATE_FALSE )
);
}
@@ -385,10 +385,10 @@ Any ORadioButtonModel::translateDbColumnToControlValue()
Any ORadioButtonModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
Any aControlValue = OReferenceValueComponent::translateExternalValueToControlValue( _rExternalValue );
- sal_Int16 nState = STATE_NOCHECK;
- if ( ( aControlValue >>= nState ) && ( nState == STATE_DONTKNOW ) )
+ sal_Int16 nState = TRISTATE_FALSE;
+ if ( ( aControlValue >>= nState ) && ( nState == TRISTATE_INDET ) )
// radio buttons do not have the DONTKNOW state
- aControlValue <<= (sal_Int16)STATE_NOCHECK;
+ aControlValue <<= (sal_Int16)TRISTATE_FALSE;
return aControlValue;
}
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index 2d051e6d7418..38ebd2cfc308 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -39,7 +39,7 @@ namespace frm
OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, sal_Bool _bSupportNoCheckRefValue )
:OBoundControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, sal_False, sal_True, sal_True )
- ,m_eDefaultChecked( STATE_NOCHECK )
+ ,m_eDefaultChecked( TRISTATE_FALSE )
,m_bSupportSecondRefValue( _bSupportNoCheckRefValue )
{
}
@@ -103,7 +103,7 @@ namespace frm
case PROPERTY_ID_DEFAULT_STATE:
{
- sal_Int16 nDefaultChecked( (sal_Int16)STATE_NOCHECK );
+ sal_Int16 nDefaultChecked( (sal_Int16)TRISTATE_FALSE );
OSL_VERIFY( _rValue >>= nDefaultChecked );
m_eDefaultChecked = (ToggleState)nDefaultChecked;
resetNoBroadcast();
@@ -178,29 +178,29 @@ namespace frm
Any OReferenceValueComponent::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
- sal_Int16 nState = STATE_DONTKNOW;
+ sal_Int16 nState = TRISTATE_INDET;
sal_Bool bExternalState = sal_False;
OUString sExternalValue;
if ( _rExternalValue >>= bExternalState )
{
- nState = ::sal::static_int_cast< sal_Int16 >( bExternalState ? STATE_CHECK : STATE_NOCHECK );
+ nState = ::sal::static_int_cast< sal_Int16 >( bExternalState ? TRISTATE_TRUE : TRISTATE_FALSE );
}
else if ( _rExternalValue >>= sExternalValue )
{
if ( sExternalValue == m_sReferenceValue )
- nState = STATE_CHECK;
+ nState = TRISTATE_TRUE;
else
{
if ( !m_bSupportSecondRefValue || ( sExternalValue == m_sNoCheckReferenceValue ) )
- nState = STATE_NOCHECK;
+ nState = TRISTATE_FALSE;
else
- nState = STATE_DONTKNOW;
+ nState = TRISTATE_INDET;
}
}
else if ( !_rExternalValue.hasValue() )
{
- nState = STATE_DONTKNOW;
+ nState = TRISTATE_INDET;
}
else
{
@@ -218,7 +218,7 @@ namespace frm
try
{
Any aControlValue( m_xAggregateSet->getPropertyValue( PROPERTY_STATE ) );
- sal_Int16 nControlValue = STATE_DONTKNOW;
+ sal_Int16 nControlValue = TRISTATE_INDET;
aControlValue >>= nControlValue;
bool bBooleanExchange = getExternalValueType().getTypeClass() == TypeClass_BOOLEAN;
@@ -228,7 +228,7 @@ namespace frm
switch( nControlValue )
{
- case STATE_CHECK:
+ case TRISTATE_TRUE:
if ( bBooleanExchange )
{
aExternalValue <<= (sal_Bool)sal_True;
@@ -239,7 +239,7 @@ namespace frm
}
break;
- case STATE_NOCHECK:
+ case TRISTATE_FALSE:
if ( bBooleanExchange )
{
aExternalValue <<= (sal_Bool)sal_False;
@@ -266,16 +266,16 @@ namespace frm
return Any();
Any aControlValue( m_xAggregateSet->getPropertyValue( PROPERTY_STATE ) );
- sal_Int16 nControlValue = STATE_DONTKNOW;
+ sal_Int16 nControlValue = TRISTATE_INDET;
aControlValue >>= nControlValue;
Any aValidatableValue;
switch ( nControlValue )
{
- case STATE_CHECK:
+ case TRISTATE_TRUE:
aValidatableValue <<= (sal_Bool)sal_True;
break;
- case STATE_NOCHECK:
+ case TRISTATE_FALSE:
aValidatableValue <<= (sal_Bool)sal_False;
break;
}
diff --git a/forms/source/inc/togglestate.hxx b/forms/source/inc/togglestate.hxx
index 064450dd3e42..aa4798a3c138 100644
--- a/forms/source/inc/togglestate.hxx
+++ b/forms/source/inc/togglestate.hxx
@@ -25,7 +25,7 @@ namespace frm
{
//........................................................................
- enum ToggleState { STATE_NOCHECK = 0, STATE_CHECK = 1, STATE_DONTKNOW = 2 };
+ enum ToggleState { TRISTATE_FALSE = 0, TRISTATE_TRUE = 1, TRISTATE_INDET = 2 };
//........................................................................
} // namespace frm
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index 71a4b4947c91..386a20711b96 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -152,7 +152,7 @@ throw ( RuntimeException )
sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID );
nItemBits &= ~TIB_CHECKABLE;
- TriState eTri = STATE_NOCHECK;
+ TriState eTri = TRISTATE_FALSE;
sal_Bool bValue = sal_Bool();
OUString aStrValue;
@@ -167,7 +167,7 @@ throw ( RuntimeException )
m_pToolbar->ShowItem( m_nID, true );
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
- eTri = STATE_CHECK;
+ eTri = TRISTATE_TRUE;
nItemBits |= TIB_CHECKABLE;
}
else if ( Event.State >>= aStrValue )
@@ -181,7 +181,7 @@ throw ( RuntimeException )
}
else if ( Event.State >>= aItemState )
{
- eTri = STATE_DONTKNOW;
+ eTri = TRISTATE_INDET;
nItemBits |= TIB_CHECKABLE;
if ( m_bMadeInvisible )
m_pToolbar->ShowItem( m_nID, true );
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 55fcd6fd2cd0..61cfb09a96fd 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -191,7 +191,7 @@ throw ( RuntimeException )
sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID );
nItemBits &= ~TIB_CHECKABLE;
- TriState eTri = STATE_NOCHECK;
+ TriState eTri = TRISTATE_FALSE;
sal_Bool bValue = sal_Bool();
OUString aStrValue;
@@ -205,7 +205,7 @@ throw ( RuntimeException )
m_pToolbar->ShowItem( m_nID, true );
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
- eTri = STATE_CHECK;
+ eTri = TRISTATE_TRUE;
nItemBits |= TIB_CHECKABLE;
}
else if ( Event.State >>= aStrValue )
@@ -219,7 +219,7 @@ throw ( RuntimeException )
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
- eTri = STATE_CHECK;
+ eTri = TRISTATE_TRUE;
nItemBits |= TIB_CHECKABLE;
}
else
@@ -254,7 +254,7 @@ throw ( RuntimeException )
}
else if (( Event.State >>= aItemState ) && !m_bEnumCommand )
{
- eTri = STATE_DONTKNOW;
+ eTri = TRISTATE_INDET;
nItemBits |= TIB_CHECKABLE;
if ( m_bMadeInvisible )
m_pToolbar->ShowItem( m_nID, true );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index ce4df551fefd..4fbcf98536ca 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1316,7 +1316,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
m_pToolBar->SetItemText( nId, aString );
}
m_pToolBar->EnableItem( nId, true );
- m_pToolBar->SetItemState( nId, STATE_NOCHECK );
+ m_pToolBar->SetItemState( nId, TRISTATE_FALSE );
// Fill command map. It stores all our commands and from what
// image manager we got our image. So we can decide if we have to use an
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index 4d398a153dc0..4b860e39153a 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -668,7 +668,7 @@ void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, CommandToInfoMap& rCom
pToolbar->SetQuickHelpText( nItemId, rItem.aLabel );
pToolbar->SetItemText( nItemId, rItem.aLabel );
pToolbar->EnableItem( nItemId, true );
- pToolbar->SetItemState( nItemId, STATE_NOCHECK );
+ pToolbar->SetItemState( nItemId, TRISTATE_FALSE );
CommandToInfoMap::iterator pIter = rCommandMap.find( rItem.aCommandURL );
if ( pIter != rCommandMap.end() )
diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx
index f6f647bda225..fcf94f2dec8c 100644
--- a/include/sfx2/controlwrapper.hxx
+++ b/include/sfx2/controlwrapper.hxx
@@ -153,7 +153,7 @@ public:
virtual ~ControlWrapperBase();
/** Derived classes enable, disable, show, or hide control(s).
- @descr Will do nothing, if the corresponding parameter is STATE_DONTKNOW. */
+ @descr Will do nothing, if the corresponding parameter is TRISTATE_INDET. */
virtual void ModifyControl( TriState eEnable, TriState eShow ) = 0;
/** Derived classes return true if the control is in "don't know" state. */
@@ -200,7 +200,7 @@ public:
inline ControlT& GetControl() { return mrControl; }
/** Enables, disables, shows, or hides the control.
- @descr Does nothing, if the corresponding parameter is STATE_DONTKNOW. */
+ @descr Does nothing, if the corresponding parameter is TRISTATE_INDET. */
virtual void ModifyControl( TriState eEnable, TriState eShow );
/** Derived classes return the value the control contains. */
@@ -542,10 +542,10 @@ PosT PosValueMapper< PosT, ValueT >::GetPosFromValue( ValueT nValue ) const
template< typename ControlT, typename ValueT >
inline void SingleControlWrapper< ControlT, ValueT >::ModifyControl( TriState eEnable, TriState eShow )
{
- if( eEnable != STATE_DONTKNOW )
- mrControl.Enable( eEnable == STATE_CHECK );
- if( eShow != STATE_DONTKNOW )
- mrControl.Show( eShow == STATE_CHECK );
+ if( eEnable != TRISTATE_INDET )
+ mrControl.Enable( eEnable == TRISTATE_TRUE );
+ if( eShow != TRISTATE_INDET )
+ mrControl.Show( eShow == TRISTATE_TRUE );
}
// ============================================================================
diff --git a/include/svx/orienthelper.hxx b/include/svx/orienthelper.hxx
index a6a52cb7a677..271e87a61d3e 100644
--- a/include/svx/orienthelper.hxx
+++ b/include/svx/orienthelper.hxx
@@ -65,10 +65,10 @@ public:
/** Registers the passed window to be enabled/disabled on call of Enable().
@param eDisableIfStacked
- STATE_CHECK: Window always disabled, if stacked text is turned on.
- STATE_NOCHECK: Window always disabled, if stacked text is turned off.
- STATE_DONTKNOW: Window will be enabled/disabled independent from stacked text. */
- void AddDependentWindow( Window& rWindow, TriState eDisableIfStacked = STATE_DONTKNOW );
+ TRISTATE_TRUE: Window always disabled, if stacked text is turned on.
+ TRISTATE_FALSE: Window always disabled, if stacked text is turned off.
+ TRISTATE_INDET: Window will be enabled/disabled independent from stacked text. */
+ void AddDependentWindow( Window& rWindow, TriState eDisableIfStacked = TRISTATE_INDET );
/** Enables or disables the dial control and all dependent windows. */
void Enable( bool bEnable = true );
diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx
index 85bc0fddf879..4d72d61d2b60 100644
--- a/include/toolkit/controls/unocontrols.hxx
+++ b/include/toolkit/controls/unocontrols.hxx
@@ -48,7 +48,6 @@
#include <toolkit/helper/macros.hxx>
#include <toolkit/helper/servicenames.hxx>
#include <vcl/bitmapex.hxx>
-#include <vcl/settings.hxx>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase2.hxx>
@@ -1083,7 +1082,7 @@ class UnoDateFieldControl : public UnoSpinFieldControl,
private:
::com::sun::star::util::Date mnFirst;
::com::sun::star::util::Date mnLast;
- AutoState mbLongFormat;
+ TriState mbLongFormat;
public:
UnoDateFieldControl();
OUString GetComponentServiceName();
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index bc3fb35dd5ab..492a3104d6d6 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -28,6 +28,8 @@
class SvStream;
+enum TriState { TRISTATE_FALSE, TRISTATE_TRUE, TRISTATE_INDET };
+
// Pair
class SAL_WARN_UNUSED Pair
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index be55c19029b7..abba9c63b5c0 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -294,11 +294,6 @@ enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_
IMAGEALIGN_BOTTOM_LEFT, IMAGEALIGN_BOTTOM_RIGHT, IMAGEALIGN_CENTER };
enum SymbolAlign { SYMBOLALIGN_LEFT, SYMBOLALIGN_RIGHT };
-// TriState
-
-enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW };
-
-
// ButtonDialog-Types
typedef sal_uInt16 StandardButtonType;
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 6c3fe18e8585..1da2e8ce894e 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -196,12 +196,12 @@ public:
inline void PushButton::Check( bool bCheck )
{
- SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK );
+ SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
}
inline bool PushButton::IsChecked() const
{
- return (GetState() == STATE_CHECK);
+ return (GetState() == TRISTATE_TRUE);
}
// ------------
@@ -504,12 +504,12 @@ public:
inline void CheckBox::Check( bool bCheck )
{
- SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK );
+ SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
}
inline bool CheckBox::IsChecked() const
{
- return (GetState() == STATE_CHECK);
+ return (GetState() == TRISTATE_TRUE);
}
// ---------------------------------
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index ee50d38b1ae8..9651d4ddb997 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -235,8 +235,6 @@ struct FrameStyle
{}
};
-enum AutoState { AUTO_STATE_OFF, AUTO_STATE_ON, AUTO_STATE_AUTO };
-
// -----------------
// - ImplStyleData -
// -----------------
@@ -340,7 +338,7 @@ private:
bool mbHighContrast;
bool mbUseSystemUIFonts;
sal_uInt16 mnAutoMnemonic;
- AutoState mnUseImagesInMenus;
+ TriState mnUseImagesInMenus;
bool mnUseFlatBorders;
bool mbPreferredUseImagesInMenus;
long mnMinThumbSize;
@@ -651,7 +649,7 @@ public:
bool GetUseFlatMenus() const
{ return mpData->mnUseFlatMenus; }
void SetUseImagesInMenus( bool bUseImagesInMenus )
- { CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus ? AUTO_STATE_ON : AUTO_STATE_OFF; }
+ { CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus ? TRISTATE_TRUE : TRISTATE_FALSE; }
bool GetUseImagesInMenus() const;
void SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus )
{ CopyData(); mpData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus; }
@@ -958,9 +956,9 @@ public:
ImplMiscData( const ImplMiscData& rData );
private:
- AutoState mnEnableATT;
+ TriState mnEnableATT;
bool mbEnableLocalizedDecimalSep;
- AutoState mnDisablePrinting;
+ TriState mnDisablePrinting;
};
// ----------------
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 4ca253f9df0b..f0abfe9162e5 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -579,12 +579,12 @@ public:
inline void ToolBox::CheckItem( sal_uInt16 nItemId, bool bCheck )
{
- SetItemState( nItemId, (bCheck) ? STATE_CHECK : STATE_NOCHECK );
+ SetItemState( nItemId, (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
}
inline bool ToolBox::IsItemChecked( sal_uInt16 nItemId ) const
{
- return (GetItemState( nItemId ) == STATE_CHECK);
+ return (GetItemState( nItemId ) == TRISTATE_TRUE);
}
inline Size ToolBox::CalcWindowSizePixel() const
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 0c28a07c2f0d..6e2aafffa52a 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -27,6 +27,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <tools/color.hxx>
#include <tools/fldunit.hxx>
+#include <tools/gen.hxx>
#include <tools/mapunit.hxx>
#include <tools/rc.h>
#include <tools/wintypes.hxx>
@@ -383,9 +384,9 @@ RscEnum * RscTypCont::InitTriState()
RscEnum * pTriState;
pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
- SETCONST( pTriState, "STATE_NOCHECK", STATE_NOCHECK );
- SETCONST( pTriState, "STATE_CHECK", STATE_CHECK );
- SETCONST( pTriState, "STATE_DONTKNOW", STATE_DONTKNOW );
+ SETCONST( pTriState, "STATE_NOCHECK", TRISTATE_FALSE );
+ SETCONST( pTriState, "STATE_CHECK", TRISTATE_TRUE );
+ SETCONST( pTriState, "STATE_DONTKNOW", TRISTATE_INDET );
return pTriState;
}
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 88090598be77..e87cf53c5a0b 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -169,12 +169,12 @@ int ScTabPageProtection::DeactivatePage( SfxItemSet* pSetP )
IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox )
{
TriState eState = pBox->GetState();
- if ( eState == STATE_DONTKNOW )
+ if ( eState == TRISTATE_INDET )
bDontCare = true; // everything combined at DontCare
else
{
bDontCare = false; // DontCare from everywhere
- sal_Bool bOn = ( eState == STATE_CHECK ); // from a selected value
+ sal_Bool bOn = ( eState == TRISTATE_TRUE ); // from a selected value
if ( pBox == m_pBtnProtect )
bProtect = bOn;
@@ -201,20 +201,20 @@ void ScTabPageProtection::UpdateButtons()
{
if ( bDontCare )
{
- m_pBtnProtect->SetState( STATE_DONTKNOW );
- m_pBtnHideCell->SetState( STATE_DONTKNOW );
- m_pBtnHideFormula->SetState( STATE_DONTKNOW );
- m_pBtnHidePrint->SetState( STATE_DONTKNOW );
+ m_pBtnProtect->SetState( TRISTATE_INDET );
+ m_pBtnHideCell->SetState( TRISTATE_INDET );
+ m_pBtnHideFormula->SetState( TRISTATE_INDET );
+ m_pBtnHidePrint->SetState( TRISTATE_INDET );
}
else
{
- m_pBtnProtect->SetState( bProtect ? STATE_CHECK : STATE_NOCHECK );
- m_pBtnHideCell->SetState( bHideCell ? STATE_CHECK : STATE_NOCHECK );
- m_pBtnHideFormula->SetState( bHideForm ? STATE_CHECK : STATE_NOCHECK );
- m_pBtnHidePrint->SetState( bHidePrint ? STATE_CHECK : STATE_NOCHECK );
+ m_pBtnProtect->SetState( bProtect ? TRISTATE_TRUE : TRISTATE_FALSE );
+ m_pBtnHideCell->SetState( bHideCell ? TRISTATE_TRUE : TRISTATE_FALSE );
+ m_pBtnHideFormula->SetState( bHideForm ? TRISTATE_TRUE : TRISTATE_FALSE );
+ m_pBtnHidePrint->SetState( bHidePrint ? TRISTATE_TRUE : TRISTATE_FALSE );
}
- sal_Bool bEnable = ( m_pBtnHideCell->GetState() != STATE_CHECK );
+ sal_Bool bEnable = ( m_pBtnHideCell->GetState() != TRISTATE_TRUE );
{
m_pBtnProtect->Enable( bEnable );
m_pBtnHideFormula->Enable( bEnable );
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 2fd7f1d92521..30c98ec202dd 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -897,7 +897,7 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(Window* pParent, ScDocument* pDoc)
mpOKAction(NULL),
mpPopupEndAction(NULL),
maWndSize(200, 330),
- mePrevToggleAllState(STATE_DONTKNOW)
+ mePrevToggleAllState(TRISTATE_INDET)
{
maTabStopCtrls.reserve(7);
maTabStopCtrls.push_back(this);
@@ -1146,17 +1146,17 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, TriStateHdl)
{
switch (mePrevToggleAllState)
{
- case STATE_NOCHECK:
- maChkToggleAll.SetState(STATE_CHECK);
+ case TRISTATE_FALSE:
+ maChkToggleAll.SetState(TRISTATE_TRUE);
setAllMemberState(true);
break;
- case STATE_CHECK:
- maChkToggleAll.SetState(STATE_NOCHECK);
+ case TRISTATE_TRUE:
+ maChkToggleAll.SetState(TRISTATE_FALSE);
setAllMemberState(false);
break;
- case STATE_DONTKNOW:
+ case TRISTATE_INDET:
default:
- maChkToggleAll.SetState(STATE_CHECK);
+ maChkToggleAll.SetState(TRISTATE_TRUE);
setAllMemberState(true);
break;
}
@@ -1175,12 +1175,12 @@ IMPL_LINK( ScCheckListMenuWindow, CheckHdl, SvTreeListBox*, pChecks )
size_t nNumChecked = maChecks.GetCheckedEntryCount();
if (nNumChecked == maMembers.size())
// all members visible
- maChkToggleAll.SetState(STATE_CHECK);
+ maChkToggleAll.SetState(TRISTATE_TRUE);
else if (nNumChecked == 0)
// no members visible
- maChkToggleAll.SetState(STATE_NOCHECK);
+ maChkToggleAll.SetState(TRISTATE_FALSE);
else
- maChkToggleAll.SetState(STATE_DONTKNOW);
+ maChkToggleAll.SetState(TRISTATE_INDET);
if (!maConfig.mbAllowEmptySet)
// We need to have at least one member selected.
@@ -1530,19 +1530,19 @@ void ScCheckListMenuWindow::initMembers()
if (nVisMemCount == n)
{
// all members visible
- maChkToggleAll.SetState(STATE_CHECK);
- mePrevToggleAllState = STATE_CHECK;
+ maChkToggleAll.SetState(TRISTATE_TRUE);
+ mePrevToggleAllState = TRISTATE_TRUE;
}
else if (nVisMemCount == 0)
{
// no members visible
- maChkToggleAll.SetState(STATE_NOCHECK);
- mePrevToggleAllState = STATE_NOCHECK;
+ maChkToggleAll.SetState(TRISTATE_FALSE);
+ mePrevToggleAllState = TRISTATE_FALSE;
}
else
{
- maChkToggleAll.SetState(STATE_DONTKNOW);
- mePrevToggleAllState = STATE_DONTKNOW;
+ maChkToggleAll.SetState(TRISTATE_INDET);
+ mePrevToggleAllState = TRISTATE_INDET;
}
maChecks.SetUpdateMode(true);
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index b07a1c9a716d..291b0d618e55 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -728,9 +728,9 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet )
const SfxPoolItem* pItem;
if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, true, &pItem ) == SFX_ITEM_SET )
- pTsbHelp->SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ pTsbHelp->SetState( ((const SfxBoolItem*)pItem)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
else
- pTsbHelp->SetState( STATE_NOCHECK );
+ pTsbHelp->SetState( TRISTATE_FALSE );
if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, true, &pItem ) == SFX_ITEM_SET )
pEdtTitle->SetText( ((const SfxStringItem*)pItem)->GetValue() );
@@ -747,7 +747,7 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet )
sal_Bool ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet )
{
- rArgSet.Put( SfxBoolItem( FID_VALID_SHOWHELP, pTsbHelp->GetState() == STATE_CHECK ) );
+ rArgSet.Put( SfxBoolItem( FID_VALID_SHOWHELP, pTsbHelp->GetState() == TRISTATE_TRUE ) );
rArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, pEdtTitle->GetText() ) );
rArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, pEdInputHelp->GetText() ) );
@@ -817,9 +817,9 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet )
const SfxPoolItem* pItem;
if ( rArgSet.GetItemState( FID_VALID_SHOWERR, true, &pItem ) == SFX_ITEM_SET )
- m_pTsbShow->SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ m_pTsbShow->SetState( ((const SfxBoolItem*)pItem)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
else
- m_pTsbShow->SetState( STATE_CHECK ); // check by default
+ m_pTsbShow->SetState( TRISTATE_TRUE ); // check by default
if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SFX_ITEM_SET )
m_pLbAction->SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() );
@@ -843,7 +843,7 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet )
sal_Bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet )
{
- rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, m_pTsbShow->GetState() == STATE_CHECK ) );
+ rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, m_pTsbShow->GetState() == TRISTATE_TRUE ) );
rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, m_pLbAction->GetSelectEntryPos() ) );
rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, m_pEdtTitle->GetText() ) );
rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, m_pEdError->GetText() ) );
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index f0e8c493b77a..4255ee90d796 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -1408,7 +1408,7 @@ void ScNavigatorDlg::CheckDataArea()
|| nCurRow < pMarkArea->nRowStart+1
|| nCurRow > pMarkArea->nRowEnd+1 )
{
- aTbxCmd.SetItemState( IID_DATA, TriState(STATE_CHECK) );
+ aTbxCmd.SetItemState( IID_DATA, TriState(TRISTATE_TRUE) );
aTbxCmd.Select( IID_DATA );
}
}
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 239054c5a2b8..034d27bcfe6c 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -241,17 +241,17 @@ sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NOTES),
rCoreSet, rOldSet,
m_pBtnNotes->IsChecked(),
- m_pBtnNotes->GetSavedValue() != STATE_NOCHECK );
+ m_pBtnNotes->GetSavedValue() != TRISTATE_FALSE );
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_GRID),
rCoreSet, rOldSet,
m_pBtnGrid->IsChecked(),
- m_pBtnGrid->GetSavedValue() != STATE_NOCHECK );
+ m_pBtnGrid->GetSavedValue() != TRISTATE_FALSE );
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_HEADERS),
rCoreSet, rOldSet,
m_pBtnHeaders->IsChecked(),
- m_pBtnHeaders->GetSavedValue() != STATE_NOCHECK );
+ m_pBtnHeaders->GetSavedValue() != TRISTATE_FALSE );
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_TOPDOWN),
rCoreSet, rOldSet,
@@ -261,12 +261,12 @@ sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_FORMULAS),
rCoreSet, rOldSet,
m_pBtnFormulas->IsChecked(),
- m_pBtnFormulas->GetSavedValue() != STATE_NOCHECK );
+ m_pBtnFormulas->GetSavedValue() != TRISTATE_FALSE );
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NULLVALS),
rCoreSet, rOldSet,
m_pBtnNullVals->IsChecked(),
- m_pBtnNullVals->GetSavedValue() != STATE_NOCHECK );
+ m_pBtnNullVals->GetSavedValue() != TRISTATE_FALSE );
// first printed page:
sal_Bool bUseValue = m_pBtnPageNo->IsChecked();
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 9c83b3b9775e..a00819222c89 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -442,7 +442,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
else if(eState == SFX_ITEM_DONTCARE)
{
mpCBXWrapText->EnableTriState(true);
- mpCBXWrapText->SetState(STATE_DONTKNOW);
+ mpCBXWrapText->SetState(TRISTATE_INDET);
}
}
break;
@@ -515,7 +515,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
mpMtrAngle->Disable();
mpCtrlDial->Disable();
mpCbStacked->EnableTriState(true);
- mpCbStacked->SetState(STATE_DONTKNOW);
+ mpCbStacked->SetState(TRISTATE_INDET);
}
}
}
@@ -546,10 +546,10 @@ void AlignmentPropertyPanel::UpdateHorAlign()
const sal_uInt16 nIdRight = mpTBHorizontal->GetItemId(UNO_ALIGNRIGHT);
const sal_uInt16 nIdBlock = mpTBHorizontal->GetItemId(UNO_ALIGNBLOCK);
- mpTBHorizontal->SetItemState(nIdLeft, STATE_NOCHECK);
- mpTBHorizontal->SetItemState(nIdCenter, STATE_NOCHECK);
- mpTBHorizontal->SetItemState(nIdRight, STATE_NOCHECK);
- mpTBHorizontal->SetItemState(nIdBlock, STATE_NOCHECK);
+ mpTBHorizontal->SetItemState(nIdLeft, TRISTATE_FALSE);
+ mpTBHorizontal->SetItemState(nIdCenter, TRISTATE_FALSE);
+ mpTBHorizontal->SetItemState(nIdRight, TRISTATE_FALSE);
+ mpTBHorizontal->SetItemState(nIdBlock, TRISTATE_FALSE);
mpFTLeftIndent->Disable();
mpMFLeftIndent->Disable();
if(meHorAlignState==SVX_HOR_JUSTIFY_REPEAT)
@@ -578,13 +578,13 @@ void AlignmentPropertyPanel::UpdateHorAlign()
switch(meHorAlignState)
{
case SVX_HOR_JUSTIFY_LEFT:
- mpTBHorizontal->SetItemState(nIdLeft, STATE_CHECK);
+ mpTBHorizontal->SetItemState(nIdLeft, TRISTATE_TRUE);
mpFTLeftIndent->Enable();
mpMFLeftIndent->Enable();
break;
- case SVX_HOR_JUSTIFY_CENTER:mpTBHorizontal->SetItemState(nIdCenter, STATE_CHECK);break;
- case SVX_HOR_JUSTIFY_RIGHT: mpTBHorizontal->SetItemState(nIdRight, STATE_CHECK);break;
- case SVX_HOR_JUSTIFY_BLOCK: mpTBHorizontal->SetItemState(nIdBlock, STATE_CHECK);break;
+ case SVX_HOR_JUSTIFY_CENTER:mpTBHorizontal->SetItemState(nIdCenter, TRISTATE_TRUE);break;
+ case SVX_HOR_JUSTIFY_RIGHT: mpTBHorizontal->SetItemState(nIdRight, TRISTATE_TRUE);break;
+ case SVX_HOR_JUSTIFY_BLOCK: mpTBHorizontal->SetItemState(nIdBlock, TRISTATE_TRUE);break;
default:;
}
}
@@ -597,15 +597,15 @@ void AlignmentPropertyPanel::UpdateVerAlign()
const sal_uInt16 nIdVCenter = mpTBVertical->GetItemId(UNO_ALIGNVCENTER);
const sal_uInt16 nIdBottom = mpTBVertical->GetItemId(UNO_ALIGNBOTTOM);
- mpTBVertical->SetItemState(nIdTop, STATE_NOCHECK);
- mpTBVertical->SetItemState(nIdVCenter, STATE_NOCHECK);
- mpTBVertical->SetItemState(nIdBottom, STATE_NOCHECK);
+ mpTBVertical->SetItemState(nIdTop, TRISTATE_FALSE);
+ mpTBVertical->SetItemState(nIdVCenter, TRISTATE_FALSE);
+ mpTBVertical->SetItemState(nIdBottom, TRISTATE_FALSE);
switch(meVerAlignState)
{
- case SVX_VER_JUSTIFY_TOP: mpTBVertical->SetItemState(nIdTop, STATE_CHECK);break;
- case SVX_VER_JUSTIFY_CENTER:mpTBVertical->SetItemState(nIdVCenter, STATE_CHECK);break;
- case SVX_VER_JUSTIFY_BOTTOM:mpTBVertical->SetItemState(nIdBottom, STATE_CHECK);break;
+ case SVX_VER_JUSTIFY_TOP: mpTBVertical->SetItemState(nIdTop, TRISTATE_TRUE);break;
+ case SVX_VER_JUSTIFY_CENTER:mpTBVertical->SetItemState(nIdVCenter, TRISTATE_TRUE);break;
+ case SVX_VER_JUSTIFY_BOTTOM:mpTBVertical->SetItemState(nIdBottom, TRISTATE_TRUE);break;
default:;
}
}
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index c66b5e70f5e9..3c27cf8ba5ec 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1845,7 +1845,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
}
else
{
- mpCBXRewind->SetState( STATE_DONTKNOW );
+ mpCBXRewind->SetState( TRISTATE_INDET );
}
}
@@ -2019,7 +2019,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
- if( mpCBXRewind->GetState() != STATE_DONTKNOW )
+ if( mpCBXRewind->GetState() != TRISTATE_INDET )
{
sal_Int16 nFill = mpCBXRewind->IsChecked() ? AnimationFill::REMOVE : AnimationFill::HOLD;
@@ -2126,10 +2126,10 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
}
else
{
- maCBXGroupAuto->SetState( STATE_DONTKNOW );
+ maCBXGroupAuto->SetState( TRISTATE_INDET );
}
- maCBXAnimateForm->SetState( STATE_DONTKNOW );
+ maCBXAnimateForm->SetState( TRISTATE_INDET );
if( pSet->getPropertyState( nHandleAnimateForm ) != STLPropertyState_AMBIGUOUS )
{
sal_Bool bAnimateForm = sal_False;
@@ -2143,7 +2143,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
maCBXAnimateForm->Enable( false );
}
- maCBXReverse->SetState( STATE_DONTKNOW );
+ maCBXReverse->SetState( TRISTATE_INDET );
if( pSet->getPropertyState( nHandleTextReverse ) != STLPropertyState_AMBIGUOUS )
{
sal_Bool bTextReverse = sal_False;
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 677ddd7f2587..fc8a1521ff62 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -653,7 +653,7 @@ void SlideTransitionPane::updateControls()
if( aEffect.mbLoopSoundAmbiguous )
{
- mpCB_LOOP_SOUND->SetState( STATE_DONTKNOW );
+ mpCB_LOOP_SOUND->SetState( TRISTATE_INDET );
}
else
{
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 689fec1cf7e0..c30e42396f73 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -97,8 +97,8 @@ sal_Bool SdParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
m_pNewStartNF->GetText() != m_pNewStartNF->GetSavedValue())
{
mbModified = true;
- sal_Bool bNewStartChecked = STATE_CHECK == m_pNewStartCB->GetState();
- sal_Bool bNumberNewStartChecked = STATE_CHECK == m_pNewStartNumberCB->GetState();
+ sal_Bool bNewStartChecked = TRISTATE_TRUE == m_pNewStartCB->GetState();
+ sal_Bool bNumberNewStartChecked = TRISTATE_TRUE == m_pNewStartNumberCB->GetState();
rSet.Put(SfxBoolItem(ATTR_NUMBER_NEWSTART, bNewStartChecked));
const sal_Int16 nStartAt = (sal_Int16)m_pNewStartNF->GetValue();
@@ -114,12 +114,12 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet )
if(eItemState > SFX_ITEM_AVAILABLE )
{
const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(ATTR_NUMBER_NEWSTART);
- m_pNewStartCB->SetState( rStart.GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ m_pNewStartCB->SetState( rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pNewStartCB->EnableTriState(false);
}
else
{
- m_pNewStartCB->SetState(STATE_DONTKNOW);
+ m_pNewStartCB->SetState(TRISTATE_INDET);
m_pNewStartCB->Disable();
}
m_pNewStartCB->SaveValue();
@@ -137,7 +137,7 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet )
}
else
{
- m_pNewStartCB->SetState(STATE_DONTKNOW);
+ m_pNewStartCB->SetState(TRISTATE_INDET);
}
ImplNewStartHdl(m_pNewStartCB);
m_pNewStartNF->SaveValue();
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index f9be5a1d21fe..c82e123049f4 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -429,13 +429,13 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
// percent
TRISTATE eState = mpDrawView->IsMarkedGluePointsPercent();
- if( eState == STATE_DONTKNOW )
+ if( eState == TRISTATE_INDET )
rSet.InvalidateItem( SID_GLUE_PERCENT );
else
- rSet.Put( SfxBoolItem( SID_GLUE_PERCENT, eState == STATE_CHECK ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_PERCENT, eState == TRISTATE_TRUE ) );
// alignment has no effect by percent
- if( eState == STATE_CHECK )
+ if( eState == TRISTATE_TRUE )
{
rSet.DisableItem( SID_GLUE_HORZALIGN_CENTER );
rSet.DisableItem( SID_GLUE_HORZALIGN_LEFT );
@@ -464,28 +464,28 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
// Escape direction
// left
eState = mpDrawView->IsMarkedGluePointsEscDir( SDRESC_LEFT );
- if( eState == STATE_DONTKNOW )
+ if( eState == TRISTATE_INDET )
rSet.InvalidateItem( SID_GLUE_ESCDIR_LEFT );
else
- rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_LEFT, eState == STATE_CHECK ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_LEFT, eState == TRISTATE_TRUE ) );
// right
eState = mpDrawView->IsMarkedGluePointsEscDir( SDRESC_RIGHT );
- if( eState == STATE_DONTKNOW )
+ if( eState == TRISTATE_INDET )
rSet.InvalidateItem( SID_GLUE_ESCDIR_RIGHT );
else
- rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_RIGHT, eState == STATE_CHECK ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_RIGHT, eState == TRISTATE_TRUE ) );
// top
eState = mpDrawView->IsMarkedGluePointsEscDir( SDRESC_TOP );
- if( eState == STATE_DONTKNOW )
+ if( eState == TRISTATE_INDET )
rSet.InvalidateItem( SID_GLUE_ESCDIR_TOP );
else
- rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_TOP, eState == STATE_CHECK ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_TOP, eState == TRISTATE_TRUE ) );
// bottom
eState = mpDrawView->IsMarkedGluePointsEscDir( SDRESC_BOTTOM );
- if( eState == STATE_DONTKNOW )
+ if( eState == TRISTATE_INDET )
rSet.InvalidateItem( SID_GLUE_ESCDIR_BOTTOM );
else
- rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_BOTTOM, eState == STATE_CHECK ) );
+ rSet.Put( SfxBoolItem( SID_GLUE_ESCDIR_BOTTOM, eState == TRISTATE_TRUE ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GRID_FRONT ) ||
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 3288f4d82f11..c34db4a516ef 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -955,7 +955,7 @@ sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) )
{
SfxDocumentInfoItem* m_pInfoItem = (SfxDocumentInfoItem*)pItem;
- sal_Bool bUseData = ( STATE_CHECK == m_pUseUserDataCB->GetState() );
+ sal_Bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() );
m_pInfoItem->SetUseUserData( bUseData );
rSet.Put( SfxDocumentInfoItem( *m_pInfoItem ) );
bRet = sal_True;
@@ -974,8 +974,8 @@ sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
newItem.resetUserData( bUseAuthor
? SvtUserOptions().GetFullName()
: OUString() );
- m_pInfoItem->SetUseUserData( STATE_CHECK == m_pUseUserDataCB->GetState() );
- newItem.SetUseUserData( STATE_CHECK == m_pUseUserDataCB->GetState() );
+ m_pInfoItem->SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() );
+ newItem.SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() );
newItem.SetDeleteUserData( sal_True );
rSet.Put( newItem );
@@ -1117,7 +1117,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
TriState eState = (TriState)m_bUseUserData;
- if ( STATE_DONTKNOW == eState )
+ if ( TRISTATE_INDET == eState )
m_pUseUserDataCB->EnableTriState( true );
m_pUseUserDataCB->SetState( eState );
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index aae7b16c2771..65ff99133b28 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -35,7 +35,7 @@ namespace {
TriState lclConvertToTriState( bool bKnown, bool bIsKnownFlag, bool bIsUnknownFlag )
{
- return (bKnown && bIsKnownFlag) ? STATE_CHECK : ((!bKnown && bIsUnknownFlag) ? STATE_NOCHECK : STATE_DONTKNOW);
+ return (bKnown && bIsKnownFlag) ? TRISTATE_TRUE : ((!bKnown && bIsUnknownFlag) ? TRISTATE_FALSE : TRISTATE_INDET);
}
} // namespace
@@ -114,13 +114,13 @@ CheckBoxWrapper::CheckBoxWrapper( CheckBox& rCheckBox ) :
bool CheckBoxWrapper::IsControlDontKnow() const
{
- return GetControl().GetState() == STATE_DONTKNOW;
+ return GetControl().GetState() == TRISTATE_INDET;
}
void CheckBoxWrapper::SetControlDontKnow( bool bSet )
{
GetControl().EnableTriState( bSet );
- GetControl().SetState( bSet ? STATE_DONTKNOW : STATE_NOCHECK );
+ GetControl().SetState( bSet ? TRISTATE_INDET : TRISTATE_FALSE );
}
sal_Bool CheckBoxWrapper::GetControlValue() const
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index c5feb4f0e755..54d09f7bcbf8 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2682,9 +2682,9 @@ sal_Bool SfxTemplateDialog_Impl::IsCheckedItem(sal_uInt16 nMesId)
switch(nMesId)
{
case SID_STYLE_WATERCAN :
- return m_aActionTbR.GetItemState(SID_STYLE_WATERCAN)==STATE_CHECK;
+ return m_aActionTbR.GetItemState(SID_STYLE_WATERCAN)==TRISTATE_TRUE;
default:
- return m_aActionTbL.GetItemState(nMesId)==STATE_CHECK;
+ return m_aActionTbL.GetItemState(nMesId)==TRISTATE_TRUE;
}
}
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index d7899eea2bd8..a853a33bd12a 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1055,7 +1055,7 @@ void SfxTemplateManagerDlg::OnTemplateSearch ()
bool bVisible = mpSearchEdit->IsVisible();
mpActionBar->SetItemState(mpActionBar->GetItemId(ACTIONBAR_SEARCH),
- bVisible? STATE_NOCHECK: STATE_CHECK);
+ bVisible? TRISTATE_FALSE: TRISTATE_TRUE);
// fdo#74782 We are switching views. No matter to which state,
// deselect and hide our current SearchView items.
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index efaeed328b08..b13603ec1764 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -929,7 +929,7 @@ void SfxToolBoxControl::StateChanged
sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() );
nItemBits &= ~TIB_CHECKABLE;
- ::TriState eTri = STATE_NOCHECK;
+ ::TriState eTri = TRISTATE_FALSE;
switch ( eState )
{
case SFX_ITEM_AVAILABLE:
@@ -938,7 +938,7 @@ void SfxToolBoxControl::StateChanged
{
// BoolItem for checking
if ( ((const SfxBoolItem*)pState)->GetValue() )
- eTri = STATE_CHECK;
+ eTri = TRISTATE_TRUE;
nItemBits |= TIB_CHECKABLE;
}
else if ( pState->ISA(SfxEnumItemInterface) &&
@@ -946,7 +946,7 @@ void SfxToolBoxControl::StateChanged
{
// EnumItem is handled as Bool
if ( ((const SfxEnumItemInterface *)pState)->GetBoolValue() )
- eTri = STATE_CHECK;
+ eTri = TRISTATE_TRUE;
nItemBits |= TIB_CHECKABLE;
}
else if ( pImpl->bShowString && pState->ISA(SfxStringItem) )
@@ -956,7 +956,7 @@ void SfxToolBoxControl::StateChanged
case SFX_ITEM_DONTCARE:
{
- eTri = STATE_DONTKNOW;
+ eTri = TRISTATE_INDET;
nItemBits |= TIB_CHECKABLE;
}
}
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 5fc3f2724f81..b707015ecd07 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -698,7 +698,7 @@ sal_Bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, Tr
{
bRet = true;
_rState = ( ( pItem->GetButtonFlags() & SV_ITEMSTATE_UNCHECKED ) == 0 )
- ? STATE_CHECK : STATE_NOCHECK;
+ ? TRISTATE_TRUE : TRISTATE_FALSE;
}
}
else
@@ -917,7 +917,7 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nR
if ( !xChild.is() )
{
- TriState eState = STATE_DONTKNOW;
+ TriState eState = TRISTATE_INDET;
sal_Bool bIsCheckBox = IsCellCheckBox( _nRow, _nColumnPos, eState );
if ( bIsCheckBox )
xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleCheckBoxCell(
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index 1f43c1b918fb..6bbf1e48d6a3 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -139,7 +139,7 @@ throw ( RuntimeException )
sal_uInt16 nItemBits = m_pToolbox->GetItemBits( m_nID );
nItemBits &= ~TIB_CHECKABLE;
- TriState eTri = STATE_NOCHECK;
+ TriState eTri = TRISTATE_FALSE;
sal_Bool bValue = sal_Bool();
OUString aStrValue;
@@ -151,7 +151,7 @@ throw ( RuntimeException )
m_pToolbox->SetItemBits( m_nID, nItemBits );
m_pToolbox->CheckItem( m_nID, bValue );
if ( bValue )
- eTri = STATE_CHECK;
+ eTri = TRISTATE_TRUE;
nItemBits |= TIB_CHECKABLE;
}
else if ( Event.State >>= aStrValue )
@@ -160,7 +160,7 @@ throw ( RuntimeException )
}
else if ( Event.State >>= aItemState )
{
- eTri = STATE_DONTKNOW;
+ eTri = TRISTATE_INDET;
nItemBits |= TIB_CHECKABLE;
}
diff --git a/svx/source/dialog/orienthelper.cxx b/svx/source/dialog/orienthelper.cxx
index 14ffd752a4d8..c931e7b636cc 100644
--- a/svx/source/dialog/orienthelper.cxx
+++ b/svx/source/dialog/orienthelper.cxx
@@ -60,8 +60,8 @@ OrientationHelper_Impl::OrientationHelper_Impl( DialControl& rCtrlDial, CheckBox
mbEnabled( rCtrlDial.IsEnabled() ),
mbVisible( rCtrlDial.IsVisible() )
{
- maWinVec.push_back( WindowPair( &mrCtrlDial, STATE_CHECK ) );
- maWinVec.push_back( WindowPair( &mrCbStacked, STATE_DONTKNOW ) );
+ maWinVec.push_back( WindowPair( &mrCtrlDial, TRISTATE_TRUE ) );
+ maWinVec.push_back( WindowPair( &mrCbStacked, TRISTATE_INDET ) );
mrCbStacked.SetClickHdl( LINK( this, OrientationHelper_Impl, ClickHdl ) );
}
@@ -82,10 +82,10 @@ void OrientationHelper_Impl::EnableWindow( Window& rWindow, TriState eDisableIfS
bool bDisableOnStacked = false;
switch( eDisableIfStacked )
{
- // STATE_CHECK: Disable window, if stacked text is turned on or "don't know".
- case STATE_CHECK: bDisableOnStacked = (mrCbStacked.GetState() != STATE_NOCHECK); break;
- // STATE_NOCHECK: Disable window, if stacked text is turned off or "don't know".
- case STATE_NOCHECK: bDisableOnStacked = (mrCbStacked.GetState() != STATE_CHECK); break;
+ // TRISTATE_TRUE: Disable window, if stacked text is turned on or "don't know".
+ case TRISTATE_TRUE: bDisableOnStacked = (mrCbStacked.GetState() != TRISTATE_FALSE); break;
+ // TRISTATE_FALSE: Disable window, if stacked text is turned off or "don't know".
+ case TRISTATE_FALSE: bDisableOnStacked = (mrCbStacked.GetState() != TRISTATE_TRUE); break;
default: ;//prevent warning
}
rWindow.Enable( mbEnabled && !bDisableOnStacked );
@@ -162,23 +162,23 @@ OrientStackedWrapper::OrientStackedWrapper( OrientationHelper& rOrientHlp ) :
bool OrientStackedWrapper::IsControlDontKnow() const
{
- return GetControl().GetStackedState() == STATE_DONTKNOW;
+ return GetControl().GetStackedState() == TRISTATE_INDET;
}
void OrientStackedWrapper::SetControlDontKnow( bool bSet )
{
GetControl().EnableStackedTriState( bSet );
- GetControl().SetStackedState( bSet ? STATE_DONTKNOW : STATE_NOCHECK );
+ GetControl().SetStackedState( bSet ? TRISTATE_INDET : TRISTATE_FALSE );
}
bool OrientStackedWrapper::GetControlValue() const
{
- return GetControl().GetStackedState() == STATE_CHECK;
+ return GetControl().GetStackedState() == TRISTATE_TRUE;
}
void OrientStackedWrapper::SetControlValue( bool bValue )
{
- GetControl().SetStackedState( bValue ? STATE_CHECK : STATE_NOCHECK );
+ GetControl().SetStackedState( bValue ? TRISTATE_TRUE : TRISTATE_FALSE );
}
// ============================================================================
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index d659b7eb7baf..d6f926c88d7f 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -718,14 +718,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
aBtnDoubleSided.Check( bValue );
bUpdate = sal_True;
}
- else if( aBtnDoubleSided.GetState() == STATE_DONTKNOW )
+ else if( aBtnDoubleSided.GetState() == TRISTATE_INDET )
aBtnDoubleSided.Check( bValue );
}
else
{
- if( aBtnDoubleSided.GetState() != STATE_DONTKNOW )
+ if( aBtnDoubleSided.GetState() != TRISTATE_INDET )
{
- aBtnDoubleSided.SetState( STATE_DONTKNOW );
+ aBtnDoubleSided.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -842,14 +842,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
aBtnNormalsInvert.Check( bValue );
bUpdate = sal_True;
}
- else if( aBtnNormalsInvert.GetState() == STATE_DONTKNOW )
+ else if( aBtnNormalsInvert.GetState() == TRISTATE_INDET )
aBtnNormalsInvert.Check( bValue );
}
else
{
- if( aBtnNormalsInvert.GetState() != STATE_DONTKNOW )
+ if( aBtnNormalsInvert.GetState() != TRISTATE_INDET )
{
- aBtnNormalsInvert.SetState( STATE_DONTKNOW );
+ aBtnNormalsInvert.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -864,14 +864,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
aBtnTwoSidedLighting.Check( bValue );
bUpdate = sal_True;
}
- else if( aBtnTwoSidedLighting.GetState() == STATE_DONTKNOW )
+ else if( aBtnTwoSidedLighting.GetState() == TRISTATE_INDET )
aBtnTwoSidedLighting.Check( bValue );
}
else
{
- if( aBtnTwoSidedLighting.GetState() != STATE_DONTKNOW )
+ if( aBtnTwoSidedLighting.GetState() != TRISTATE_INDET )
{
- aBtnTwoSidedLighting.SetState( STATE_DONTKNOW );
+ aBtnTwoSidedLighting.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -909,14 +909,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
aMtrSlant.Enable( bValue );
bUpdate = sal_True;
}
- else if( aBtnShadow3d.GetState() == STATE_DONTKNOW )
+ else if( aBtnShadow3d.GetState() == TRISTATE_INDET )
aBtnShadow3d.Check( bValue );
}
else
{
- if( aBtnShadow3d.GetState() != STATE_DONTKNOW )
+ if( aBtnShadow3d.GetState() != TRISTATE_INDET )
{
- aBtnShadow3d.SetState( STATE_DONTKNOW );
+ aBtnShadow3d.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1023,14 +1023,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight1, bOn );
bUpdate = sal_True;
}
- if( aBtnLight1.GetState() == STATE_DONTKNOW )
+ if( aBtnLight1.GetState() == TRISTATE_INDET )
aBtnLight1.Check( aBtnLight1.IsChecked() );
}
else
{
- if( aBtnLight1.GetState() != STATE_DONTKNOW )
+ if( aBtnLight1.GetState() != TRISTATE_INDET )
{
- aBtnLight1.SetState( STATE_DONTKNOW );
+ aBtnLight1.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1072,14 +1072,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight2, bOn );
bUpdate = sal_True;
}
- if( aBtnLight2.GetState() == STATE_DONTKNOW )
+ if( aBtnLight2.GetState() == TRISTATE_INDET )
aBtnLight2.Check( aBtnLight2.IsChecked() );
}
else
{
- if( aBtnLight2.GetState() != STATE_DONTKNOW )
+ if( aBtnLight2.GetState() != TRISTATE_INDET )
{
- aBtnLight2.SetState( STATE_DONTKNOW );
+ aBtnLight2.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1121,14 +1121,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight3, bOn );
bUpdate = sal_True;
}
- if( aBtnLight3.GetState() == STATE_DONTKNOW )
+ if( aBtnLight3.GetState() == TRISTATE_INDET )
aBtnLight3.Check( aBtnLight3.IsChecked() );
}
else
{
- if( aBtnLight3.GetState() != STATE_DONTKNOW )
+ if( aBtnLight3.GetState() != TRISTATE_INDET )
{
- aBtnLight3.SetState( STATE_DONTKNOW );
+ aBtnLight3.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1170,14 +1170,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight4, bOn );
bUpdate = sal_True;
}
- if( aBtnLight4.GetState() == STATE_DONTKNOW )
+ if( aBtnLight4.GetState() == TRISTATE_INDET )
aBtnLight4.Check( aBtnLight4.IsChecked() );
}
else
{
- if( aBtnLight4.GetState() != STATE_DONTKNOW )
+ if( aBtnLight4.GetState() != TRISTATE_INDET )
{
- aBtnLight4.SetState( STATE_DONTKNOW );
+ aBtnLight4.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1219,14 +1219,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight5, bOn );
bUpdate = sal_True;
}
- if( aBtnLight5.GetState() == STATE_DONTKNOW )
+ if( aBtnLight5.GetState() == TRISTATE_INDET )
aBtnLight5.Check( aBtnLight5.IsChecked() );
}
else
{
- if( aBtnLight5.GetState() != STATE_DONTKNOW )
+ if( aBtnLight5.GetState() != TRISTATE_INDET )
{
- aBtnLight5.SetState( STATE_DONTKNOW );
+ aBtnLight5.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1268,14 +1268,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight6, bOn );
bUpdate = sal_True;
}
- if( aBtnLight6.GetState() == STATE_DONTKNOW )
+ if( aBtnLight6.GetState() == TRISTATE_INDET )
aBtnLight6.Check( aBtnLight6.IsChecked() );
}
else
{
- if( aBtnLight6.GetState() != STATE_DONTKNOW )
+ if( aBtnLight6.GetState() != TRISTATE_INDET )
{
- aBtnLight6.SetState( STATE_DONTKNOW );
+ aBtnLight6.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1317,14 +1317,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight7 , bOn );
bUpdate = sal_True;
}
- if( aBtnLight7.GetState() == STATE_DONTKNOW )
+ if( aBtnLight7.GetState() == TRISTATE_INDET )
aBtnLight7.Check( aBtnLight7.IsChecked() );
}
else
{
- if( aBtnLight7.GetState() != STATE_DONTKNOW )
+ if( aBtnLight7.GetState() != TRISTATE_INDET )
{
- aBtnLight7.SetState( STATE_DONTKNOW );
+ aBtnLight7.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1366,14 +1366,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
SetUILightState( aBtnLight8, bOn );
bUpdate = sal_True;
}
- if( aBtnLight8.GetState() == STATE_DONTKNOW )
+ if( aBtnLight8.GetState() == TRISTATE_INDET )
aBtnLight8.Check( aBtnLight8.IsChecked() );
}
else
{
- if( aBtnLight8.GetState() != STATE_DONTKNOW )
+ if( aBtnLight8.GetState() != TRISTATE_INDET )
{
- aBtnLight8.SetState( STATE_DONTKNOW );
+ aBtnLight8.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1527,14 +1527,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
aBtnTexFilter.Check( bValue );
bUpdate = sal_True;
}
- if( aBtnTexFilter.GetState() == STATE_DONTKNOW )
+ if( aBtnTexFilter.GetState() == TRISTATE_INDET )
aBtnTexFilter.Check( bValue );
}
else
{
- if( aBtnTexFilter.GetState() != STATE_DONTKNOW )
+ if( aBtnTexFilter.GetState() != TRISTATE_INDET )
{
- aBtnTexFilter.SetState( STATE_DONTKNOW );
+ aBtnTexFilter.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1640,14 +1640,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
aBtnPerspective.Check( ePT == PR_PERSPECTIVE );
bUpdate = sal_True;
}
- if( aBtnPerspective.GetState() == STATE_DONTKNOW )
+ if( aBtnPerspective.GetState() == TRISTATE_INDET )
aBtnPerspective.Check( ePT == PR_PERSPECTIVE );
}
else
{
- if( aBtnPerspective.GetState() != STATE_DONTKNOW )
+ if( aBtnPerspective.GetState() != TRISTATE_INDET )
{
- aBtnPerspective.SetState( STATE_DONTKNOW );
+ aBtnPerspective.SetState( TRISTATE_INDET );
bUpdate = sal_True;
}
}
@@ -1731,7 +1731,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
//Others must stand as the front on all sides
// Perspective
- if( aBtnPerspective.GetState() != STATE_DONTKNOW )
+ if( aBtnPerspective.GetState() != TRISTATE_INDET )
{
sal_uInt16 nValue;
if( aBtnPerspective.IsChecked() )
@@ -1784,9 +1784,9 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
// Double-sided
TriState eState = aBtnDoubleSided.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
- sal_Bool bValue = STATE_CHECK == eState;
+ sal_Bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(Svx3DDoubleSidedItem(bValue));
}
else
@@ -1835,9 +1835,9 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
// Normal inverted
eState = aBtnNormalsInvert.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
- sal_Bool bValue = STATE_CHECK == eState;
+ sal_Bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(Svx3DNormalsInvertItem(bValue));
}
else
@@ -1845,9 +1845,9 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
// 2-sided lighting
eState = aBtnTwoSidedLighting.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
- sal_Bool bValue = STATE_CHECK == eState;
+ sal_Bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(Svx3DTwoSidedLightingItem(bValue));
}
else
@@ -1865,9 +1865,9 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
// 3D-Shadow
eState = aBtnShadow3d.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
- sal_Bool bValue = STATE_CHECK == eState;
+ sal_Bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(Svx3DShadow3DItem(bValue));
rAttrs.Put(SdrShadowItem(bValue));
}
@@ -1920,7 +1920,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_1);
// Light 1 (on/off)
eState = aBtnLight1.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight1 );
rAttrs.Put(Svx3DLightOnOff1Item(bValue));
@@ -1945,7 +1945,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_2);
// Light 2 (on/off)
eState = aBtnLight2.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight2 );
rAttrs.Put(Svx3DLightOnOff2Item(bValue));
@@ -1969,7 +1969,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_3);
// Light 3 (on/off)
eState = aBtnLight3.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight3 );
rAttrs.Put(Svx3DLightOnOff3Item(bValue));
@@ -1993,7 +1993,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_4);
// Light 4 (on/off)
eState = aBtnLight4.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight4 );
rAttrs.Put(Svx3DLightOnOff4Item(bValue));
@@ -2017,7 +2017,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_5);
// Light 5 (on/off)
eState = aBtnLight5.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight5 );
rAttrs.Put(Svx3DLightOnOff5Item(bValue));
@@ -2041,7 +2041,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_6);
// Light 6 (on/off)
eState = aBtnLight6.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight6 );
rAttrs.Put(Svx3DLightOnOff6Item(bValue));
@@ -2065,7 +2065,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_7);
// Light 7 (on/off)
eState = aBtnLight7.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight7 );
rAttrs.Put(Svx3DLightOnOff7Item(bValue));
@@ -2089,7 +2089,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_8);
// Light 8 (on/off)
eState = aBtnLight8.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
sal_Bool bValue = GetUILightState( aBtnLight8 );
rAttrs.Put(Svx3DLightOnOff8Item(bValue));
@@ -2169,9 +2169,9 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
// Filter
eState = aBtnTexFilter.GetState();
- if( eState != STATE_DONTKNOW )
+ if( eState != TRISTATE_INDET )
{
- sal_Bool bValue = STATE_CHECK == eState;
+ sal_Bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(Svx3DTextureFilterItem(bValue));
}
else
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index aca59abe9bc6..4acf5a73ab94 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1707,14 +1707,14 @@ CellControllerRef DbCheckBox::CreateController() const
static void lcl_setCheckBoxState( const Reference< ::com::sun::star::sdb::XColumn >& _rxField,
CheckBoxControl* _pCheckBoxControl )
{
- TriState eState = STATE_DONTKNOW;
+ TriState eState = TRISTATE_INDET;
if (_rxField.is())
{
try
{
sal_Bool bValue = _rxField->getBoolean();
if (!_rxField->wasNull())
- eState = bValue ? STATE_CHECK : STATE_NOCHECK;
+ eState = bValue ? TRISTATE_TRUE : TRISTATE_FALSE;
}
catch( const Exception& )
{
@@ -1744,7 +1744,7 @@ void DbCheckBox::updateFromModel( Reference< XPropertySet > _rxModel )
{
OSL_ENSURE( _rxModel.is() && m_pWindow, "DbCheckBox::updateFromModel: invalid call!" );
- sal_Int16 nState = STATE_DONTKNOW;
+ sal_Int16 nState = TRISTATE_INDET;
_rxModel->getPropertyValue( FM_PROP_STATE ) >>= nState;
static_cast< CheckBoxControl* >( m_pWindow )->GetBox().SetState( static_cast< TriState >( nState ) );
}
@@ -3028,11 +3028,11 @@ void DbFilterField::SetText(const OUString& rText)
{
TriState eState;
if (rText == "1")
- eState = STATE_CHECK;
+ eState = TRISTATE_TRUE;
else if (rText == "0")
- eState = STATE_NOCHECK;
+ eState = TRISTATE_FALSE;
else
- eState = STATE_DONTKNOW;
+ eState = TRISTATE_INDET;
((CheckBoxControl*)m_pWindow)->GetBox().SetState(eState);
((CheckBoxControl*)m_pPainter)->GetBox().SetState(eState);
@@ -3191,13 +3191,13 @@ IMPL_LINK_NOARG(DbFilterField, OnClick)
switch (eState)
{
- case STATE_CHECK:
+ case TRISTATE_TRUE:
aText = "1";
break;
- case STATE_NOCHECK:
+ case TRISTATE_FALSE:
aText = "0";
break;
- case STATE_DONTKNOW:
+ case TRISTATE_INDET:
break;
}
@@ -4008,7 +4008,7 @@ short SAL_CALL FmXCheckBoxCell::getState() throw( RuntimeException )
UpdateFromColumn();
return (short)m_pBox->GetState();
}
- return STATE_DONTKNOW;
+ return TRISTATE_INDET;
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index b503013335f0..01b6e490bb27 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3643,17 +3643,17 @@ Reference< XAccessible > DbGridControl::CreateAccessibleCell( sal_Int32 _nRow, s
Reference< ::com::sun::star::awt::XCheckBox> xBox(xInt,UNO_QUERY);
if ( xBox.is() )
{
- TriState eValue = STATE_NOCHECK;
+ TriState eValue = TRISTATE_FALSE;
switch( xBox->getState() )
{
case 0:
- eValue = STATE_NOCHECK;
+ eValue = TRISTATE_FALSE;
break;
case 1:
- eValue = STATE_CHECK;
+ eValue = TRISTATE_TRUE;
break;
case 2:
- eValue = STATE_DONTKNOW;
+ eValue = TRISTATE_INDET;
break;
}
return DbGridControl_Base::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eValue );
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 0e2d40a30fb3..85e80bb37bde 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -511,8 +511,8 @@ sal_Bool IsSearchableControl( const ::com::sun::star::uno::Reference< ::com::sun
{
switch ( (::TriState)xCheckBox->getState() )
{
- case STATE_NOCHECK: *_pCurrentText = "0"; break;
- case STATE_CHECK: *_pCurrentText = "1"; break;
+ case TRISTATE_FALSE: *_pCurrentText = "0"; break;
+ case TRISTATE_TRUE: *_pCurrentText = "1"; break;
default: *_pCurrentText = ""; break;
}
}
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 3816ab40fddb..2a11166b00a1 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -201,8 +201,8 @@ OUString CheckBoxWrapper::getCurrentText() const
{
switch ((TriState)m_xBox->getState())
{
- case STATE_NOCHECK: return OUString("0");
- case STATE_CHECK: return OUString("1");
+ case TRISTATE_FALSE: return OUString("0");
+ case TRISTATE_TRUE: return OUString("1");
default: break;
}
return OUString();
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 37b7a4ad151b..872c645cd982 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -1010,13 +1010,13 @@ void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState
{
mpTBxNumBullet->SetItemState(
nIdNumber,
- aBool ? STATE_CHECK : STATE_NOCHECK );
+ aBool ? TRISTATE_TRUE : TRISTATE_FALSE );
}
else if (nSID==FN_NUM_BULLET_ON)
{
mpTBxNumBullet->SetItemState(
nIdBullet,
- aBool ? STATE_CHECK : STATE_NOCHECK );
+ aBool ? TRISTATE_TRUE : TRISTATE_FALSE );
}
}
}
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index eb49b9e77f62..aafeed7b7bfe 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -1021,7 +1021,7 @@ void ExtrusionColorControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
}
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
}
}
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 1d5aa7688f54..16ea98a21673 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -778,7 +778,7 @@ void SvxTableToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, cons
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
rTbx.SetItemState( nId,
- ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
}
// class SvxColumnsToolBoxControl ------------------------------------------
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 29586d4f997a..78303aa1ff86 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -752,7 +752,7 @@ void SvxLineEndToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, co
ToolBox& rTbx = GetToolBox();
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ rTbx.SetItemState( nId, ( SFX_ITEM_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 b282f8fb016f..c40c639fb248 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2190,7 +2190,7 @@ void SvxStyleToolBoxControl::StateChanged(
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
SvxStyleBox_Impl* pBox = (SvxStyleBox_Impl*)(rTbx.GetItemWindow( nId ));
- TriState eTri = STATE_NOCHECK;
+ TriState eTri = TRISTATE_FALSE;
DBG_ASSERT( pBox, "Control not found!" );
@@ -2205,12 +2205,12 @@ void SvxStyleToolBoxControl::StateChanged(
{
case SFX_ITEM_AVAILABLE:
eTri = ((const SfxBoolItem*)pState)->GetValue()
- ? STATE_CHECK
- : STATE_NOCHECK;
+ ? TRISTATE_TRUE
+ : TRISTATE_FALSE;
break;
case SFX_ITEM_DONTCARE:
- eTri = STATE_DONTKNOW;
+ eTri = TRISTATE_INDET;
break;
}
@@ -2373,7 +2373,7 @@ void SvxFontColorToolBoxControl::StateChanged(
}
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
}
//========================================================================
@@ -2445,7 +2445,7 @@ void SvxColorToolBoxControl::StateChanged(
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
}
//========================================================================
@@ -2563,7 +2563,7 @@ void SvxColorExtToolBoxControl::StateChanged(
ToolBox& rTbx = GetToolBox();
sal_uInt16 nId = GetId();
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
if (bChoiceFromPalette)
{
@@ -2679,8 +2679,8 @@ void SvxFrameToolBoxControl::StateChanged(
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState)
- ? STATE_DONTKNOW
- : STATE_NOCHECK );
+ ? TRISTATE_INDET
+ : TRISTATE_FALSE );
}
//========================================================================
@@ -2729,8 +2729,8 @@ void SvxFrameLineStyleToolBoxControl::StateChanged(
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState)
- ? STATE_DONTKNOW
- : STATE_NOCHECK );
+ ? TRISTATE_INDET
+ : TRISTATE_FALSE );
}
//========================================================================
@@ -2791,7 +2791,7 @@ void SvxFrameLineColorToolBoxControl::StateChanged(
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
const SvxColorItem* pItem = 0;
if ( SFX_ITEM_DONTCARE != eState )
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index de22a460c470..7d767051c63c 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1467,7 +1467,7 @@ void SwHTMLParser::InsertInput()
std::vector<OUString> aUnoMacroParamTbl;
sal_uInt16 nSize = 0;
sal_Int16 nMaxLen = 0;
- sal_Int16 nChecked = STATE_NOCHECK;
+ sal_Int16 nChecked = TRISTATE_FALSE;
sal_Int32 nTabIndex = TABINDEX_MAX + 1;
HTMLInputType eType = HTML_IT_TEXT;
sal_Bool bDisabled = sal_False, bValue = sal_False;
@@ -1511,7 +1511,7 @@ void SwHTMLParser::InsertInput()
bValue = sal_True;
break;
case HTML_O_CHECKED:
- nChecked = STATE_CHECK;
+ nChecked = TRISTATE_TRUE;
break;
case HTML_O_DISABLED:
bDisabled = sal_True;
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 718493485b57..1a718c0e4e11 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -764,7 +764,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aTmp = xPropSet->getPropertyValue(
OUString("DefaultState") );
if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) &&
- STATE_NOCHECK != *(sal_Int16*) aTmp.getValue() )
+ TRISTATE_FALSE != *(sal_Int16*) aTmp.getValue() )
{
sOptions.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_checked);
}
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 50acfdc6a1b8..d3526c205c95 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -56,16 +56,16 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet&
get(m_pNewStartBX, "boxNEW_START");
get(m_pNewStartCB, "checkCB_NEW_START");
- m_pNewStartCB->SetState(STATE_NOCHECK);
+ m_pNewStartCB->SetState(TRISTATE_FALSE);
get(m_pNewStartNumberCB, "checkCB_NUMBER_NEW_START");
- m_pNewStartNumberCB->SetState(STATE_NOCHECK);
+ m_pNewStartNumberCB->SetState(TRISTATE_FALSE);
get(m_pNewStartNF, "spinNF_NEW_START");
get(m_pCountParaFram, "frameFL_COUNT_PARA");
get(m_pCountParaCB, "checkCB_COUNT_PARA");
- m_pCountParaCB->SetState(STATE_NOCHECK);
+ m_pCountParaCB->SetState(TRISTATE_FALSE);
get(m_pRestartParaCountCB, "checkCB_RESTART_PARACOUNT");
- m_pRestartParaCountCB->SetState(STATE_NOCHECK);
+ m_pRestartParaCountCB->SetState(TRISTATE_FALSE);
get(m_pRestartBX, "boxRESTART_NO");
get(m_pRestartNF, "spinNF_RESTART_PARA");
@@ -134,8 +134,8 @@ sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
m_pNewStartNF->GetText() != m_pNewStartNF->GetSavedValue())
{
bModified = sal_True;
- bool bNewStartChecked = STATE_CHECK == m_pNewStartCB->GetState();
- bool bNumberNewStartChecked = STATE_CHECK == m_pNewStartNumberCB->GetState();
+ bool bNewStartChecked = TRISTATE_TRUE == m_pNewStartCB->GetState();
+ bool bNumberNewStartChecked = TRISTATE_TRUE == m_pNewStartNumberCB->GetState();
rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked));
rSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT,
bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)m_pNewStartNF->GetValue() : USHRT_MAX));
@@ -146,7 +146,7 @@ sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
m_pRestartNF->GetSavedValue() != m_pRestartNF->GetText() )
{
SwFmtLineNumber aFmt;
- aFmt.SetStartValue( static_cast< sal_uLong >(m_pRestartParaCountCB->GetState() == STATE_CHECK ?
+ aFmt.SetStartValue( static_cast< sal_uLong >(m_pRestartParaCountCB->GetState() == TRISTATE_TRUE ?
m_pRestartNF->GetValue() : 0 ));
aFmt.SetCountLines( m_pCountParaCB->IsChecked() );
rSet.Put(aFmt);
@@ -207,12 +207,12 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
bCurNumrule = sal_True;
const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART);
- m_pNewStartCB->SetState(rStart.GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ m_pNewStartCB->SetState(rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pNewStartCB->EnableTriState(false);
}
else
- m_pNewStartCB->SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW);
+ m_pNewStartCB->SetState(bHasNumberStyle ? TRISTATE_FALSE : TRISTATE_INDET);
m_pNewStartCB->SaveValue();
@@ -228,7 +228,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
m_pNewStartNumberCB->EnableTriState(false);
}
else
- m_pNewStartCB->SetState(STATE_DONTKNOW);
+ m_pNewStartCB->SetState(TRISTATE_INDET);
NewStartHdl_Impl(m_pNewStartCB);
m_pNewStartNF->SaveValue();
m_pNewStartNumberCB->SaveValue();
@@ -238,8 +238,8 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER);
sal_uLong nStartValue = rNum.GetStartValue();
bool bCount = rNum.IsCount();
- m_pCountParaCB->SetState( bCount ? STATE_CHECK : STATE_NOCHECK );
- m_pRestartParaCountCB->SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK );
+ m_pCountParaCB->SetState( bCount ? TRISTATE_TRUE : TRISTATE_FALSE );
+ m_pRestartParaCountCB->SetState( 0 != nStartValue ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pRestartNF->SetValue(nStartValue == 0 ? 1 : nStartValue);
LineCountHdl_Impl(m_pCountParaCB);
m_pCountParaCB->EnableTriState(false);
@@ -247,8 +247,8 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
}
else
{
- m_pCountParaCB->SetState(STATE_DONTKNOW);
- m_pRestartParaCountCB->SetState(STATE_DONTKNOW);
+ m_pCountParaCB->SetState(TRISTATE_INDET);
+ m_pRestartParaCountCB->SetState(TRISTATE_INDET);
}
m_pCountParaCB->SaveValue();
m_pRestartParaCountCB->SaveValue();
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index bcf4785e9cfe..597fc6020489 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -329,7 +329,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
get(m_pTree, "tree");
m_pTree->set_height_request(m_pTree->GetTextHeight() * 16);
get(m_pFileCB, "link");
- m_pFileCB->SetState(STATE_NOCHECK);
+ m_pFileCB->SetState(TRISTATE_FALSE);
get(m_pDDECB, "dde");
get(m_pDDEFrame, "ddedepend");
get(m_pFileNameFT, "filenameft");
@@ -340,16 +340,16 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
get(m_pSubRegionED, "section");
m_pSubRegionED->SetStyle(m_pSubRegionED->GetStyle() | WB_SORT);
get(m_pProtectCB, "protect");
- m_pProtectCB->SetState(STATE_NOCHECK);
+ m_pProtectCB->SetState(TRISTATE_FALSE);
get(m_pPasswdCB, "withpassword");
get(m_pPasswdPB, "password");
get(m_pHideCB, "hide");
- m_pHideCB->SetState(STATE_NOCHECK);
+ m_pHideCB->SetState(TRISTATE_FALSE);
get(m_pConditionFT, "conditionft");
get(m_pConditionED, "condition");
// edit in readonly sections
get(m_pEditInReadonlyCB, "editinro");
- m_pEditInReadonlyCB->SetState(STATE_NOCHECK);
+ m_pEditInReadonlyCB->SetState(TRISTATE_FALSE);
get(m_pOptionsPB, "options");
get(m_pDismiss, "remove");
get(m_pOK, "ok");
@@ -438,7 +438,7 @@ sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
{
//reset old button state
if(pBox->IsTriStateEnabled())
- pBox->SetState(pBox->IsChecked() ? STATE_NOCHECK : STATE_DONTKNOW);
+ pBox->SetState(pBox->IsChecked() ? TRISTATE_FALSE : TRISTATE_INDET);
else
pBox->Check(!pBox->IsChecked());
}
@@ -632,16 +632,16 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bFirst = false;
}
- m_pHideCB->SetState(!bHiddenValid ? STATE_DONTKNOW :
- bHidden ? STATE_CHECK : STATE_NOCHECK);
- m_pProtectCB->SetState(!bProtectValid ? STATE_DONTKNOW :
- bProtect ? STATE_CHECK : STATE_NOCHECK);
+ m_pHideCB->SetState(!bHiddenValid ? TRISTATE_INDET :
+ bHidden ? TRISTATE_TRUE : TRISTATE_FALSE);
+ m_pProtectCB->SetState(!bProtectValid ? TRISTATE_INDET :
+ bProtect ? TRISTATE_TRUE : TRISTATE_FALSE);
// edit in readonly sections
- m_pEditInReadonlyCB->SetState(!bEditInReadonlyValid ? STATE_DONTKNOW :
- bEditInReadonly ? STATE_CHECK : STATE_NOCHECK);
+ m_pEditInReadonlyCB->SetState(!bEditInReadonlyValid ? TRISTATE_INDET :
+ bEditInReadonly ? TRISTATE_TRUE : TRISTATE_FALSE);
- m_pFileCB->SetState(!bFileValid ? STATE_DONTKNOW :
- bFile ? STATE_CHECK : STATE_NOCHECK);
+ m_pFileCB->SetState(!bFileValid ? TRISTATE_INDET :
+ bFile ? TRISTATE_TRUE : TRISTATE_FALSE);
if (bConditionValid)
m_pConditionED->SetText(sCondition);
@@ -655,7 +655,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
m_pDDECB->Enable(false);
m_pDDEFrame->Enable(false);
m_pOptionsPB->Enable(false);
- bool bPasswdEnabled = m_pProtectCB->GetState() == STATE_CHECK;
+ bool bPasswdEnabled = m_pProtectCB->GetState() == TRISTATE_TRUE;
m_pPasswdCB->Enable(bPasswdEnabled);
m_pPasswdPB->Enable(bPasswdEnabled);
if(!bPasswdValid)
@@ -677,8 +677,8 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
SwSectionData const& rData( pRepr->GetSectionData() );
m_pConditionED->SetText(rData.GetCondition());
m_pHideCB->Enable();
- m_pHideCB->SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK);
- bool bHide = STATE_CHECK == m_pHideCB->GetState();
+ m_pHideCB->SetState((rData.IsHidden()) ? TRISTATE_TRUE : TRISTATE_FALSE);
+ bool bHide = TRISTATE_TRUE == m_pHideCB->GetState();
m_pConditionED->Enable(bHide);
m_pConditionFT->Enable(bHide);
m_pPasswdCB->Check(rData.GetPassword().getLength() > 0);
@@ -709,12 +709,12 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
UseFileHdl(m_pFileCB);
DDEHdl(m_pDDECB);
m_pProtectCB->SetState((rData.IsProtectFlag())
- ? STATE_CHECK : STATE_NOCHECK);
+ ? TRISTATE_TRUE : TRISTATE_FALSE);
m_pProtectCB->Enable();
// edit in readonly sections
m_pEditInReadonlyCB->SetState((rData.IsEditInReadonlyFlag())
- ? STATE_CHECK : STATE_NOCHECK);
+ ? TRISTATE_TRUE : TRISTATE_FALSE);
m_pEditInReadonlyCB->Enable();
bool bPasswdEnabled = m_pProtectCB->IsChecked();
@@ -839,13 +839,13 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox )
pBox->EnableTriState(false);
SvTreeListEntry* pEntry = m_pTree->FirstSelected();
OSL_ENSURE(pEntry,"no entry found");
- sal_Bool bCheck = STATE_CHECK == pBox->GetState();
+ sal_Bool bCheck = TRISTATE_TRUE == pBox->GetState();
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetProtectFlag(bCheck);
Image aImage = BuildBitmap(bCheck,
- STATE_CHECK == m_pHideCB->GetState());
+ TRISTATE_TRUE == m_pHideCB->GetState());
m_pTree->SetExpandedEntryBmp( pEntry, aImage );
m_pTree->SetCollapsedEntryBmp( pEntry, aImage );
pEntry = m_pTree->NextSelected(pEntry);
@@ -868,17 +868,17 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
- pRepr->GetSectionData().SetHidden(STATE_CHECK == pBox->GetState());
+ pRepr->GetSectionData().SetHidden(TRISTATE_TRUE == pBox->GetState());
- Image aImage = BuildBitmap(STATE_CHECK == m_pProtectCB->GetState(),
- STATE_CHECK == pBox->GetState());
+ Image aImage = BuildBitmap(TRISTATE_TRUE == m_pProtectCB->GetState(),
+ TRISTATE_TRUE == pBox->GetState());
m_pTree->SetExpandedEntryBmp( pEntry, aImage );
m_pTree->SetCollapsedEntryBmp( pEntry, aImage );
pEntry = m_pTree->NextSelected(pEntry);
}
- bool bHide = STATE_CHECK == pBox->GetState();
+ bool bHide = TRISTATE_TRUE == pBox->GetState();
m_pConditionED->Enable(bHide);
m_pConditionFT->Enable(bHide);
return 0;
@@ -898,7 +898,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetEditInReadonlyFlag(
- STATE_CHECK == pBox->GetState());
+ TRISTATE_TRUE == pBox->GetState());
pEntry = m_pTree->NextSelected(pEntry);
}
@@ -960,10 +960,10 @@ IMPL_LINK_NOARG(SwEditRegionDlg, ChangeDismissHdl)
m_pHideCB->Enable(false);
// edit in readonly sections
m_pEditInReadonlyCB->Enable(false);
- m_pEditInReadonlyCB->SetState(STATE_NOCHECK);
- m_pProtectCB->SetState(STATE_NOCHECK);
+ m_pEditInReadonlyCB->SetState(TRISTATE_FALSE);
+ m_pProtectCB->SetState(TRISTATE_FALSE);
m_pPasswdCB->Check(false);
- m_pHideCB->SetState(STATE_NOCHECK);
+ m_pHideCB->SetState(TRISTATE_FALSE);
m_pFileCB->Check(false);
// otherwise the focus would be on HelpButton
m_pOK->GrabFocus();
@@ -1009,7 +1009,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
m_pDDEFrame->Enable(bFile && ! bMulti);
if( bFile )
{
- m_pProtectCB->SetState(STATE_CHECK);
+ m_pProtectCB->SetState(TRISTATE_TRUE);
m_pFileNameED->GrabFocus();
}
@@ -1989,15 +1989,15 @@ void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn,
switch( eState )
{
case FTNEND_ATTXTEND_OWNNUMANDFMT:
- pNtNumFmtCB->SetState( STATE_CHECK );
+ pNtNumFmtCB->SetState( TRISTATE_TRUE );
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- pNtNumCB->SetState( STATE_CHECK );
+ pNtNumCB->SetState( TRISTATE_TRUE );
// no break;
case FTNEND_ATTXTEND:
- pNtAtTextEndCB->SetState( STATE_CHECK );
+ pNtAtTextEndCB->SetState( TRISTATE_TRUE );
// no break;
}
@@ -2081,9 +2081,9 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
pSuffixED = pEndSuffixED;
}
- sal_Bool bEnableAtEnd = STATE_CHECK == pEndBox->GetState();
- sal_Bool bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState();
- sal_Bool bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState();
+ sal_Bool bEnableAtEnd = TRISTATE_TRUE == pEndBox->GetState();
+ sal_Bool bEnableNum = bEnableAtEnd && TRISTATE_TRUE == pNumBox->GetState();
+ sal_Bool bEnableNumFmt = bEnableNum && TRISTATE_TRUE == pNumFmtBox->GetState();
pNumBox->Enable( bEnableAtEnd );
pOffsetTxt->Enable( bEnableNum );
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index c6cb1405489c..d0b4ed317a00 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1489,7 +1489,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
m_pSplitRowCB->Check( ((const SwFmtRowSplit*)pItem)->GetValue() );
}
else
- m_pSplitRowCB->SetState(STATE_DONTKNOW);
+ m_pSplitRowCB->SetState(TRISTATE_INDET);
m_pSplitRowCB->SaveValue();
if(bPageBreak)
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 57a4b0b86b0a..546aa7d5e74f 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -601,7 +601,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
::com::sun::star::awt::ItemEvent aEvent;
aEvent.Source = (::cppu::OWeakObject*)this;
- aEvent.Selected = ( rButton.GetState() == STATE_CHECK ) ? 1 : 0;
+ aEvent.Selected = ( rButton.GetState() == TRISTATE_TRUE ) ? 1 : 0;
maItemListeners.itemStateChanged( aEvent );
}
}
@@ -862,10 +862,10 @@ void VCLXCheckBox::setState( short n ) throw(::com::sun::star::uno::RuntimeExcep
TriState eState;
switch ( n )
{
- case 0: eState = STATE_NOCHECK; break;
- case 1: eState = STATE_CHECK; break;
- case 2: eState = STATE_DONTKNOW; break;
- default: eState = STATE_NOCHECK;
+ case 0: eState = TRISTATE_FALSE; break;
+ case 1: eState = TRISTATE_TRUE; break;
+ case 2: eState = TRISTATE_INDET; break;
+ default: eState = TRISTATE_FALSE;
}
pCheckBox->SetState( eState );
@@ -890,9 +890,9 @@ short VCLXCheckBox::getState() throw(::com::sun::star::uno::RuntimeException)
{
switch ( pCheckBox->GetState() )
{
- case STATE_NOCHECK: nState = 0; break;
- case STATE_CHECK: nState = 1; break;
- case STATE_DONTKNOW: nState = 2; break;
+ case TRISTATE_FALSE: nState = 0; break;
+ case TRISTATE_TRUE: nState = 1; break;
+ case TRISTATE_INDET: nState = 2; break;
default: OSL_FAIL( "VCLXCheckBox::getState(): unknown TriState!" );
}
}
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 04572b055011..c342d83cc542 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -3422,7 +3422,7 @@ UnoDateFieldControl::UnoDateFieldControl()
{
mnFirst = util::Date( 1, 1, 1900 );
mnLast = util::Date( 31, 12, 2200 );
- mbLongFormat = AUTO_STATE_AUTO;
+ mbLongFormat = TRISTATE_INDET;
}
OUString UnoDateFieldControl::GetComponentServiceName()
@@ -3451,7 +3451,7 @@ void UnoDateFieldControl::createPeer( const uno::Reference< awt::XToolkit > & rx
uno::Reference < awt::XDateField > xField( getPeer(), uno::UNO_QUERY );
xField->setFirst( mnFirst );
xField->setLast( mnLast );
- if ( mbLongFormat != AUTO_STATE_AUTO ) // not set
+ if ( mbLongFormat != TRISTATE_INDET )
xField->setLongFormat( mbLongFormat );
}
@@ -3565,7 +3565,7 @@ util::Date UnoDateFieldControl::getLast() throw(uno::RuntimeException)
void UnoDateFieldControl::setLongFormat( sal_Bool bLong ) throw(uno::RuntimeException)
{
- mbLongFormat = bLong ? AUTO_STATE_ON : AUTO_STATE_OFF;
+ mbLongFormat = bLong ? TRISTATE_TRUE : TRISTATE_FALSE;
if ( getPeer().is() )
{
uno::Reference < awt::XDateField > xField( getPeer(), uno::UNO_QUERY );
@@ -3575,7 +3575,7 @@ void UnoDateFieldControl::setLongFormat( sal_Bool bLong ) throw(uno::RuntimeExce
sal_Bool UnoDateFieldControl::isLongFormat() throw(uno::RuntimeException)
{
- return ( mbLongFormat != AUTO_STATE_AUTO ) ? mbLongFormat : sal_False;
+ return ( mbLongFormat != TRISTATE_INDET ) ? mbLongFormat : sal_False;
}
void UnoDateFieldControl::setEmpty() throw(uno::RuntimeException)
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 37adb5f80608..dd2fe1aeffd6 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -207,7 +207,7 @@ ImplStyleData::ImplStyleData() :
mnOptions = 0;
mnAutoMnemonic = 1;
mnToolbarIconSize = STYLE_TOOLBAR_ICONSIZE_UNKNOWN;
- mnUseImagesInMenus = AUTO_STATE_AUTO;
+ mnUseImagesInMenus = TRISTATE_INDET;
mpFontOptions = NULL;
mnEdgeBlending = 35;
maEdgeBlendingTopLeftColor = RGB_COLORDATA(0xC0, 0xC0, 0xC0);
@@ -520,11 +520,11 @@ bool StyleSettings::GetUseImagesInMenus() const
{
// icon mode selected in Tools -> Options... -> OpenOffice.org -> View
switch (mpData->mnUseImagesInMenus) {
- case AUTO_STATE_OFF:
+ case TRISTATE_FALSE:
return false;
- case AUTO_STATE_ON:
+ case TRISTATE_TRUE:
return true;
- default: // AUTO_STATE_AUTO:
+ default: // TRISTATE_INDET:
return GetPreferredUseImagesInMenus();
}
}
@@ -800,8 +800,8 @@ bool StyleSettings::operator ==( const StyleSettings& rSet ) const
ImplMiscData::ImplMiscData()
{
- mnEnableATT = AUTO_STATE_AUTO;
- mnDisablePrinting = AUTO_STATE_AUTO;
+ mnEnableATT = TRISTATE_INDET;
+ mnDisablePrinting = TRISTATE_INDET;
static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
mbEnableLocalizedDecimalSep = (pEnv != NULL) ? sal_True : sal_False;
}
@@ -872,16 +872,16 @@ bool MiscSettings::operator ==( const MiscSettings& rSet ) const
bool MiscSettings::GetDisablePrinting() const
{
- if( mpData->mnDisablePrinting == AUTO_STATE_AUTO )
+ if( mpData->mnDisablePrinting == TRISTATE_INDET )
{
OUString aEnable =
vcl::SettingsConfigItem::get()->
getValue( OUString( "DesktopManagement" ),
OUString( "DisablePrinting" ) );
- mpData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? AUTO_STATE_ON : AUTO_STATE_OFF;
+ mpData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
}
- return mpData->mnDisablePrinting != AUTO_STATE_OFF;
+ return mpData->mnDisablePrinting != TRISTATE_FALSE;
}
// -----------------------------------------------------------------------
@@ -889,7 +889,7 @@ bool MiscSettings::GetEnableATToolSupport() const
{
#ifdef WNT
- if( mpData->mnEnableATT == AUTO_STATE_AUTO )
+ if( mpData->mnEnableATT == TRISTATE_INDET )
{
// Check in the Windows registry if an AT tool wants Accessibility support to
// be activated ..
@@ -909,19 +909,19 @@ bool MiscSettings::GetEnableATToolSupport() const
switch (dwType)
{
case REG_SZ:
- mpData->mnEnableATT = ((0 == stricmp((const char *) Data, "1")) || (0 == stricmp((const char *) Data, "true"))) ? AUTO_STATE_ON : AUTO_STATE_OFF;
+ mpData->mnEnableATT = ((0 == stricmp((const char *) Data, "1")) || (0 == stricmp((const char *) Data, "true"))) ? TRISTATE_TRUE : TRISTATE_FALSE;
break;
case REG_DWORD:
switch (((DWORD *) Data)[0]) {
case 0:
- mpData->mnEnableATT = AUTO_STATE_OFF;
+ mpData->mnEnableATT = TRISTATE_FALSE;
break;
case 1:
- mpData->mnEnableATT = AUTO_STATE_ON;
+ mpData->mnEnableATT = TRISTATE_TRUE;
break;
default:
- mpData->mnEnableATT = AUTO_STATE_AUTO;
- //TODO: or AUTO_STATE_ON?
+ mpData->mnEnableATT = TRISTATE_INDET;
+ //TODO: or TRISTATE_TRUE?
break;
}
break;
@@ -936,7 +936,7 @@ bool MiscSettings::GetEnableATToolSupport() const
}
#endif
- if( mpData->mnEnableATT == AUTO_STATE_AUTO )
+ if( mpData->mnEnableATT == TRISTATE_INDET )
{
static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
if( !pEnv || !*pEnv )
@@ -945,21 +945,21 @@ bool MiscSettings::GetEnableATToolSupport() const
vcl::SettingsConfigItem::get()->
getValue( OUString( "Accessibility" ),
OUString( "EnableATToolSupport" ) );
- mpData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? AUTO_STATE_ON : AUTO_STATE_OFF;
+ mpData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
}
else
{
- mpData->mnEnableATT = AUTO_STATE_ON;
+ mpData->mnEnableATT = TRISTATE_TRUE;
}
}
- return mpData->mnEnableATT != AUTO_STATE_OFF;
+ return mpData->mnEnableATT != TRISTATE_FALSE;
}
#ifdef WNT
void MiscSettings::SetEnableATToolSupport( sal_Bool bEnable )
{
- if ( (bEnable ? AUTO_STATE_ON : AUTO_STATE_OFF) != mpData->mnEnableATT )
+ if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mpData->mnEnableATT )
{
if( bEnable && !ImplInitAccessBridge() )
return;
@@ -1004,7 +1004,7 @@ void MiscSettings::SetEnableATToolSupport( sal_Bool bEnable )
setValue( OUString( "Accessibility" ),
OUString( "EnableATToolSupport" ),
bEnable ? OUString("true") : OUString("false" ) );
- mpData->mnEnableATT = bEnable ? AUTO_STATE_ON : AUTO_STATE_OFF;
+ mpData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE;
}
}
#endif
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 94d2ab883c67..7e5f28cef894 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -626,8 +626,8 @@ void PushButton::ImplInitPushButtonData()
mpWindowImpl->mbPushButton = true;
meSymbol = SYMBOL_NOSYMBOL;
- meState = STATE_NOCHECK;
- meSaveValue = STATE_NOCHECK;
+ meState = TRISTATE_FALSE;
+ meSaveValue = TRISTATE_FALSE;
mnDDStyle = 0;
mbPressed = false;
mbInUserDraw = false;
@@ -1639,14 +1639,14 @@ void PushButton::SetState( TriState eState )
if ( meState != eState )
{
meState = eState;
- if ( meState == STATE_NOCHECK )
+ if ( meState == TRISTATE_FALSE )
ImplGetButtonState() &= ~(BUTTON_DRAW_CHECKED | BUTTON_DRAW_DONTKNOW);
- else if ( meState == STATE_CHECK )
+ else if ( meState == TRISTATE_TRUE )
{
ImplGetButtonState() &= ~BUTTON_DRAW_DONTKNOW;
ImplGetButtonState() |= BUTTON_DRAW_CHECKED;
}
- else // STATE_DONTKNOW
+ else // TRISTATE_INDET
{
ImplGetButtonState() &= ~BUTTON_DRAW_CHECKED;
ImplGetButtonState() |= BUTTON_DRAW_DONTKNOW;
@@ -3129,8 +3129,8 @@ Size RadioButton::GetOptimalSize() const
void CheckBox::ImplInitCheckBoxData()
{
- meState = STATE_NOCHECK;
- meSaveValue = STATE_NOCHECK;
+ meState = TRISTATE_FALSE;
+ meSaveValue = TRISTATE_FALSE;
mbTriState = false;
}
@@ -3240,7 +3240,7 @@ void CheckBox::ImplDrawCheckBoxState()
if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) )
{
- ImplControlValue aControlValue( meState == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
+ ImplControlValue aControlValue( meState == TRISTATE_TRUE ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
Rectangle aCtrlRegion( maStateRect );
ControlState nState = 0;
@@ -3249,9 +3249,9 @@ void CheckBox::ImplDrawCheckBoxState()
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
- if ( meState == STATE_CHECK )
+ if ( meState == TRISTATE_TRUE )
aControlValue.setTristateVal( BUTTONVALUE_ON );
- else if ( meState == STATE_DONTKNOW )
+ else if ( meState == TRISTATE_INDET )
aControlValue.setTristateVal( BUTTONVALUE_MIXED );
if ( IsMouseOver() && maMouseRect.IsInside( GetPointerPosPixel() ) )
@@ -3266,9 +3266,9 @@ void CheckBox::ImplDrawCheckBoxState()
sal_uInt16 nStyle = ImplGetButtonState();
if ( !IsEnabled() )
nStyle |= BUTTON_DRAW_DISABLED;
- if ( meState == STATE_DONTKNOW )
+ if ( meState == TRISTATE_INDET )
nStyle |= BUTTON_DRAW_DONTKNOW;
- else if ( meState == STATE_CHECK )
+ else if ( meState == TRISTATE_TRUE )
nStyle |= BUTTON_DRAW_CHECKED;
Image aImage = GetCheckImage( GetSettings(), nStyle );
if ( IsZoom() )
@@ -3410,14 +3410,14 @@ void CheckBox::ImplDrawCheckBox( bool bLayout )
void CheckBox::ImplCheck()
{
TriState eNewState;
- if ( meState == STATE_NOCHECK )
- eNewState = STATE_CHECK;
+ if ( meState == TRISTATE_FALSE )
+ eNewState = TRISTATE_TRUE;
else if ( !mbTriState )
- eNewState = STATE_NOCHECK;
- else if ( meState == STATE_CHECK )
- eNewState = STATE_DONTKNOW;
+ eNewState = TRISTATE_FALSE;
+ else if ( meState == TRISTATE_TRUE )
+ eNewState = TRISTATE_INDET;
else
- eNewState = STATE_NOCHECK;
+ eNewState = TRISTATE_FALSE;
meState = eNewState;
ImplDelData aDelData;
@@ -3619,13 +3619,13 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aStateRect.Top() += aBrd1Size.Height();
aStateRect.Right() -= aBrd1Size.Width();
aStateRect.Bottom() -= aBrd1Size.Height();
- if ( meState == STATE_DONTKNOW )
+ if ( meState == TRISTATE_INDET )
pDev->SetFillColor( Color( COL_LIGHTGRAY ) );
else
pDev->SetFillColor( Color( COL_WHITE ) );
pDev->DrawRect( aStateRect );
- if ( meState == STATE_CHECK )
+ if ( meState == TRISTATE_TRUE )
{
aStateRect.Left() += aBrd2Size.Width();
aStateRect.Top() += aBrd2Size.Height();
@@ -3829,8 +3829,8 @@ void CheckBox::Toggle()
void CheckBox::SetState( TriState eState )
{
- if ( !mbTriState && (eState == STATE_DONTKNOW) )
- eState = STATE_NOCHECK;
+ if ( !mbTriState && (eState == TRISTATE_INDET) )
+ eState = TRISTATE_FALSE;
if ( meState != eState )
{
@@ -3843,7 +3843,7 @@ void CheckBox::SetState( TriState eState )
bool CheckBox::set_property(const OString &rKey, const OString &rValue)
{
if (rKey == "active")
- SetState(toBool(rValue) ? STATE_CHECK : STATE_NOCHECK);
+ SetState(toBool(rValue) ? TRISTATE_TRUE : TRISTATE_FALSE);
else
return Button::set_property(rKey, rValue);
return true;
@@ -3857,8 +3857,8 @@ void CheckBox::EnableTriState( bool bTriState )
{
mbTriState = bTriState;
- if ( !bTriState && (meState == STATE_DONTKNOW) )
- SetState( STATE_NOCHECK );
+ if ( !bTriState && (meState == TRISTATE_INDET) )
+ SetState( TRISTATE_FALSE );
}
}
@@ -4129,7 +4129,7 @@ void DisclosureButton::ImplDrawCheckBoxState()
Rectangle aStateRect( GetStateRect() );
- ImplControlValue aControlValue( GetState() == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
+ ImplControlValue aControlValue( GetState() == TRISTATE_TRUE ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
Rectangle aCtrlRegion( aStateRect );
ControlState nState = 0;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7f4ac6312fda..c845d8cf4d7e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1237,7 +1237,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
new TriStateBox(pParent, nBits) :
new CheckBox(pParent, nBits);
if (bIsTriState)
- pCheckBox->SetState(STATE_DONTKNOW);
+ pCheckBox->SetState(TRISTATE_INDET);
pCheckBox->SetImageAlign(IMAGEALIGN_LEFT); //default to left
pWindow = pCheckBox;
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 175af19aa236..b0401ae3545c 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3159,11 +3159,11 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
return;
}
- if ( pItem->meState == STATE_CHECK )
+ if ( pItem->meState == TRISTATE_TRUE )
{
nStyle |= BUTTON_DRAW_CHECKED;
}
- else if ( pItem->meState == STATE_DONTKNOW )
+ else if ( pItem->meState == TRISTATE_INDET )
{
nStyle |= BUTTON_DRAW_DONTKNOW;
}
@@ -3176,7 +3176,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
{
if ( mnOutStyle & TOOLBOX_STYLE_FLAT )
{
- if ( (pItem->meState != STATE_NOCHECK) || !bPaint )
+ if ( (pItem->meState != TRISTATE_FALSE) || !bPaint )
{
ImplErase( this, pItem->maRect, nHighlight != 0, bHasOpenPopup );
}
@@ -3244,12 +3244,12 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
nImageOffX += (nBtnWidth-aImageSize.Width())/2;
nImageOffY += (nBtnHeight-aImageSize.Height())/2;
}
- if ( nHighlight != 0 || (pItem->meState == STATE_CHECK) )
+ if ( nHighlight != 0 || (pItem->meState == TRISTATE_TRUE) )
{
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, aButtonRect, nHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False );
+ ImplDrawButton( this, aButtonRect, nHighlight, pItem->meState == TRISTATE_TRUE, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False );
if( nHighlight != 0 )
{
@@ -3298,12 +3298,12 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
}
// draw selection only if not already drawn during image output (see above)
- if ( !bLayout && !bImage && (nHighlight != 0 || (pItem->meState == STATE_CHECK) ) )
+ if ( !bLayout && !bImage && (nHighlight != 0 || (pItem->meState == TRISTATE_TRUE) ) )
{
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, pItem->maRect, nHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False );
+ ImplDrawButton( this, pItem->maRect, nHighlight, pItem->meState == TRISTATE_TRUE, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False );
}
sal_uInt16 nTextStyle = 0;
@@ -3340,12 +3340,12 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
{
ImplErase( this, aDropDownRect, nHighlight != 0, bHasOpenPopup );
- if( nHighlight != 0 || (pItem->meState == STATE_CHECK) )
+ if( nHighlight != 0 || (pItem->meState == TRISTATE_TRUE) )
{
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, aDropDownRect, nHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), false );
+ ImplDrawButton( this, aDropDownRect, nHighlight, pItem->meState == TRISTATE_TRUE, pItem->mbEnabled && IsEnabled(), false );
}
}
ImplDrawDropdownArrow( this, aDropDownRect, bSetColor, bRotate );
@@ -3576,15 +3576,15 @@ bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel )
{
if ( pItem->mnBits & TIB_RADIOCHECK )
{
- if ( pItem->meState != STATE_CHECK )
- SetItemState( pItem->mnId, STATE_CHECK );
+ if ( pItem->meState != TRISTATE_TRUE )
+ SetItemState( pItem->mnId, TRISTATE_TRUE );
}
else
{
- if ( pItem->meState != STATE_CHECK )
- pItem->meState = STATE_CHECK;
+ if ( pItem->meState != TRISTATE_TRUE )
+ pItem->meState = TRISTATE_TRUE;
else
- pItem->meState = STATE_NOCHECK;
+ pItem->meState = TRISTATE_FALSE;
}
}
@@ -5080,15 +5080,15 @@ bool ToolBox::ImplActivateItem( KeyCode aKeyCode )
{
if ( pItem->mnBits & TIB_RADIOCHECK )
{
- if ( pItem->meState != STATE_CHECK )
- SetItemState( pItem->mnId, STATE_CHECK );
+ if ( pItem->meState != TRISTATE_TRUE )
+ SetItemState( pItem->mnId, TRISTATE_TRUE );
}
else
{
- if ( pItem->meState != STATE_CHECK )
- pItem->meState = STATE_CHECK;
+ if ( pItem->meState != TRISTATE_TRUE )
+ pItem->meState = TRISTATE_TRUE;
else
- pItem->meState = STATE_NOCHECK;
+ pItem->meState = TRISTATE_FALSE;
}
}
mnMouseModifier = aKeyCode.GetModifier();
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index f1aad48bcf7b..ea5e3ef2200f 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -73,7 +73,7 @@ ImplToolBoxPrivateData::ImplToolBoxPrivateData() :
maMenuType = TOOLBOX_MENUTYPE_NONE;
maMenubuttonItem.maItemSize = Size( TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET, TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET );
- maMenubuttonItem.meState = STATE_NOCHECK;
+ maMenubuttonItem.meState = TRISTATE_FALSE;
mnMenuButtonWidth = TB_MENUBUTTON_SIZE;
@@ -106,7 +106,7 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits,
mpUserData = NULL;
meType = TOOLBOXITEM_BUTTON;
mnBits = nItemBits;
- meState = STATE_NOCHECK;
+ meState = TRISTATE_FALSE;
mbEnabled = true;
mbVisible = true;
mbEmptyBtn = bEmptyBtn;
@@ -1672,7 +1672,7 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
if ( pItem->meState != eState )
{
// Wenn RadioCheck, dann vorherigen unchecken
- if ( (eState == STATE_CHECK) && (pItem->mnBits & TIB_AUTOCHECK) &&
+ if ( (eState == TRISTATE_TRUE) && (pItem->mnBits & TIB_AUTOCHECK) &&
(pItem->mnBits & TIB_RADIOCHECK) )
{
ImplToolItem* pGroupItem;
@@ -1685,8 +1685,8 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
pGroupItem = &mpData->m_aItems[nGroupPos-1];
if ( pGroupItem->mnBits & TIB_RADIOCHECK )
{
- if ( pGroupItem->meState != STATE_NOCHECK )
- SetItemState( pGroupItem->mnId, STATE_NOCHECK );
+ if ( pGroupItem->meState != TRISTATE_FALSE )
+ SetItemState( pGroupItem->mnId, TRISTATE_FALSE );
}
else
break;
@@ -1699,8 +1699,8 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
pGroupItem = &mpData->m_aItems[nGroupPos];
if ( pGroupItem->mnBits & TIB_RADIOCHECK )
{
- if ( pGroupItem->meState != STATE_NOCHECK )
- SetItemState( pGroupItem->mnId, STATE_NOCHECK );
+ if ( pGroupItem->meState != TRISTATE_FALSE )
+ SetItemState( pGroupItem->mnId, TRISTATE_FALSE );
}
else
break;
@@ -1730,7 +1730,7 @@ TriState ToolBox::GetItemState( sal_uInt16 nItemId ) const
if ( pItem )
return pItem->meState;
else
- return STATE_NOCHECK;
+ return TRISTATE_FALSE;
}
@@ -2139,7 +2139,7 @@ void ToolBox::UpdateCustomMenu()
sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START;
pMenu->InsertItem( id, it->maText, it->maImage, 0, OString(), 0 );
pMenu->EnableItem( id, it->mbEnabled );
- pMenu->CheckItem ( id, it->meState == STATE_CHECK );
+ pMenu->CheckItem ( id, it->meState == TRISTATE_TRUE );
nSepPos++;
}
}
@@ -2156,7 +2156,7 @@ void ToolBox::UpdateCustomMenu()
sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START;
pMenu->InsertItem( id, it->maText, it->maImage, 0, OString(), nSepPos+1 );
pMenu->EnableItem( id, it->mbEnabled );
- pMenu->CheckItem( id, it->meState == STATE_CHECK );
+ pMenu->CheckItem( id, it->meState == TRISTATE_TRUE );
}
}
}
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index d92f037fdbad..75c9c9bf2697 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -44,7 +44,7 @@
#include <com/sun/star/awt/ImagePosition.hpp>
#include <sax/tools/converter.hxx>
-#include <tools/wintypes.hxx>
+#include <tools/gen.hxx>
#include <xmloff/txtprmap.hxx>
#include <com/sun/star/form/binding/XBindableValue.hpp>
#include <com/sun/star/form/binding/XListEntrySink.hpp>
@@ -1077,7 +1077,7 @@ namespace xmloff
OAttributeMetaData::getSpecialAttributeName(SCA_STATE),
PROPERTY_DEFAULT_STATE,
OEnumMapper::getEnumMap(OEnumMapper::epCheckState),
- STATE_NOCHECK);
+ TRISTATE_FALSE);
#if OSL_DEBUG_LEVEL > 0
// reset the bit for later checking
m_nIncludeSpecial = m_nIncludeSpecial & ~SCA_STATE;
@@ -1091,7 +1091,7 @@ namespace xmloff
OAttributeMetaData::getSpecialAttributeName(SCA_CURRENT_STATE),
PROPERTY_STATE,
OEnumMapper::getEnumMap(OEnumMapper::epCheckState),
- STATE_NOCHECK);
+ TRISTATE_FALSE);
#if OSL_DEBUG_LEVEL > 0
// reset the bit for later checking
m_nIncludeSpecial = m_nIncludeSpecial & ~SCA_CURRENT_STATE;
diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx
index 4969efe07ce7..ecaba1cfd3dd 100644
--- a/xmloff/source/forms/formenums.cxx
+++ b/xmloff/source/forms/formenums.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/awt/ScrollBarOrientation.hpp>
#include <com/sun/star/awt/VisualEffect.hpp>
#include <com/sun/star/awt/ImageScaleMode.hpp>
-#include <tools/wintypes.hxx>
+#include <tools/gen.hxx>
#include <xmloff/xmltoken.hxx>
namespace xmloff
@@ -173,9 +173,9 @@ namespace xmloff
{
static const SvXMLEnumMapEntry aCheckStateMap[] =
{
- { XML_UNCHECKED, STATE_NOCHECK },
- { XML_CHECKED, STATE_CHECK },
- { XML_UNKNOWN, STATE_DONTKNOW },
+ { XML_UNCHECKED, TRISTATE_FALSE },
+ { XML_CHECKED, TRISTATE_TRUE },
+ { XML_UNKNOWN, TRISTATE_INDET },
{ XML_TOKEN_INVALID, 0 }
};
rReturn = aCheckStateMap;
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 4779b4e18ce6..b640b2a0f8b1 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -41,7 +41,7 @@
#include <com/sun/star/awt/ScrollBarOrientation.hpp>
#include <com/sun/star/awt/VisualEffect.hpp>
#include <com/sun/star/form/ListSourceType.hpp>
-#include <tools/wintypes.hxx>
+#include <tools/gen.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <xmloff/controlpropertyhdl.hxx>
#include "controlpropertymap.hxx"
@@ -196,11 +196,11 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter)
ListSourceType_VALUELIST, OEnumMapper::getEnumMap(OEnumMapper::epListSourceType),
&::getCppuType( static_cast<ListSourceType*>(NULL) ));
m_aAttributeMetaData.addEnumProperty(
- OAttributeMetaData::getSpecialAttributeName(SCA_STATE), PROPERTY_DEFAULT_STATE, STATE_NOCHECK,
+ OAttributeMetaData::getSpecialAttributeName(SCA_STATE), PROPERTY_DEFAULT_STATE, TRISTATE_FALSE,
OEnumMapper::getEnumMap(OEnumMapper::epCheckState),
&::getCppuType( static_cast< sal_Int16* >(NULL)));
m_aAttributeMetaData.addEnumProperty(
- OAttributeMetaData::getSpecialAttributeName(SCA_CURRENT_STATE), PROPERTY_STATE, STATE_NOCHECK,
+ OAttributeMetaData::getSpecialAttributeName(SCA_CURRENT_STATE), PROPERTY_STATE, TRISTATE_FALSE,
OEnumMapper::getEnumMap(OEnumMapper::epCheckState),
&::getCppuType( static_cast< sal_Int16* >(NULL)));
m_aAttributeMetaData.addEnumProperty(