summaryrefslogtreecommitdiff
path: root/toolkit/source/controls
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2001-10-17 07:47:10 +0000
committerMalte Timmermann <mt@openoffice.org>2001-10-17 07:47:10 +0000
commit4b7c6afb19379b43037030bb2db8d3a3ff64cb4a (patch)
tree584436395db7febcf0c5161f93c59ac26849c048 /toolkit/source/controls
parenta0e2e65247fa9b41592a1d6b69bd3cbbe735e798 (diff)
#91616# PushButtonType
Diffstat (limited to 'toolkit/source/controls')
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx5
-rw-r--r--toolkit/source/controls/unocontrols.cxx27
2 files changed, 27 insertions, 5 deletions
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 6b2e0f040e07..a1c349ad2df8 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrolmodel.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: mt $ $Date: 2001-10-12 12:30:23 $
+ * last change: $Author: mt $ $Date: 2001-10-17 08:47:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -347,6 +347,7 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 nPropId )
case BASEPROPERTY_LINECOUNT: aDefault <<= (sal_Int16) 5; break;
case BASEPROPERTY_ALIGN: aDefault <<= (sal_Int16) PROPERTY_ALIGN_LEFT; break;
case BASEPROPERTY_IMAGEALIGN: aDefault <<= (sal_Int16) 1 /*ImageAlign::TOP*/; break;
+ case BASEPROPERTY_PUSHBUTTONTYPE: aDefault <<= (sal_Int16) 0 /*PushButtonType::STANDARD*/; break;
case BASEPROPERTY_DATEMAX: aDefault <<= (sal_Int32) Date( 31, 12, 2200 ).GetDate(); break;
case BASEPROPERTY_DATEMIN: aDefault <<= (sal_Int32) Date( 1, 1, 1900 ).GetDate(); break;
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 0794cad2fdf8..10881365df6a 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrols.cxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: mt $ $Date: 2001-10-12 12:30:23 $
+ * last change: $Author: mt $ $Date: 2001-10-17 08:44:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1323,6 +1323,7 @@ UnoControlButtonModel::UnoControlButtonModel()
ImplRegisterProperty( BASEPROPERTY_IMAGEURL );
ImplRegisterProperty( BASEPROPERTY_LABEL );
ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
+ ImplRegisterProperty( BASEPROPERTY_PUSHBUTTONTYPE );
ImplRegisterProperty( BASEPROPERTY_STATE );
ImplRegisterProperty( BASEPROPERTY_TABSTOP );
}
@@ -1408,7 +1409,27 @@ UnoButtonControl::UnoButtonControl()
::rtl::OUString UnoButtonControl::GetComponentServiceName()
{
- return ::rtl::OUString::createFromAscii( "pushbutton" );
+ ::rtl::OUString aName( ::rtl::OUString::createFromAscii( "pushbutton" ) );
+ uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_PUSHBUTTONTYPE ) );
+ sal_Int16 n;
+ if ( ( aVal >>= n ) && n )
+ {
+ // Use PushButtonType later when available...
+ switch ( n )
+ {
+ case 1 /*PushButtonType::OK*/: aName= ::rtl::OUString::createFromAscii( "okbutton" );
+ break;
+ case 2 /*PushButtonType::CANCEL*/: aName= ::rtl::OUString::createFromAscii( "cancelbutton" );
+ break;
+ case 3 /*PushButtonType::HELP*/: aName= ::rtl::OUString::createFromAscii( "helpbutton" );
+ break;
+ default:
+ {
+ DBG_ERROR( "Unknown Button Type!" );
+ }
+ }
+ }
+ return aName;
}
// uno::XInterface