[Libreoffice-commits] core.git: 2 commits - accessibility/source chart2/source cui/source dbaccess/source forms/source framework/source include/sfx2 include/svx include/toolkit include/tools include/vcl rsc/source sc/source sd/source sfx2/source svtools/source svx/source sw/source toolkit/source vcl/source xmloff/source

Stephan Bergmann sbergman at redhat.com
Mon Feb 24 03:28:56 PST 2014


 accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx |   10 
 accessibility/source/extended/accessibletablistboxtable.cxx       |    8 
 accessibility/source/standard/vclxaccessiblebutton.cxx            |    4 
 accessibility/source/standard/vclxaccessibletoolbox.cxx           |    4 
 accessibility/source/standard/vclxaccessibletoolboxitem.cxx       |    2 
 chart2/source/controller/dialogs/res_DataLabel.cxx                |   16 -
 chart2/source/controller/dialogs/res_Trendline.cxx                |   16 -
 chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx        |   24 -
 chart2/source/controller/dialogs/tp_AxisLabel.cxx                 |   24 -
 chart2/source/controller/dialogs/tp_TitleRotation.cxx             |    6 
 cui/source/options/optgdlg.cxx                                    |    2 
 cui/source/tabpages/align.cxx                                     |   10 
 cui/source/tabpages/chardlg.cxx                                   |   20 -
 cui/source/tabpages/measure.cxx                                   |   50 ++--
 cui/source/tabpages/paragrph.cxx                                  |  106 ++++----
 cui/source/tabpages/swpossizetabpage.cxx                          |   16 -
 cui/source/tabpages/textanim.cxx                                  |   50 ++--
 cui/source/tabpages/textattr.cxx                                  |   62 ++---
 cui/source/tabpages/tparea.cxx                                    |   76 +++---
 cui/source/tabpages/tpline.cxx                                    |   20 -
 cui/source/tabpages/tpshadow.cxx                                  |   10 
 cui/source/tabpages/transfrm.cxx                                  |   44 +--
 dbaccess/source/ui/browser/unodatbr.cxx                           |    6 
 dbaccess/source/ui/control/TableGrantCtrl.cxx                     |   10 
 dbaccess/source/ui/dlg/adminpages.cxx                             |    2 
 dbaccess/source/ui/dlg/advancedsettings.cxx                       |    2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx             |    6 
 forms/source/component/Button.cxx                                 |    6 
 forms/source/component/CheckBox.cxx                               |   12 
 forms/source/component/Filter.cxx                                 |   20 -
 forms/source/component/RadioButton.cxx                            |    8 
 forms/source/component/refvaluecomponent.cxx                      |   28 +-
 forms/source/inc/togglestate.hxx                                  |    2 
 framework/source/uielement/complextoolbarcontroller.cxx           |    6 
 framework/source/uielement/generictoolbarcontroller.cxx           |    8 
 framework/source/uielement/toolbarmanager.cxx                     |    2 
 framework/source/uielement/toolbarmerger.cxx                      |    2 
 include/sfx2/controlwrapper.hxx                                   |   12 
 include/svx/orienthelper.hxx                                      |    8 
 include/toolkit/controls/unocontrols.hxx                          |    3 
 include/tools/gen.hxx                                             |    2 
 include/tools/wintypes.hxx                                        |    5 
 include/vcl/button.hxx                                            |    8 
 include/vcl/settings.hxx                                          |   10 
 include/vcl/toolbox.hxx                                           |    4 
 rsc/source/parser/rscibas.cxx                                     |    7 
 sc/source/ui/attrdlg/tabpages.cxx                                 |   22 -
 sc/source/ui/cctrl/checklistmenu.cxx                              |   32 +-
 sc/source/ui/dbgui/validate.cxx                                   |   12 
 sc/source/ui/navipi/navipi.cxx                                    |    2 
 sc/source/ui/pagedlg/tptable.cxx                                  |   10 
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx                   |   32 +-
 sd/source/ui/animations/CustomAnimationDialog.cxx                 |   10 
 sd/source/ui/animations/SlideTransitionPane.cxx                   |    2 
 sd/source/ui/dlg/paragr.cxx                                       |   10 
 sd/source/ui/view/drviews7.cxx                                    |   22 -
 sfx2/source/dialog/dinfdlg.cxx                                    |    8 
 sfx2/source/dialog/itemconnect.cxx                                |    6 
 sfx2/source/dialog/templdlg.cxx                                   |    4 
 sfx2/source/doc/templatedlg.cxx                                   |    2 
 sfx2/source/toolbox/tbxitem.cxx                                   |    8 
 svtools/source/contnr/svtabbx.cxx                                 |    4 
 svtools/source/uno/generictoolboxcontroller.cxx                   |    6 
 svx/source/dialog/orienthelper.cxx                                |   20 -
 svx/source/engine3d/float3d.cxx                                   |  122 +++++-----
 svx/source/fmcomp/gridcell.cxx                                    |   20 -
 svx/source/fmcomp/gridctrl.cxx                                    |    8 
 svx/source/form/fmshimp.cxx                                       |    4 
 svx/source/form/fmsrcimp.cxx                                      |    4 
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx                |    4 
 svx/source/tbxctrls/extrusioncontrols.cxx                         |    2 
 svx/source/tbxctrls/layctrl.cxx                                   |    2 
 svx/source/tbxctrls/linectrl.cxx                                  |    2 
 svx/source/tbxctrls/tbcontrl.cxx                                  |   24 -
 sw/source/filter/html/htmlform.cxx                                |    4 
 sw/source/filter/html/htmlforw.cxx                                |    2 
 sw/source/ui/chrdlg/numpara.cxx                                   |   28 +-
 sw/source/ui/dialog/uiregionsw.cxx                                |   70 ++---
 sw/source/ui/table/tabledlg.cxx                                   |    2 
 toolkit/source/awt/vclxwindows.cxx                                |   16 -
 toolkit/source/controls/unocontrols.cxx                           |    8 
 vcl/source/app/settings.cxx                                       |   42 +--
 vcl/source/control/button.cxx                                     |   52 ++--
 vcl/source/window/builder.cxx                                     |    2 
 vcl/source/window/toolbox.cxx                                     |   38 +--
 vcl/source/window/toolbox2.cxx                                    |   20 -
 xmloff/source/forms/elementexport.cxx                             |    6 
 xmloff/source/forms/formenums.cxx                                 |    8 
 xmloff/source/forms/layerimport.cxx                               |    6 
 89 files changed, 731 insertions(+), 736 deletions(-)

New commits:
commit 130a2baa8307175c27da42ba3ec5a3caf8d799fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 24 12:27:11 2014 +0100

    error: enumeral and non-enumeral type in conditional expression
    
    Change-Id: I30293ac22fb26e0f7c9bfd335ccaa9a2d263d02f

diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index c342d83..e79c2f3 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -3575,7 +3575,7 @@ void UnoDateFieldControl::setLongFormat( sal_Bool bLong ) throw(uno::RuntimeExce
 
 sal_Bool UnoDateFieldControl::isLongFormat() throw(uno::RuntimeException)
 {
-    return ( mbLongFormat != TRISTATE_INDET ) ? mbLongFormat : sal_False;
+    return mbLongFormat == TRISTATE_TRUE;
 }
 
 void UnoDateFieldControl::setEmpty() throw(uno::RuntimeException)
commit 33740b7d5abb8aca34692fbdaa787b26a60652a9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 24 12:25:02 2014 +0100

    Replace exisiting TriState, AutoState with more generic TriState
    
    Change-Id: Ida05478aae5a379775c671e0c2f2851d820d78be

diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
index f23f472..966def8 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 b316a4a..c651135 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 9bf3b81..a4d0e2f 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 a748f73..3fa0318 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 2ec9392..6ff821c 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 ca29b4d..a6e995a 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 ae02ba0..1d2307a 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 abb672f..ea1c355 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 3389bf8..f1126e5 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 8e94ae1..0bf2029 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 83bb0ee..47f8373 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 4c05ba4..e9fe995 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 b5b05ae..ce3dedb 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 96b0d0e..bd92d55 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 e813985..0df6735 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 263700c..d680463 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 fe5c827..3bdb1cd 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 5384fb4..33d576c 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 49beef7..1351bf3 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 238919c..e6f886f 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 1da2af8..1899cef 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 7fd60dc..d74790a 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 c3b9444..01ffd81 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 ef3d357..9570d8f 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 3f2f402..36b4b65 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 );
             }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list