diff options
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblecheckbox.cxx')
-rw-r--r-- | accessibility/source/standard/vclxaccessiblecheckbox.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx index 8465562d2fe8..a0eff42c5874 100644 --- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx +++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx @@ -285,8 +285,7 @@ sal_Bool VCLXAccessibleCheckBox::setCurrentValue( const Any& aNumber ) { sal_Int32 nValue = 0, nValueMin = 0, nValueMax = 0; OSL_VERIFY( aNumber >>= nValue ); - OSL_VERIFY( getMinimumValue() >>= nValueMin ); - OSL_VERIFY( getMaximumValue() >>= nValueMax ); + nValueMax=implGetMaximumValue(); if ( nValue < nValueMin ) nValue = nValueMin; @@ -306,17 +305,20 @@ Any VCLXAccessibleCheckBox::getMaximumValue( ) OExternalLockGuard aGuard( this ); Any aValue; + aValue <<= implGetMaximumValue(); + return aValue; +} + +sal_Int32 VCLXAccessibleCheckBox::implGetMaximumValue( ) +{ VclPtr< CheckBox > pCheckBox = GetAs< CheckBox >(); if ( pCheckBox && pCheckBox->IsTriStateEnabled() ) - aValue <<= sal_Int32(2); - else - aValue <<= sal_Int32(1); + return 2; - return aValue; + return 1; } - Any VCLXAccessibleCheckBox::getMinimumValue( ) { OExternalLockGuard aGuard( this ); |