diff options
author | Noel Power <noel.power@suse.com> | 2013-04-29 19:41:45 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-04-29 20:20:11 +0100 |
commit | 8eb150e65632d9d04fe4d580471cdbdd9f80ccd4 (patch) | |
tree | 763893c117d74818033ea1d693023cc5a13b0f63 /vbahelper | |
parent | 56961599abffcb60fe405fa0e6c62dfe9bc22156 (diff) |
create togglebutton class ( for togglebutton on sheet )
Change-Id: If987eb6ed04d80e62b4b418e8f9de3a143ef68a7
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/msforms/vbacontrol.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index b788368b8df4..516cfa69247a 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -615,7 +615,14 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R case form::FormComponentType::COMBOBOX: return new ScVbaComboBox( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); case form::FormComponentType::COMMANDBUTTON: - return new ScVbaButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); + { + sal_Bool bToggle = sal_False; + xProps->getPropertyValue( "Toggle" ) >>= bToggle; + if ( bToggle ) + return new ScVbaToggleButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); + else + return new ScVbaButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); + } case form::FormComponentType::FIXEDTEXT: return new ScVbaLabel( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); case form::FormComponentType::TEXTFIELD: |