summaryrefslogtreecommitdiff
path: root/vbahelper/source/msforms/vbaradiobutton.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper/source/msforms/vbaradiobutton.cxx')
-rw-r--r--vbahelper/source/msforms/vbaradiobutton.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/vbahelper/source/msforms/vbaradiobutton.cxx b/vbahelper/source/msforms/vbaradiobutton.cxx
index 10dabf8c8abe..f15d8175d3d1 100644
--- a/vbahelper/source/msforms/vbaradiobutton.cxx
+++ b/vbahelper/source/msforms/vbaradiobutton.cxx
@@ -66,17 +66,16 @@ ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExceptio
sal_Int16 nOldValue = 0;
m_xProps->getPropertyValue( STATE ) >>= nOldValue;
- sal_Bool bValue = sal_False;
- if( _value >>= nValue )
- {
- if( nValue == -1)
- nValue = 1;
- }
- else if ( _value >>= bValue )
+ if( !( _value >>= nValue ) )
{
+ sal_Bool bValue = sal_False;
+ _value >>= bValue;
if ( bValue )
- nValue = 1;
+ nValue = -1;
}
+
+ if( nValue == -1)
+ nValue = 1;
m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
if ( nValue != nOldValue )
{