summaryrefslogtreecommitdiffstats
path: root/forms/source/component/CheckBox.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-04-02 09:49:08 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-04-02 09:49:08 +0000
commit174cdfcb6230459de37944d0ece30a866a665543 (patch)
treec94636e364ed41b4ef995c9234c5a181a26f2c3f /forms/source/component/CheckBox.cxx
parentINTEGRATION: CWS frmvalidation (1.11.36); FILE MERGED (diff)
downloadcore-174cdfcb6230459de37944d0ece30a866a665543.tar.gz
core-174cdfcb6230459de37944d0ece30a866a665543.zip
INTEGRATION: CWS frmvalidation (1.10.36); FILE MERGED
2004/03/12 12:10:31 fs 1.10.36.2: #i21506# new services for validating form control values 2004/03/11 16:46:11 fs 1.10.36.1: mass checkin - #i25106# core for validating form controls via external XValidator instances - moved the services/interfaces related to binding form controls to external value suppliers into css.form.binding (out of drafts.css.form/component)
Diffstat (limited to 'forms/source/component/CheckBox.cxx')
-rw-r--r--forms/source/component/CheckBox.cxx46
1 files changed, 25 insertions, 21 deletions
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index eb29bb998b41..b39b0efd98b2 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CheckBox.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: obo $ $Date: 2003-10-21 08:54:43 $
+ * last change: $Author: rt $ $Date: 2004-04-02 10:49:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,6 +75,10 @@
#include <tools/debug.hxx>
#endif
+#ifndef _COMPHELPER_BASIC_IO_HXX_
+#include <comphelper/basicio.hxx>
+#endif
+
//.........................................................................
namespace frm
{
@@ -89,7 +93,7 @@ using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-using namespace ::drafts::com::sun::star::form;
+using namespace ::com::sun::star::form::binding;
//==================================================================
//= OCheckBoxControl
@@ -132,7 +136,7 @@ InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServic
DBG_NAME( OCheckBoxModel )
//------------------------------------------------------------------
OCheckBoxModel::OCheckBoxModel(const Reference<XMultiServiceFactory>& _rxFactory)
- :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_CONTROL_CHECKBOX, sal_False, sal_True )
+ :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_CONTROL_CHECKBOX, sal_False, sal_True, sal_True )
// use the old control name for compytibility reasons
{
DBG_CTOR( OCheckBoxModel, NULL );
@@ -166,12 +170,22 @@ IMPLEMENT_DEFAULT_CLONING( OCheckBoxModel )
StringSequence SAL_CALL OCheckBoxModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
- aSupported.realloc(aSupported.getLength() + 3);
- ::rtl::OUString* pArray = aSupported.getArray();
- pArray[aSupported.getLength()-3] = FRM_SUN_COMPONENT_BINDDB_CHECKBOX;
- pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_DATABASE_CHECKBOX;
- pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_CHECKBOX;
+ sal_Int32 nOldLen = aSupported.getLength();
+ aSupported.realloc( nOldLen + 8 );
+ ::rtl::OUString* pStoreTo = aSupported.getArray() + nOldLen;
+
+ *pStoreTo++ = BINDABLE_CONTROL_MODEL;
+ *pStoreTo++ = DATA_AWARE_CONTROL_MODEL;
+ *pStoreTo++ = VALIDATABLE_CONTROL_MODEL;
+
+ *pStoreTo++ = BINDABLE_DATA_AWARE_CONTROL_MODEL;
+ *pStoreTo++ = VALIDATABLE_BINDABLE_CONTROL_MODEL;
+
+ *pStoreTo++ = FRM_SUN_COMPONENT_CHECKBOX;
+ *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_CHECKBOX;
+ *pStoreTo++ = BINDABLE_DATABASE_CHECK_BOX;
+
return aSupported;
}
@@ -247,21 +261,11 @@ void OCheckBoxModel::fillProperties(
Sequence< Property >& _rProps,
Sequence< Property >& _rAggregateProps ) const
{
- FRM_BEGIN_PROP_HELPER(10)
- // the "State" property is transient, so change this
-// ModifyPropertyAttributes(_rAggregateProps, PROPERTY_STATE, PropertyAttribute::TRANSIENT, 0);
-
- DECL_PROP2(CLASSID, sal_Int16, READONLY, TRANSIENT);
+ BEGIN_DESCRIBE_PROPERTIES( 3, OBoundControlModel )
DECL_PROP1(REFVALUE, ::rtl::OUString, BOUND);
DECL_PROP1(DEFAULTCHECKED, sal_Int16, BOUND);
- DECL_PROP1(NAME, rtl::OUString, BOUND);
- DECL_PROP1(TAG, rtl::OUString, BOUND);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
- DECL_PROP1(CONTROLSOURCE, rtl::OUString, BOUND);
- DECL_IFACE_PROP3(BOUNDFIELD, XPropertySet, BOUND,READONLY, TRANSIENT);
- DECL_IFACE_PROP2(CONTROLLABEL, XPropertySet, BOUND, MAYBEVOID);
- DECL_PROP2(CONTROLSOURCEPROPERTY, rtl::OUString, READONLY, TRANSIENT);
- FRM_END_PROP_HELPER();
+ END_DESCRIBE_PROPERTIES();
}
//------------------------------------------------------------------------------