summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-24 12:25:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-24 12:27:32 +0100
commit33740b7d5abb8aca34692fbdaa787b26a60652a9 (patch)
treead2574a7850e2aa8ac18eaff89f4a85567896692 /toolkit
parent43d7f4e3640c5e370fd1204739c2b0c7eb5f40e4 (diff)
Replace exisiting TriState, AutoState with more generic TriState
Change-Id: Ida05478aae5a379775c671e0c2f2851d820d78be
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindows.cxx16
-rw-r--r--toolkit/source/controls/unocontrols.cxx8
2 files changed, 12 insertions, 12 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 57a4b0b86b0a..546aa7d5e74f 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -601,7 +601,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
::com::sun::star::awt::ItemEvent aEvent;
aEvent.Source = (::cppu::OWeakObject*)this;
- aEvent.Selected = ( rButton.GetState() == STATE_CHECK ) ? 1 : 0;
+ aEvent.Selected = ( rButton.GetState() == TRISTATE_TRUE ) ? 1 : 0;
maItemListeners.itemStateChanged( aEvent );
}
}
@@ -862,10 +862,10 @@ void VCLXCheckBox::setState( short n ) throw(::com::sun::star::uno::RuntimeExcep
TriState eState;
switch ( n )
{
- case 0: eState = STATE_NOCHECK; break;
- case 1: eState = STATE_CHECK; break;
- case 2: eState = STATE_DONTKNOW; break;
- default: eState = STATE_NOCHECK;
+ case 0: eState = TRISTATE_FALSE; break;
+ case 1: eState = TRISTATE_TRUE; break;
+ case 2: eState = TRISTATE_INDET; break;
+ default: eState = TRISTATE_FALSE;
}
pCheckBox->SetState( eState );
@@ -890,9 +890,9 @@ short VCLXCheckBox::getState() throw(::com::sun::star::uno::RuntimeException)
{
switch ( pCheckBox->GetState() )
{
- case STATE_NOCHECK: nState = 0; break;
- case STATE_CHECK: nState = 1; break;
- case STATE_DONTKNOW: nState = 2; break;
+ case TRISTATE_FALSE: nState = 0; break;
+ case TRISTATE_TRUE: nState = 1; break;
+ case TRISTATE_INDET: nState = 2; break;
default: OSL_FAIL( "VCLXCheckBox::getState(): unknown TriState!" );
}
}
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 04572b055011..c342d83cc542 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -3422,7 +3422,7 @@ UnoDateFieldControl::UnoDateFieldControl()
{
mnFirst = util::Date( 1, 1, 1900 );
mnLast = util::Date( 31, 12, 2200 );
- mbLongFormat = AUTO_STATE_AUTO;
+ mbLongFormat = TRISTATE_INDET;
}
OUString UnoDateFieldControl::GetComponentServiceName()
@@ -3451,7 +3451,7 @@ void UnoDateFieldControl::createPeer( const uno::Reference< awt::XToolkit > & rx
uno::Reference < awt::XDateField > xField( getPeer(), uno::UNO_QUERY );
xField->setFirst( mnFirst );
xField->setLast( mnLast );
- if ( mbLongFormat != AUTO_STATE_AUTO ) // not set
+ if ( mbLongFormat != TRISTATE_INDET )
xField->setLongFormat( mbLongFormat );
}
@@ -3565,7 +3565,7 @@ util::Date UnoDateFieldControl::getLast() throw(uno::RuntimeException)
void UnoDateFieldControl::setLongFormat( sal_Bool bLong ) throw(uno::RuntimeException)
{
- mbLongFormat = bLong ? AUTO_STATE_ON : AUTO_STATE_OFF;
+ mbLongFormat = bLong ? TRISTATE_TRUE : TRISTATE_FALSE;
if ( getPeer().is() )
{
uno::Reference < awt::XDateField > xField( getPeer(), uno::UNO_QUERY );
@@ -3575,7 +3575,7 @@ void UnoDateFieldControl::setLongFormat( sal_Bool bLong ) throw(uno::RuntimeExce
sal_Bool UnoDateFieldControl::isLongFormat() throw(uno::RuntimeException)
{
- return ( mbLongFormat != AUTO_STATE_AUTO ) ? mbLongFormat : sal_False;
+ return ( mbLongFormat != TRISTATE_INDET ) ? mbLongFormat : sal_False;
}
void UnoDateFieldControl::setEmpty() throw(uno::RuntimeException)