summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-03-09 12:25:58 +0000
committerOliver Bolte <obo@openoffice.org>2007-03-09 12:25:58 +0000
commit70c96ba1d33058e55d5a0c19101b39f30546f6cc (patch)
tree996eea415bbbe595878d2f1d57e03cac75678776
parent6a45d2a1753c3a52dbbedf8385e8024ebd6e97ab (diff)
INTEGRATION: CWS hb02 (1.41.44); FILE MERGED
2007/02/01 12:09:37 fs 1.41.44.2: #i74051# split describeFixedProperties in describeFixedProperties and describeAggregateProperties 2007/01/31 10:55:26 fs 1.41.44.1: changed handling of properties in the course of #i74051#
-rw-r--r--forms/source/component/FormattedField.cxx61
1 files changed, 26 insertions, 35 deletions
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 878e423df050..73c09529fdc0 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: FormattedField.cxx,v $
*
- * $Revision: 1.41 $
+ * $Revision: 1.42 $
*
- * last change: $Author: obo $ $Date: 2006-10-12 11:11:25 $
+ * last change: $Author: obo $ $Date: 2007-03-09 13:25:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -542,46 +542,37 @@ Sequence< Type > OFormattedModel::_getTypes()
// XPropertySet
//------------------------------------------------------------------------------
-Reference<com::sun::star::beans::XPropertySetInfo> SAL_CALL OFormattedModel::getPropertySetInfo() throw(RuntimeException)
-{
- Reference<com::sun::star::beans::XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
- return xInfo;
-}
-
-//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper& OFormattedModel::getInfoHelper()
-{
- return *const_cast<OFormattedModel*>(this)->getArrayHelper();
-}
-
-//------------------------------------------------------------------------------
-void OFormattedModel::fillProperties(
- Sequence< com::sun::star::beans::Property >& _rProps,
- Sequence< com::sun::star::beans::Property >& _rAggregateProps ) const
+void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OEditBaseModel )
DECL_BOOL_PROP1(EMPTY_IS_NULL, BOUND);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DECL_BOOL_PROP2(FILTERPROPOSAL, BOUND, MAYBEDEFAULT);
-
- // TreatAsNumeric nicht transient : wir wollen es an der UI anbinden (ist noetig, um dem EffectiveDefault
- // - der kann Text oder Zahl sein - einen Sinn zu geben)
- ModifyPropertyAttributes(_rAggregateProps, PROPERTY_TREATASNUMERIC, 0, PropertyAttribute::TRANSIENT);
- // same for FormatKey
- // (though the paragraph above for the TreatAsNumeric does not hold anymore - we do not have an UI for this.
- // But we have for the format key ...)
- // 25.06.2001 - 87862 - frank.schoenheit@sun.com
- ModifyPropertyAttributes(_rAggregateProps, PROPERTY_FORMATKEY, 0, PropertyAttribute::TRANSIENT);
-
- RemoveProperty(_rAggregateProps, PROPERTY_STRICTFORMAT);
- // no strict format property for formatted fields: it does not make sense, 'cause
- // there is no general way to decide which characters/sub strings are allowed during the input of an
- // arbitraryly formatted control
- // 81441 - 12/07/00 - FS
END_DESCRIBE_PROPERTIES();
}
//------------------------------------------------------------------------------
+void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
+{
+ OEditBaseModel::describeAggregateProperties( _rAggregateProps );
+
+ // TreatAsNumeric nicht transient : wir wollen es an der UI anbinden (ist noetig, um dem EffectiveDefault
+ // - der kann Text oder Zahl sein - einen Sinn zu geben)
+ ModifyPropertyAttributes(_rAggregateProps, PROPERTY_TREATASNUMERIC, 0, PropertyAttribute::TRANSIENT);
+ // same for FormatKey
+ // (though the paragraph above for the TreatAsNumeric does not hold anymore - we do not have an UI for this.
+ // But we have for the format key ...)
+ // 25.06.2001 - 87862 - frank.schoenheit@sun.com
+ ModifyPropertyAttributes(_rAggregateProps, PROPERTY_FORMATKEY, 0, PropertyAttribute::TRANSIENT);
+
+ RemoveProperty(_rAggregateProps, PROPERTY_STRICTFORMAT);
+ // no strict format property for formatted fields: it does not make sense, 'cause
+ // there is no general way to decide which characters/sub strings are allowed during the input of an
+ // arbitraryly formatted control
+ // 81441 - 12/07/00 - FS
+}
+
+//------------------------------------------------------------------------------
void OFormattedModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
OEditBaseModel::getFastPropertyValue(rValue, nHandle);
@@ -617,7 +608,7 @@ void OFormattedModel::setPropertyToDefaultByHandle(sal_Int32 nHandle)
//------------------------------------------------------------------------------
void OFormattedModel::setPropertyToDefault(const ::rtl::OUString& aPropertyName) throw( com::sun::star::beans::UnknownPropertyException, RuntimeException )
{
- OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)getInfoHelper();
+ OPropertyArrayAggregationHelper& rPH = impl_ts_getArrayHelper();
sal_Int32 nHandle = rPH.getHandleByName( aPropertyName );
if (nHandle == PROPERTY_ID_FORMATSSUPPLIER)
@@ -641,7 +632,7 @@ Any OFormattedModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
//------------------------------------------------------------------------------
Any SAL_CALL OFormattedModel::getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw( com::sun::star::beans::UnknownPropertyException, RuntimeException )
{
- OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)getInfoHelper();
+ OPropertyArrayAggregationHelper& rPH = impl_ts_getArrayHelper();
sal_Int32 nHandle = rPH.getHandleByName( aPropertyName );
if (nHandle == PROPERTY_ID_FORMATSSUPPLIER)