summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-04-29 19:41:45 +0100
committerNoel Power <noel.power@suse.com>2013-05-09 14:11:13 +0100
commitbb1ff2338396a665f2c83287c99945a2a7f7b73e (patch)
treee0a0c384a660d4a05d5e7001e591e404faa237d3 /vbahelper
parent89e1382ebfb4d6d868bf4baee37fe31c6fec0bc8 (diff)
create togglebutton class ( for togglebutton on sheet )
Change-Id: If987eb6ed04d80e62b4b418e8f9de3a143ef68a7
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx9
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: